Skip to content

Commit

Permalink
Update editing.mdx (#3255)
Browse files Browse the repository at this point in the history
* Update editing.mdx

add about readOnlyLinkIds

* update editing docs

* update editing docs

---------

Co-authored-by: ageryck <[email protected]>
  • Loading branch information
AbdulWahabMemon and ageryck authored May 20, 2024
1 parent b97ceea commit d47d3c9
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/engineering/android-app/configuring/editing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ You can manage edits through
1. complex structure maps to ensure that any potential downstream effects of an edit (like changing CarePlan or Task status) are accounted for, or
2. limiting what is editable to only those fields(data elements) that do not have downstream affects.

We suggest following approach (2.) to reduce the chance of errors and the resulting inconsistent data.
We suggest following approach (2) above to reduce the chance of errors and the resulting inconsistent data. This approach can be implemented using the two options suggested below;

## Limiting what is editable

## Toggle visibility for select questionnaire items

Below we describe how to limit what is editable while reusing the same FHIR resources that created the data. This assumes that you have

- a Questionniare that data is originally entered in and will be edited in,
Expand Down Expand Up @@ -68,3 +70,22 @@ Below we describe how to limit what is editable while reusing the same FHIR reso
```

4. Launch the Questionnaire from an edit menu just as would is creating, but prepopulate the previously captured items. This approach allows to you to use the existing Questionnaire and StructureMap.

## Block select questionnaire items from editing

# Using ```readOnlyLinkIds``` config

Below we defines how we can limit the Edit to QuestionnaireItems in Edit Mode

For the Questionnaire with Edit Mode, Assign the list of QuestionnaireItems->link-ids to the property readOnlyLinkIds of QuestionnaireConfig : like

>```
> "readOnlyLinkIds": [
> "0740ed31-554a-4069-81d9-08f9f1697a03",
> "6c2d4f74-84d5-49cd-81dd-a53e101a6899",
> "5f06debf-721a-457d-8540-65cac95be9a1",
> "e5bb0db6-82a0-4200-b421-334da8a916a4"
> ]
>```
This list is handled with fhircore app function named ```prepareQuestionsForReadingOrEditing``` to restrict the input behaviour on the provided link-ids fields when Questionnaire is rendered, this allows for visbility of the data capruted previously however user is unable to make edits.

0 comments on commit d47d3c9

Please sign in to comment.