medicationAdministrationGet
Get a MedicationAdministration resource based on the resource ID, or search by resource ID, patient ID, status, effective time, reason given, subject, reason not given, request, or patient identifier.
/MedicationAdministration/
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json,application/xml"\
"//MedicationAdministration/?_id=&patient=&status=&effective-time=&reason-given=&subject=&reason-not-given=&request=&patient.identifer="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MedicationAdministrationApi;
import java.io.File;
import java.util.*;
public class MedicationAdministrationApiExample {
public static void main(String[] args) {
MedicationAdministrationApi apiInstance = new MedicationAdministrationApi();
Integer id = 56; // Integer | Resource identifier.
String patient = patient_example; // String | Reference.
String status = status_example; // String | Event status.
date effectiveTime = ; // date | Time the administration occurred.
String reasonGiven = reasonGiven_example; // String | Reason for the administration.
String subject = subject_example; // String | Patient ID.
String reasonNotGiven = reasonNotGiven_example; // String | Reason the administration was not given or refused.
String request = request_example; // String | MedicationRequest ID.
String patient.identifer = patient.identifer_example; // String | Patient ID.
try {
MedicationAdministration result = apiInstance.medicationAdministrationGet(id, patient, status, effectiveTime, reasonGiven, subject, reasonNotGiven, request, patient.identifer);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MedicationAdministrationApi#medicationAdministrationGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.MedicationAdministrationApi;
public class MedicationAdministrationApiExample {
public static void main(String[] args) {
MedicationAdministrationApi apiInstance = new MedicationAdministrationApi();
Integer id = 56; // Integer | Resource identifier.
String patient = patient_example; // String | Reference.
String status = status_example; // String | Event status.
date effectiveTime = ; // date | Time the administration occurred.
String reasonGiven = reasonGiven_example; // String | Reason for the administration.
String subject = subject_example; // String | Patient ID.
String reasonNotGiven = reasonNotGiven_example; // String | Reason the administration was not given or refused.
String request = request_example; // String | MedicationRequest ID.
String patient.identifer = patient.identifer_example; // String | Patient ID.
try {
MedicationAdministration result = apiInstance.medicationAdministrationGet(id, patient, status, effectiveTime, reasonGiven, subject, reasonNotGiven, request, patient.identifer);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MedicationAdministrationApi#medicationAdministrationGet");
e.printStackTrace();
}
}
}
Integer *id = 56; // Resource identifier. (optional)
String *patient = patient_example; // Reference. (optional)
String *status = status_example; // Event status. (optional)
date *effectiveTime = ; // Time the administration occurred. (optional)
String *reasonGiven = reasonGiven_example; // Reason for the administration. (optional)
String *subject = subject_example; // Patient ID. (optional)
String *reasonNotGiven = reasonNotGiven_example; // Reason the administration was not given or refused. (optional)
String *request = request_example; // MedicationRequest ID. (optional)
String *patient.identifer = patient.identifer_example; // Patient ID. (optional)
MedicationAdministrationApi *apiInstance = [[MedicationAdministrationApi alloc] init];
[apiInstance medicationAdministrationGetWith:id
patient:patient
status:status
effectiveTime:effectiveTime
reasonGiven:reasonGiven
subject:subject
reasonNotGiven:reasonNotGiven
request:request
patient.identifer:patient.identifer
completionHandler: ^(MedicationAdministration output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var MedicationAdministration = require('medication_administration');
var api = new MedicationAdministration.MedicationAdministrationApi()
var opts = {
'id': 56, // {{Integer}} Resource identifier.
'patient': patient_example, // {{String}} Reference.
'status': status_example, // {{String}} Event status.
'effectiveTime': , // {{date}} Time the administration occurred.
'reasonGiven': reasonGiven_example, // {{String}} Reason for the administration.
'subject': subject_example, // {{String}} Patient ID.
'reasonNotGiven': reasonNotGiven_example, // {{String}} Reason the administration was not given or refused.
'request': request_example, // {{String}} MedicationRequest ID.
'patient.identifer': patient.identifer_example // {{String}} Patient ID.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.medicationAdministrationGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class medicationAdministrationGetExample
{
public void main()
{
var apiInstance = new MedicationAdministrationApi();
var id = 56; // Integer | Resource identifier. (optional)
var patient = patient_example; // String | Reference. (optional)
var status = status_example; // String | Event status. (optional)
var effectiveTime = new date(); // date | Time the administration occurred. (optional)
var reasonGiven = reasonGiven_example; // String | Reason for the administration. (optional)
var subject = subject_example; // String | Patient ID. (optional)
var reasonNotGiven = reasonNotGiven_example; // String | Reason the administration was not given or refused. (optional)
var request = request_example; // String | MedicationRequest ID. (optional)
var patient.identifer = patient.identifer_example; // String | Patient ID. (optional)
try
{
MedicationAdministration result = apiInstance.medicationAdministrationGet(id, patient, status, effectiveTime, reasonGiven, subject, reasonNotGiven, request, patient.identifer);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling MedicationAdministrationApi.medicationAdministrationGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiMedicationAdministrationApi();
$id = 56; // Integer | Resource identifier.
$patient = patient_example; // String | Reference.
$status = status_example; // String | Event status.
$effectiveTime = ; // date | Time the administration occurred.
$reasonGiven = reasonGiven_example; // String | Reason for the administration.
$subject = subject_example; // String | Patient ID.
$reasonNotGiven = reasonNotGiven_example; // String | Reason the administration was not given or refused.
$request = request_example; // String | MedicationRequest ID.
$patient.identifer = patient.identifer_example; // String | Patient ID.
try {
$result = $api_instance->medicationAdministrationGet($id, $patient, $status, $effectiveTime, $reasonGiven, $subject, $reasonNotGiven, $request, $patient.identifer);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MedicationAdministrationApi->medicationAdministrationGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MedicationAdministrationApi;
my $api_instance = WWW::SwaggerClient::MedicationAdministrationApi->new();
my $id = 56; # Integer | Resource identifier.
my $patient = patient_example; # String | Reference.
my $status = status_example; # String | Event status.
my $effectiveTime = ; # date | Time the administration occurred.
my $reasonGiven = reasonGiven_example; # String | Reason for the administration.
my $subject = subject_example; # String | Patient ID.
my $reasonNotGiven = reasonNotGiven_example; # String | Reason the administration was not given or refused.
my $request = request_example; # String | MedicationRequest ID.
my $patient.identifer = patient.identifer_example; # String | Patient ID.
eval {
my $result = $api_instance->medicationAdministrationGet(id => $id, patient => $patient, status => $status, effectiveTime => $effectiveTime, reasonGiven => $reasonGiven, subject => $subject, reasonNotGiven => $reasonNotGiven, request => $request, patient.identifer => $patient.identifer);
print Dumper($result);
};
if ($@) {
warn "Exception when calling MedicationAdministrationApi->medicationAdministrationGet: $@\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.MedicationAdministrationApi()
id = 56 # Integer | Resource identifier. (optional)
patient = patient_example # String | Reference. (optional)
status = status_example # String | Event status. (optional)
effectiveTime = # date | Time the administration occurred. (optional)
reasonGiven = reasonGiven_example # String | Reason for the administration. (optional)
subject = subject_example # String | Patient ID. (optional)
reasonNotGiven = reasonNotGiven_example # String | Reason the administration was not given or refused. (optional)
request = request_example # String | MedicationRequest ID. (optional)
patient.identifer = patient.identifer_example # String | Patient ID. (optional)
try:
api_response = api_instance.medication_administration_get(id=id, patient=patient, status=status, effectiveTime=effectiveTime, reasonGiven=reasonGiven, subject=subject, reasonNotGiven=reasonNotGiven, request=request, patient.identifer=patient.identifer)
pprint(api_response)
except ApiException as e:
print("Exception when calling MedicationAdministrationApi->medicationAdministrationGet: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| _id |
Integer
Resource identifier.
|
| patient |
String
Reference.
|
| status |
String
Event status.
|
| effective-time |
date
Time the administration occurred.
|
| reason-given |
String
Reason for the administration.
|
| subject |
String
Patient ID.
|
| reason-not-given |
String
Reason the administration was not given or refused.
|
| request |
String
MedicationRequest ID.
|
| patient.identifer |
String
Patient ID.
|