Leave a comment at the end of this page or email contact@krishagni.com
Calculated URL
From v11 onwards
For version v11 onwards, the syntax for the displayExpr is changed.
If the URL is https://demo.openspecimen.org/ui-app/#/cp-view/734/participants/6840/visit/54017/specimen/193275/overview then the displayExpr is as below
//Example Code
{
"name" : "calcSpecimen.computedUrl",
"caption" : "URL",
"type" : "text",
"displayExpr" : "'https://demo.openspecimen.org/ui-app/#/cp-view/' + cpr.cpId + '/participants/' + cpr.id + '/visit/' + specimen.visitId + '/specimen/' + specimen.id + '/overview'",
"linkText" : "View Image"
},
Before v11
From v10.2 onwards on the JSON-configured overview page, calculated fields can be used to display the hyperlinked URLs.
If the URL for the record is ‘https://test.openspecimen.org/#/cp-view/6636/participants/176857/detail/overview ', you need to configure displayExpr as 'https://test.openspecimen.org/#/cp-view/{{cpr.cpId} }/participants/{{cpr.id}}/detail/overview’
//Example Code
{
"name" : "calcSpecimen.computedUrl",
"caption" : "Specimen overview page",
"type" : "text",
"displayExpr" : "https://test.openspecimen.org/#/cp-view/{{cpr.cpId}}/participants/{{cpr.id}}/visits/specimens/detail/overview?specimenId={{specimen.id}}&visitId={{specimen.visitId}}",
"linkText" : "View Image"
}
On the user interface, the field will be displayed hyperlinked.
Below is the list of fields that are available to be used in the JSON
Field | Syntax |
Collection Protocol Identifier | cpr.cpId |
Participant Registration Identifier | participant.id |
Participant Identifier | cpr.id |
Visit Identifier | specimen.visitId |
Specimen Identifier | specimen.id |
Leave a comment at the end of this page or email contact@krishagni.com