Encounter

Default

encounterGet

Get an Encounter resource based on the resource ID, or search by ID, patient ID, status, class, type, date, or identifier.


/encounter/

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"//encounter/?_id=&patient=&status=&class=&type=&date=&identifier="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String id = id_example; // String | Resource ID.
        String patient = patient_example; // String | Patient ID.
        String status = status_example; // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
        String class = class_example; // String | Classification of the patient encounter.
        String type = type_example; // String | Specific type of encounter.
        String date = date_example; // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
        String identifier = identifier_example; // String | Identifier(s) by which this encounter is known.
        try {
            Encounter result = apiInstance.encounterGet(id, patient, status, class, type, date, identifier);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String id = id_example; // String | Resource ID.
        String patient = patient_example; // String | Patient ID.
        String status = status_example; // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
        String class = class_example; // String | Classification of the patient encounter.
        String type = type_example; // String | Specific type of encounter.
        String date = date_example; // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
        String identifier = identifier_example; // String | Identifier(s) by which this encounter is known.
        try {
            Encounter result = apiInstance.encounterGet(id, patient, status, class, type, date, identifier);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterGet");
            e.printStackTrace();
        }
    }
}
String *id = id_example; // Resource ID. (optional)
String *patient = patient_example; // Patient ID. (optional)
String *status = status_example; // Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown. (optional)
String *class = class_example; // Classification of the patient encounter. (optional)
String *type = type_example; // Specific type of encounter. (optional)
String *date = date_example; // A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates. (optional)
String *identifier = identifier_example; // Identifier(s) by which this encounter is known. (optional)

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

