openspecimen/rest/ng/specimens
or
Table of Contents
Specimen details provided multiple parameters.
GET openspecimen/rest/ng/specimens?startlabel={label1}&label={startlabel2}&maxcprId={maxResultscprId}&searchStringeventId={searchStringeventId}&countReqvisitId={true/falsevisitId}
Use this resource to get specimens with specific parameters. This API returns all the matching specimens based on the searchString, if searchString not specified then it returns all the specimens present in the openSpecimen applicationparameters provided.
Use HTTP GET method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
Parameter | Details |
---|
label [optional] | The |
label of the specimen which you want |
. Users can search for multiple specimens by providing multiple label values in URL query string |
cprId [optional] |
Collection Protocol Registration ID of that specimen. |
eventId [optional] |
http[s]:<host>:<port>/openspecimen/rest/ng/specimens
Use this URL to get users in openSpecimen application.
Result:
Event ID of the anticipated specimen. Either this parameter or visitId parameter needs to be provided when searching based on cprId. | |
visitId [optional] | Visit ID under which the specimen is collected. Either this parameter or eventId parameter needs to be provided when searching based on cprId. |
The response of this request will contains contain the details of the specimens. Below is the example of the get specimens:
Expand | ||
---|---|---|
| ||
|
...
|
Specimen custom fields provided the specimen label.
GET openspecimen/rest/ng/specimens?label={label}&exactMatch=true&includeExtensions=true
Use this resource to get a specimen custom field by providing the specimen label. Specimen custom field details will be found under the 'extensionDetail' element.
Expand | ||
---|---|---|
| ||
|
...
|
...
"barcode" : "",
"biohazardDetails" : [ ],
"collectionStatus" : "Collected",
"comment" : "creating an adhoc specimen.",
"createdOn" : "2014-02-21",
"externalIdentifierDetails" : [ ],
"id" : 2,
"initialQuantity" : 2.0,
"label" : "Tissue1",
"lineage" : "New",
"pathologicalStatus" : "Metastatic",
"scgId" : 1,
"specimenClass" : "Tissue",
"specimenType" : "Fixed Tissue",
"tissueSide" : "Left",
"tissueSite" : "Nasal cavity"
}]
|
Specimen details provided specimen id.
GET openspecimen/rest/ng/specimens/{specimen_id}
Use this resource to get specimen details by specimen id.
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Specimens got successfully |
401 | All requests | Authorization failed, the user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |