Versions Compared

Key

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

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

You can create aliquots through POST URL   http://<host>:<port>/catissuecore  POST openspecimen/rest/ng/specimens/{specimenId}/aliquotsHere specimenId refers to the identifier of the specimen for which you want to create aliquotcollect

Use this REST API is to create aliquots for existing specimen

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.

List of positions to store created aliquot.
List Contains

 

containerName
Parameter
Details
noOfAliquotsNumber of aliquots to create from specimen.It is mandatory field.
quantityPerAliquot [optional]labelLabel given to aliquot.
initialQty

Specimen quantity to create each aliquot.

  • As quantity is optional, if not given then quantity per Aliquot will be calculated as:
    quantity per Aliquot = Specimen Quantity / number of Aliquots.
Positions [optional]
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 :

{

"id

{

[

URL http://<host>:<port>/catissuecoreopenspecimen/rest/ng/specimens/{specimenId}/aliquotscollect
Requestapplication/json
MethodPOST
json

[

{

"noOfAliquotsinitialQty":2"10",

"quantityPerAliquotlabel":2"label1",

"positionsvisitId":[{"containerName1,

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

"parentId":1,

"lineage":"Aliquot",

"status":"cont1Collected",

"positionXcreatedOn":"X2015-12-03T04:37:03.779Z",

"positionYchildren":[],

"YspecimensPool":[]

},

{

"containerNameinitialQty":"cont210",

"positionXlabel":"label2",

"XvisitId":1,"positionY

"storageLocation":{"name":"Y"}

],

}

Response

Fluid Container"},

"parentId":1,

"lineage":"Aliquot",

"status":"Collected",

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

"children":[],

"specimensPool":[]

}

]

Response
  1. [
  2.    {
  3.        "id": 12,
  4.        "cpId": 1,
  5.        "cprId": 1,
  6.        "
tissueSite
  1. eventId":
"S1","tissueSide
  1. null,
  2.        "visitId": 1,
  3.        "visitName": "
Tissue
  1. first visit",
  2.        "
pathologicalStatus
  1. cpShortTitle": "
Not Specified
  1. blood",
  2.        "
lineage
  1. reqId":
"Aliquot",

"initialQuantity": 2,

"availableQuantity": 2,

"
  1. null,
  2.        "sortOrder": null,
  3.        "label": "label1",
  4.        "barcode": null,
  5.        "type": "Whole Blood",
  6.        "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.      
"isAvailable
  1.  "reqLabel": null,
  2.        "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 label should be greater than 0unique, Insufficient parent quantityquantity, Specified container has no space to store aliquots
401All requestsAuthorization failed, User doesn't have Authority to create Aliquot
500All requestsInternal server error, Encountered server error while performing operations