Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for hiding characters in a questions through an extension #3265

Merged
merged 4 commits into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,69 @@ eventType |The intention of the eventWorkflow. E.g close resources | yes | RESOU
triggerConditions | This defines an array of condition for to be met for the event to run | no | null |
eventResourceId | uniqueId of resource id to be closed | yes | |
eventResources | A list of resources to close(Type of ResourceConfig) | yes | | |


## Hiding characters in a questionnaire
We can hide sensitive information typed on a questionnaire through adding a linkId extension. A sample linkId with password-widget extension looks like
``` json
{
"extension": [
{
"url": "https://github.com/google/android-fhir/StructureDefinition/questionnaire-itemControl",
"valueString": "password-widget"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/minLength",
"valueInteger": 16
},
{
"url": "http://ehelse.no/fhir/StructureDefinition/validationtext",
"valueString": "NIK number should be of 16 digits"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/regex",
"valueString": "^\\+?(?:[()\\h-]*\\d[()\\h-]*){16}$"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-display-category",
"code": "instructions"
}
]
}
}
],
"linkId": "82a80049-8d2d-4008-81aa-55356b9d6628",
"text": "NIK number",
"_text": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "id"
},
{
"url": "content",
"valueString": "Nomor Induk Kependudukan (NIK)"
}
]
}
]
},
"type": "string",
"required": false,
"maxLength": 16
}
```
Below is the specific extension for this. The extension is validated at class called [PasswordViewHolderFactory](https://github.com/opensrp/fhircore/blob/main/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/sdc/PasswordViewHolderFactory.kt)
``` json
{
"url": "https://github.com/google/android-fhir/StructureDefinition/questionnaire-itemControl",
"valueString": "password-widget"
}
```
Loading