# SwiftShiftApi.PatientApi

All URIs are relative to *http://localhost:3000*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteOrganizationPatient**](PatientApi.md#deleteOrganizationPatient) | **DELETE** /organizations/{organization_id}/patients/{patient_id} | 
[**deletePatient**](PatientApi.md#deletePatient) | **DELETE** /organizations/{organization_id}/sites/{site_id}/patients/{patient_id} | 
[**getPatient**](PatientApi.md#getPatient) | **GET** /organizations/{organization_id}/sites/{site_id}/patients/{patient_id} | 
[**listOrganizationPatients**](PatientApi.md#listOrganizationPatients) | **GET** /organizations/{organization_id}/patients | List organization patients.
[**listPatients**](PatientApi.md#listPatients) | **GET** /patients | List patients.
[**listSitePatients**](PatientApi.md#listSitePatients) | **GET** /organizations/{organization_id}/sites/{site_id}/patients | List site patients.
[**postPatient**](PatientApi.md#postPatient) | **POST** /organizations/{organization_id}/sites/{site_id}/patients | Creates a patient.
[**putPatient**](PatientApi.md#putPatient) | **PUT** /organizations/{organization_id}/sites/{site_id}/patients/{patient_id} | 


<a name="deleteOrganizationPatient"></a>
# **deleteOrganizationPatient**
> Patient deleteOrganizationPatient(organizationId, patientId)



Delete patient.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let patientId = "patientId_example"; // String | The id of the patient.
apiInstance.deleteOrganizationPatient(organizationId, patientId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **patientId** | **String**| The id of the patient. | 

### Return type

[**Patient**](Patient.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="deletePatient"></a>
# **deletePatient**
> Patient deletePatient(organizationId, siteId, patientId)



Delete patient.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let patientId = "patientId_example"; // String | The id of the patient.
apiInstance.deletePatient(organizationId, siteId, patientId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **patientId** | **String**| The id of the patient. | 

### Return type

[**Patient**](Patient.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getPatient"></a>
# **getPatient**
> Patient getPatient(organizationId, siteId, patientId)



Get patient details.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let patientId = "patientId_example"; // String | The id of the patient.
apiInstance.getPatient(organizationId, siteId, patientId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **patientId** | **String**| The id of the patient. | 

### Return type

[**Patient**](Patient.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listOrganizationPatients"></a>
# **listOrganizationPatients**
> InlineResponse20013 listOrganizationPatients(organizationId, opts)

List organization patients.

List organization patients.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let opts = {
  'take': 50, // Number | Page size.
  'skip': 0, // Number | The start index.
  'search': "search_example", // String | Search phrase.
  'select': ["null"], // [String] | List of the properties to return.
  'sort': ["null"], // [String] | List of the properties to sort by.
  'q': "q_example" // String | resource query language
};
apiInstance.listOrganizationPatients(organizationId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **take** | **Number**| Page size. | [optional] [default to 50]
 **skip** | **Number**| The start index. | [optional] [default to 0]
 **search** | **String**| Search phrase. | [optional] 
 **select** | [**[String]**](String.md)| List of the properties to return. | [optional] 
 **sort** | [**[String]**](String.md)| List of the properties to sort by. | [optional] 
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse20013**](InlineResponse20013.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listPatients"></a>
# **listPatients**
> InlineResponse20013 listPatients(opts)

List patients.

List patients.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let opts = {
  'take': 50, // Number | Page size.
  'skip': 0, // Number | The start index.
  'search': "search_example", // String | Search phrase.
  'select': ["null"], // [String] | List of the properties to return.
  'sort': ["null"], // [String] | List of the properties to sort by.
  'q': "q_example" // String | resource query language
};
apiInstance.listPatients(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **take** | **Number**| Page size. | [optional] [default to 50]
 **skip** | **Number**| The start index. | [optional] [default to 0]
 **search** | **String**| Search phrase. | [optional] 
 **select** | [**[String]**](String.md)| List of the properties to return. | [optional] 
 **sort** | [**[String]**](String.md)| List of the properties to sort by. | [optional] 
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse20013**](InlineResponse20013.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listSitePatients"></a>
# **listSitePatients**
> InlineResponse20013 listSitePatients(organizationId, siteId, opts)

List site patients.

List site patients.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let opts = {
  'take': 50, // Number | Page size.
  'skip': 0, // Number | The start index.
  'search': "search_example", // String | Search phrase.
  'select': ["null"], // [String] | List of the properties to return.
  'sort': ["null"], // [String] | List of the properties to sort by.
  'q': "q_example" // String | resource query language
};
apiInstance.listSitePatients(organizationId, siteId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **take** | **Number**| Page size. | [optional] [default to 50]
 **skip** | **Number**| The start index. | [optional] [default to 0]
 **search** | **String**| Search phrase. | [optional] 
 **select** | [**[String]**](String.md)| List of the properties to return. | [optional] 
 **sort** | [**[String]**](String.md)| List of the properties to sort by. | [optional] 
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse20013**](InlineResponse20013.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="postPatient"></a>
# **postPatient**
> Patient postPatient(organizationId, siteId, opts)

Creates a patient.

Creates a patient.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let opts = {
  'patientPayload': new SwiftShiftApi.PatientPayload() // PatientPayload | 
};
apiInstance.postPatient(organizationId, siteId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **patientPayload** | [**PatientPayload**](PatientPayload.md)|  | [optional] 

### Return type

[**Patient**](Patient.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="putPatient"></a>
# **putPatient**
> Patient putPatient(organizationId, siteId, patientId, opts)



Update patient details.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.PatientApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let patientId = "patientId_example"; // String | The id of the patient.
let opts = {
  'patientPayload': new SwiftShiftApi.PatientPayload() // PatientPayload | 
};
apiInstance.putPatient(organizationId, siteId, patientId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **patientId** | **String**| The id of the patient. | 
 **patientPayload** | [**PatientPayload**](PatientPayload.md)|  | [optional] 

### Return type

[**Patient**](Patient.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

