Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GET openspecimen/rest/ng/specimens?label={labelslabel1}&label={label2}&cprId={cprId}&eventId={eventId}&visitId={visitId}

...

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.
This is the array of string. You can specify comma separated labels for multiple labels.
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]Event ID of anticipated specimen.
This
Either this parameter or visitId parameter needs to be provided
with
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.


Result:

The response of this request will contains the details of the specimens.

Below is the example of the get specimens:

URLopenspecimen/rest/ng/specimens?label=b1
,
&label=b2
MethodGET
Requestapplication/json

Response

[

  {

    "id": 8,

    "cpId": 1,

    "cprId": 1,

    "eventId": null,

    "visitId": 1,

    "visitName": "first visit",

    "cpShortTitle": "blood",

    "reqId": null,

    "sortOrder": null,

    "label": "b1",

    "barcode": null,

    "type": "Whole Blood",

    "specimenClass": "Fluid",

    "lineage": "Aliquot",

    "anatomicSite": "Autonomic nervous system, NOS",

    "laterality": "Not Applicable",

    "status": "Collected",

    "reqLabel": null,

    "pathology": "Malignant, Pre-Invasive",

    "initialQty": 20,

    "availableQty": 20,

    "available": true,

    "concentration": 10,

    "parentId": 1,

    "parentLabel": "blood1",

    "storageLocation": {

      "id": 1,

      "name": "Fluid Container",

      "positionX": "5",

      "positionY": "A"

    },

    "storageType": null,

    "collectionContainer": null,

    "activityStatus": "Active",

    "createdOn": 1449500400000,

    "code": null,

    "distributed": null

  },

  {

    "id": 9,

    "cpId": 1,

    "cprId": 1,

    "eventId": null,

    "visitId": 1,

    "visitName": "first visit",

    "cpShortTitle": "blood",

    "reqId": null,

    "sortOrder": null,

    "label": "b2",

    "barcode": null,

    "type": "Whole Blood",

    "specimenClass": "Fluid",

    "lineage": "Aliquot",

    "anatomicSite": "Autonomic nervous system, NOS",

    "laterality": "Not Applicable",

    "status": "Collected",

    "reqLabel": null,

    "pathology": "Malignant, Pre-Invasive",

    "initialQty": 20,

    "availableQty": 20,

    "available": true,

    "concentration": 10,

    "parentId": 1,

    "parentLabel": "blood1",

    "storageLocation": {

      "id": 1,

      "name": "Fluid Container",

      "positionX": "6",

      "positionY": "A"

    },

    "storageType": null,

    "collectionContainer": null,

    "activityStatus": "Active",

    "createdOn": 1449500400000,

    "code": null,

    "distributed": null

  }

]

 

Error Cases :

code
Applies to
Status Message
200All resourcesSpecimens got successfully
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations