openspecimen/rest/ng/visits/collect
Use this resource to add create visit and collect specimens of that visit.its specimens in one call.
Use HTTP POST method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
visitName [optional] | Name of the visit |
sprNumber [optional] | Surgical pathology number |
Here both parameters are optional
...
visit | Visit Details. Please refer Add Visit for attributes of visit. |
specimens | Array of specimen details which wanted to collect. Please refer Create Specimen for attributes of specimen. |
Result:
The response of this request will contains the details of the visits with anticipated and unplanned collection status.Below is the example of the get visits by name:all collected and anticipated specimen details of visit.
bynamespr?visitName=01GETPOST |
Request | application/json |
Response0: {"visit":
{
"eventLabel":"Baseline",
"eventPoint":10,
"clinicalDiagnoses": [
"3-part fracture of surgical neck of humerus",
"(Idiopathic) normal pressure hydrocephalus"
],
"clinicalStatus":"Not Specified",
"activityStatus":"Active",
"code":null,
"eventId":4,
"site":"Arkansas Hospital",
"cpTitle":"Planned Clinical Study",
"visitDate":"08-12-2015",
"cprId":596,
"status":"Complete"
},
"specimens":[
{
"initialQty":10,
"label":null,
"reqId":4,
"storageLocation":{id":null,"name":null,"positionX":null,"positionY":null},
"lineage":"New",
"concentration":null,
"status":"Collected",
"closeAfterChildrenCreation":null,
"collectionEvent":{"time":"2015-12-08"},
"receivedEvent":{"time":"2015-12-08"},
"children":[],
"specimensPool":[]
}
]
} |
|
Response |
Code Block |
---|
{
"visit": {
"cprId": |
|
5954DWP00013DWP00004"
"eventLabel": " |
|
BaselineTest"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": "A Planned Clinical Study FD"
"id": |
|
72201clinicalDiagnosis"Not Specified"
"3-part fracture of surgical neck of humerus",
"(Idiopathic) normal pressure hydrocephalus"
],
"clinicalStatus": "Not Specified"
"activityStatus": "Active"
"site": " |
|
ArkansasHospitalDrive"
"status": "Complete"
"comments": null
"surgicalPathologyNumber": |
|
"1234"null
"sprName": null
"missedReason": null
"missedBy": null
"sprLocked": false
"visitDate": |
|
14503770000001449597053346
"code": null
"cohort": null
"extensionDetail": null
}-
"specimens": |
|
Below is the example of the get visits by spr number:
URL | http://<host>:<port>/openspecimen /rest/ng/visits/bynamespr?sprNumber=1234 |
Method | GET |
Request | application/json |
Response | Code Block |
---|
|
[1]
0: {
"id": 2925
"cpId": 2
"cprId": |
|
59552
"eventId": null
"visitId": |
|
4ppidDWP00013eventLabelBaselineA Planned Clinical Study FD"
" |
|
eventPoint10cpId2cpTitlePlanned Clinical StudycpShortTitleautoPrintLabelEnabled": false
" |
|
APlanned Clinical Study FDnull
"type": "Whole Blood"
" |
|
id722name01clinicalDiagnosisanatomicSite": "Not Specified"
" |
|
clinicalStatuslaterality": "Not Specified"
"status": "Collected"
"reqLabel": null
" |
|
activityStatusActivesite"Arkansas Hospital"
"status10
"availableQty": 10
"available": true
"concentration": null
" |
|
CompletecommentsparentLabel": null
"storageLocation": {
" |
|
surgicalPathologyNumber1234sprNamemissedReasonpositionY": null
}-
"storageType": "Auto" |
|
missedBy
"collectionContainer": null
" |
|
sprLockedfalsevisitDate14503770000001449596760000
"code": null
"distributed": null
"collectionEvent": null
" |
|
cohortreceivedEvent": null
"labelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%"
"biohazards": [0]
" |
|
extensionDetail}
-
1"closeAfterChildrenCreation": null
"children": [1]
0: {
"id": null
"cpId": null
"cprId": |
|
595": 86
"ppid": null
"visitId": null
"visitName": null
"cpShortTitle": null
"reqId": 472
"sortOrder": null
"label": null
"autoPrintLabelEnabled": false
"barcode": null
"type": "Plasma"
"specimenClass": "Fluid"
"lineage": "Derived"
"anatomicSite": " |
|
DWP00013eventLabelTesteventPoint10cpId2cpTitlepathology": "Malignant"
" |
|
PlannedClinicalStudy"cpShortTitlenull
"available": null
"concentration": null
"parentId" |
|
APlanned Clinical Study FD"
null
"parentLabel": null
"storageLocation": {
"id": |
|
72302clinicalDiagnosispositionY": null
}-
"storageType" |
|
NotSpecifiedclinicalStatuscollectionContainer": "Not Specified"
"activityStatus": null
"createdOn": null
" |
|
Activesite3165PorderDrivestatuslabelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%"
" |
|
Completebiohazards": null
"comments": null
" |
|
surgicalPathologyNumbercloseAfterChildrenCreation": null
" |
|
1234pooledSpecimenId": null
" |
|
sprNamepooledSpecimenLabel": null
" |
|
missedReasonmissedBysprLocked"visitDate"extensionDetail": null
}-
-
"pooledSpecimenId": null
"pooledSpecimenLabel": |
|
1450377000000codecohortcloseParent": null
"poolSpecimen": false
"extensionDetail": null
}-
|
|
...
| | |
---|
200 | All resources | Specimen collection groups got successfully |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |