Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

Use this resource to get specimens with specific parameters. This API returns all the matching specimens based on the parameters 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]Event ID of 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.


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
  • No labels