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 |
Json |
Code Block |
---|
| {"visit":
{
"eventLabel":"Baseline",
"eventPoint":10,
" |
|
clinicalDiagnosis":"Not Specified"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": |
|
1450377000000"08-12-2015",
"cprId":596,
"status":"Complete"
},
"specimens":[
{ |
|
"id":null,"
"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- |
|
08T15:30:36.766Z08"},
"receivedEvent":{"time":"2015-12- |
|
08T15:30:36.766Z008"},
"children":[],
"specimensPool":[]
}
]
} |
|
Response | |
|
5954DWP00013DWP00004"
"eventLabel": " |
|
BaselineTest"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": "A Planned Clinical Study FD"
"id": |
|
72201clinicalDiagnosisclinicalDiagnoses": [
"3-part fracture of surgical neck of humerus",
|
|
"Not Specified" "(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": |
|
595 4ppidDWP00013eventLabelBaselineA Planned Clinical Study FD"
" |
|
eventPoint10cpId2cpTitlePlanned Clinical StudycpShortTitleautoPrintLabelEnabled": false
"barcode" |
|
APlanned Clinical Study FDnull
"type": "Whole Blood"
" |
|
id722name01clinicalDiagnosisanatomicSite": "Not Specified"
" |
|
clinicalStatuslaterality": "Not Specified"
"status": " |
|
activityStatusCollected"
"reqLabel": null
"pathology": " |
|
ActivesiteinitialQty": 10
"availableQty" |
|
Arkansas Hospital"
"status": "Complete"
"comments: 10
"available": true
"concentration": null
"parentId": null
"parentLabel": null
"storageLocation": {
" |
|
surgicalPathologyNumber1234sprNamemissedReason"missedBy"storageType": "Auto"
"collectionContainer": null
" |
|
sprLockedfalsevisitDate14503770000001449596760000
"code": null
"distributed": null
" |
|
cohortextensionDetail
}
-
1
"labelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%"
"biohazards": [0]
"comments": null
"closeAfterChildrenCreation": null
"children": [1]
0: {
"id": null
"cpId": null
"cprId": |
|
595null
"eventId": null
"visitId": null
"visitName": null
"cpShortTitle": |
|
86
"ppid null
"reqId": 472
"sortOrder": null
"label": null
"autoPrintLabelEnabled": false
"barcode": null
"type": "Plasma"
"specimenClass": "Fluid"
"lineage": "Derived"
"anatomicSite": " |
|
DWP00013eventLabelTest"eventPoint"status": null
"reqLabel": |
|
10cpId2cpTitlePlannedClinicalStudycpShortTitleconcentration": null
"parentId" |
|
APlanned Clinical Study FD"null
"parentLabel": null
"storageLocation": {
"id": |
|
72302clinicalDiagnosis"Not Specifiednull
}-
"storageType": "Auto"
" |
|
clinicalStatuscollectionContainer": "Not Specified"
"activityStatus": null
" |
|
Active"createdOn": null
"code": null
" |
|
sitedistributed": null
"collectionEvent" |
|
3165PorderDrivestatusComplete"%PPI%.%SP_TYPE%.%SYS_UID%"
"biohazards": null
"comments": null
" |
|
surgicalPathologyNumbercloseAfterChildrenCreation": null
" |
|
1234pooledSpecimenId": null
" |
|
sprNamepooledSpecimenLabel": null
" |
|
missedReasonmissedBysprLockedpoolSpecimen": false
"extensionDetail": null
}-
-
"pooledSpecimenId": null
" |
|
visitDate1450377000000codecohortcloseParent": 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 |