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
Json


Code Block
linenumberstrue
{"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.766Z
08"},
      "receivedEvent":{"time":"2015-12-
08T15:30:36.766Z0
08"},
      "children":[],
      "specimensPool":[]
    }
  ]
}


Response


Code Block
linenumberstrue
{
"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": [
    "3-part fracture of surgical neck of humerus", 
"Not Specified"
	"(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":
4
 null
"visitId": 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
"barcode"
A
: 
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": "
activityStatus
Collected"
"reqLabel": null
"pathology": "
Active
Not Specified"
"
site
initialQty": 10
"availableQty"
Arkansas Hospital" "status": "Complete" "comments
: 10
"available": true
"concentration": null
"parentId": null
"parentLabel": null
"storageLocation": {
"
surgicalPathologyNumber
id": -1
"
1234
name": null
"
sprName
positionX": null
"
missedReason
positionY": null
}-
"missedBy
"storageType": "Auto"
"collectionContainer": null
"
sprLocked
activityStatus": 
false
"Active"
"
visitDate
createdOn": 
1450377000000
1449596760000
"code": null
"distributed": null
"
cohort
collectionEvent": null
"
extensionDetail
receivedEvent": null
} - 1

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