[apiInstance encounterGetWith:id
    patient:patient
    status:status
    class:class
    type:type
    date:date
    identifier:identifier
              completionHandler: ^(Encounter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Encounter = require('encounter');

var api = new Encounter.DefaultApi()
var opts = { 
  'id': id_example, // {{String}} Resource ID.
  'patient': patient_example, // {{String}} Patient ID.
  'status': status_example, // {{String}} Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
  'class': class_example, // {{String}} Classification of the patient encounter.
  'type': type_example, // {{String}} Specific type of encounter.
  'date': date_example, // {{String}} A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
  'identifier': identifier_example // {{String}} Identifier(s) by which this encounter is known.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.encounterGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var id = id_example;  // String | Resource ID. (optional) 
            var patient = patient_example;  // String | Patient ID. (optional) 
            var status = status_example;  // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown. (optional) 
            var class = class_example;  // String | Classification of the patient encounter. (optional) 
            var type = type_example;  // String | Specific type of encounter. (optional) 
            var date = date_example;  // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates. (optional) 
            var identifier = identifier_example;  // String | Identifier(s) by which this encounter is known. (optional) 

            try
            {
                Encounter result = apiInstance.encounterGet(id, patient, status, class, type, date, identifier);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.encounterGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$id = id_example; // String | Resource ID.
$patient = patient_example; // String | Patient ID.
$status = status_example; // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
$class = class_example; // String | Classification of the patient encounter.
$type = type_example; // String | Specific type of encounter.
$date = date_example; // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
$identifier = identifier_example; // String | Identifier(s) by which this encounter is known.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $id = id_example; # String | Resource ID.
my $patient = patient_example; # String | Patient ID.
my $status = status_example; # String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
my $class = class_example; # String | Classification of the patient encounter.
my $type = type_example; # String | Specific type of encounter.
my $date = date_example; # String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
my $identifier = identifier_example; # String | Identifier(s) by which this encounter is known.

eval { 
    my $result = $api_instance->encounterGet(id => $id, patient => $patient, status => $status, class => $class, type => $type, date => $date, identifier => $identifier);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->encounterGet: $@\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.DefaultApi()
id = id_example # String | Resource ID. (optional)
patient = patient_example # String | Patient ID. (optional)
status = status_example # String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown. (optional)
class = class_example # String | Classification of the patient encounter. (optional)
type = type_example # String | Specific type of encounter. (optional)
date = date_example # String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates. (optional)
identifier = identifier_example # String | Identifier(s) by which this encounter is known. (optional)

try: 
    api_response = api_instance.encounter_get(id=id, patient=patient, status=status, class=class, type=type, date=date, identifier=identifier)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->encounterGet: %s\n" % e)

Parameters

Query parameters
Name Description
_id
String
Resource ID.
patient
String
Patient ID.
status
String
Encounter status. Values include planned, in-progress, on-hold, completed, cancelled, entered-in-error, and unknown.
class
String
Classification of the patient encounter.
type
String
Specific type of encounter.
date
String
A date within the actualPeriod the Encounter lasted. For more information on date formats, see <a href="http://hl7.org/fhir/search.html#date">dates</a>.
identifier
String
Identifier(s) by which this encounter is known.

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


encounterPatientClassGet

Search for Encounter resources based on a combination of patient ID and class.


/encounter/[patient]&[class]

Usage and SDK Samples

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

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String class = class_example; // String | Classification of the patient encounter.
        try {
            Encounter result = apiInstance.encounterPatientClassGet(patient, class);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientClassGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String class = class_example; // String | Classification of the patient encounter.
        try {
            Encounter result = apiInstance.encounterPatientClassGet(patient, class);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientClassGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient ID. (optional)
String *class = class_example; // Classification of the patient encounter. (optional)

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

[apiInstance encounterPatientClassGetWith:patient
    class:class
              completionHandler: ^(Encounter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Encounter = require('encounter');

var api = new Encounter.DefaultApi()
var opts = { 
  'patient': patient_example, // {{String}} Patient ID.
  'class': class_example // {{String}} Classification of the patient encounter.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.encounterPatientClassGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var patient = patient_example;  // String | Patient ID. (optional) 
            var class = class_example;  // String | Classification of the patient encounter. (optional) 

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

$api_instance = new Swagger\Client\ApiDefaultApi();
$patient = patient_example; // String | Patient ID.
$class = class_example; // String | Classification of the patient encounter.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $patient = patient_example; # String | Patient ID.
my $class = class_example; # String | Classification of the patient encounter.

eval { 
    my $result = $api_instance->encounterPatientClassGet(patient => $patient, class => $class);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->encounterPatientClassGet: $@\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.DefaultApi()
patient = patient_example # String | Patient ID. (optional)
class = class_example # String | Classification of the patient encounter. (optional)

try: 
    api_response = api_instance.encounter_patient_class_get(patient=patient, class=class)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->encounterPatientClassGet: %s\n" % e)

Parameters

Query parameters
Name Description
patient
String
Patient ID.
class
String
Classification of the patient encounter.

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


encounterPatientDateGet

Search for Encounter resources based on a combination of patient ID and date.


/encounter/[patient]&[date]

Usage and SDK Samples

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

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String date = date_example; // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
        try {
            Encounter result = apiInstance.encounterPatientDateGet(patient, date);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientDateGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String date = date_example; // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
        try {
            Encounter result = apiInstance.encounterPatientDateGet(patient, date);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientDateGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient ID. (optional)
String *date = date_example; // A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates. (optional)

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

[apiInstance encounterPatientDateGetWith:patient
    date:date
              completionHandler: ^(Encounter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Encounter = require('encounter');

var api = new Encounter.DefaultApi()
var opts = { 
  'patient': patient_example, // {{String}} Patient ID.
  'date': date_example // {{String}} A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.encounterPatientDateGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var patient = patient_example;  // String | Patient ID. (optional) 
            var date = date_example;  // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates. (optional) 

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

$api_instance = new Swagger\Client\ApiDefaultApi();
$patient = patient_example; // String | Patient ID.
$date = date_example; // String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $patient = patient_example; # String | Patient ID.
my $date = date_example; # String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates.

eval { 
    my $result = $api_instance->encounterPatientDateGet(patient => $patient, date => $date);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->encounterPatientDateGet: $@\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.DefaultApi()
patient = patient_example # String | Patient ID. (optional)
date = date_example # String | A date within the actualPeriod the Encounter lasted. For more information on date formats, see dates. (optional)

try: 
    api_response = api_instance.encounter_patient_date_get(patient=patient, date=date)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->encounterPatientDateGet: %s\n" % e)

Parameters

Query parameters
Name Description
patient
String
Patient ID.
date
String
A date within the actualPeriod the Encounter lasted. For more information on date formats, see <a href="http://hl7.org/fhir/search.html#date">dates</a>.

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


encounterPatientStatusGet

Search for Encounter resources based on a combination of patient ID and status.


/encounter/[patient]&[status]

Usage and SDK Samples

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

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String status = status_example; // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
        try {
            Encounter result = apiInstance.encounterPatientStatusGet(patient, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientStatusGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String status = status_example; // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
        try {
            Encounter result = apiInstance.encounterPatientStatusGet(patient, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientStatusGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient ID. (optional)
String *status = status_example; // Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown. (optional)

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

[apiInstance encounterPatientStatusGetWith:patient
    status:status
              completionHandler: ^(Encounter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Encounter = require('encounter');

var api = new Encounter.DefaultApi()
var opts = { 
  'patient': patient_example, // {{String}} Patient ID.
  'status': status_example // {{String}} Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.encounterPatientStatusGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var patient = patient_example;  // String | Patient ID. (optional) 
            var status = status_example;  // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown. (optional) 

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

$api_instance = new Swagger\Client\ApiDefaultApi();
$patient = patient_example; // String | Patient ID.
$status = status_example; // String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $patient = patient_example; # String | Patient ID.
my $status = status_example; # String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown.

eval { 
    my $result = $api_instance->encounterPatientStatusGet(patient => $patient, status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->encounterPatientStatusGet: $@\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.DefaultApi()
patient = patient_example # String | Patient ID. (optional)
status = status_example # String | Encounter status. Values include planned, in-progress, on-hold, completed,  cancelled, entered-in-error, and unknown. (optional)

try: 
    api_response = api_instance.encounter_patient_status_get(patient=patient, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->encounterPatientStatusGet: %s\n" % e)

Parameters

Query parameters
Name Description
patient
String
Patient ID.
status
String
Encounter status. Values include planned, in-progress, on-hold, completed, cancelled, entered-in-error, and unknown.

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


encounterPatientTypeGet

Search for Encounter resources based on a combination of patient ID and type.


/encounter/[patient]&[type]

Usage and SDK Samples

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

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String type = type_example; // String | Specific type of encounter.
        try {
            Encounter result = apiInstance.encounterPatientTypeGet(patient, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientTypeGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String patient = patient_example; // String | Patient ID.
        String type = type_example; // String | Specific type of encounter.
        try {
            Encounter result = apiInstance.encounterPatientTypeGet(patient, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#encounterPatientTypeGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient ID. (optional)
String *type = type_example; // Specific type of encounter. (optional)

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

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

var api = new Encounter.DefaultApi()
var opts = { 
  'patient': patient_example, // {{String}} Patient ID.
  'type': type_example // {{String}} Specific type of encounter.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.encounterPatientTypeGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var patient = patient_example;  // String | Patient ID. (optional) 
            var type = type_example;  // String | Specific type of encounter. (optional) 

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

$api_instance = new Swagger\Client\ApiDefaultApi();
$patient = patient_example; // String | Patient ID.
$type = type_example; // String | Specific type of encounter.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $patient = patient_example; # String | Patient ID.
my $type = type_example; # String | Specific type of encounter.

eval { 
    my $result = $api_instance->encounterPatientTypeGet(patient => $patient, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->encounterPatientTypeGet: $@\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.DefaultApi()
patient = patient_example # String | Patient ID. (optional)
type = type_example # String | Specific type of encounter. (optional)

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

Parameters

Query parameters
Name Description
patient
String
Patient ID.
type
String
Specific type of encounter.

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