wiki:OpenSpecimen HowTo Use Expedited Entry for a Study

Version 4 (modified by Richard Bramley, 9 years ago) ( diff )

--

OpenSpecimen HowTo Use Expedited Entry for a Study

Tags: OpenSpecimen HowTo

Procedure

The settings are set using the REST API. See OpenSpecimen REST API Documentation.

  • The cp_id is the id of the protocol and can be obtained from the URL when viewing the protocol or its participants. For example https://www15.lamp.le.ac.uk/openspecimen/#/cp-view/12/participants
  • Use Postman or other HTTP utility to make the following request:
URL
http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols/{cp_id}/workflows
Method
PUT
Content-Type
application/json
parameter
cp_id using the value from above.
Request Body
[
  {
    "name":"registerParticipant",
    "view":"plugin-ui-resources/le/collect-specimens.html",
    "ctrl":"leRegAndCollectSpecimensCtrl",
    "data":{
      "boxOpts":{
        "dimension":{
          "rows":8,
          "columns":12
        },
        "compact":false
      }
    }
  }
]
Response Body
{
    "cpId": <cp_id>,
    "shortTitle": <cp_short_title>,
    "workflows": {
        "registerParticipant": {
            "name": "registerParticipant",
            "view": "plugin-ui-resources/le/collect-specimens.html",
            "ctrl": "leRegAndCollectSpecimensCtrl",
            "data": {
                "boxOpts": {
                    "dimension": {
                        "rows": 8,
                        "columns": 12
                    },
                    "compact": false
                }
            }
        }
    }
}
The setting can be deleted by updating all the values to empty using the REST API. For example
[
  {
    "name": "",
    "view": "",
    "ctrl": "",
    "data": {  }
  }
]

Error: Macro BackLinks(None) failed
'Environment' object has no attribute 'get_db_cnx'

Note: See TracWiki for help on using the wiki.