Specimen

get
/Specimen/{id}

Specimen read

Read a Specimen resource.

Path Parameters

id required
string
The unique identifier for the Specimen

Response Payload Attributes

resourceType
string

The FHIR Resource name.

id
string

Unique Canvas identifier for this resource.

type
json

Kind of material that forms the specimen.

Click to view child attributes
text
string

Free-text description of the specimen type (e.g. “Serum”).

subject
json

The patient from whom the specimen was collected.

Click to view child attributes
reference
string

The patient reference in the format Patient/<patient_id>.

type
string

Type the reference refers to (e.g. Patient).

Responses

200 OK
Request was successful.

Errors

401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.

Query Parameters

_id
string

A Canvas-issued unique identifier for a specific Specimen.

patient
string

The patient reference associated to the Specimen using the format Patient/<patient_id>.

Response Payload Attributes

resourceType
string

The FHIR Resource name.

type
string

This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .

total
integer

The number of resources that match the search parameter.

link
array[json]

Attributes relevant to pagination, see our Pagination page for more detail.

Click to view child attributes
relation
enum [self|first|next|last]

The relation of the page search

url

The search url for the specific relation

entry
array[json]

The results bundle that lists out each object returned in the search

Click to view child attributes
resource
json

The attributes specific to the resource type, see the Attributes section below

Attributes

resourceType
string

The FHIR Resource name.

id
string

Unique Canvas identifier for this resource.

type
json

Kind of material that forms the specimen.

Click to view child attributes
text
string

Free-text description of the specimen type (e.g. “Serum”).

subject
json

The patient from whom the specimen was collected.

Click to view child attributes
reference
string

The patient reference in the format Patient/<patient_id>.

type
string

Type the reference refers to (e.g. Patient).

Responses

200 OK
Request was successful.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Specimen/<id>' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Specimen/<id>"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
      "resourceType": "Specimen",
      "id": "0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d",
      "type": {
        "text": "Serum"
      },
      "subject": {
        "reference": "Patient/1c8c6f27551d4d01aa3bf2477a4d5259",
        "type": "Patient",
      }
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "not-found",
          "details": {
            "text": "Unknown Specimen resource 'SPM-unknown'"
          }
        }
      ]
    }
    
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Specimen?_id=0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d&patient=Patient/1c8c6f27-55d-4d01-aa3b-f2477a4d5259' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Specimen?_id=0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d&patient=Patient/1c8c6f27-55d-4d01-aa3b-f2477a4d5259"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
      "resourceType": "Bundle",
      "type": "searchset",
      "total": 1,
      "link": [
        {
          "relation": "self",
          "url": "/Specimen?_id=0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d&patient=Patient/1c8c6f27551d4d01aa3bf2477a4d5259&_count=10&_offset=0"
        },
        {
          "relation": "first",
          "url": "/Specimen?_id=0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d&patient=Patient/1c8c6f27551d4d01aa3bf2477a4d5259&_count=10&_offset=0"
        },
        {
          "relation": "last",
          "url": "/Specimen?_id=0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d&patient=Patient/1c8c6f27551d4d01aa3bf2477a4d5259&_count=10&_offset=0"
        }
      ],
      "entry": [
        {
          "resource": {
            "resourceType": "Specimen",
            "id": "0a5d9e1f-1c64-4d04-a2bb-2a58e34f9f6d",
            "type": {
              "text": "Serum"
            },
            "subject": {
              "reference": "Patient/1c8c6f27-551d4d01aa3bf2477a4d5259",
              "type": "Patient",
            }
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "invalid",
          "details": {
            "text": "Bad request"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }