Feature available in v5.0 and onwards. Below mentioned code block is to setup the visit lookup step. For searching the participants, MRN/EMPI can be used and for visits 'Visit name' or 'Accession Number'
visitsLookup
{ "name": "visitsLookup", "data": { "enable": true, /* matchTableOpts is used to sort matching visit based on Visit date*/ "matchTableOpts": { "sortAttr": "visit.visitDate", "sortDirection": "desc" }, "matchTable": [ { "name": "visit.name", "baseField": "visit.name", "caption": "Bank Number" }, { "name": "visit.visitDate", "baseField": "visit.visitDate" }, { "name": "visit.surgicalPathologyNumber", "baseField": "visit.surgicalPathologyNumber", "caption": "Accession Number" } ], "searchAttrs": [ { "attr": "EMPI_MRN", "caption": "MRN" }, { "attr": "VISIT_NAME", "caption": "Bank Number" }, { "attr": "SPR_NO", "caption": "Accession Number" } ] } }
The configured fields will be displayed on the search visits page
On searching for a participant that has 2 visits added, OpenSpecimen will fetch both the visits in the results table. User can then select from these visits and add specimens to them. The fields added in the 'matchTable' section will be displayed as the columns in the results table.