{"id":35743186,"url":"https://github.com/helsenorge/refero","last_synced_at":"2026-01-17T16:12:52.962Z","repository":{"id":41411161,"uuid":"488493333","full_name":"helsenorge/refero","owner":"helsenorge","description":"FHIR Questionnaire Form Filler React Component","archived":false,"fork":false,"pushed_at":"2026-01-06T14:07:10.000Z","size":16851,"stargazers_count":17,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-08T10:50:38.489Z","etag":null,"topics":["fhir","form-filler","react","sdc","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helsenorge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-04T07:32:40.000Z","updated_at":"2026-01-06T14:06:24.000Z","dependencies_parsed_at":"2023-11-15T10:31:47.967Z","dependency_job_id":"8cac7cfd-28af-4896-8650-e4d7a11b912a","html_url":"https://github.com/helsenorge/refero","commit_stats":null,"previous_names":[],"tags_count":360,"template":false,"template_full_name":null,"purl":"pkg:github/helsenorge/refero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsenorge%2Frefero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsenorge%2Frefero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsenorge%2Frefero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsenorge%2Frefero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helsenorge","download_url":"https://codeload.github.com/helsenorge/refero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsenorge%2Frefero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fhir","form-filler","react","sdc","typescript"],"created_at":"2026-01-06T16:05:09.035Z","updated_at":"2026-01-17T16:12:52.953Z","avatar_url":"https://github.com/helsenorge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @helsenorge/refero\n\nReact component that consumes a [FHIR Questionnaire](https://hl7.org/fhir/R4/questionnaire.html) object and renders it as a form.\n\n## PeerDependencies\n\n- [react](https://www.npmjs.com/package/react)\n- [react-dom](https://www.npmjs.com/package/react-dom)\n- [redux](https://www.npmjs.com/package/redux)\n- [react-redux](https://www.npmjs.com/package/react-redux)\n- [dompurify](https://www.npmjs.com/package/dompurify)\n- [@helsenorge/file-upload](https://www.npmjs.com/package/@helsenorge/file-upload)\n- [@helsenorge/datepicker](https://www.npmjs.com/package/@helsenorge/datepicker)\n- [@helsenorge/autosuggest](https://www.npmjs.com/package/@helsenorge/autosuggest)\n- [@helsenorge/designsystem-react](https://www.npmjs.com/package/@helsenorge/designsystem-react)\n\n## Dependencies\n\n- [firepath](https://www.npmjs.com/package/firepath)\n- [marked](https://www.npmjs.com/package/marked)\n- [uuid](https://www.npmjs.com/package/uuid)\n- [react-collapse](https://www.npmjs.com/package/react-collapse)\n- [react-hook-form](https://www.npmjs.com/package/react-hook-form)\n- [date-fns](https://www.npmjs.com/package/date-fns)\n- [classnames](https://www.npmjs.com/package/classnames)\n- [@helsenorge/core-utils](https://www.npmjs.com/package/@helsenorge/core-utils)\n- [@helsenorge/eslint-config](https://www.npmjs.com/package/@helsenorge/eslint-config)\n\n## Example usage\n\n```tsx\nimport React from 'react';\nimport { Provider } from 'react-redux';\nimport { configureStore } from '@reduxjs/toolkit';\nimport { Refero, rootReducer } from '@helsenorge/refero';\n\nconst store = configureStore({ reducer: rootReducer, middleware: getDefaultMiddleware =\u003e getDefaultMiddleware() });\n\nconst App = () =\u003e {\n    return (\n      \u003cProvider store={store}\u003e\n        \u003cRefero\n          questionnaire={...}\n          questionnaireResponse={...}\n          resources={...}\n          onCancel={...}\n          onSave={...}\n          onSubmit={...}\n          promptLoginMessage={...}\n          onRequestAttachmentLink={...}\n          onOpenAttachment={...}\n          onDeleteAttachment={...}\n          uploadAttachment={...}\n          loginButton={...}\n          authorized\n          sticky\n          pdf\n          onRequestHelpButton={...}\n          onRequestHelpElement={...}\n          attachmentMaxFileSize={...}\n          attachmentMaxFileSizePerFile={...}\n          attachmentValidTypes={...}\n          attachmentErrorMessage={...}\n          validationSummaryPlacement={...}\n          onChange={...}\n          onRenderMarkdown={...}\n          syncQuestionnaireResponse\n          blockSubmit={...}\n          language={...}\n          validateScriptInjection={...}\n          autoSuggestProps={...}\n          submitButtonDisabled={...}\n          saveButtonDisabled={...}\n          fetchValueSet={...}\n          fetchReceivers={...}\n          onFieldsNotCorrectlyFilledOut={...}\n          onStepChange={...}\n          renderCustomActionButton={...}\n          onFormViewChange={...}\n        /\u003e\n      \u003c/Provider\u003e\n    );\n};\n```\n\n## Props\n\n| Name                          | Required | Type                       | Default | Description                                                                                                                                                                             |\n| ----------------------------- | -------- | -------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| questionnaire                 |          | Questionnaire              | null    | FHIR Questionnaire object                                                                                                                                                               |\n| questionnaireResponse         |          | QuestionnaireResponse      | null    | FHIR QuestionnaireResponse object                                                                                                                                                       |\n| resources                     |          | Resources                  | null    | Resources object                                                                                                                                                                        |\n| onSubmit                      | true     | callback                   |         | Callback when user submits the form                                                                                                                                                     |\n| onSave                        | true     | callback                   |         | Callback when user saves the form                                                                                                                                                       |\n| onCancel                      | true     | callback                   |         | Callback when user cancels the form                                                                                                                                                     |\n| uploadAttachment              |          | callback                   | null    | Callback when user uploads attachment                                                                                                                                                   |\n| onDeleteAttachment            |          | callback                   | null    | Callback when user deletes attachment                                                                                                                                                   |\n| onOpenAttachment              |          | callback                   | null    | Callback when user opens attachment                                                                                                                                                     |\n| onRequestAttachmentLink       |          | callback                   | null    | Callback when the form needs to render a link to an attachment                                                                                                                          |\n| attachmentMaxFileSize         |          | number                     | 25M     | Max allowed file size for attachments in bytes. Default is 25M                                                                                                                          |\n| attachmentMaxFileSizePerFile  |          | number                     | 20M     | Max allowed file size per file for attachments in bytes. Default is 20M                                                                                                                 |\n| attachmentValidTypes          |          | string[]                   | ...     | List of allowed mime types for attachments. Default allowed types are: image/jpeg, image/png, application/pdf                                                                           |\n| attachmentErrorMessage        |          | string                     | null    | Text shown when file-upload fails to validate                                                                                                                                           |\n| promptLoginMessage            |          | callback                   | null    | Callback when the form needs to notify the user about authentication                                                                                                                    |\n| loginButton                   | true     | JSX.Element                |         | JSX for when the form needs to render a login button                                                                                                                                    |\n| authorized                    | true     | boolean                    |         | Whether or not the user is authorized/authenticated                                                                                                                                     |\n| pdf                           |          | boolean                    | false   | Renders the form without interactive elements                                                                                                                                           |\n| sticky                        |          | boolean                    | false   | Whether the actionbar (bar with buttons send/save) should be sticky                                                                                                                     |\n| onRequestHelpButton           |          | callback                   | null    | Callback when the form needs to render a help button                                                                                                                                    |\n| onRequestHelpElement          |          | callback                   | null    | Callback when the form needs to render a help element (help text)                                                                                                                       |\n| validationSummaryPlacement    |          | ValidationSummaryPlacement | null    | Controls the placement of the form validation summary                                                                                                                                   |\n| onChange                      |          | callback                   | null    | Callback when user enters an answer                                                                                                                                                     |\n| onRenderMarkdown              |          | callback                   | null    | Callback when the form needs to render markdown                                                                                                                                         |\n| syncQuestionnaireResponse     |          | boolean                    | false   | Will try to synchronize a Questionnaire and QuestionnaireResponse object                                                                                                                |\n| fetchValueSet                 |          | callback                   | null    | Callback when an autosuggest field will fetch data                                                                                                                                      |\n| autoSuggestProps              |          | AutoSuggestProps           | null    | Config for when and autosuggest field will call fetchValueSet                                                                                                                           |\n| blockSubmit                   |          | boolean                    | false   | Whether the form is disabled or not                                                                                                                                                     |\n| language                      |          | string                     | null    | Which locale is used for date related components (only en-gb and nb-no are supported)                                                                                                   |\n| validateScriptInjection       |          | boolean                    | false   | Whether script injection validation should be performed for string and text inputs                                                                                                      |\n| submitButtonDisabled          |          | boolean                    | false   | Whenther the submit button should be disabled or not                                                                                                                                    |\n| saveButtonDisabled            |          | boolean                    | false   | Whenther the save button should be disabled or not                                                                                                                                      |\n| fetchValueSet                 |          | callback                   |         | Callback when user triggers autosuggest fields                                                                                                                                          |\n| fetchReceivers                |          | callback                   |         | Callback when the receiver component is mounted                                                                                                                                         |\n| onFieldsNotCorrectlyFilledOut |          | callback                   |         | Callback when a field is incorrectly filled out                                                                                                                                         |\n| onStepChange                  |          | callback                   |         | Callback when the current step in step-views changes                                                                                                                                    |\n| useFormProps                  |          | UseFormProps               |         | Additional options passed to `react-hook-form`'s `useForm` hook.                                                                                                                        |\n| renderCustomActionButtons     |          | callback                   |         | A callback function that allows consumers to render their own custom buttons.                                                                                                           |\n| onFormViewChange              |          | callback                   |         | A callback function that is called when the form is initialized or if the form changes (example: step change). It accepts a ref of the element that wraps the form, and the step index. |\n\n### `questionnaire: Questionnaire`\n\nThis is the questionnaire to be rendered. It must be a [`Questionnaire`](https://hl7.org/fhir/R4/questionnaire.html) object.\n\n### `questionnaireResponse: QuestionnaireResponse`\n\nThis is the object that reflects the users answers. If the property is not specified, an empty\n[`QuestionnaireResponse`](https://hl7.org/fhir/R4/questionnaireresponse.html) will be generated.\n\n### `resources: Resources`\n\nThis object, of type [`Resources`](#Resources), specifies all the different texts the component makes use of.\n\n### `authorized: boolean`\n\nWhen this property is `true`, the form is rendered as normal, with submit and save buttons. When it is `false` the form is rendered without\nsubmit and save buttons, and while the user is allowed to fill out the form, at the first attempt to do so, a callback to\n`promptLoginMessage` is fired.\n\n### `pdf: boolean`\n\nWhen this property is `true`, the form is rendered in a read-only manner suitable for printing, when `false`, the form is rendered as usual.\n\n### `sticky: boolean`\n\nWhen this property is `true`, the form renders the actionbar as sticky.\n\n### `attachmentMaxFileSize: number`\n\nMax file size in bytes allowed for attachments. Default is 25M.\n\n### `attachmentValidTypes: MimeTypes[]`\n\nList of allowed mime types for attachments. Default allowed types are image/jpeg, image/png, application/pdf\n\n### `validationSummaryPlacement: ValidationSummaryPlacement`\n\nControls the placement of the form validation summary. See ['ValidationSummaryPlacement'](#ValidationSummaryPlacement) for possible values.\nIf not specified, it defaults to ValidationSummaryPlacement.Top\n\n### `syncQuestionnaireResponse: boolean`\n\nProvides limited assistance with synchronizing a Questionnaire and QuestionnaireResponse object. If an item is declared in the\nQuestionnaire, but is missing from the QuestionnaireResponse, it will try to synthesize an item with any potential children. Likewise, if an\nitem has been removed from the Questionnaire, it will be removed from the QuestionnaireResponse. It also supports limited help when an item\nhas changed its type, but only in the case where an answer element is provided in the QuestionnaireResponse item. It does not take any\nextension into consideration when creating new items.\n\nIn addition it will convert old linkIds for repeated items containing a caret (^) into new linkIds without. Eg. it will transform linkIds of\nthe form X^Y into just X, by stripping everything from the caret to the end of the linkId.\n\n### `autoSuggestProps: AutoSuggestProps`\n\nConfiguration for when autosuggest fields should call `fetchValueSet`. `minSearchCharacters` is the minumum number of letters which must be\ntyped before `fetchValueSet` will be called. Default value is 0. `typingSearchDelay` is the amount of milliseconds to wait after the user\nstop typing before calling `fetchValueSet`. Default value is 500.\n\n## Callback API\n\n### `onSubmit: () =\u003e void`\n\nThis callback is called when the user requests the current form to be submitted.\n\n### `onSave: () =\u003e void`\n\nThis callback is called when the user requests the current form to be saved.\n\n### `onCancel: () =\u003e void`\n\nThis callback is called when the user requests the current form to be cancled.\n\n### `uploadAttachment: (files: UploadFile[], onSuccess: (attachment: Attachment) =\u003e void) =\u003e void`\n\nThis callback is called when the user requests uploading an attachment. The callback is called with the following arguments:\n\n- `files: UploadFile[]` An array of [`UploadFile`](https://developer.mozilla.org/en-US/docs/Web/API/File) objects to be be uploaded.\n\n- `onSuccess: (attachment: Attachment) =\u003e void` Call this callback to indicate success\n\n### `onDeleteAttachment: (fileId: string, onSuccess: () =\u003e void) =\u003e void`\n\nThis callback is called when the user requests deleting an attachment. The callback is called with the following arguments:\n\n- `fileId: string` This indicates which file the user is requesting to delete\n- `onSuccess: () =\u003e void` Call this callback to indicate success.\n\n### `onOpenAttachment: (fileId: string) =\u003e void`\n\nThis callback is called when the user requests to open an attachment. The callback is called with the following arguments:\n\n- `fileId: string` This identifies the attachment, as described under `onDeleteAttachment`.\n\n### `onRequestAttachmentLink: (fileId: string) =\u003e string`\n\nThis callback is called when the form needs to render an `\u003ca href\u003e`-type link. The callback should return a link to the the attachment. The\ncallback is called with the following arguments:\n\n- `fileId: string` This identifies the attachment, as described under `onDeleteAttachment`.\n\n### `promptLoginMessage: () =\u003e void`\n\nThis callback is called when the form needs to notify the user about authentication. The callback could f.ex. show an alertbox to that\neffect.\n\n### `onRequestHelpButton: (item: QuestionniareItem, itemHelp: QuestionnaireItem, helpType: string, helpText: string, opening: boolean) =\u003e JSX.Element`\n\nThis callback is called when the form encounters an element with help. The callback should return a JSX.Element which is placed after the\nitems label. If this is not specified, a default implementation is provided. The callback is called with the following arguments:\n\n- `item: QuestionnaireItem` This is the item for which the help button is about to be rendered.\n- `helpItem: QuestionnaireItem` This is the item containing the raw help text.\n- `helpType: string` Type of help, either \"help\" or \"help-link\".\n- `helpText: string` The help text, either as plain text or html (in the case the help item had markdown)\n- `opening: boolean` This boolean indicates whether the help text is visible or not (open or closed)\n\n### `onRequestHelpElement: (item: QuestionnaireItem, itemHelp: QuestionniareItem, helpType: string, helpText: string, opening: boolean =\u003e JSX.Element`\n\nThis callback is called when the form encounters an element with help. The callback could return a JSX.Element which would be placed after\nthe items label. If this is not specified, a default implementation is provided. The callback is called with the following arguments:\n\n- `item: QuestionnaireItem` This is the item for which the help element is about to be rendered.\n- `helpItem: QuestionnaireItem` This is the item containing the raw help text.\n- `helpType: string` Type of help, either \"help\" or \"help-link\".\n- `helpText: string` The help text, either as plain text or html (in the case the help item had markdown)\n- `opening: boolean` This boolean indicates whether the help text is visible or not (open or closed)\n\n### `onChange: (item: QuestionnaireItem, answer: QuestionnaireResponseAnswer, actionRequester: IActionRequester, questionnaireInspector: IQuestionnaireInspector) =\u003e void`\n\nThis callback is called when the user enters an answer. The callback is called with the following arguments:\n\n- `item: QuestionnaireItem` This is the item the user answered.\n- `answer: QuestionnaireResponseAnswer` This is the actual answer the user entered.\n- `actionRequester: IActionRequester` Instance that facilitates programmatic changes to the questionnaire response.\n- `questionnaireInspector: IQuestionnaireInspector` Instance that lets users query the questionnaire for questionnaire items and\n  questionnaireResponse items.\n\n### `onRenderMarkdown: (item: QuestionnaireItem, markdown: string) =\u003e string`\n\nThis callback is called when the form needs to render markdown. It should return a HTML string representation of the markup. The callback is\ncalled with the following arguments:\n\n- `item: QuestionnaireItem` This is the item with the markdown.\n- `markdown: string` The actual markdown.\n\n### `fetchValueSet: (searchString: string, item: QuestionnaireItem, successCallback: (valueSet: ValueSet) =\u003e void, errorCallback(error: string) =\u003e void) =\u003e void`\n\nThis callback is called when an autosuggest field need to load data. It should call either successCallback with a valueSet, or errorCallback\nwith an error message.\n\n- `searchString: string` The value currently typed in the autosuggest field.\n- `item: QuestionnaireItem` This is the choice or open-choice item to load data for.\n- `successCallback: (valueSet: ValueSet) =\u003e void` The function to call to return a list of values to the autosuggest field, which will be\n  displayed as a list to the user.\n- `errorCallback(error: string) =\u003e void)` The function to call to return an error message to the autosuggest field, which will be displayed\n  to the user.\n\n### `fetchReceivers: (successCallback: (receivers: OrgenhetHierarki[]) =\u003e void, errorCallback: () =\u003e void) =\u003e void`\n\nThis callback is called when a receiver component needs to load data. It should call either successCallback with a list of OrgenhetHierarki\nobjects, or errorCallback with an error message.\n\n- `successCallback: (receivers: OrgenhetHierarki[]) =\u003e void` The function to call to return a list of OrgenhetHierarki objects to the\n  receiver component, which will be displayed as a set of choices to the user.\n- `errorCallback(error: string) =\u003e void)` The function to call to return an error message to the receiver component, which will be displayed\n  to the user.\n\n### `onFieldsNotCorrectlyFilledOut: () =\u003e void`\n\nThis callback is called when a required field is not filled out, or if a field is incorrectly filled out.\n\n### `onStepChange: (newIndex: number) =\u003e void`\n\nThis callback is called when the current step in a step-view changes. It takes in the parameter newIndex, which contains the new index that\nthe current index will be updated to. This can be used to make progress indicators display the correct step.\n\n### `onFormViewChange: (focusedElement: HTMLElement, stepIndex: number) =\u003e void`\n\nA callback function that is called when the form is initialized or if the form changes (example: step change). It accepts a ref of the\nelement that wraps the form.\n\n# Scoring Functionality\n\n## Description\n\nTo assign a value to a question to be used in scoring, use the **Answer option**.\n\n### Marking a Field as a Scoring Field\n\n![Scoring Field Toggle](./doc_images/img1.png)\n\nThe following codes are established to indicate that this element is used for scoring, as well as a code to specify that it is a question\n(Question score):\n\n```json\n{\n  \"system\": \"http://ehelse.no/Score\",\n  \"code\": \"score\",\n  \"display\": \"score\"\n}\n\n{\n  \"system\": \"http://ehelse.no/scoringFormulas\",\n  \"code\": \"QS\",\n  \"display\": \"Question score\"\n}\n```\n\nYou have the option to assign an \\`ordinalValue\\`—a decimal number—for each choice, which can be used in scoring.\n\n![Assigning Ordinal Values](./doc_images/img2.png)\n\n### Creating a Subtotal Field\n\nNext, create a field for a subtotal, e.g., for all scoring values within a group.  \nThis should be a numeric or decimal value.\n\n![Subtotal Field](./doc_images/img3.png)\n\nThe following codes indicate that this is a **Section Score**:\n\n```json\n{\n  \"system\": \"http://ehelse.no/Score\",\n  \"code\": \"score\",\n  \"display\": \"score\"\n}\n\n{\n  \"system\": \"http://ehelse.no/scoringFormulas\",\n  \"code\": \"SS\",\n  \"display\": \"Section score\"\n}\n```\n\n### Creating a Total Score Field\n\nFinally, create a field for the total score, covering all scoring values in the entire form:\n\n```json\n{\n  \"system\": \"http://ehelse.no/Score\",\n  \"code\": \"score\",\n  \"display\": \"score\"\n}\n\n{\n  \"system\": \"http://ehelse.no/scoringFormulas\",\n  \"code\": \"TS\",\n  \"display\": \"Total score\"\n}\n```\n\n### Example Form Layout\n\n![Example Form Layout](./doc_images/img4.png)\n\n# Mathematical Expressions\n\n## Description\n\n### Examples:\n\n#### Calculation: Integer, Decimal\n\n![Integer and Decimal Calculation](./doc_images/calc_img1.png)\n\nIn the sum field, the following is entered:\n\n![Calculation Formula](./doc_images/calc_img2.png)\n\n```\nQuestionnaireResponse.descendants().where(linkId='Value1').answer.value + QuestionnaireResponse.descendants().where(linkId='Value2').answer.value\n```\n\n#### Calculation Using Quantity Data from Two Fields (Height and Weight to Calculate BMI)\n\n![BMI Calculation](./doc_images/calc_img3.png)\n\nIn the sum field, the following is entered:\n\n```\nQuestionnaireResponse.descendants().where(linkId='Vekt').answer.value.value / ((QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value / 10000) * QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value)\n```\n\n\u003e **Note:**  \n\u003e Use \\`value.value\\` when working with quantities. For other numeric values, only \\`value\\` is used in the expressions.\n\nCustom units must follow the **FHIR Standard**:  \n[Datatypes-definitions - FHIR v4.0.1](https://www.hl7.org/fhir/datatypes.html)\n\n# Enum definitions\n\n## `ValidationSummaryPlacement`\n\n```ts\nenum ValidationSummaryPlacement {\n  Top = 'Top',\n  Bottom = 'Bottom',\n}\n```\n\n# Interface definitions\n\n## `IActionRequester`\n\n```ts\ninterface IActionRequester {\n  addIntegerAnswer(linkId: string, value: number, index?: number): void;\n  addDecimalAnswer(linkId: string, value: number, index?: number): void;\n  addChoiceAnswer(linkId: string, value: Coding, index?: number): void;\n  addOpenChoiceAnswer(linkId: string, value: Coding | string, index?: number): void;\n  addBooleanAnswer(linkId: string, value: boolean, index?: number): void;\n  addDateAnswer(linkId: string, value: string, index?: number): void;\n  addTimeAnswer(linkId: string, value: string, index?: number): void;\n  addDateTimeAnswer(linkId: string, value: string, index?: number): void;\n  addQuantityAnswer(linkId: string, value: Quantity, index?: number): void;\n  addStringAnswer(linkId: string, value: string, index?: number): void;\n\n  clearIntegerAnswer(linkId: string, index?: number): void;\n  clearDecimalAnswer(linkId: string, index?: number): void;\n  clearBooleanAnswer(linkId: string, index?: number): void;\n  clearDateAnswer(linkId: string, index?: number): void;\n  clearTimeAnswer(linkId: string, index?: number): void;\n  clearDateTimeAnswer(linkId: string, index?: number): void;\n  clearQuantityAnswer(linkId: string, index?: number): void;\n  clearStringAnswer(linkId: string, index?: number): void;\n\n  removeChoiceAnswer(linkId: string, value: Coding, index?: number): void;\n  removeOpenChoiceAnswer(linkId: string, value: Coding | string, index?: number): void;\n}\n```\n\n`IActionRequester` facilitates programmatic updates of the `QuestionnaireResponse`. All the `add*`, `clear*` and `remove*` methods, will\nqueue a change event when called. This queue will then be processed when the callback finishes.\n\n`linkId` is the linkId of the item to be updated. `value` is the value to update with. `index` is optional and defaults to `0`. It indicates\nwhich instance of an item should be updated in case it is a repeatable item.\n\n`removeChoiceAnswer` and `removeOpenChoiceAnswer` only removes answers in the case it is a check-box group. It is not possible to remove an\nanswer from a radio-button group or drop-down group.\n\n## `IQuestionnaireInspector`\n\n```ts\ninterface IQuestionnaireInspector {\n  findItemWithLinkIds(linkIds: string[]): QuestionnaireItemPair[];\n}\n```\n\n`IQuestionnaireInspector` lets the users query the state of the questionnaire for both `QuestionnaireItem` and `QuestionnaireResponse`.\n\n## `Path`\n\n```ts\ninterface Path {\n  linkId: string;\n  index?: number;\n}\n```\n\n## `QuestionniareItemPair`\n\n```ts\ninterface QuestionnaireItemPair {\n  QuestionnaireItem: QuestionnaireItem;\n  QuestionnaireResponseItems: ItemAndPath[];\n}\n\ninterface ItemAndPath {\n  item: QuestionnaireResponseItem;\n  path: Path[];\n}\n```\n\n## `TextMessage`\n\n```ts\ninterface TextMessage {\n  Title: string;\n  Body: string;\n}\n```\n\n## `UploadedFile`\n\n```ts\n// location: '@helsenorge/file-upload/components/dropzone'\ninterface UploadedFile {\n  id?: string;\n  name: string;\n}\n```\n\n## `Resources`\n\n```ts\ninterface Resources {\n  confirmDeleteButtonText: string;\n  confirmDeleteCancelButtonText: string;\n  confirmDeleteHeading: string;\n  confirmDeleteDescription: string;\n  validationNotAllowed: string;\n  formCancel: string;\n  formSend: string;\n  repeatButtonText: string;\n  errorAfterMaxDate: string;\n  errorBeforeMinDate: string;\n  oppgiVerdi: string;\n  oppgiGyldigVerdi: string;\n  deleteButtonText: string;\n  validationSummaryHeader: string;\n  selectDefaultPlaceholder: string;\n  supportedFileFormats: string;\n  ikkeBesvart: string;\n  formRequiredErrorMessage: string;\n  deleteAttachmentText: string;\n  uploadButtonText: string;\n  autoSuggestLoadError: string;\n  stringOverMaxLengthError: string;\n  chooseFilesText: string;\n  autosuggestNoSuggestions: string;\n  skipLinkText: string;\n  formSave: string;\n  openChoiceOption: string;\n  year_field_invalid: string;\n  year_field_required: string;\n  year_field_mindate: string;\n  year_field_maxdate: string;\n  yearmonth_field_month_placeholder: string;\n  yearmonth_field_required: string;\n  adresseKomponent_header: string;\n  adresseKomponent_sublabel: string;\n  adresseKomponent_velgHelseregion: string;\n  adresseKomponent_velgHelseforetak: string;\n  adresseKomponent_velgSykehus: string;\n  adresseKomponent_velgAvdeling: string;\n  adresseKomponent_skjemaSendesTil: string;\n  adresseKomponent_feilmelding: string;\n  adresseKomponent_loadError: string;\n  adresseKomponent_velgKlinikk: string;\n  adresseKomponent_velgSeksjon: string;\n  adresseKomponent_velgSengepost: string;\n  adresseKomponent_velgPoliklinikk: string;\n  adresseKomponent_velgTjeneste: string;\n  linkOpensInNewTab: string;\n  nextStep: string;\n  previousStep: string;\n  maxCharactersText: string;\n  attachmentError_minFiles: string;\n  attachmentError_maxFiles: string;\n  attachmentError_fileSize: string;\n  attachmentError_fileType: string;\n  dateError_invalid: string;\n  dateError_time_invalid: string;\n  dateLabel_january: string;\n  dateLabel_february: string;\n  dateLabel_march: string;\n  dateLabel_april: string;\n  dateLabel_may: string;\n  dateLabel_june: string;\n  dateLabel_july: string;\n  dateLabel_august: string;\n  dateLabel_september: string;\n  dateLabel_october: string;\n  dateLabel_november: string;\n  dateLabel_december: string;\n  dateFormat_ddmmyyyy: string;\n  timeError_hours_digits: string;\n  timeError_minutes_digits: string;\n  dateLabel_year: string;\n  dateLabel_month: string;\n  attachmentError_minFiles_and_maxFiles: string;\n  quantity_unit_sublabel: string;\n  formOptional: string;\n  formRequired: string;\n  formAllOptional: string;\n  formAllRequired: string;\n  formRequiredInputs: string;\n  formRequiredSingleCheckbox: string;\n  formRequiredMultiCheckbox: string;\n  formRequiredRadiobuttonList: string;\n}\n```\n\n## `AutoSuggestProps`\n\n```ts\ninterface AutoSuggestProps {\n  minSearchCharacters: number;\n  typingSearchDelay: number;\n}\n```\n\n## `ValueSet`\n\n```ts\ninterface ValueSet extends DomainResource {\n  // ValueSet as defined by the FHIR standard\n}\n```\n\n## `OrgenhetHierarki`\n\n```ts\ninterface OrgenhetHierarki {\n  OrgenhetId: number;\n  Navn: string;\n  EnhetType: EnhetType;\n  EndepunktId: string | null;\n  UnderOrgenheter: OrgenhetHierarki[] | null;\n}\n\nenum EnhetType {\n  Region = 1,\n  Foretak = 2,\n  Sykehus = 3,\n  Klinikk = 4,\n  Avdeling = 5,\n  Seksjon = 6,\n  Sengepost = 7,\n  Poliklinikk = 8,\n  Tjeneste = 9,\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelsenorge%2Frefero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelsenorge%2Frefero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelsenorge%2Frefero/lists"}