POST openspecimen/rest/ng/specimens
This API is available for creating Specimen.
List of mandatory fields:
- Label
- TissueSite
- TissueSide
- PathologicalStatus
- Lineage
- InitialQuantity
- collectionStatus
- SpecimenClass
- SpecimenType
- ActivityStatus
- Barcode
- Comment
- CreatedOn
- scgId
...
used to create specimen for particular visit under participant. Using this API the specimen is also collected which creation.
Parameter Details:
The API accepts the specimen details in JSON format with following parameters:
Parameter | Details | ||||||
---|---|---|---|---|---|---|---|
label | Label given to specimen | ||||||
specimenClass | Class of the specimen. | ||||||
type | Specimen type of specimen. The specimen type should belong to specimen class. | ||||||
pathology | Pathology status of specimen. | ||||||
anatomicSite | Anatomic site of the specimen. | ||||||
laterality | Laterality of the specimen. | ||||||
initialQty | Initial quantity of the specimen. | ||||||
availableQty | Available quantity of the specimen. | ||||||
lineage | Lineage of the specimen. For new specimen the value would be "New". | ||||||
visitId | Visit ID of the participant under which the specimen will be collected. | ||||||
status | Status of the specimen. For collecting specimen the value would be "Collected". | ||||||
storageLocation [optional] | Storage location to store the created specimen. The location detail is also a JSON object, which contains :
| ||||||
concentration [optional] | Concentration of specimen. | ||||||
biohazards [optional] | Biohazards of that specimen. | ||||||
comments [optional] | Comments for that specimen. | ||||||
collectionEvent | This is the JSON object containing the details of collection event. It has below parameters:
| ||||||
receivedEvent | This is the JSON object containing the details of received event. It has below parameters :
|
Result :
Response of this request contains the details of specimen.
URL | openspecimen/rest/ng/specimens |
Request type | application/json |
Method | POST |
json | { "activityStatuslineage": "Active""New", "visitId":1, "barcodestatus":"245095132Collected", "biohazardDetailsavailableQty": [ ]"10", "storageLocation":{}, "collectionStatuscollectionEvent":{ "user":{ "id":1, "firstName":"Admin", "lastName":"Admin", "loginName":"admin@admin.com", "domain":"Collectedopenspecimen", "commentemailAddress":"creating an adhoc specimen.", "createdOn" : "2014-02-21", "externalIdentifierDetails" : [ ], "initialQuantity" : 2.0, "label" : "sample_123", "lineage" : "New", "pathologicalStatus" : "Metastatic", "scgId" : 1admin@admin.com","admin":true,"cpCount":0, "creationDate":null }, "time":"2015-12-04T04:14:36.333Z", "container":"Not Specified", "procedure":"Not Specified" }, "receivedEvent":{ "user":{ "id":1, "firstName":"Admin", "lastName":"Admin", "loginName":"admin@admin.com", "domain":"openspecimen", "emailAddress":"admin@admin.com", "admin":true, "cpCount":0, "creationDate":null }, "time":"2015-12-04T04:14:36.333Z", "receivedQuality":"Acceptable" }, "initialQty":"10", "concentration":"", "label":"unplanned specimen 1", "specimenClass":"Fluid", "type":"Bone Marrow Plasma", "specimenTypepathology":"FecesNon-Malignant, Diseased", "tissueSideanatomicSite":"LeftExternal ear", "tissueSitelaterality":"Nasal cavityRight" } |
Response | { "id": 9, "cpId": 1, "cprId": 1, "eventId": null, "visitId": 1, "visitName": "first visit", "cpShortTitle": "blood", { "activityStatus"reqId": null, "sortOrder": null, "label": "Activeunplanned specimen 1", "barcode": null, "type": "Bone Marrow Plasma", "biohazardDetails" : [ ]specimenClass": "Fluid", "lineage": "New", "anatomicSite": "External ear", "laterality": "Right", "collectionStatusstatus": "Collected", "reqLabel": null, "pathology": "Non-Malignant, Diseased", "initialQty": 10, "availableQty": 10, "available": true, "concentration": null, "commentparentId": "creating an adhoc specimen."null, "parentLabel": null, "createdOnstorageLocation": { "id"2014-02-21", "externalIdentifierDetails" : [ ]: -1, "name": null, "positionX": null, "positionY": null }, "storageType": null, "collectionContainer": null, "idactivityStatus": 2"Active", "initialQuantitycreatedOn": 2.01449202440000, "labelcode": null, "distributed": null, "lineagecollectionEvent": null, "NewreceivedEvent": null, "pathologicalStatuslabelFmt": null, "Metastaticbiohazards": [], "scgIdcomments": 1null, "specimenClasscloseAfterChildrenCreation": null, "Fluidchildren": [], "specimenTypepooledSpecimenId": null, "FecespooledSpecimenLabel": null, "tissueSidespecimensPool": null, "LeftcloseParent": null, "tissueSitepoolSpecimen": "Nasal cavity"null, "extensionDetail": null } |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Specimen has been created successfully |
400 | All requests | Invalid parameters, e.g duplicate label, duplicate barcode, invalid class Name etc |
401 | All requests | Authorization failed, User doesn’t have Authority to create specimen for the given collection protocolvisit. |
500 | All requests | Internal server error, Encountered server error while performing operations |