Leave a comment at the end of this page or email contact@krishagni.com
Create Specimen
POST openspecimen/rest/ng/specimens
This API is used to create specimen for particular visit under participant. Using this API the specimen is also collected while 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 :
| ||||||
extensionDetail [optional] | This is the JSON object containing the details of custom-fields. It has the below parameters:
|
Result :
Response of this request contains the details of specimen.
API Example:
URL | openspecimen/rest/ng/specimens |
Request type | application/json |
Method | POST |
json | { "extensionDetail": { |
Response | { "id": 9, "cpId": 1, "cprId": 1, "eventId": null, "visitId": 1, "visitName": "first visit", "cpShortTitle": "blood", "reqId": null, "sortOrder": null, "label": "unplanned specimen 1", "barcode": null, "type": "Bone Marrow Plasma", "specimenClass": "Fluid", "lineage": "New", "anatomicSite": "External ear", "laterality": "Right", "status": "Collected", "reqLabel": null, "pathology": "Non-Malignant, Diseased", "initialQty": 10, "availableQty": 10, "available": true, "concentration": null, "parentId": null, "parentLabel": null, "storageLocation": { "id": -1, "name": null, "positionX": null, "positionY": null }, "storageType": null, "collectionContainer": null, "activityStatus": "Active", "createdOn": 1449202440000, "code": null, "distributed": null, "collectionEvent": null, "receivedEvent": null, "labelFmt": null, "biohazards": [], "comments": null, "closeAfterChildrenCreation": null, "children": [], "pooledSpecimenId": null, "pooledSpecimenLabel": null, "specimensPool": null, "closeParent": null, "poolSpecimen": null, "extensionDetail": { }], } |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Specimen has been created successfully |
400 | All requests | Invalid parameters, e.g duplicate label, invalid class Name etc |
401 | All requests | Authorization failed, User doesn’t have Authority to create specimen for the given visit. |
500 | All requests | Internal server error, Encountered server error while performing operations |
Leave a comment at the end of this page or email contact@krishagni.com