MedicationDispense

MedicationDispense

medicationDispensePatientGet

Get a MedicationDispense resource based on the patient ID..


/MedicationDispense/[patient]

Usage and SDK Samples

curl -X GET\
-H "Accept: application/fhir+json"\
"//MedicationDispense/[patient]?patient="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MedicationDispenseApi;

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

public class MedicationDispenseApiExample {

    public static void main(String[] args) {
        
        MedicationDispenseApi apiInstance = new MedicationDispenseApi();
        String patient = patient_example; // String | Patient reference (e.g., `Patient/123` or an identifier)
        try {
            Bundle result = apiInstance.medicationDispensePatientGet(patient);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MedicationDispenseApi#medicationDispensePatientGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MedicationDispenseApi;

public class MedicationDispenseApiExample {

    public static void main(String[] args) {
        MedicationDispenseApi apiInstance = new MedicationDispenseApi();
        String patient = patient_example; // String | Patient reference (e.g., `Patient/123` or an identifier)
        try {
            Bundle result = apiInstance.medicationDispensePatientGet(patient);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MedicationDispenseApi#medicationDispensePatientGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient reference (e.g., `Patient/123` or an identifier)

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

[apiInstance medicationDispensePatientGetWith:patient
              completionHandler: ^(Bundle output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var MedicationDispense = require('medication_dispense');

var api = new MedicationDispense.MedicationDispenseApi()
var patient = patient_example; // {{String}} Patient reference (e.g., `Patient/123` or an identifier)

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

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

            var apiInstance = new MedicationDispenseApi();
            var patient = patient_example;  // String | Patient reference (e.g., `Patient/123` or an identifier)

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

$api_instance = new Swagger\Client\ApiMedicationDispenseApi();
$patient = patient_example; // String | Patient reference (e.g., `Patient/123` or an identifier)

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

my $api_instance = WWW::SwaggerClient::MedicationDispenseApi->new();
my $patient = patient_example; # String | Patient reference (e.g., `Patient/123` or an identifier)

eval { 
    my $result = $api_instance->medicationDispensePatientGet(patient => $patient);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MedicationDispenseApi->medicationDispensePatientGet: $@\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.MedicationDispenseApi()
patient = patient_example # String | Patient reference (e.g., `Patient/123` or an identifier)

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

Parameters

Query parameters
Name Description
patient*
String
Patient reference (e.g., `Patient/123` or an identifier)
Required

Responses

Status: 200 - Successful search

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


medicationDispensePatientStatusGet

Search for MedicationDispense records based on patient filtered by status.


/MedicationDispense/[patient]&[status]

Usage and SDK Samples

curl -X GET\
-H "Accept: application/fhir+json"\
"//MedicationDispense/[patient]&[status]?patient=&status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MedicationDispenseApi;

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

public class MedicationDispenseApiExample {

    public static void main(String[] args) {
        
        MedicationDispenseApi apiInstance = new MedicationDispenseApi();
        String patient = patient_example; // String | Patient reference
        String status = status_example; // String | Status of the medication dispense
        try {
            Bundle result = apiInstance.medicationDispensePatientStatusGet(patient, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MedicationDispenseApi#medicationDispensePatientStatusGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MedicationDispenseApi;

public class MedicationDispenseApiExample {

    public static void main(String[] args) {
        MedicationDispenseApi apiInstance = new MedicationDispenseApi();
        String patient = patient_example; // String | Patient reference
        String status = status_example; // String | Status of the medication dispense
        try {
            Bundle result = apiInstance.medicationDispensePatientStatusGet(patient, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MedicationDispenseApi#medicationDispensePatientStatusGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient reference
String *status = status_example; // Status of the medication dispense

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

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

var api = new MedicationDispense.MedicationDispenseApi()
var patient = patient_example; // {{String}} Patient reference
var status = status_example; // {{String}} Status of the medication dispense

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

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

            var apiInstance = new MedicationDispenseApi();
            var patient = patient_example;  // String | Patient reference
            var status = status_example;  // String | Status of the medication dispense

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

$api_instance = new Swagger\Client\ApiMedicationDispenseApi();
$patient = patient_example; // String | Patient reference
$status = status_example; // String | Status of the medication dispense

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

my $api_instance = WWW::SwaggerClient::MedicationDispenseApi->new();
my $patient = patient_example; # String | Patient reference
my $status = status_example; # String | Status of the medication dispense

eval { 
    my $result = $api_instance->medicationDispensePatientStatusGet(patient => $patient, status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MedicationDispenseApi->medicationDispensePatientStatusGet: $@\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.MedicationDispenseApi()
patient = patient_example # String | Patient reference
status = status_example # String | Status of the medication dispense

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

Parameters

Query parameters
Name Description
patient*
String
Patient reference
Required
status*
String
Status of the medication dispense
Required

Responses

Status: 200 - Successful search

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


medicationDispensePatientStatusTypeGet

Search for MedicationDispense records based on patient, status, and type.


/MedicationDispense/[patient]&[status]&[type]

Usage and SDK Samples

curl -X GET\
-H "Accept: application/fhir+json"\
"//MedicationDispense/[patient]&[status]&[type]?patient=&status=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MedicationDispenseApi;

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

public class MedicationDispenseApiExample {

    public static void main(String[] args) {
        
        MedicationDispenseApi apiInstance = new MedicationDispenseApi();
        String patient = patient_example; // String | Patient reference
        String status = status_example; // String | Status of the medication dispense
        String type = type_example; // String | Type of medication dispense (e.g., refill, emergency)
        try {
            Bundle result = apiInstance.medicationDispensePatientStatusTypeGet(patient, status, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MedicationDispenseApi#medicationDispensePatientStatusTypeGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MedicationDispenseApi;

public class MedicationDispenseApiExample {

    public static void main(String[] args) {
        MedicationDispenseApi apiInstance = new MedicationDispenseApi();
        String patient = patient_example; // String | Patient reference
        String status = status_example; // String | Status of the medication dispense
        String type = type_example; // String | Type of medication dispense (e.g., refill, emergency)
        try {
            Bundle result = apiInstance.medicationDispensePatientStatusTypeGet(patient, status, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MedicationDispenseApi#medicationDispensePatientStatusTypeGet");
            e.printStackTrace();
        }
    }
}
String *patient = patient_example; // Patient reference
String *status = status_example; // Status of the medication dispense
String *type = type_example; // Type of medication dispense (e.g., refill, emergency)

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

[apiInstance medicationDispensePatientStatusTypeGetWith:patient
    status:status
    type:type
              completionHandler: ^(Bundle output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var MedicationDispense = require('medication_dispense');

var api = new MedicationDispense.MedicationDispenseApi()
var patient = patient_example; // {{String}} Patient reference
var status = status_example; // {{String}} Status of the medication dispense
var type = type_example; // {{String}} Type of medication dispense (e.g., refill, emergency)

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

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

            var apiInstance = new MedicationDispenseApi();
            var patient = patient_example;  // String | Patient reference
            var status = status_example;  // String | Status of the medication dispense
            var type = type_example;  // String | Type of medication dispense (e.g., refill, emergency)

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

$api_instance = new Swagger\Client\ApiMedicationDispenseApi();
$patient = patient_example; // String | Patient reference
$status = status_example; // String | Status of the medication dispense
$type = type_example; // String | Type of medication dispense (e.g., refill, emergency)

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

my $api_instance = WWW::SwaggerClient::MedicationDispenseApi->new();
my $patient = patient_example; # String | Patient reference
my $status = status_example; # String | Status of the medication dispense
my $type = type_example; # String | Type of medication dispense (e.g., refill, emergency)

eval { 
    my $result = $api_instance->medicationDispensePatientStatusTypeGet(patient => $patient, status => $status, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MedicationDispenseApi->medicationDispensePatientStatusTypeGet: $@\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.MedicationDispenseApi()
patient = patient_example # String | Patient reference
status = status_example # String | Status of the medication dispense
type = type_example # String | Type of medication dispense (e.g., refill, emergency)

try: 
    api_response = api_instance.medication_dispense_patient_status_type_get(patient, status, type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MedicationDispenseApi->medicationDispensePatientStatusTypeGet: %s\n" % e)

Parameters

Query parameters
Name Description
patient*
String
Patient reference
Required
status*
String
Status of the medication dispense
Required
type*
String
Type of medication dispense (e.g., refill, emergency)
Required

Responses

Status: 200 - Successful search

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