Specimen

Specimen

specimenIdGet

Get a Specimen resource based on the ID..


/Specimen/{id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//Specimen/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SpecimenApi;

import java.io.File;
import java.util.*;

public class SpecimenApiExample {

    public static void main(String[] args) {
        
        SpecimenApi apiInstance = new SpecimenApi();
        String id = id_example; // String | The ID of the Specimen resource.
        try {
            Specimen result = apiInstance.specimenIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SpecimenApi#specimenIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SpecimenApi;

public class SpecimenApiExample {

    public static void main(String[] args) {
        SpecimenApi apiInstance = new SpecimenApi();
        String id = id_example; // String | The ID of the Specimen resource.
        try {
            Specimen result = apiInstance.specimenIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SpecimenApi#specimenIdGet");
            e.printStackTrace();
        }
    }
}
String *id = id_example; // The ID of the Specimen resource.

SpecimenApi *apiInstance = [[SpecimenApi alloc] init];

[apiInstance specimenIdGetWith:id
              completionHandler: ^(Specimen output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Specimen = require('specimen');

var api = new Specimen.SpecimenApi()
var id = id_example; // {{String}} The ID of the Specimen resource.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.specimenIdGet(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class specimenIdGetExample
    {
        public void main()
        {

            var apiInstance = new SpecimenApi();
            var id = id_example;  // String | The ID of the Specimen resource.

            try
            {
                Specimen result = apiInstance.specimenIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SpecimenApi.specimenIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSpecimenApi();
$id = id_example; // String | The ID of the Specimen resource.

try {
    $result = $api_instance->specimenIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SpecimenApi->specimenIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SpecimenApi;

my $api_instance = WWW::SwaggerClient::SpecimenApi->new();
my $id = id_example; # String | The ID of the Specimen resource.

eval { 
    my $result = $api_instance->specimenIdGet(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SpecimenApi->specimenIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SpecimenApi()
id = id_example # String | The ID of the Specimen resource.

try: 
    api_response = api_instance.specimen_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SpecimenApi->specimenIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The ID of the Specimen resource.
Required

Responses

Status: 200 - Successful response with Specimen resource

Status: 400 - Bad request. The error was encountered when parsing the content into the appropriate FHIR resource.

Status: 401 - Unauthorized. Possible causes
  • a token failed authorization
  • a user could not be found

Status: 403 - Forbidden. Possible causes
  • a code or query parameter was not supported
  • a code may have had no valid equivalent in the EHR
  • a user does not have enough permissions to perform a certain action
  • a query was invalid, for example a search token value ended in an escape character

Status: 404 - Resource not found. Possible causes
  • an operation was not supported
  • the FHIR resource was not implemented by the product adapter
  • the FHIR resource was not found
  • the service was unable to generate the FHIR resource possibly because a required element was not provided
  • the specified patient could not be found in the EHR
  • the paging information that was sent to the product was not correct indicating that the request for the page could not be honored

Status: 405 - Method not allowed. Possible cause
  • resource does not exist

Status: 412 - Precondition failed. Possible causes
  • certain precondition checks failed, for example a version mismatch
  • an update could not be processed as the If-Match tag didn't match the version

Status: 413 - Request entity too large. Possible cause
  • a request could not be honored because it was too expensive for the server to execute, for example a search that would return a million records

Status: 422 - Unprocessable entity. Possible cause
  • an exception was thrown upon violated constraint, for example missing or invalid element for resource or if an update on a resource did not happen

Status: 429 - Too many requests. Possible causes
  • too many concurrent FHIR requests

Status: 500 - Internal server error. Possible causes
  • the system was missing configuration information, for example if a URL to a service was missing or a security group was not found for the user
  • none of the available exceptions are appropriate


specimenPatientIDGet

Get a Specimen resource based on the Patient ID..


/Specimen/[PatientID]

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//Specimen/[PatientID]?patient="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SpecimenApi;

import java.io.File;
import java.util.*;

public class SpecimenApiExample {

    public static void main(String[] args) {
        
        SpecimenApi apiInstance = new SpecimenApi();
        String patient = patient_example; // String | The patient ID to search specimens for.
        try {
            inline_response_200 result = apiInstance.specimenPatientIDGet(patient);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SpecimenApi#specimenPatientIDGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SpecimenApi;

public class SpecimenApiExample {

    public static void main(String[] args) {
        SpecimenApi apiInstance = new SpecimenApi();
        String patient = patient_example; // String | The patient ID to search specimens for.
        try {
            inline_response_200 result = apiInstance.specimenPatientIDGet(patient);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SpecimenApi#specimenPatientIDGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // The patient ID to search specimens for.

SpecimenApi *apiInstance = [[SpecimenApi alloc] init];

[apiInstance specimenPatientIDGetWith:patient
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Specimen = require('specimen');

var api = new Specimen.SpecimenApi()
var patient = patient_example; // {{String}} The patient ID to search specimens for.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.specimenPatientIDGet(patient, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class specimenPatientIDGetExample
    {
        public void main()
        {

            var apiInstance = new SpecimenApi();
            var patient = patient_example;  // String | The patient ID to search specimens for.

            try
            {
                inline_response_200 result = apiInstance.specimenPatientIDGet(patient);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SpecimenApi.specimenPatientIDGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSpecimenApi();
$patient = patient_example; // String | The patient ID to search specimens for.

try {
    $result = $api_instance->specimenPatientIDGet($patient);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SpecimenApi->specimenPatientIDGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SpecimenApi;

my $api_instance = WWW::SwaggerClient::SpecimenApi->new();
my $patient = patient_example; # String | The patient ID to search specimens for.

eval { 
    my $result = $api_instance->specimenPatientIDGet(patient => $patient);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SpecimenApi->specimenPatientIDGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SpecimenApi()
patient = patient_example # String | The patient ID to search specimens for.

try: 
    api_response = api_instance.specimen_patient_id_get(patient)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SpecimenApi->specimenPatientIDGet: %s\n" % e)

Parameters

Query parameters
Name Description
patient*
String
The patient ID to search specimens for.
Required

Responses

Status: 200 - Successful response with list of Specimens

Status: 400 - Bad request. The error was encountered when parsing the content into the appropriate FHIR resource.

Status: 401 - Unauthorized. Possible causes
  • a token failed authorization
  • a user could not be found

Status: 403 - Forbidden. Possible causes
  • a code or query parameter was not supported
  • a code may have had no valid equivalent in the EHR
  • a user does not have enough permissions to perform a certain action
  • a query was invalid, for example a search token value ended in an escape character

Status: 404 - Resource not found. Possible causes
  • an operation was not supported
  • the FHIR resource was not implemented by the product adapter
  • the FHIR resource was not found
  • the service was unable to generate the FHIR resource possibly because a required element was not provided
  • the specified patient could not be found in the EHR
  • the paging information that was sent to the product was not correct indicating that the request for the page could not be honored

Status: 405 - Method not allowed. Possible cause
  • resource does not exist

Status: 412 - Precondition failed. Possible causes
  • certain precondition checks failed, for example a version mismatch
  • an update could not be processed as the If-Match tag didn't match the version

Status: 413 - Request entity too large. Possible cause
  • a request could not be honored because it was too expensive for the server to execute, for example a search that would return a million records

Status: 422 - Unprocessable entity. Possible cause
  • an exception was thrown upon violated constraint, for example missing or invalid element for resource or if an update on a resource did not happen

Status: 429 - Too many requests. Possible causes
  • too many concurrent FHIR requests

Status: 500 - Internal server error. Possible causes
  • the system was missing configuration information, for example if a URL to a service was missing or a security group was not found for the user
  • none of the available exceptions are appropriate