Update Diagnostic Request
PATCHhttps://api.sandbox.daslab.health/v1/diagnostic-requests/:id
This endpoint allows you to update a Diagnostic Request.
A Diagnostic Request is a custom FHIR Bundle defined by DasLab in order to represent the package that contains the following FHIR resources:
- Patient
- Service Request
- Specimen
Please see here for more information regarding Bundles and their usage in the FHIR standard.
Request
Path Parameters
id uuidrequired
The ID of the Diagnostic Request.
- application/json
Body
required
patient objectrequired
specimen objectrequired
serviceRequest objectrequired
Responses
- 200
- 400
- 401
Updated successfully.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"id": "17506e30-4537-4539-8f73-10c29f6e8a06",
"resourceType": "Bundle",
"type": "transaction-response",
"entry": [
{
"resource": {
"resourceType": "ServiceRequest",
"id": "180ad422382-f3cd57c9-0f18-4dee-a057-f2152186acaa",
"meta": {
"versionId": "1",
"lastUpdated": "2022-05-10T09:17:14.498146Z"
},
"status": "active",
"intent": "order",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "6357-8",
"display": "Chlamydia trachomatis DNA [Presence] in Urine by NAA with probe detection"
}
]
},
"subject": {
"reference": "Patient/180ad41b430-abb6d60b-3833-40fa-b5a1-2994f7aa26a9/_history/2"
},
"requester": {
"reference": "Organization/17ebfb0781c-8aa96f99-e785-48bb-a3b0-1c8a3d149689"
},
"specimen": [
{
"reference": "Specimen/180ad422382-3c6b951c-f327-4dd7-adf4-30042a2be57b"
}
]
}
},
{
"resource": {
"resourceType": "Specimen",
"id": "180ad422382-3c6b951c-f327-4dd7-adf4-30042a2be57b",
"meta": {
"versionId": "1",
"lastUpdated": "2022-05-10T09:17:14.498036Z"
},
"status": "available",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0487",
"code": "UR",
"display": "Urine"
}
]
},
"subject": {
"reference": "Patient/180ad41b430-abb6d60b-3833-40fa-b5a1-2994f7aa26a9/_history/2"
},
"collection": {
"collectedDateTime": "2022-01-01T00:00:00Z"
},
"container": [
{
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "PLAC",
"display": "Placer Identifier"
}
]
},
"system": "http://hospital.smarthealthit.org",
"value": "2ee3e587-d5b6-4be7-b16e-4b632d291111"
}
]
}
]
}
},
{
"resource": {
"resourceType": "Patient",
"id": "180ad41b430-abb6d60b-3833-40fa-b5a1-2994f7aa26a9",
"meta": {
"versionId": "2",
"lastUpdated": "2022-05-10T09:17:14.345861Z"
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "PLAC",
"display": "Placer Identifier"
}
]
},
"value": "1086ff92-4a2e-4a4f-b82b-4ac116327507"
}
],
"name": [
{
"family": "Mustermann",
"given": [
"Erika"
]
}
],
"telecom": [
{
"system": "email",
"value": "erika@example.com",
"use": "home"
}
],
"gender": "female",
"birthDate": "1945-10-31",
"managingOrganization": {
"reference": "Organization/17ebfb0781c-8aa96f99-e785-48bb-a3b0-1c8a3d149689"
}
}
}
]
}
{
"id": "17506e30-4537-4539-8f73-10c29f6e8a06",
"resourceType": "Bundle",
"type": "transaction-response",
"entry": [
{
"resource": {
"resourceType": "ServiceRequest",
"id": "180ad422382-f3cd57c9-0f18-4dee-a057-f2152186acaa",
"meta": {
"versionId": "1",
"lastUpdated": "2022-05-10T09:17:14.498146Z"
},
"status": "active",
"intent": "order",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "6357-8",
"display": "Chlamydia trachomatis DNA [Presence] in Urine by NAA with probe detection"
}
]
},
"subject": {
"reference": "Patient/180ad41b430-abb6d60b-3833-40fa-b5a1-2994f7aa26a9/_history/2"
},
"requester": {
"reference": "Organization/17ebfb0781c-8aa96f99-e785-48bb-a3b0-1c8a3d149689"
},
"specimen": [
{
"reference": "Specimen/180ad422382-3c6b951c-f327-4dd7-adf4-30042a2be57b"
}
]
}
},
{
"resource": {
"resourceType": "Specimen",
"id": "180ad422382-3c6b951c-f327-4dd7-adf4-30042a2be57b",
"meta": {
"versionId": "1",
"lastUpdated": "2022-05-10T09:17:14.498036Z"
},
"status": "available",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0487",
"code": "UR",
"display": "Urine"
}
]
},
"subject": {
"reference": "Patient/180ad41b430-abb6d60b-3833-40fa-b5a1-2994f7aa26a9/_history/2"
},
"collection": {
"collectedDateTime": "2022-01-01T00:00:00Z"
},
"container": [
{
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "PLAC",
"display": "Placer Identifier"
}
]
},
"system": "http://hospital.smarthealthit.org",
"value": "2ee3e587-d5b6-4be7-b16e-4b632d291111"
}
]
}
]
}
},
{
"resource": {
"resourceType": "Patient",
"id": "180ad41b430-abb6d60b-3833-40fa-b5a1-2994f7aa26a9",
"meta": {
"versionId": "2",
"lastUpdated": "2022-05-10T09:17:14.345861Z"
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "PLAC",
"display": "Placer Identifier"
}
]
},
"value": "1086ff92-4a2e-4a4f-b82b-4ac116327507"
}
],
"name": [
{
"family": "Mustermann",
"given": [
"Erika"
]
}
],
"telecom": [
{
"system": "email",
"value": "erika@example.com",
"use": "home"
}
],
"gender": "female",
"birthDate": "1945-10-31",
"managingOrganization": {
"reference": "Organization/17ebfb0781c-8aa96f99-e785-48bb-a3b0-1c8a3d149689"
}
}
}
]
}
The request was unacceptable. Usually due to parameters being missing or being sent in an invalid format.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
Default value: Bad Request
messages string[]
statusCode integer
Default value: 400
{
"error": "Bad Request",
"messages": [
"string"
],
"statusCode": 400
}
{
"error": "Bad Request",
"messages": [
"patient should not be null or undefined",
"specimen should not be null or undefined"
],
"statusCode": 400
}
JWT is either missing, invalid, or expired.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
Default value: Unauthorized
messages string[]
statusCode integer
Default value: 401
{
"error": "Unauthorized",
"messages": [
"string"
],
"statusCode": 401
}
{
"error": "Unauthorized",
"messages": [
"Invalid JWT"
],
"statusCode": 401
}
Authorization: http
name: bearertype: httpscheme: bearerbearerFormat: JWT
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PATCH 'https://api.sandbox.daslab.health/v1/diagnostic-requests/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"patient": {
"birthDate": "string",
"gender": "string",
"identifier": [
{
"type": {
"coding": [
{
"code": "string",
"display": "string",
"system": "string"
}
],
"text": "string"
},
"system": "string",
"value": "string"
}
],
"name": [
{
"family": "string",
"given": [
"string"
]
}
],
"resourceType": "string",
"telecom": [
{
"system": "string",
"use": "string",
"value": "string"
}
]
},
"specimen": {
"id": "string",
"resourceType": "string",
"collection": {
"collectedDateTime": "string"
},
"container": [
{
"identifier": [
{
"type": {
"coding": [
{
"code": "string",
"display": "string",
"system": "string"
}
],
"text": "string"
},
"system": "string",
"value": "string"
}
]
}
]
},
"serviceRequest": {
"identifier": [
{
"type": {
"coding": [
{
"code": "string",
"display": "string",
"system": "string"
}
],
"text": "string"
},
"system": "string",
"value": "string"
}
],
"id": "string"
}
}'
ResponseClear