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":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": ""}

URL http://<host>:<port>/catissuecore/openspecimen/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":"X","positionY"label2",

"visitId":1,

"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.        "eventId": null,
  7.        "visitId": 1,
  8.        "visitName": "first visit",
  9.        "cpShortTitle": "blood",
  10.        "reqId": null,
  11.        "sortOrder": null,
  12.        "label": "label1",
  13.        "barcode": null,
  14.        "type": "Whole Blood",
  15.        "specimenClass": "Fluid",
  16.        "lineage": "Aliquot",
  17.        "anatomicSite": "Autonomic nervous system, NOS",
  18.        "laterality": "Not Applicable",
  19.        "status": "Collected",
  20.        "reqLabel": null,
  21.        "pathology": "Malignant, Pre-Invasive",
  22.        "initialQty": 10,
  23.        "availableQty": 10,
  24.        "available": true,
  25.        "concentration": 10,
  26.        "parentId": 1,
  27.        "parentLabel": "blood1",
  28.        "storageLocation":
  29.        {
  30.            "id": 1,
  31.            "name": "Fluid Container",
  32.            "positionX": "7",
  33.            "positionY": "A" 
  34.        },
  35.        "storageType": null,
  36.        "collectionContainer": null,
  37.        "activityStatus": "Active",
  38.        "createdOn": 1449117420000,
  39.        "code": null,
  40.        "distributed": null,
  41.        "collectionEvent": null,
  42.        "receivedEvent": null,
  43.        "labelFmt": null,
  44.        "biohazards":
  45.        [
  46.        ],
  47.        "comments": null,
  48.        "closeAfterChildrenCreation": null,
  49.        "children":
  50.        [
  51.        ],
  52.        "pooledSpecimenId": null,
  53.        "pooledSpecimenLabel": null,
  54.        "specimensPool": null,
  55.        "closeParent": null,
  56.        "poolSpecimen": null,
  57.        "extensionDetail": null 
  58.    },
  59.    {
  60.        "id": 13,
  61.        "cpId": 1,
  62.        "cprId": 1,
  63.        "eventId": null,
  64.        "visitId": 1,
  65.        "visitName": "first visit",
  66.        "cpShortTitle": "blood",
  67.        "reqId": null,
  68.        "sortOrder": null,
  69.        "label": "label2",
  70.        "barcode": null,
  71.        "type": "Whole Blood",
  72.        "specimenClass": "Fluid",
  73.        "lineage": "Aliquot",
  74.        "anatomicSite": "Autonomic nervous system, NOS",
  75.        "laterality": "Not Applicable",
  76.        "status": "Collected",
  77.        "reqLabel": null,
  78.        "pathology": "Malignant, Pre-Invasive",
  79.        "initialQty": 10,
  80.        "availableQty": 10,
  81.        "available": true,
  82.        "concentration": 10,
  83.        "parentId": 1,
  84.        "parentLabel": "blood1",
  85.        "storageLocation":
  86.        {
  87.            "id": 1,
  88.            "name": "Fluid Container",
  89.            "positionX": "8",
  90.            "positionY": "A" 
  91.        },
  92.        "storageType": null,
  93.        "collectionContainer": null,
  94.        "activityStatus": "Active",
  95.        "createdOn": 1449117420000,
  96.        "code": null,
  97.        "distributed": null,
  98.        "collectionEvent": null,
  99.        "receivedEvent": null,
  100.        "labelFmt": null,
  101.        "biohazards":
  102.        [
  103.        ],
  104.        "comments": null,
  105.        "closeAfterChildrenCreation": null,
  106.        "children":
  107.        [
  108.        ],
  109.        "pooledSpecimenId": null,
  110.        "pooledSpecimenLabel": null,
  111.        "specimensPool": null,
  112.        "closeParent": null,
  113.        "poolSpecimen": null,
  114.        "extensionDetail": null 
  115.    }
  116. ]

 

Response  Status :

code
Applies to
Status Message
200All resourcesAliquots has been created successfully
400All requestsInvalid parameters, like noOfAliquots label should be greater than 0unique, Insufficient parent quantity, 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