Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Parameter
Details
visitName [optional]Name of the visitsprNumber [optional]Surgical pathology number

Here both parameters are optional

...

visitVisit Details. Please refer Add Visit for attributes of visit.
specimensArray 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.

URLhttp://<host>:<port>/openspecimen/rest/ng/visits/
bynamespr?visitName=01
collect
Method
GET
POST
Requestapplication/json
Response
Json


Code Block
linenumberstrue
0:
{"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": 
595
52
"eventId": 
4
86
"ppid": "
DWP00013
DWP00004"
"eventLabel": "
Baseline
Test"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": "A Planned Clinical Study FD"
"id": 
722
728
"name": "
01
DWP00004_Test_333"
"
clinicalDiagnosis
clinicalDiagnoses": [
 
"Not Specified"
   "3-part fracture of surgical neck of humerus", 
	"(Idiopathic) normal pressure hydrocephalus"
],
"clinicalStatus": "Not Specified"
"activityStatus": "Active"
"site": "
Arkansas
3165 Porder 
Hospital
Drive"
"status": "Complete"
"comments": null
"surgicalPathologyNumber": 
"1234"
null
"sprName": null
"missedReason": null
"missedBy": null
"sprLocked": false
"visitDate": 
1450377000000
1449597053346
"code": null
"cohort": null
"extensionDetail": null
}-
"specimens": 

 

Below is the example of the get visits by spr number:

URLhttp://<host>:<port>/openspecimen/rest/ng/visits/bynamespr?sprNumber=1234MethodGETRequestapplication/json

Response

Code Block
linenumberstrue
[1]
0:  {
"id": 2925
"cpId": 2
"cprId": 
595
52
"eventId": null
"visitId": 
4
728
"
ppid
visitName": "
DWP00013
DWP00004_Test_333"
"
eventLabel
cpShortTitle": "
Baseline
A Planned Clinical Study FD"
"
eventPoint
reqId": 
10
471
"
cpId
sortOrder": 
2
null
"
cpTitle
label": "
Planned Clinical Study
DWP00004.WB.283"
"
cpShortTitle
autoPrintLabelEnabled": false
"
A
barcode": 
Planned Clinical Study FD
null
"type": "Whole Blood"
"
id
specimenClass": 
722
"Fluid"
"
name
lineage": "
01
New"
"
clinicalDiagnosis
anatomicSite": "Not Specified"
"
clinicalStatus
laterality": "Not Specified"
"status": "Collected"
"reqLabel": null
"
activityStatus
pathology": "
Active
Not Specified"
"
site
initialQty": 
"Arkansas Hospital" "status
10
"availableQty": 10
"available": true
"concentration": null
"
Complete
parentId": null
"
comments
parentLabel": null
"storageLocation": {
"
surgicalPathologyNumber
id": -1
"
1234
name": null
"
sprName
positionX": null
"
missedReason
positionY": null
}-
"storageType": "Auto"
missedBy

"collectionContainer": null
"
sprLocked
activityStatus": 
false
"Active"
"
visitDate
createdOn": 
1450377000000
1449596760000
"code": null
"distributed": null
"collectionEvent": null
"
cohort
receivedEvent": null
"labelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%"
"biohazards": [0]
"
extensionDetail
comments": null
} - 1
"closeAfterChildrenCreation": null
"children": [1]
0:  {
"id": null
"cpId": null
"cprId": 
595
null
"eventId
": 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": "
DWP00013
Not Specified"
"
eventLabel
laterality": "
Test
Not Specified"
"
eventPoint
status": 
10
null
"
cpId
reqLabel": 
2
null
"
cpTitle
pathology": "Malignant"
"
Planned
initialQty": 
Clinical
10
Study
"availableQty": 
"cpShortTitle
null
"available": null
"concentration": null
"parentId"
A
: 
Planned Clinical Study FD"
null
"parentLabel": null
"storageLocation": {
"id": 
723
null
"name": null
"
02
positionX": null
"
clinicalDiagnosis
positionY": null
}-
"storageType"
Not
: 
Specified
"Auto"
"
clinicalStatus
collectionContainer": "Not Specified"
"activityStatus": null
"createdOn": null
"
Active
code": null
"
site
distributed": null
"
3165
collectionEvent": 
Porder
null
Drive
"receivedEvent": null
"
status
labelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%"
"
Complete
biohazards": null
"comments": null
"
surgicalPathologyNumber
closeAfterChildrenCreation": null
"
1234
pooledSpecimenId": null
"
sprName
pooledSpecimenLabel": null
"
missedReason
specimensPool": null
"
missedBy
closeParent": null
"
sprLocked
poolSpecimen": false
"visitDate
"extensionDetail": null
}-
-
"pooledSpecimenId": null
"pooledSpecimenLabel": 
1450377000000
null
"
code
specimensPool": null
"
cohort
closeParent": null
"poolSpecimen": false
"extensionDetail": null
}-

...

-
}




code
Applies to
Status Message
200All resourcesSpecimen collection groups got successfully
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations