Create Aliquots for specified specimen
...
{
"count":1,
"quantityPerAliquot":2,
"positions":[
{"containerName":"cont1","position1":"a","position2":"b"},
{"containerName":"cont2","position1":"a","position2":"b"}
],
"specimenId":97
}
...
{
[
{
"id":1,
"tissueSite" : "S1",
"tissueSide" : "Tissue",
"pathologicalStatus" : "Not Specified",
"lineage": "Aliquot",
"initialQuantity": 2,
"availableQuantity": 2,
"specimenClass": "Tissue",
"specimenType": "Fresh Tissue",
"concentrationInMicrogramPerMicroliter": " 1",
"label": "29_1",
"activityStatus": "Active",
"isAvailable": "true",
"barcode": " 1111",
"comment": null,
"createdOn": "04-04-2014 ",
"collectionStatus": " Collected",
"specimenCollectionGroup": {"id": 1, "name": "TestSCG", ...},
"biohazardCollection": {"id":1 , "name": "RadioActive" , "type" : "RadioActive"},
"externalIdentifierCollection": {"id": 1, "name": "", "value": ""}
},
{
"id":2,
"tissueSite" : "S1",
"tissueSide" : "Tissue",
"pathologicalStatus" : "Not Specified",
"lineage": "Aliquot",
"initialQuantity": 2,
"availableQuantity": 2,
"specimenClass": "Tissue",
"specimenType": "Fresh Tissue",
"concentrationInMicrogramPerMicroliter": " 1",
"label": "29_1",
"activityStatus": "Active",
"isAvailable": "true",
"barcode": " 1111",
"comment": null,
"createdOn": "04-04-2014 ",
"collectionStatus": " Collected",
"specimenCollectionGroup": {"id": 1, "name": "TestSCG", ...},
"biohazardCollection": {"id":1 , "name": "RadioActive" , "type" : "RadioActive"},
"externalIdentifierCollection": {"id": 1, "name": "", "value": ""}
}
...
POST openspecimen/rest/ng/specimens/collect
Use this REST API is to create aliquots for existing specimen
Parameter Details :
This API accepts the array of aliquots details in JSON format. Each element in array is considered as single aliquot.
Below are parameters for single aliquot detail.
Parameter | Details | ||||||
---|---|---|---|---|---|---|---|
label | Label given to aliquot. | ||||||
initialQty | Specimen quantity to create aliquot. | ||||||
visitId | Visit id under which the parent specimen is present. | ||||||
parentId | Parent specimen id of which aliquot will be created. | ||||||
storageLocation [optional] | Storage location to store the created aliquot. The location detail is also a JSON object, which contains :
| ||||||
lineage | This property value should be "Aliquot". This property is used to show that we want to create aliquot of specimen. | ||||||
status | This value shows the aliquot status. This value should be "Collected". | ||||||
createdOn | The date:time on which the aliquot is created. | ||||||
closeAfterChildrenCreation [optional] | This is boolean property. Possible values are true, false. If value is present on parent specimen detail object then the parent specimen will be closed after aliquots are created. | ||||||
children | This is the JSON array of specimen details object. If we are specifying the the closeAfterChildrenCreation option to close the parent specimen then the children array will contain the object of aliquots details which needs to be created. | ||||||
specimenPool | This is the JSON array of specimen detail object. This object contains the details of specimens. |
Result :
Response of this request contains array of created aliquots. If parent specimen is closed then parent specimen detail object with created aliquot details in children array.
API Example :
URL | openspecimen/rest/ng/specimens/collect |
Request | application/json |
Method | POST |
json | [ { "initialQty":"10", "label":"label1", "visitId":1, "storageLocation":{"name":"Fluid Container"}, "parentId":1, "lineage":"Aliquot", "status":"Collected", "createdOn":"2015-12-03T04:37:03.779Z", "children":[], "specimensPool":[] }, { "initialQty":"10", "label":"label2", "visitId":1, "storageLocation":{"name":"Fluid Container"}, "parentId":1, "lineage":"Aliquot", "status":"Collected", "createdOn":"2015-12-03T04:37:03.779Z", "children":[], "specimensPool":[] } ] |
Response |
|
Response Status :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Aliquots has been created successfully |
400 | All requests | Invalid parameters, like label should be unique, Insufficient quantity, Specified container has no space to store aliquots |
401 | All requests | Authorization failed, User doesn't have Authority to create Aliquot |
500 | All requests | Internal server error, Encountered server error while performing operations |