Versions Compared

Key

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

Use of   POST openspecimen/rest/ng/specimens/collect

Use this REST API is to create aliquots for given existing specimen.

You can create aliquots through POST URL   http://<host>:<port>/catissuecore/rest/ng/specimens/{specimenId}/aliquots

Parameter Details :The aliquot

creation This API takes 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
noOfAliquotsNumber of aliquots to create from specimen
quantityPerAliquotlabelLabel given to aliquot.
initialQty

Specimen quantity to create

each

aliquot

Positions
List of positions to store created aliquot.
List Contains

 

containerName

.

visitIdVisit id under which the parent specimen is present.
parentIdParent 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 :

 

nameName of Container
positionX [optional]X Position in container
positionY [optional]Y Position in container

 

  • As Position is optional, If not given then aliquots will be stored virtually.
  • If only container name is given then first available position will be allocated in specified container.If position is not available then throws error message.
lineageThis property value should be "Aliquot". This property is used to show that we want to create aliquot of specimen.
statusThis value shows the aliquot status. This value should be "Collected".
createdOnThe 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}/aliquots
collect
Requestapplication/json
MethodPOST
json

[

{

"initialQty":"10",

"count

"label":"label1",

"visitId":1,

"storageLocation":{"name":"Fluid Container"},

"parentId":1,

"quantityPerAliquot":2

"lineage":"Aliquot",

"status":"Collected",

"createdOn":"2015-12-03T04:37:03.779Z",

"children":[],

"

positions

specimensPool":[]

},

{

"

containerName

initialQty":"

cont1

10",

"

position1

label":"

X","position2

label2",

"visitId":1,

"storageLocation":{"name":"

Y

Fluid Container"},

{"containerName

"parentId":1,

"lineage":"

cont2

Aliquot",

"

position1

status":"

X

Collected",

"

position2

createdOn":"

Y"}

2015-12-03T04:37:03.779Z",

"children":[],

"specimensPool":[]

}

]

Response

{

  1. [
  2.    {
  3.        "id": 12,
  4.        "cpId": 1,
  5.        "cprId": 1,
  6.        "eventId": null,
  7.        "visitId": 1,
  8.        "
tissueSite
  1. visitName": "
S1
  1. first visit",
  2.        "
tissueSide
  1. cpShortTitle": "
Tissue
  1. blood",
  2.        "
pathologicalStatus"lineage
  1. reqId":
"Not Specified",
  1. null,
  2.        "sortOrder": null,
  3.        "label": "
Aliquot
  1. label1",
  2.        "
initialQuantity
  1. barcode":
2
  1. null,
  2.        "
availableQuantity
  1. type":
2
  1. "Whole Blood",
  2.        "specimenClass": "
Tissue
  1. Fluid",
  2.        "
specimenType
  1. lineage": "
Fresh Tissue
  1. Aliquot",
  2.        "
concentrationInMicrogramPerMicroliter
  1. anatomicSite": "
1
  1. Autonomic nervous system, NOS",
  2.        "
label
  1. laterality": "
29_1
  1. Not Applicable",
  2.        "
activityStatus
  1. status": "
Active"
  1. Collected",
  2.        "reqLabel": null,
  3.        "
isAvailable
  1. pathology": "
true
  1. Malignant, Pre-Invasive",
  2.        "
barcode
  1. initialQty":
" 1111",

"comment": null,

"createdOn": "04-04-2014 ",

"collectionStatus": " Collected",

"specimenCollectionGroup": {
  1. 10,
  2.        "availableQty": 10,
  3.        "available": true,
  4.        "concentration": 10,
  5.        "parentId": 1,
  6.        "parentLabel": "blood1",
  7.        "storageLocation":
  8.        {
  9.            "id": 1,
  10.            "name": "Fluid Container",
  11.            "positionX": "
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": ""}

  1. 7",
  2.            "positionY": "A" 
  3.        },
  4.        "storageType": null,
  5.        "collectionContainer": null,
  6.        "activityStatus": "Active",
  7.        "createdOn": 1449117420000,
  8.        "code": null,
  9.        "distributed": null,
  10.        "collectionEvent": null,
  11.        "receivedEvent": null,
  12.        "labelFmt": null,
  13.        "biohazards":
  14.        [
  15.        ],
  16.        "comments": null,
  17.        "closeAfterChildrenCreation": null,
  18.        "children":
  19.        [
  20.        ],
  21.        "pooledSpecimenId": null,
  22.        "pooledSpecimenLabel": null,
  23.        "specimensPool": null,
  24.        "closeParent": null,
  25.        "poolSpecimen": null,
  26.        "extensionDetail": null 
  27.    },
  28.    {
  29.        "id": 13,
  30.        "cpId": 1,
  31.        "cprId": 1,
  32.        "eventId": null,
  33.        "visitId": 1,
  34.        "visitName": "first visit",
  35.        "cpShortTitle": "blood",
  36.        "reqId": null,
  37.        "sortOrder": null,
  38.        "label": "label2",
  39.        "barcode": null,
  40.        "type": "Whole Blood",
  41.        "specimenClass": "Fluid",
  42.        "lineage": "Aliquot",
  43.        "anatomicSite": "Autonomic nervous system, NOS",
  44.        "laterality": "Not Applicable",
  45.        "status": "Collected",
  46.        "reqLabel": null,
  47.        "pathology": "Malignant, Pre-Invasive",
  48.        "initialQty": 10,
  49.        "availableQty": 10,
  50.        "available": true,
  51.        "concentration": 10,
  52.        "parentId": 1,
  53.        "parentLabel": "blood1",
  54.        "storageLocation":
  55.        {
  56.            "id": 1,
  57.            "name": "Fluid Container",
  58.            "positionX": "8",
  59.            "positionY": "A" 
  60.        },
  61.        "storageType": null,
  62.        "collectionContainer": null,
  63.        "activityStatus": "Active",
  64.        "createdOn": 1449117420000,
  65.        "code": null,
  66.        "distributed": null,
  67.        "collectionEvent": null,
  68.        "receivedEvent": null,
  69.        "labelFmt": null,
  70.        "biohazards":
  71.        [
  72.        ],
  73.        "comments": null,
  74.        "closeAfterChildrenCreation": null,
  75.        "children":
  76.        [
  77.        ],
  78.        "pooledSpecimenId": null,
  79.        "pooledSpecimenLabel": null,
  80.        "specimensPool": null,
  81.        "closeParent": null,
  82.        "poolSpecimen": null,
  83.        "extensionDetail": null 
  84.    }
  85. ]

 

Response  Status :

code
Applies to
Status Message
200All resourcesAliquots has been created successfully
400All requestsInvalid parameters, like count count should be greater than 0label should be unique, Insufficient quantity, Specified container has no space to store aliquots
401All requestsAuthorization failed, User doesn’t doesn't have Authority to create Aliquot
500All requestsInternal server error, Encountered server error while performing operations