Use of POST openspecimen/rest/ng/specimens/collect
Use this REST API is to create aliquots for given specimen.
You can create aliquots through POST URL http://<host>:<port>/catissuecore/rest/ng/specimens/{specimenId}/aliquots
specimenId refers to the identifier of the specimen for which you want to create aliquotexisting specimen.
Parameter Details :The aliquot
creation This API requires the following parameters in json request :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 | ||||||
---|---|---|---|---|---|---|---|
noOfAliquots | Number of aliquots to create from specimen.It is mandatory field. | ||||||
quantityPerAliquot [optional]label | Label given to aliquot. | ||||||
initialQty | Specimen quantity to create each aliquot.
| storageLocations [optional] | |||||
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 list array of created aliquots. If parent specimen is closed then parent specimen detail object with created aliquot details in children array.
API Example :
URL | http://<host>:<port>/ catissuecore/openspecimen/rest/ng/specimens/{specimenId}/aliquotscollect | ||
Request | application/json | ||
Method | POST | ||
json | "id"[ { "noOfAliquotsinitialQty":2"10", "quantityPerAliquotlabel":2"label1", "storageLocationsvisitId":[{"containerName1, "storageLocation":{"name":"Fluid Container"}, "parentId":1, "lineage":"Aliquot", "status":"cont1Collected", "positionXcreatedOn":"X2015-12-03T04:37:03.779Z", "positionYchildren":[], "YspecimensPool":[] }, { "containerNameinitialQty":"cont210", "positionXlabel":"Xlabel2","positionY "visitId":1, "storageLocation":{"name":"Y"} ], } | Response | Fluid Container"}, "parentId":1, "lineage":"Aliquot", "status":"Collected", "createdOn":"2015-12-03T04:37:03.779Z", "children":[], "specimensPool":[] } ] |
Response |
"comment": null, "createdOn": "04-04-2014 ", "collectionStatus": " Collected", "specimenCollectionGroup": {
"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": ""}
|
Response Status :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Aliquots has been created successfully |
400 | All requests | Invalid parameters, like noOfAliquots label should be greater than 0unique, Insufficient parent 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 |