Implantable Device

Device

deviceGet

Get a Device resource based on the resource ID, or search by resource ID, patient ID, or device type. A device type is usually a SNOMED code. For more information on the syntax used for searches, go to Searching.


/device/

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"//device/?_id=&patient=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeviceApi;

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

public class DeviceApiExample {

    public static void main(String[] args) {
        
        DeviceApi apiInstance = new DeviceApi();
        String id = id_example; // String | Resource ID.
        String patient = patient_example; // String | Patient ID.
        String type = type_example; // String | Device type. For example, a SNOMED code.
        try {
            Device result = apiInstance.deviceGet(id, patient, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceApi#deviceGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeviceApi;

public class DeviceApiExample {

    public static void main(String[] args) {
        DeviceApi apiInstance = new DeviceApi();
        String id = id_example; // String | Resource ID.
        String patient = patient_example; // String | Patient ID.
        String type = type_example; // String | Device type. For example, a SNOMED code.
        try {
            Device result = apiInstance.deviceGet(id, patient, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceApi#deviceGet");
            e.printStackTrace();
        }
    }
}
String *id = id_example; // Resource ID. (optional)
String *patient = patient_example; // Patient ID. (optional)
String *type = type_example; // Device type. For example, a SNOMED code. (optional)

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

[apiInstance deviceGetWith:id
    patient:patient
    type:type
              completionHandler: ^(Device output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ImplantableDevice = require('implantable_device');

var api = new ImplantableDevice.DeviceApi()
var opts = { 
  'id': id_example, // {{String}} Resource ID.
  'patient': patient_example, // {{String}} Patient ID.
  'type': type_example // {{String}} Device type. For example, a SNOMED code.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deviceGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DeviceApi();
            var id = id_example;  // String | Resource ID. (optional) 
            var patient = patient_example;  // String | Patient ID. (optional) 
            var type = type_example;  // String | Device type. For example, a SNOMED code. (optional) 

            try
            {
                Device result = apiInstance.deviceGet(id, patient, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeviceApi.deviceGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDeviceApi();
$id = id_example; // String | Resource ID.
$patient = patient_example; // String | Patient ID.
$type = type_example; // String | Device type. For example, a SNOMED code.

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

my $api_instance = WWW::SwaggerClient::DeviceApi->new();
my $id = id_example; # String | Resource ID.
my $patient = patient_example; # String | Patient ID.
my $type = type_example; # String | Device type. For example, a SNOMED code.

eval { 
    my $result = $api_instance->deviceGet(id => $id, patient => $patient, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeviceApi->deviceGet: $@\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.DeviceApi()
id = id_example # String | Resource ID. (optional)
patient = patient_example # String | Patient ID. (optional)
type = type_example # String | Device type. For example, a SNOMED code. (optional)

try: 
    api_response = api_instance.device_get(id=id, patient=patient, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeviceApi->deviceGet: %s\n" % e)

Parameters

Query parameters
Name Description
_id
String
Resource ID.
patient
String
Patient ID.
type
String
Device type. For example, a SNOMED code.

Responses

Status: 200 - Successful operation

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


devicePatientTypeGet

Search for Device resources based on the combination of patient ID and device type. For more information on the syntax used for searches, go to Searching.


/device/[patient]&[type]

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"//device/[patient]&[type]?patient=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeviceApi;

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

public class DeviceApiExample {

    public static void main(String[] args) {
        
        DeviceApi apiInstance = new DeviceApi();
        String patient = patient_example; // String | Patient ID.
        String type = type_example; // String | Device type. For example, a SNOMED code.
        try {
            Device result = apiInstance.devicePatientTypeGet(patient, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceApi#devicePatientTypeGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeviceApi;

public class DeviceApiExample {

    public static void main(String[] args) {
        DeviceApi apiInstance = new DeviceApi();
        String patient = patient_example; // String | Patient ID.
        String type = type_example; // String | Device type. For example, a SNOMED code.
        try {
            Device result = apiInstance.devicePatientTypeGet(patient, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceApi#devicePatientTypeGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient ID. (optional)
String *type = type_example; // Device type. For example, a SNOMED code. (optional)

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

[apiInstance devicePatientTypeGetWith:patient
    type:type
              completionHandler: ^(Device output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ImplantableDevice = require('implantable_device');

var api = new ImplantableDevice.DeviceApi()
var opts = { 
  'patient': patient_example, // {{String}} Patient ID.
  'type': type_example // {{String}} Device type. For example, a SNOMED code.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.devicePatientTypeGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DeviceApi();
            var patient = patient_example;  // String | Patient ID. (optional) 
            var type = type_example;  // String | Device type. For example, a SNOMED code. (optional) 

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

$api_instance = new Swagger\Client\ApiDeviceApi();
$patient = patient_example; // String | Patient ID.
$type = type_example; // String | Device type. For example, a SNOMED code.

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

my $api_instance = WWW::SwaggerClient::DeviceApi->new();
my $patient = patient_example; # String | Patient ID.
my $type = type_example; # String | Device type. For example, a SNOMED code.

eval { 
    my $result = $api_instance->devicePatientTypeGet(patient => $patient, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeviceApi->devicePatientTypeGet: $@\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.DeviceApi()
patient = patient_example # String | Patient ID. (optional)
type = type_example # String | Device type. For example, a SNOMED code. (optional)

try: 
    api_response = api_instance.device_patient_type_get(patient=patient, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeviceApi->devicePatientTypeGet: %s\n" % e)

Parameters

Query parameters
Name Description
patient
String
Patient ID.
type
String
Device type. For example, a SNOMED code.

Responses

Status: 200 - Successful operation

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