Got feedback or spotted a mistake?
Leave a comment at the end of this page or email contact@krishagni.com
Make the fields read-only
When the values for fields is coming from the HL7 or any other system to the OpenSpecimen at that time user doesn't allow to edit those fields on OpenSpecimen UI.
To achieve that, the user is able to make those fields read -only by configuring the below code in the JSON workflow.
Below is the list of different attribute types that can be made as read-only.
Attribute Type | Description | Example JSON |
---|---|---|
Text | Gender field made as read-only by setting 'type: span" | text field { "name" : "cpr.participant.gender", "caption" : "Gender", "type" : "span", "attr" : "gender", "optional" : true }, |
date | To made the date field as read-only, set the "type" : "span" and "formatType" : "date" | date { "name" : "cpr.participant.birthDate", "caption" : "Birth Date", "type" : "span", "formatType" : "date", "dateOnly" : true, "optional" : true }, |
Number | Made the customs form field as read-only | Custom form field { "name" : "specimen.extensionDetail.attrsMap.ST30", "caption" : "Time Lapse", "type" : "span", "optional" : true } |
Dropdown(custom field) | A drop-down field from the custom form is also able to make as read-only by setting the "type": "span" from "dropdown" | dropdown { "name": "specimen.extensionDetail.attrsMap.DD20", "caption": "Method", "type": "span", "optional": true, "listSource": { "apiUrl": "forms/permissible-values", "selectProp": "value", "displayProp": "value", "queryParams": { "dynamic": {}, "static": { "formName": "SpecimenAdditionalFields", "controlName": "DD20" } } } } |
Radiobutton | Made radio button field read-only by specifying the "type": "span". | radio { "name": "specimen.extensionDetail.attrsMap.RB2", "caption": "Medical data base", "type": "span", "optional": true, "options": ["Yes","No"], "defaultValue": "Yes" } |
Checkbox | Made Checkbox to the read-only field by specifying "type": "span". | checkbox { "name": "specimen.incrParentFreezeThaw", "caption": "Increment parent specimen's Freeze/Thaw cycles?", "type": "span", "optional": true, "options": [ { "caption": "Yes", "value": 1 }, { "caption": "No", "value": 0 } ] } |
Got feedback or spotted a mistake?
Leave a comment at the end of this page or email contact@krishagni.com