Sei sulla pagina 1di 188

Payer Integration Service Application Program

Interface (API) User Guide

Payer Integration Service - Application Program Interface (API) User Guide


By Philips Respironics
© 2019 Koninklijke Philips N.V. All rights reserved.
Payer Integration Service - API User Guide

Revision History:
1/23/2014 Initial version
6/18/2014 Updated document for SOAP endpoint
6/30/2014 Added OfficeGUID to UpsertPatient operation
7/14/2014 Added Office List operation
9/05/2014 Added section 9: EMR Integration
9/16/2014 Added section 8.11: Register Device V2 (Endpoint)
9/26/2014 Updated Patient Locator to accept patientGuid
11/5/2014 Updates to Patient locator endpoint to retrieve patient token for Payer Integration 1.6
release
3/2/2015 Added Patient locator V2 endpoint to retrieve patient token and GUID for Payer Integration
1.7a release
3/9/2015 Added GetClinician, AvailableSleepLabs, GetSleepDr, GetPCP, and updated
PatientDemographic object for patient insert/update/upsert.
6/1/2015 Modified code samples and document to make it more readable and easy to use.
6/25/2015 Added changes recommended to support PI 1.8 release
8/18/2015 Added changes to support PI 1.10 release Extended code examples
11/19/2015 Fixed errors in the code snippets.
Moved code snippets from files and added them into document.
Updated formatting and content for readability.
Removed content for targeted audience and fixed typographical mistakes.
Removed sample demo programs.
03/10/2016 Updated for Patient Notes and Best 30 Day Compliance Report
05/18/2016 Added Custom Field service.
Added required field note for StartOfDayHour in Patient Insert Request.
Added default value notes and fixed some errors.
09/19/2016 Added suggestion for DeviceSerialNumber and DeviceSerialNumberNew.
Added information to clarify other settings.
Updated reference to correctly include “PatientIntegration.”
Added compliant patient list note to section 19 Compliant Patient List GET.
12/13/2016 Replaced the domestic address block with the international address block. Added shading
to keywords, acronyms, code elements, etc. as an indicator to the translation vendor to not
translate those items.
3/7/2017 Added PAMS content (sections 27-45) and symbols table.
6/26/2017 Updated Intended Use section, added About Payer Integration section.
7/27/2017 Updated Sections 2.1, 2.2.1, 2.2.2, 3, 8, 8.2, 11.1, added Sections 47 & 48
10/18/2017 Updated HTTP status table (page 100) to include “clinician not found”
05/31/2018 Misc. corrections and additions. Added Mask and Accessory endpoints
07/24/2018 Corrected typo in “Badrequest (400)”; Clarified description of Reminder API Response for
Reminder Group POST JSON element; updated type and description for “Result” and
“Result Code” elements; Changed data types of Start and End elements from datetime to
string; deleted mandatory field requirement note for {DateOfBirth} query string field; misc.
formatting updates and corrections.
08/10/2018 Updated section 8 to include the new advanced statistics
09/18/2018 Added section 54 for Patient Escalations

Confidential Page i
© 2019 KPNV All Rights Reserved
Table of Contents Payer Integration Service - API User Guide

Corrected error indicating that PatientUUID was not always required in Patient Insert and
Upsert in sections 11.1 & 13.1;
Updated datetime format to match correct syntax (replaced T with a space) in section 19.1;
Updated section 53 to remove incorrect note about XML only support.
11/26/2018 Added sections 11, 59, 60 and 61 for Questionnaires related endpoints;
Updated section 35 to include the TimeZone property
01/27/2019 Corrected meaning of {PatientGuid} in section 32.1
03/11/2019 Added LastSuccessfulModemCall to section 8.
03/18/2019 Added additional description to Patient Notes POST.
05/07/2019 Updated for 1.28 release.
07/15/2019 Updated for 1.29 release.

Confidential Page ii
© 2019 KPNV All Rights Reserved
Table of Contents Payer Integration Service - API User Guide

Table of Contents
1. Preface ........................................................................................................................................................ 1
1.1 Intended Use ............................................................................................................................................ 1
1.2 About Payer Integration ........................................................................................................................... 1
1.3 Audience................................................................................................................................................... 1
1.4 Code Samples ........................................................................................................................................... 1
1.5 Cautions and Warnings ............................................................................................................................ 1
1.5.1 Cautions ...................................................................................................................................... 1
1.5.2 Warnings ..................................................................................................................................... 2
1.6 Registering as an Integrator ..................................................................................................................... 2
2. Introduction................................................................................................................................................. 3
2.1 Making Service Requests.......................................................................................................................... 3
2.2 Request Messages .................................................................................................................................... 3
2.2.1 Request Header .......................................................................................................................... 3
2.2.2 Computing the Signature ............................................................................................................ 5
2.2.3 Response Message...................................................................................................................... 5
3. Service Endpoints......................................................................................................................................... 6
4. Company Access List GET ............................................................................................................................. 8
4.1 Company Access List Request .................................................................................................................. 8
4.2 Company Access List Response ................................................................................................................ 8
5. Office Access List GET ................................................................................................................................. 11
5.1 Office Access List Request ...................................................................................................................... 11
5.2 Office Access List Response .................................................................................................................... 12
6. General Patient Locator GET....................................................................................................................... 15
6.1 General Patient Locator Request ........................................................................................................... 15
6.2 General Patient Locator Response ......................................................................................................... 17
7. Patient Locator by UUID GET ...................................................................................................................... 19
7.1 Patient Locator by UUID Request ........................................................................................................... 19
7.2 Patient Locator by UUID Response ........................................................................................................ 19
8. Patient Compliance Data GET ..................................................................................................................... 21
8.1 Patient Compliance Data Request .......................................................................................................... 22
8.2 Patient Compliance Data Response ....................................................................................................... 23
9. Therapy Reports GET.................................................................................................................................. 33
9.1 Therapy Reports Request ....................................................................................................................... 33
9.2 Therapy Reports Response ..................................................................................................................... 34
10. Best 30 Day Compliance Reports GET ......................................................................................................... 37
10.1 Best 30 Day Compliance Reports Request ............................................................................................. 37
10.2 Best 30 Day Compliance Reports Response ........................................................................................... 38
11. Questionnaire Reports GET ........................................................................................................................ 41
11.1 Questionnaire Reports GET request ....................................................................................................... 41
11.2 Questionnaire Reports GET response .................................................................................................... 41
12. Patient Insert POST .................................................................................................................................... 43
12.1 Patient Insert Request ............................................................................................................................ 44
12.2 Patient Insert Response ......................................................................................................................... 49
13. Patient Update PUT ................................................................................................................................... 54
13.1 Patient Update Request ......................................................................................................................... 54
13.2 Patient Update Response ....................................................................................................................... 59
14. Patient Upsert POST ................................................................................................................................... 64
14.1 Patient Upsert Request .......................................................................................................................... 64

Confidential Page iii


© 2019 KPNV All Rights Reserved
Table of Contents Payer Integration Service - API User Guide

14.2 Patient Upsert Response ........................................................................................................................ 68


15. Patient List GET .......................................................................................................................................... 69
15.1 Patient List GET Request ........................................................................................................................ 69
15.2 Patient List GET Response ...................................................................................................................... 70
16. Transaction Status GET............................................................................................................................... 71
16.1 Transaction Status Request .................................................................................................................... 71
16.2 Transaction Status Response.................................................................................................................. 72
17. Register Device POST ................................................................................................................................. 74
17.1 Register Device POST Request ............................................................................................................... 74
17.2 Register Device POST Response ............................................................................................................. 75
18. Register Device PUT ................................................................................................................................... 77
18.1 Register Device PUT Request ................................................................................................................. 77
18.2 Register Device PUT Response ............................................................................................................... 78
19. Register Device GET ................................................................................................................................... 80
19.1 Register Device GET Request.................................................................................................................. 80
19.2 Register Device GET Response ............................................................................................................... 80
20. Register Device DELETE .............................................................................................................................. 82
20.1 Register Device DELETE Request ............................................................................................................ 82
20.2 Register Device DELETE Response .......................................................................................................... 83
21. Compliant Patient List GET ......................................................................................................................... 84
21.1 Compliant Patient List Request .............................................................................................................. 84
21.2 Compliant Patient List Response ............................................................................................................ 85
22. Clinician List GET ........................................................................................................................................ 88
22.1 Clinician List Request .............................................................................................................................. 88
22.2 Clinician List Response ........................................................................................................................... 88
23. Sleep Lab List GET ...................................................................................................................................... 91
23.1 Sleep Lab List Request ............................................................................................................................ 91
23.2 Sleep Lab List Response.......................................................................................................................... 91
24. Sleep Doctor List GET ................................................................................................................................. 94
24.1 Sleep Doctor List Request....................................................................................................................... 94
24.2 Sleep Doctor List Response .................................................................................................................... 94
25. Primary Care Physician List GET .................................................................................................................. 97
25.1 Primary Care Physician List Request....................................................................................................... 97
25.2 Primary Care Physician List Response .................................................................................................... 98
26. Patient Notes GET .................................................................................................................................... 101
26.1 Patient Notes Request.......................................................................................................................... 101
26.2 Patient Notes Response ....................................................................................................................... 102
27. Patient Notes POST .................................................................................................................................. 103
27.1 Patient Notes POST Request ................................................................................................................ 103
27.2 Patient Note POST Response................................................................................................................ 104
28. Patient Custom Fields GET ........................................................................................................................ 105
28.1 Patient Custom Fields Request ............................................................................................................. 105
28.2 Patient Custom Fields Response .......................................................................................................... 106
29. Patient Communication POST................................................................................................................... 109
29.1 Patient Communication Request.......................................................................................................... 109
29.2 Patient Communication Response ....................................................................................................... 110
30. Communications Methods GET ................................................................................................................ 111
30.1 Communications Methods Request ..................................................................................................... 111
30.2 Communication Methods Response .................................................................................................... 111

Confidential Page iv
© 2019 KPNV All Rights Reserved
Table of Contents Payer Integration Service - API User Guide

31. Communications Reasons GET.................................................................................................................. 113


31.1 Communications Reasons Request ...................................................................................................... 113
31.2 Communication Reasons Response ..................................................................................................... 113
32. Patient Communications GET by Company ............................................................................................... 114
32.1 Communications Request .................................................................................................................... 114
32.2 Communication Methods Response .................................................................................................... 115
33. Patient Communications GET by Patient................................................................................................... 116
33.1 Communications Request .................................................................................................................... 116
33.2 Communication Response.................................................................................................................... 116
34. Patient Communications GET by Clinicians ............................................................................................... 118
34.1 Communications Request .................................................................................................................... 118
34.2 Communication Response.................................................................................................................... 118
35. Patient Communication GET by Communication GUID .............................................................................. 119
35.1 Communications Request .................................................................................................................... 119
35.2 Communication Response.................................................................................................................... 120
36. Patient Demographics GET ....................................................................................................................... 121
36.1 Patient Demographics Request ............................................................................................................ 121
36.2 Patient Demographics Response .......................................................................................................... 122
37. Reminder POST ........................................................................................................................................ 125
37.1 Reminder POST Request....................................................................................................................... 125
37.2 Reminder POST Response .................................................................................................................... 125
38. Reminder DELETE ..................................................................................................................................... 126
39. Reminder GET by Reminder GUID............................................................................................................. 127
39.1 Reminder GET Request......................................................................................................................... 127
39.2 Reminder GET Response ...................................................................................................................... 127
40. Reminder PATCH ...................................................................................................................................... 129
41. Reminder PUT .......................................................................................................................................... 130
42. Reminder GET by Patient ......................................................................................................................... 131
42.1 Reminder Request ................................................................................................................................ 131
42.2 Reminder Response.............................................................................................................................. 131
43. Reminder Group POST ............................................................................................................................. 132
43.1 Reminder API Request.......................................................................................................................... 132
43.2 Reminder API Response ....................................................................................................................... 133
44. Reminder Groups GET by Reminder GUID................................................................................................. 134
44.1 Reminder Request ................................................................................................................................ 134
44.2 Reminder Response.............................................................................................................................. 134
45. Reminder Groups GET by Integrator ......................................................................................................... 135
45.1 Reminder Group Request ..................................................................................................................... 135
45.2 Reminder Group Response .................................................................................................................. 136
46. Reminder Groups GET by Company .......................................................................................................... 137
46.1 Reminder Groups Request ................................................................................................................... 137
46.2 Reminder Groups Response ................................................................................................................. 137
47. Patient Reminder Groups GET by Patient.................................................................................................. 139
47.1 Reminder Groups Request ................................................................................................................... 139
47.2 Reminder Groups Response ................................................................................................................. 139
48. Patient Equipment POST Mask ................................................................................................................. 140
48.1 Post Mask Request ............................................................................................................................... 140
48.2 Post Mask Response ............................................................................................................................. 141

Confidential Page v
© 2019 KPNV All Rights Reserved
Table of Contents Payer Integration Service - API User Guide

49. Patient Equipment PUT Mask ................................................................................................................... 142


49.1 Put Mask Request................................................................................................................................. 142
49.2 Put Mask Response .............................................................................................................................. 143
50. Patient Equipment GET Mask Assigned to Patient .................................................................................... 145
50.1 Get Mask Request ................................................................................................................................ 145
50.1 Get Mask Response .............................................................................................................................. 146
51. Patient Equipment POST Accessory .......................................................................................................... 147
51.1 Post Accessory Request ........................................................................................................................ 147
51.2 Post Accessory Response ..................................................................................................................... 148
52. Patient Equipment GET Accessory Assigned to Patient.............................................................................. 149
52.1 Get Accessory Request ......................................................................................................................... 149
52.2 Get Accessory Response....................................................................................................................... 150
53. Company Equipment GET Accessories for Company.................................................................................. 151
53.1 Get Accessories List Request ................................................................................................................ 151
53.2 Get Accessory List Response ................................................................................................................ 151
54. Company Equipment GET Mask List for Company ..................................................................................... 152
54.1 Get Company Mask List Request .......................................................................................................... 152
54.2 Get Company Mask List Response ....................................................................................................... 153
55. Patient Escalation GET ............................................................................................................................. 153
55.1 Patient Escalations GET Request .......................................................................................................... 154
55.2 Patient Escalations GET Response ........................................................................................................ 155
56. EMR Integration ....................................................................................................................................... 156
57. Advanced Statistics Flag GET .................................................................................................................... 157
57.1 Advanced Statistics Flag GET Request .................................................................................................. 157
57.2 Advanced Statistics Flag GET Response ............................................................................................... 157
58. Advanced Statistics Flag PUT .................................................................................................................... 159
58.1 Advanced Statistics Flag PUT Request .................................................................................................. 159
58.2 Advanced Statistics Flag PUT Response ............................................................................................... 160
59. Questionnaire Templates GET .................................................................................................................. 160
59.1 Questionnaire Templates GET Request ................................................................................................ 160
59.2 Questionnaire Templates GET Response ............................................................................................. 161
60. Questions GET ......................................................................................................................................... 162
60.1 Questions GET request ......................................................................................................................... 162
60.2 Questions GET response....................................................................................................................... 163
61. Question Responses POST ........................................................................................................................ 164
61.1 Question Responses POST request ...................................................................................................... 164
61.2 Question Responses POST response .................................................................................................... 165
62. Legacy APIs (Endpoints) ........................................................................................................................... 166
62.1 General Patient Locator V1 GET ........................................................................................................... 166
62.1.1 General Patient Locator Request ............................................................................................ 167
62.1.2 General Patient Locator Response.......................................................................................... 168
62.2 Patient Upsert V1 POST ........................................................................................................................ 168
62.2.1 Patient Upsert V1 Request...................................................................................................... 169
62.2.2 Patient Upsert V1 Response ................................................................................................... 173
62.3 Transaction Status V1 GET ................................................................................................................... 173
62.3.1 Transaction Status V1 Request ............................................................................................... 174
62.3.2 Transaction Status V1 Response ............................................................................................. 174
62.4 Patient Compliance Data (SOAP) POST ................................................................................................ 175
62.4.1 Patient Compliance Data (SOAP) Request .............................................................................. 176

Confidential Page vi
© 2019 KPNV All Rights Reserved
Table of Contents Payer Integration Service - API User Guide

62.4.2 Patient Compliance Data (SOAP) Response ............................................................................ 178

Confidential Page vii


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

1. Preface
1.1 Intended Use

Payer Integration is intended to support patients by inserting and updating the patient demographics to the
EncoreAnywhere database. It also retrieves compliance data, Encore Anywhere therapy reports and provides
indications that the patient has achieved compliance via CMS guidelines. It provides summary data on patient
compliance to insurance providers (or payers) and Durable Medical Equipment (DME) suppliers.

1.2 About Payer Integration

Payer Integration Services are part of a web-service based system that accesses EncoreAnywhere to provide
patient-compliance information. This includes data created by Philips Respironics therapy devices. For more
information, please refer to the Encore Anywhere user guide. Payer Integration does not provide or aid in
diagnosis of any diseases or conditions.

Payer Integration is highly secure to help meet requirements for HIPAA compliance and privacy laws. This
includes access security as well as the security and privacy of transmitted data.

This document describes features of the Payer Integration Services compliance data web service and it is a guide
to help Payer Integrators use this service in their applications and other systems. This document outlines the key
points necessary for a successful integration and includes detailed explanations of the endpoint with code
samples.

1.3 Audience

This document is written for software developers. Any programming language may be used to send requests to
the Payer Integration services. The code samples referred to in this manual are written in C#. Readers should
be familiar with Extensible Markup Language (XML).

1.4 Code Samples

For the purposes of this document, code samples are provided. The samples are written in C# and are
compatible with .Net version 4.5 and later. Many of the samples use the following .Net libraries:

• System.Web
• System.Net.Http
• System.Net.Http.Headers
• System.Xml.Linq

1.5 Cautions and Warnings

1.5.1 Cautions

1. U.S. Federal law restricts this device to sale by, or on the order of, a licensed physician.
2. The code samples included in this document are provided on an “as is” basis, without warranty of any
kind. Philips Respironics does not warrant or guarantee their reliability, accuracy, or correctness of use

Confidential Page 1
© 2019 KPNV All Rights Reserved
Preface

in any way. Philips Respironics is not responsible for any damage that may occur as a result of using
these samples.

1.5.2 Warnings

1. This user guide serves as a reference.


2. Payer Integration is intended only for use by a Durable Medical Equipment (DME) supplier, in a clinical
(sleep lab) or homecare provider.

1.6 Registering as an Integrator

Before a DME supplier can begin to access the EncoreAnywhere system, the DME must register with Philips
Respironics as an authorized integrator and consumer of patient data in order to use Payer Integration services.
Philips provides each authorized Payer Integrator with a unique authorization ID and key. Philips also provides
the hostname for the EncoreAnywhere server. All integrators that use EncoreAnywhere must have an
authorization ID and key. The integrator must keep this information secure. Publishing or sharing the ID and key
with third parties can lead to violation of the HIPAA Privacy and Security Framework.

A given integrator may not have access to all endpoints. The endpoints available to each integrator will be made
known when the integrator registers with Philips Respironics.

Should the registration process involve negotiations or contracts, the integrator may be granted temporary
access for development purposes.

To register with Philips Respironics, contact Philips customer support at (800) 345-6443.

Confidential Page 2
© 2019 KPNV All Rights Reserved
2. Introduction
Payer Integration Services are part of a web-service based system that accesses EncoreAnywhere to provide
patient-compliance information for therapists, clinicians, home care providers, insurance providers (or payers)
and DMEs. EncoreAnywhere gathers, stores, manages, and presents patient-compliance data. This includes data
created by Philips Respironics sleep and home respiratory therapy devices. EncoreAnywhere is a complete
solution for gathering and viewing patients' compliance data over the web. EncoreAnywhere collects and stores
patient data.

This document describes features of the Payer Integration Services compliance data web service and it is a guide
to help Payer Integrators use this service in their applications and other systems. The web service is a set of
RESTful (Representational State Transfer) endpoints. This web service is a widely supported form of integration
across multiple languages and systems. This document outlines the key points necessary for a successful
integration and includes detailed explanations of the endpoint with code samples.

2.1 Making Service Requests

EncoreAnywhere receives a specially formatted HTTP request. Each request has two parts: a header and a
body. The response from EncoreAnywhere will also have a header and a body. Depending on the request, the
body of the request or the body of the response may be empty. As a RESTful service, no session is established.
Each request generates a single response. There is no state information retained.

2.2 Request Messages

EncoreAnywhere receives a specially formatted HTTP request. Each request has two parts: a header and a body.
The response from EncoreAnywhere will also have a header and a body. Depending on the request, the body of
the request or the body of the response may be empty. As a RESTful service, no session is established. Each
request generates a single response. There is no state information retained.

The EndpointURI includes the hostname and resource of the endpoint. The general format for the EndpointURI
is “https://” + “hostname” + / + “endpointURL” where https:// - Is a required part of the HTTP protocol.

Hostname - This server host name is providing the PI service. The production hostname is made known
to Payer Integration companies when they register. Typically, this is “Integration.EncoreAnywhere.com”.
Philips Respironics provides access to a sandbox that allows the developers to build and test their code
without affecting the production server. The hostname for the sandbox is “tmintegrationsandbox.net”.

endpointURL - This is the endpoint for the service being targeted by the request. The URL for an endpoint
varies from one PI service to the next. The Service Endpoints section of this manual describes the
endpoint information for each of the endpoints supported by Payer Integration service.

2.2.1 Request Header


As described in the HTTP protocol, not all of the HTTP header fields are supported by the Payer Integrator (PI)
endpoints. The format of the header is as shown in the Figure 1 below and should be present in every request to
the PI services.

Confidential Page 3
© 2019 KPNV All Rights Reserved
Figure 1
Host: <hostname>
The “<hostname>” identifies the name of the target server.

Timestamp: <UTCTime>
This “<UTCTime>” identifies the Coordinated Universal Time (UTC) stamp. This must match the timestamp used
in computing the signature for Authorization.
The format of the Timestamp is yyyyMMddHHmmss
where, yyyy - The current year as 4 digits
MM - The current month of the year as 2 digits (01-12)
dd - The day of the month as 2 digits (01-31)
HH - The hour of the day as 2 digits in 24 hour format (00-23)
mm - The minutes of the hour as 2 digits (00-59)
ss - The seconds of the minute as 2 digits (00-59)
For example, the date: “June 8, 2013 7:37:58 PM (UTC)” would convert to the timestamp:
“20130608193758”.

Authorization: <ID:Signature>
The authorization contains of ID and signature. The format of the authorization is
Authorization: ID:signature
Where, ID - Is the ID received when the Payer Integrator registered.
Signature - Is the base 64 format of HMACSHA256 computed string resulting from concatenation
of absolute path of the URI and timestamp used in the Timestamp: <UTCTime>.
The Computing the Signature section describes how to create a signature for Payer Integration request.
EncoreAnywhere Compliance Data Services uses a modified AWS (Amazon Web Services) REST authentication
model for authentication.

Accept: <content-type>
The “<content-type” identifies the expected content type of the response from the endpoint. If JSON is
expected, {application/json} should be the value. The format of this header is
Accept: {application/json}

NOTE: Not all of the endpoints support and respond with JSON content. Hence, the response content will be still
in XML format even if the JSON content is requested.

Confidential Page 4
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

2.2.2 Computing the Signature


Before the signature can be computed, the authorization ID and key must be obtained. Refer to the section 1.6
Registering as an Integrator on how to obtain an authorization ID and key.
HTTPS is used to provide a secure communication channel and your key is used to validate your identity for your
request. The ID/key pair must be provided with each request. Only requests with a valid ID/key pair are
acknowledged by the EncoreAnywhere service.
Below is an example (C#) with brief description on how to compute signature:
1. Encode the lower case of integrator key to bytes in UTF-8 format
var keyToBytes = Encoding.UTF8.GetBytes(integratorKey.ToString().ToLower());
2. Create a HMACSHA256 routine that uses the key bytes as the encryption key
var hmacSha256 = new System.Security.Cryptography.HMACSHA256(keyToBytes);
3. Create the signature by encrypting the encoded endpoint (Absolute path of the URI only) and timestamp
var signatureBytes = utf8.GetBytes(String.Concat(new Uri(url).AbsolutePath, timeStamp));
4. Convert the encrypted string to base-64 string format
var signature = Convert.ToBase64String(hmacSha256.ComputeHash(signatureBytes));

2.2.3 Response Message


The response message is composed of a header and a body. The header includes HTTPS Status Codes. The body
of the response is encoded in either Extensible Markup Language (XML) or JavaScript Object Notation (JSON)
based on the availability of the requested content-type. Each response includes an HTTP Status Code and a
result code.

Null attribute values are omitted from the response.

HTTP Status Codes and Result Code

Every HTTP request returns two pieces of information: the HTTP status code and the response body. A
successful response to a request returns a status code of 200 “OK”.

As a RESTful web service, it is common to receive other status codes when the item is not found, not available or
ambiguous. In the cases where the EncoreAnywhere Compliance Data returns an Error Response, the error
response contains details to indicate a cause for the error. The error responses are shown in the code blocks of
text. Only the <ResultCode> element is used to convey additional information to the HTTP Status Codes.

Confidential Page 5
© 2019 KPNV All Rights Reserved
3. Service Endpoints
Payer Integration Service provides service endpoint interfaces (SEI). These endpoints provide access to
EncoreAnywhere data, which includes compliance data. The primary root URL paths exposed by the service
include:
• https://(host)/PayerIntegrationExternal.v001/...
• https://(host)/ReportIntegrationExternal.v001/...
• https://(host)/PatientIntegrationExternal.v001/...
• https://(host)/PayerIntegrationExternal.v002/...
• https://(host)/PatientIntegrationExternal.v002/...
• https://(host)/EncoreExternalServices.REST/...
In the examples above, the “(host)” is replaced by the hostname of the EncoreAnywhere server to which the
DME has requested and been granted access. Each of these paths access one or more service SEIs. The host
name for the service is integration.encoreanywhere.com. A fully qualified URI for an endpoint would look like
this: https://integration.encoreanywhere.com/PayerIntegrationExternal.v001/Company
These APIs appear below with page numbers and links:

API Page API Page


Company Access List GET 8 Patient Communications GET 119
Office Access List GET 11 Patient Demographics GET 121
General Patient Locator GET 15 Reminder API POST 125
Patient Locator by UUID GET 19 Reminder DELETE 126
Patient Compliance Data GET 21 Reminder GET by Reminder GUID 127
Therapy Reports GET 33 Reminder PATCH 129
Best 30 Day Compliance Reports GET 37 Reminder PUT 130
Patient Insert POST 43 Reminder GET by Patient 131
Patient Update PUT 54 Reminder Group POST 132
Patient Upsert POST 64 Reminder Groups GET by Reminder GUID 134
Transaction Status GET 69 Reminder Groups GET by Integrator 135
Register Device POST 74 Reminder Groups GET by Company 137
Register Device PUT 77 Patient Reminder Groups GET by Patient 139
Register Device GET 80 Patient Equipment POST Mask 140
Register Device DELETE 82 Patient Equipment PUT Mask 142
Compliant Patient List GET 84 Patient Equipment GET Mask Assigned to Patient 145
Clinician List GET 88 Patient Equipment POST Accessory 147
Sleep Lab List GET 91 Patient Equipment GET Accessory Assigned to Patient 149
Sleep Doctor List GET 94 Company Equipment GET Accessories for Company 151
Primary Care Physician List GET 97 Company Equipment GET Mask List for Company 152
Patient Notes POST 103 EMR Integration 153
Patient Custom Fields GET 105 Advanced Statistics Flag GET 157
Patient Communication POST 109 Advanced Statistics Flag PUT 159
Communications Methods GET 111 Legacy Endpoint - General Patient Locator V1 GET 166
Communications Reasons GET 113 Legacy Endpoint - Patient Upsert V1 POST 168
Companies - Patient Communications GET 114 Legacy Endpoint - Transaction Status V1 GET 173

Confidential Page 6
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

Patients - Patient Communications GET 116 Legacy Endpoint - Patient Compliance Data (SOAP) POST 175
Clinicians GET 118

Endpoint Permissions
In addition to sending a properly formatted request, your Philips Respironics supplied integrator credentials
must also be configured with the proper permission necessary to access each endpoint. If your integrator
credentials lack sufficient permission, the HTTP status code returned in most cases will be Unauthorized (401).

Confidential Page 7
© 2019 KPNV All Rights Reserved
4. Company Access List GET
The company access list endpoint provides the list of all DME companies to which the requestor providing
credentials has access. The list contains the Company Access GUID, a name for each company and a flag
indicating if the integrator can update patients within that company. The identifier can be used in other
endpoints where a specific company must be defined.

NOTE: Philips reserves the right to change these company identifiers at any time.

4.1 Company Access List Request

The syntax for the company access list request and an example of a correctly formatted access list request can
be found below:

GET https://{host}/PayerIntegrationExternal.v001/Company
Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company

The variable portion of the endpoint name is shown in the table below:

HTTP
Meaning
Argument
Specifies the host name for EncoreAnywhere that was received from Philips Respironics.
{host}
Typically, this is Integration.EncoreAnywhere.com

4.2 Company Access List Response

An example of a company access list response in XML can be found below:

<CompanyListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Companies>
<Company>
<AccessKey>fe3de913-17f8-41a3-bf6b-87a8297f8d16</AccessKey>
<CreateUpdatePatients>true</CreateUpdatePatients>
<Name>ABC Medical</Name>
</Company>
</Companies>
</CompanyListResponse>

An example of a company access list response in JSON can be found below:

{"Result":"Success","ResultCode":1,"Companies":[{"AccessKey":"fe3de913-17f8-
41a3-bf6b-87a8297f8d16","CreateUpdatePatients":true,"Name":"ABC Medical"}]}

Confidential Page 8
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The possible HTTP status values and the result codes associated with those status codes is shown below:

HTTP Status Result Code Possible Causes


OK (200) Success Successful request
BadRequest (400) AuthenticationFailed Improperly formatted request header
Integrator credentials are unknown or disabled
Unauthorized (401) AuthenticationFailed
Integrator lacks permission to access this endpoint
Improperly formatted request header
NotFound (404) NoData Integrator has no companies available
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time

The meaning of the XML elements are shown in the table below:

C#
XML Element Data Meaning
Type
<CompanyListResponse> class Contains response to the company list request.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Contains as many Company objects as needed to represent the
<Companies> list
complete company request.
<Company> class Contains the information to describe a particular company.
Contains the access key for the company. This value is also known as the
CompanyAccessKey or CompanyAccessGuid. It must be used in
<AccessKey> string
subsequent Patient Insert Request, Patient Update Request, or the
Patient Upsert Request.
Indicates whether the company can update and create patient
information. True indicates that patient information may be changed by
<CreateUpdatePatients> Boolean
the company. False indicates that the company cannot create or update
the patient list.
Contains the name of the Company. The company name is a maximum
<Name> string
of 50 characters long.

The meaning of the JSON elements are shown in the table below:

C#
JSON Element Data Meaning
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
Contains as many Company objects as needed to represent the
“Companies” list
complete company request

Confidential Page 9
© 2019 KPNV All Rights Reserved
C#
JSON Element Data Meaning
Type
Contains the access key for the company. This value is also known as the
CompanyAccessKey or CompanyAccessGuid. It must be used in
“AccessKey” string
subsequent Patient Insert Request, Patient Update Request, or the
Patient Upsert Request.
Indicates whether the company can update and create patient
information. True indicates that patient information may be changed by
“CreateUpdatePatients” Boolean
the company. False indicates that the company cannot create or update
the patient list.
Contains the name of the Company. The company name is a maximum
“Name” string
of 50 characters long.

Confidential Page 10
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

5. Office Access List GET


The office access list endpoint provides a list of all DME offices to which the company has access. The list
includes a GUID, name, and office contact information for each office. The GUID can be used with other
endpoints where a specific office must be defined.

NOTE: Philips reserves the right to change these office identifiers (GUIDs) at any time.

5.1 Office Access List Request

The syntax for the office access list request and an example are shown below:

GET
https://{host}/PayerIntegrationExternal.v001/Company/{companyaccessguid}/Offices
?PageNumber={pageNumber}
Example:
GET
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/4be
50061-2088-4894-942f-ff6caa3f1a87/Offices?PageNumber=1

HTTP Argument Meaning


Specifies the host name for EncoreAnywhere that was received from Philips
{host}
Respironics. Typically, this is Integration.EncoreAnywhere.com
Specifies the company GUID. This is the value returned from the Company Access List
{companyaccessguid}
endpoint. The maximum length is 40 characters.

This endpoint uses the following fields in the query string.

Query String
Meaning
Fields
Specifies the page number for the offices being requested. The default length for a page is
{pageNumber} 500 offices. When more than one page of offices is required, this request can be repeated
with the page number incremented in each request.

Confidential Page 11
© 2019 KPNV All Rights Reserved
5.2 Office Access List Response

An example of an office access list response in XML is shown below:

<OfficeListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<DataCounts>
<PageCount>1</PageCount>
<PageSize>500</PageSize>
<RecordCount>1</RecordCount>
</DataCounts>
<Offices>
<Office>
<Address1>123 Main Street</Address1>
<Address2>Suite 123</Address2>
<City>Monroeville</City>
<State>PA</State>
<PostalCode>15146</PostalCode>
<ContactName>Mario Lewis</ContactName>
<OfficeGUID>a46b8689-16ae-4898-9fee-a07e17baf14d</OfficeGUID>
<OfficeName>Common DME Office</OfficeName>
</Office>
</Offices>
</OfficeListResponse>

An example of an office access list response in JSON is shown below:

{"Result":"Success","ResultCode":1,"DataCounts":{"PageCount":1,"PageSize":500,"R
ecordCount":1},"Offices":[{"Address1":"123 Main St", Address2":"Suite 123",
"City":"Monroeville",”ContactName”:”Mario Lewis”,"OfficeGUID":"a46b8689-16ae-
4898-9fee-a07e17baf14d","OfficeName":"Common
DME","PostalCode":"15222","State":"PA"}]}

The possible HTTP status values and the result codes associated with those status codes is shown below:

HTTP Status Result Code Possible Causes


OK (200) Success Successful request
AuthenticationFailed Improperly formatted request header
BadRequest (400) InvalidInputValues Improperly formatted request header
InvalidCompany Improperly formatted company Access ID
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthenticationFailed Improperly formatted request header
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
NoContent(204) NoContent Integrator has no offices available.

Confidential Page 12
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The meaning of the XML elements appear in the table below:

C#
XML Element Data Meaning
Type
<OfficListResponse> class Response to the office list request
<Result> enum HTTP status result
<ResultCode> string Description of the result code
<DataCounts> class Count of data for this portion of the office list response
<PageCount> int Page number specified in the original request
Maximum number of offices that may appear on a given page. The default is
<PageSize> int
500 offices per page.
<RecordCount> int Actual number of records in the offices class
<Offices> list Office object for each of the offices returned in this response
<Office> class Information for a single office
First line of the address for the office, typically the street name and number.
<Address1> string
This field may be up to 50 characters long.
Second line of the address for the office, typically an office or suite number.
<Address2> string
This field may be up to 50 characters long.
City associated with the address for the office, which may be up to 50
<City> string
characters long
State associated with the address for the office, which may be up to 50
<State> string
characters long
Zip code associated with the address for the office, which may be up to 25
<PostalCode> string
characters long
Name of the person to contact when calling the office, which may be up to 25
<ContactName> string
characters long
Globally Unique Identifier (GUID) for the office, which has a maximum length
<OfficeGUID> string
of 40 characters
<OfficeName> string Name of the office, which may be up to 50 characters long

The meaning of the JSON elements appear in the table below:

C# Data
JSON Element Meaning
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“DataCounts” class Count of data for this portion of the office list response
“PageCount” int Page number specified in the original request
Maximum number of offices that may appear on a given page. The default is
“PageSize” int
500 offices per page.

Confidential Page 13
© 2019 KPNV All Rights Reserved
C# Data
JSON Element Meaning
Type
“RecordCount” int Actual number of records in the offices class
“Offices” list Office object for each of the offices returned in this response
First line of the address for the office, typically the street name and number.
“Address1” string
This field may be up to 50 characters long.
Second line of the address for the office, typically an office or suite number.
“Address2” string
This field may be up to 50 characters long.
City associated with the address for the office, which may be up to 50
“City” string
characters long
State associated with the address for the office, which may be up to 50
“State” string
characters long
Zip code associated with the address for the office, which may be up to 25
“PostalCode” string
characters long
Name of the person to contact when calling the office, which may be up to 25
“ContactName” string
characters long
Globally Unique Identifier (GUID) for the office, which has a maximum length
“OfficeGUID” string
of 40 characters
“OfficeName” string Name of the office, which may be up to 50 characters long

Confidential Page 14
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

6. General Patient Locator GET


The patient locator endpoints are designed to uniquely identify a patient within EncoreAnywhere. This endpoint
returns a temporary token with a successful patient locator call. This token can then be used to request and
review the patient's compliance data or compliance reports. In addition, the patient’s UUID and patient GUID
will be returned.

This patient locator endpoint will identify a patient by the supplied identity filters in any of the companies to
which the integrator has access. The identity filters available are:

• Device Serial Number


• Last Name
• First Name
• Date of Birth
• Health Plan
• Membership Id
• IncludingInactivePatients
• Patient GUID

6.1 General Patient Locator Request

The request MUST contain at least one identity filter. In order for a request to succeed, the caller MUST supply
enough identity filters to uniquely identify one patient only. The request syntax and examples of properly
formatted requests can be found below:

GET https://{host}/PayerIntegrationExternal.v002/Patient?LastName={last-name}
&FirstName={first-name}
&DateOfBirth={date-of-birth}
&HealthPlan={health-plan}
&MemberID={membership-id}
&PatientGuid={patient-GUID}
&DeviceSerialNumber={device-serial-number}

Examples:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v002/Patient?Las
tName=Smith&DateOfBirth=1965-01-23
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v002/Patient?Pat
ientGuid=852E0680-E5C2-45BA-9A2D-197D1377182E
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v002/Patient?Dev
iceSerialNumber=P018087192F00&DateOfBirth=1965-01-23

HTTP
Meaning
Argument
{host} Specifies the host name for EncoreAnywhere that was received from Philips Respironics

Confidential Page 15
© 2019 KPNV All Rights Reserved
The use of the query string fields appear in the following table.

Query String Fields Meaning


Last name of the patient being located, which has a maximum length of 25
{LastName}
characters
First name of the patient being located, which has a maximum length of 25
{FirstName}
characters
Date of birth for the patient being located, which uses the date format: yyyy-MM-
dd, where:
{DateOfBirth} yyyy – The current year as 4 digits
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
Name of the health plan for the patient, which is the name of the health insurance
{HealthPlan}
company or the payer when the patient is self-insured
Member’s ID within the health plan, which may be a health plan membership ID or
{MembershipId}
policy number
{PatientGUID} GUID for the patient being located, which has a maximum length of 40 characters
Serial number for the device that has been assigned to the patient being located.
{DeviceSerialNumber} This value can be obtained from the GetDeviceRegistration endpoint.
Recommended to be sent in upper case.
Active status of the patient with possible values of “True” and “False.” This value
{IncludingInactivePatient} indicates whether to return only active patients or active and inactive patients.
“False” returns only active patients.

Confidential Page 16
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

6.2 General Patient Locator Response

An example of a general patient response in XML is shown below:

<PatientLocatorResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v002"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Expiration>2015-03-02T03:52:13.0821013Z</Expiration>
<Token>6549c93a-aee3-4ac1-b604-220b29d13f46</Token>
<PatientGuid>40a11c7c-1325-43f6-98ee-7b10eb3b4734</PatientGuid>
<PatientUUID>ABCDEF2072244</PatientUUID>
</PatientLocatorResponse>

An example of a general patient response in JSON is shown below:

{"Result":"Success","ResultCode":1,"Expiration":"2015-03-02T03:52:13.0821013Z
","PatientGuid":"40a11c7c-1325-43f6-98ee-7b10eb3b4734","PatientUUID":"
ABCDEF2072244","Token":"6549c93a-aee3-4ac1-b604-220b29d13f46"}

The possible HTTP status values and the result codes associated with those status codes are shown below:

HTTP Status Result Code Possible Causes


OK (200) Success Successful request
MultipleChoices The provided identity filters matched more than one patient.
MultipleResults
Ambiguous (300)
BadRequest (400) AuthenticationFailed Improperly formatted request header
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header
NotFound (404) NoData No patient matched the provided identity filters.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.

The meaning of the XML elements from the body of the response is shown in the table below:

C# Data
XML Element Meaning
Type
<PatientLocatorResponse> class Response to the patient locator request
<Result> enum HTTP status result
<ResultCode> string Description of the result code
Expiration time of the token specified below. In general, a token is
valid for only 15 minutes. The format for the date is “yyyy-MM-
<Expiration> datetime ddTHH:mm:ss.fff”. The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.

Confidential Page 17
© 2019 KPNV All Rights Reserved
C# Data
XML Element Meaning
Type
A unique patient token for the patient. The <Expiration> element
<Token> string
indicates when this element will expire.
<PatientGuid> string GUID for the patient, which has a maximum length of 40 characters
<PatientUUID> string UUID for the patient, with a maximum length of 40 characters, that is
unique within the company associated with the patient

The meaning of the JSON elements from the body of the response is shown in the table below:

C# Data
JSON Element Meaning
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
Expiration time of the token specified below. In general, a token is
valid for only 15 minutes. The format for the date is “yyyy-MM-
“Expiration” datetime ddTHH:mm:ss.fff”. The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
A unique patient token for the patient. The <Expiration> element
“Token” string
indicates when this element will expire.
“PatientGuid” string GUID for the patient, which has a maximum length of 40 characters
“PatientUUID” string UUID for the patient, with a maximum length of 40 characters, that is
unique within the company associated with the patient

Confidential Page 18
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

7. Patient Locator by UUID GET


The patient locator by UUID endpoint returns a temporary token from a successful patient locator call. This
token can be used to request and review the patient's compliance data or compliance reports.

This patient locator by UUID endpoint will identify a patient by their company and UUID. The company is
identified by supplying the appropriate company access key. See Computing the Signature.

7.1 Patient Locator by UUID Request

The syntax for the patient locator by UUID request and an example of its use is shown below:

GET https://{host}/PayerIntegrationExternal.v001/Company/{access-
key}/Patient/{patient-uuid)}

Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/fe3
de913-17f8-41a3-bf6b-87a8297f8d16/Patient/022-930-041

HTTP
Meaning
Argument
{host} Host name for EncoreAnywhere that was received from Philips Respironics
{access- Access ID for the company that originally created the patient. This is also known as the
key} <companyAccessGuid>. This is the value returned in the Company Access List response.
UUID, with a maximum length of 40 characters, for the unique patient being located within the
{patient-
company associated with the patient. The company assigns patient UUIDs when the patient is
uuid}
inserted or updated.

7.2 Patient Locator by UUID Response

An example of the patient locator by UUID response in XML is shown below:

<PatientLocatorResponse xmlns="services.encoreanywhere.com/REST/PayerIntegration
/v001" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Expiration>2012-12-09T14:36:53.9324951Z</Expiration>
<Token>234163c1-ebf6-41a3-ac0b-ca038e85d036</Token>
</PatientLocatorResponse>

An example of the patient locator by UUID response in JSON is shown below:

{"Result":"Success","ResultCode":1,"Expiration":"2012-12-09T14:36:53.9324951Z
","Token":"234163c1-ebf6-41a3-ac0b-ca038e85d036"}

Confidential Page 19
© 2019 KPNV All Rights Reserved
The possible HTTP status values and the result codes associated with those status codes is shown below:

HTTP Status Result Code Possible Causes


OK (200) Success Successful request
AuthenticationFailed Improperly formatted request header
BadRequest (400)
InvalidCompany Company access key is invalid.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Integrator lacks permission to access this endpoint.
Unauthorized (401)
Improperly formatted request header.
AuthorizationFailed
Integrator does not have access to this company.
Patient with this UUID was not found in the provided
NotFound (404) NoData
company.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.

The meaning of the XML elements in the Patient Locator by UUID response.

C#
XML Element Data Meaning
Type
<PatientLocatorResponse> class Response to the patient locator request.
<Result> enum HTTP status result.
<ResultCode> string Description of the result code.
Expiration time of the token specified below. In general, a token is valid
for only 15 minutes. The format for the date is yyyy-MM-
<Expiration> string ddTHH:mm:ss.fff. The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Unique patient token for the patient. The <Expiration> element shows
<Token> string
when this token will expire.

The meaning of the JSON elements in the Patient Locator by UUID response.

C#
JSON Element Data Meaning
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
Expiration time of the token specified below. In general, a token is valid
for only 15 minutes. The format for the date is yyyy-MM-
“Expiration” string ddTHH:mm:ss.fff. The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Unique patient token for the patient. The <Expiration> element shows
“Token” string
when this token will expire.

Confidential Page 20
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

8. Patient Compliance Data GET


The patient compliance data endpoint helps to review a patient's compliance status and other details. The
endpoint accepts a patient token and a date range from which compliance history of the patient is obtained. The
provided patient token must be retrieved by identifying a patient with one of the patient locator end points.

It is important to note that Philips Respironics manages a template for each set of integrator credentials, which
regulates the following:

• The number of calls that an integrator can make to collect compliance data per day.
• The minimum and maximum range in days that an integrator can use when requesting compliance data.
• The Boolean expression “IsPatientCompliant” is evaluated and will be included in the response based on
the below conditions:
• The search range for compliant data is equal to or greater than the threshold value configured
for the integrator.
• Patient has met minimum usage for the number of days which is equal to or greater than the
threshold value configured for the integrator.
• The aggregate compliance variables and their various values returned to the integrator requesting
compliance data.
• Whether historical data is also returned to the integrator requesting compliance data.
• If the patient is enabled for advanced statistics, respective statistics will be included in the response.

The compliance endpoint provides an option to use Blower Time Duration rather than Usage as the basis for
historical average calculations over the specified date range. The endpoint provides compliance detail along with
the averages as aggregate compliance values in the response and are used by the formula that evaluates
whether the patient is considered compliant. The aggregate compliance values that could be included in the
response include the following:

• Apnea Hypopnea Index (AHI)


• Clear Airway Apnea Index
• Hours Of Use
• Percent of Large Leaks
• Percent of Periodic Breathing
• Auto CPAP Mean Pressure
• Auto IPAP Mean Pressure
• Auto EPAP Mean Pressure
• Auto CPAP Peak Average Pressure
• Auto CPAP Peak Average Pressure Less Than or Equal to 90%
• Auto IPAP Peak Average Pressure Less Than or Equal to 90%
• Auto EPAP Peak Average Pressure Less Than or Equal to 90%
• Average Unintentional Leak
• Average Breath Rate
• Average Percent Triggered Breath
• Average Exhaled Tidal Volume
• Average Minute Vent
• Average IE Ratio

Confidential Page 21
© 2019 KPNV All Rights Reserved
The compliance details per day that could be included in the response are as below:

• Date
• DeviceName
• TherapyMode
• Source Of Data
• Apnea Hypopnea Index (AHI)
• Clear Airway Apnea Index
• Hours Of Use
• Percent of Large Leaks
• Percent of Periodic Breathing
• Auto CPAP Mean Pressure
• Auto IPAP Mean Pressure
• Auto EPAP Mean Pressure
• Auto CPAP Peak Average Pressure
• Auto CPAP Peak Average Pressure Less Than or Equal to 90%
• Auto IPAP Peak Average Pressure Less Than or Equal to 90%
• Auto EPAP Peak Average Pressure Less Than or Equal to 90%
• Average Unintentional Leak
• Average Breath Rate
• Average Percent Triggered Breath
• Average Exhaled Tidal Volume
• Average Minute Vent
• Average IE Ratio

For each of the variables under Compliance Values, the following values could be returned depending on the
configuration for the integrator:
• Average – The average for this variable over the specified date range.
• Count – The number of times a value for this variable was available within the specified date range.
• Nights Of Usage – The same as count.
• Conditional Count – Based on an equality formula (i.e., value > 4), this is the number of times within the
specified date range that the value for this variable proved true for the formula.

Notes on Last Successful Modem Call For Patient (LastSuccessfulModemCall element in Response):
• 'OK' is the only status considered to be successful.
• Last Successful Modem Call will appear once in response regardless of date range.
• The Modem Administration section of the Encore UI is specific to modems where a modem can be
assigned to multiple patients. In contrast, this API call is specific to patients.
• LastSuccessfulModemCall element contains both date and time and is converted to the patient's
timezone. (Data in the database is stored in UTC).
• If no modem exists for the patient or no last successful modem call for the patient exists, no
LastSuccessfulModemCall element is included in the response.

8.1 Patient Compliance Data Request

The syntax for the Patient Compliance Data Request and an example of its usage can be found below:

Confidential Page 22
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

GET https://{host}/PayerIntegrationExternal.v001/Patient/{patient-
token}/Compliance?
&StartDate={start-date}
&EndDate={end-date}
&UseBlowerTime={blower-time}
Example:
https://integration.encoreanywhere.com/PayerIntegrationExternal.v001/Patient/234
163c1-ebf6-41a3-ac0b-ca038e85d036/Compliance?StartDate=2012-01-01&EndDate=2012-
03-31

HTTP
Meaning and Usage
Argument
{host} Specifies the host name for EncoreAnywhere that was received from Philips Respironics.
Specifies the token that uniquely identifies the patient whose history is being requested. This
value can be obtained with the Patient Locator APIs in the <Token> element:
{patient-
28.1 General Patient Locator V1 GET
token}
6. General Patient Locator GET
7. Patient Locator by UUID GET

Query String
Meaning
Fields
Specifies the first day of the range of days of compliance data being requested. The date
ranges is subject Philips Respironics registration constraints. The format is “yyyy-MM-dd”
where
StartDate
yyyy – The current year as 4 digits.
MM – The current month of the year as 2 digits (01-12).
dd – The day of the month as 2 digits (01-31).
Specifies the last day of the range of days of compliance data being requested. The date
ranges is subject Philips Respironics registration constraints. The format is “yyyy-MM-dd”
where
EndDate
yyyy – The current year as 4 digits.
MM – The current month of the year as 2 digits (01-12).
dd – The day of the month as 2 digits (01-31).
Indicates how patient compliance should be calculated:
True – Specifies that Blower Duration Time should be used in calculations of
average patient compliance during the period specified by the start-date and end-
UseBlowerTime
date parameters. This is the time that the CPAP is actually in use.
False – {default} Specifies that Usage will be used as the basis for the compliance
average calculations. Time the CPAP is on.

8.2 Patient Compliance Data Response

An example of a patient compliance data response in XML is shown below:

<ComplianceResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>

Confidential Page 23
© 2019 KPNV All Rights Reserved
<ResultCode>Success</ResultCode>
<ComplianceDetails>
<ComplianceDetail>
<AHI>0</AHI>
<AverageBreathRate>15</AverageBreathRate>
<AverageIERatio>0.59095656871795654</AverageIERatio>
<AverageMinuteVent>2.3743941783905029</AverageMinuteVent>
<AveragePctTriggeredBreath>3.0841622352600098</AveragePctTriggeredBreath>
<AverageUnIntentionalLeak>36.945930480957031</AverageUnIntentionalLeak>
<BlowerTimeDuration>65.36666666666666</BlowerTimeDuration>
<ClearAirwayApnea>0</ClearAirwayApnea>
<Date>2018-03-18T00:00:00</Date>
<LargeLeakMinutes>0</LargeLeakMinutes>
<PeriodicBreathingMinutes>0</PeriodicBreathingMinutes>
<SourceOfData>MemoryCard<SourceOfData>
<UsageMinutes>65.35</UsageMinutes>
</ComplianceDetail>
<ComplianceDetail>
<AHI>28.4</AHI>
<AverageBreathRate>18</AverageBreathRate>
<AverageIERatio>0.83823525905609131</AverageIERatio>
<AverageMinuteVent>3</AverageMinuteVent>
<AveragePctTriggeredBreath>42</AveragePctTriggeredBreath>
<AverageUnIntentionalLeak>41</AverageUnIntentionalLeak>
<BlowerTimeDuration>19</BlowerTimeDuration>
<ClearAirwayApnea>22.1052628</ClearAirwayApnea>
<Date>2018-03-19T00:00:00</Date>
<LargeLeakMinutes>2</LargeLeakMinutes>
<PeriodicBreathingMinutes>0</PeriodicBreathingMinutes>
<SourceOfData>MemoryCard<SourceOfData>
<UsageMinutes>19</UsageMinutes>
</ComplianceDetail>
</ComplianceDetails>
<ComplianceValues>
<AHI>
<Average>6.3971546</Average>
<ConditionalCount>
<Operand>5</Operand>
<Operator>LessThanOrEqual</Operator>
<Value>1</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AHI> <AverageBreathRate>
<Average>15.6757558</Average>
<ConditionalCount>
<Operand>5</Operand>
<Operator>LessThan</Operator>
<Value>0</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AverageBreathRate>
<AverageExhaledTidalVolume>
<Average>166.70816</Average>
<ConditionalCount>
<Operand>7</Operand>
<Operator>Equal</Operator>
<Value>0</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AverageExhaledTidalVolume>

Confidential Page 24
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

<AverageIERatio>
<Average>0.6466566</Average>
<ConditionalCount>
<Operand>59</Operand>
<Operator>GreaterThan</Operator>
<Value>0</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AverageIERatio>
<AverageMinuteVent>
<Average>2.5153131</Average>
<ConditionalCount>
<Operand>8</Operand>
<Operator>GreaterThanOrEqual</Operator>
<Value>0</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AverageMinuteVent>
<AveragePctTriggeredBreath>
<Average>11.8500297</Average>
<ConditionalCount>
<Operand>6</Operand>
<Operator>LessThanOrEqual</Operator>
<Value>1</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AveragePctTriggeredBreath>
<AverageUnIntentionalLeak>
<Average>37.8591175</Average>
<ConditionalCount>
<Operand>2</Operand>
<Operator>GreaterThan</Operator> <Value>2</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</AverageUnIntentionalLeak>
<BlowerHoursOfUse>
<Average>0.7030556</Average>
<ConditionalCount> <Operand>100</Operand>
<Operator>LessThan</Operator>
<Value>2</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</BlowerHoursOfUse>
<ClearAirwayApneaIndex>
<Average>4.979253</Average>
<ConditionalCount>
<Operand>6</Operand>
<Operator>GreaterThanOrEqual</Operator>
<Value>1</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</ClearAirwayApneaIndex>
<HoursOfUse>
<Average>0.7029167</Average>
<ConditionalCount>
<Operand>400</Operand>
<Operator>LessThan</Operator>

Confidential Page 25
© 2019 KPNV All Rights Reserved
<Value>2</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</HoursOfUse>
<PercentLargeLeak>
<Average>2.3710729</Average>
<ConditionalCount>
<Operand>5</Operand>
<Operator>Equal</Operator>
<Value>0</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</PercentLargeLeak> <PercentPeriodicBreathing> <Average>0</Average>
<ConditionalCount>
<Operand>7</Operand>
<Operator>GreaterThan</Operator>
<Value>0</Value>
</ConditionalCount>
<Count>2</Count>
<NightsOfUsage>2</NightsOfUsage>
</PercentPeriodicBreathing>
</ComplianceValues>
<EndDate>2018-03-19T00:00:00</EndDate>
<LastSuccessfulModemCall>2018-03-18T06:01:33</LastSuccessfulModemCall>
<StartDate>2018-03-18T00:00:00</StartDate>
</ComplianceResponse>

An example of a patient compliance data response in JSON is shown below:

{"Result":"Success","ResultCode":1,"ComplianceDetails":[{"AHI":0,"AverageBreathR
ate":15,"AverageIERatio":0.59095656871795654,"AverageMinuteVent":2.3743941783905
029,"AveragePctTriggeredBreath":3.0841622352600098,"AverageUnIntentionalLeak":36
.945930480957031,"BlowerTimeDuration":65.36666666666666,"ClearAirwayApnea":0,"Da
te":"\/Date(1521345600000-
0400)\/","LargeLeakMinutes":0,"PeriodicBreathingMinutes":0,"UsageMinutes":65.35}
,{"AHI":28.4,"AverageBreathRate":18,"AverageIERatio":0.83823525905609131,"Averag
eMinuteVent":3,"AveragePctTriggeredBreath":42,"AverageUnIntentionalLeak":41,"Blo
werTimeDuration":19,"ClearAirwayApnea":22.1052628,"Date":"\/Date(1521432000000-
0400)\/","LargeLeakMinutes":2,"PeriodicBreathingMinutes":0,”SourceOfData”:”Memor
yCard”,"UsageMinutes":19}],"ComplianceValues":{"AHI":{"Average":6.3971546,"Condi
tionalCount":{"Operand":5,"Operator":"LessThanOrEqual","Value":1},"Count":2,"Nig
htsOfUsage":2},"AverageBreathRate":{"Average":15.6757558,"ConditionalCount":{"Op
erand":5,"Operator":"LessThan","Value":0},"Count":2,"NightsOfUsage":2},"AverageE
xhaledTidalVolume":{"Average":166.70816,"ConditionalCount":{"Operand":7,"Operato
r":"Equal","Value":0},"Count":2,"NightsOfUsage":2},"AverageIERatio":{"Average":0
.6466566,"ConditionalCount":{"Operand":59,"Operator":"GreaterThan","Value":0},"C
ount":2,"NightsOfUsage":2},"AverageMinuteVent":{"Average":2.5153131,"Conditional
Count":{"Operand":8,"Operator":"GreaterThanOrEqual","Value":0},"Count":2,"Nights
OfUsage":2},"AveragePctTriggeredBreath":{"Average":11.8500297,"ConditionalCount"
:{"Operand":6,"Operator":"LessThanOrEqual","Value":1},"Count":2,"NightsOfUsage":
2},"AverageUnIntentionalLeak":{"Average":37.8591175,"ConditionalCount":{"Operand
":2,"Operator":"GreaterThan","Value":2},"Count":2,"NightsOfUsage":2},"BlowerHour
sOfUse":{"Average":0.7030556,"ConditionalCount":{"Operand":100,"Operator":"LessT
han","Value":2},"Count":2,"NightsOfUsage":2},"ClearAirwayApneaIndex":{"Average":
4.979253,"ConditionalCount":{"Operand":6,"Operator":"GreaterThanOrEqual","Value"
:1},"Count":2,"NightsOfUsage":2},"HoursOfUse":{"Average":0.7029167,"ConditionalC
ount":{"Operand":400,"Operator":"LessThan","Value":2},"Count":2,"NightsOfUsage":
2},"PercentLargeLeak":{"Average":2.3710729,"ConditionalCount":{"Operand":5,"Oper
ator":"Equal","Value":0},"Count":2,"NightsOfUsage":2},"PercentPeriodicBreathing"

Confidential Page 26
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

:{"Average":0,"ConditionalCount":{"Operand":7,"Operator":"GreaterThan","Value":0
},"Count":2,"NightsOfUsage":2}},"EndDate":"\/Date(1521432000000-0400)\/",
"LastSuccessfulModemCall":"\/Date(15432948000000500)\/","StartDate":"\/Date(1521
345600000-0400)\/"}

The possible HTTP status values and the result codes associated with those status codes are shown below:

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
ResetContent (205) InvalidInputValues The patient token has expired.
AuthenticationFailed Improperly formatted request header.
BadRequest (400)
InvalidInputValues Improperly formatted dates or patient token.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
No data was found for this patient within the provided date
NoData
range.
NotFound (404) Start date is greater than the end date.
InvalidInputValues The date range in days is outside the min or max range for
this integrator.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.

The meaning and use of the XML elements from the body of the response is shown in the table below:

C# Data
XML Element Meaning
Type
<ComplianceResponse> object Contains the response to a compliance data request.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Contains the list of the compliance details that meet
<ComplianceDetails> list the request criteria (StartDate-EndDate and patient-
token).
<ComplianceDetail> object Contains compliance data for one patient.
Contains Apnea Hypopnea Index for the patient. This
<AHI> float index indicates the severity of sleep apnea with the
patient.
Name of the device associated with the compliance
<DeviceName> string
data
<TherapyMode> string Therapy mode of the device
<SourceOfData> string Source of data for the day’s latest download
Contains the average pressure for the CPAP machine
<AutoCpapMeanPressure> float
used by the patient.
Contains the average of inspiratory positive airway
<AutoIpapMeanPressure> float
pressure.

Confidential Page 27
© 2019 KPNV All Rights Reserved
C# Data
XML Element Meaning
Type
Contains the average of expiratory positive airway
<AutoEpapMeanPressure> float
pressure.
Contains the peak average pressure for the CPAP
<AutoCpapPeakAveragePressure> float
machine used by the patient.
Contains the average CPAP device pressure of less than
<AverageCPAPDevicePressureLTE90> float
or equal to 90%.
Contains the average IPAP pressure of less than or
<AverageIPAPDevicePressureLTE90> float
equal to 90%.
Contains the average EPAP pressure of less than or
<AverageEPAPDevicePressureLTE90> float
equal to 90%.
<BlowerTimeDuration> float Contains the blower time duration.
<ClearAirwayApnea> float Contains the Apnea Index.
Contains the current date for the data. The format for
the date is yyyy-MM-ddTHH:mm:ss. The webpage
<Date> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime structure.
Contains the number of minutes when a large leak was
<LargeLeakMinutes> float
present. The headgear was not on the patient’s face.
Contains the rate of periodic breathing when the CPAP
<PeriodicBreathingMinutes> float
device was in use.
Contains the number of minutes the CPAP device was
<UsageMinutes> float
in use by the patient.
<AverageBreathRate> float Average of the patient’s breathe rate per minute.
<AveragePctTriggeredBreath> float Average percent of patient-triggered breaths.
<AverageExhaledTidalVolume> float Average exhaled tidal volume.
<AverageMinuteVent> float Average minute ventilation.
<AverageIERatio> float Average of the inspiration expiration ratio.
<AverageTITotal> float Average of the total inspiration time.
<AverageUnIntentionalLeak> float Average of the unintentional leak in liters per minute.
Contains the elements similar to <ComplianceDetail>
<ComplianceValues> object
object except date, as this is the summary of data.
Contains the end date for the compliance data. The
format for the date is yyyy-MM-ddTHH:mm:ss. The
<EndDate> string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime structure.
Specifies the patient is in compliance with CPAP
<IsPatientCompliant> Boolean
machine usage.

Confidential Page 28
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C# Data
XML Element Meaning
Type
Contains the start date for the compliancedata. The
format for the date is yyyy-MM-ddTHH:mm:ss. The
<StartDate> string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime structure.
Start Date of the date range within preceding 90 days
<ComplianceRangeStartDate> datetime
where compliance was found
End Date of the date range within preceding 90 days
<ComplianceRangeEndDate> datetime
where compliance was found

<Make> string Make of the device


<Model> string Model of the device

<LastSuccessfulModemCall> DateTime Date and time of last successful modem call

Below is the list of elements which could be included for each of the Compliance values based on the
configuration of the integrator template.

XML Element C# Data Type Meaning


Contains the average number of hours that the CPAP device was used
<Average> float
each night over the specified date range.
<Count> int Contains the actual compliance count.
<ConditionalCount> object Contains information to compute the conditional count.
<Operand> float Contains the operand to determine the compliance.
<Operator> string Contains operator to use to determine the compliance.
<Value> int Contains the value to use to determine the compliance.
Contains the actual number of nights that the CPAP machine was used
<NightsOfUsage> int between the {start-date} and the {end-date} values used in the
corresponding Patient Compliance Data request.

The meaning and use of the JSON elements from the body of the response is shown in the table below:

C# Data
JSON Element Meaning
Type
Result message that explains the ResultCode in more
“Result” string
detail
“ResultCode” enum Custom response code for the response

Confidential Page 29
© 2019 KPNV All Rights Reserved
C# Data
JSON Element Meaning
Type
Contains the list of the compliance details that meet
“ComplianceDetails” list the request criteria (StartDate-EndDate and patient-
token).
Contains Apnea Hypopnea Index for the patient. This
“AHI” float index indicates the severity of sleep apnea with the
patient.
“DeviceName” Name of the device associated with the compliance
string
data
“TherapyMode” string Therapy mode of the device
“SourceOfData” string Source of data for the day’s latest download
Contains the average pressure for the CPAP machine
“AutoCpapMeanPressure” float
used by the patient.
Contains the average of inspiratory positive airway
“AutoIpapMeanPressure” float
pressure.
Contains the average of expiratory positive airway
“AutoEpapMeanPressure” float
pressure.
Contains the peak average pressure for the CPAP
“AutoCpapPeakAveragePressure” float
machine used by the patient.
Contains the average CPAP device pressure of less than
“AverageCPAPDevicePressureLTE90” float
or equal to 90%.
Contains the average IPAP pressure of less than or
“AverageIPAPDevicePressureLTE90” float
equal to 90%.
Contains the average EPAP pressure of less than or
“AverageEPAPDevicePressureLTE90” float
equal to 90%.
“BlowerTimeDuration” float Contains the blower time duration.
“ClearAirwayApnea” float Contains the Apnea Index.
Contains the current date for the data. The format for
the date is yyyy-MM-ddTHH:mm:ss. The webpage
“Date” string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime structure.
Contains the number of minutes when a large leak was
“LargeLeakMinutes” float
present. The headgear was not on the patient’s face.
Contains the rate of periodic breathing when the CPAP
“PeriodicBreathingMinutes” float
device was in use.
Contains the number of minutes the CPAP device was
“UsageMinutes” float
in use by the patient.
“AverageBreathRate” float Average of the patient’s breathe rate per minute.
“AveragePctTriggeredBreath” float Average percent of patient-triggered breaths.
“AverageExhaledTidalVolume” float Average exhaled tidal volume.
“AverageMinuteVent” float Average minute ventilation.
“AverageIERatio” float Average of the inspiration expiration ratio.

Confidential Page 30
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C# Data
JSON Element Meaning
Type
“AverageTITotal” float Average of the total inspiration time.
“AverageUnIntentionalLeak” float Average of the unintentional leak in liters per minute.
Contains the elements similar to <ComplianceDetail>
“ComplianceValues” object
object except date, as this is the summary of data.
Contains the end date for the compliance data. The
format for the date is yyyy-MM-ddTHH:mm:ss. The
“EndDate” string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime structure.
Specifies the patient is in compliance with CPAP
“IsPatientCompliant” Boolean
machine usage.
Contains the start date for the compliancedata. The
format for the date is yyyy-MM-ddTHH:mm:ss. The
“StartDate” string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime structure.
Start Date of the date range within preceding 90 days
“ComplianceRangeStartDate” datetime
where compliance was found
End Date of the date range within preceding 90 days
“ComplianceRangeEndDate” datetime
where compliance was found

“Make” string Make of the device


“Model” string Model of the device

“LastSuccessfulModemCall” DateTime Date and time of last successful modem call

Below is the list of elements which could be included for each of the Compliance values based on the
configuration of the integrator template.

JSON Element C# Data Type Meaning


Contains the average number of hours that the CPAP device was used
“Average” float
each night over the specified date range.
“Count” int Contains the actual compliance count.
“ConditionalCount” object Contains information to compute the conditional count.
“Operand” float Contains the operand to determine the compliance.
“Operator” string Contains operator to use to determine the compliance.
“Value” int Contains the value to use to determine the compliance.

Confidential Page 31
© 2019 KPNV All Rights Reserved
JSON Element C# Data Type Meaning
Contains the actual number of nights that the CPAP machine was used
“NightsOfUsage” int between the {start-date} and the {end-date} values used in the
corresponding Patient Compliance Data request.

Confidential Page 32
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

9. Therapy Reports GET


The therapy report endpoint provides an Adobe® Portable Document Format (PDF) version of an
EncoreAnywhere Therapy Reports for a particular patient. The patient token identifies the patient whose report
is being requested. The patient locator endpoint returns a patient token. The report itself is transmitted as
Base64 encoded text. Three reports are available:

• Therapy Summary Report


• Therapy Trend Report
• Therapy Detail Report (In EncoreAnywhere browser interface is the Patient Report)

The therapy report endpoints provide an option to use Blower Time Duration rather than Usage as the basis for
report calculations over the specified date range. The default value is false when this option is omitted.

9.1 Therapy Reports Request

The syntax for the therapy report request and an example of a request can be found below:
GET https://{host}/ReportIntegrationExternal.v001/Patient/{patient-
token}/Report/Therapy/{reportType}?
&StartDate={start-date}
&EndDate={end-date}
&UseBlowerTime={blower-time}
Example:
https://Integration.EncoreAnywhere.com/ReportIntegrationExternal.v001/Patient/23
4163c1-ebf6-41a3-ac0b-ca038e85d036/Report/Therapy/Summary?StartDate=2012-01-
01&EndDate=2012-03-31

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
{host} Name of the host for EncoreAnywhere.
Token that uniquely identifies the patient whose history is being requested. This value can be
obtained with the Patient Locator APIs in the <Token> element:
{patient-
28.1 General Patient Locator V1 GET
token}
6. General Patient Locator GET
7. Patient Locator by UUID GET
Type of report to generate for this request. The possible values are:
1. Summary
{reportType}
2. Trend
3. Detail

Confidential Page 33
© 2019 KPNV All Rights Reserved
The use of the query string fields are shown in the following table.

Query String
Meaning
Fields
First day of the range of days for the report being requested. The format: yyyy-MM-dd.
yyyy – The current year as 4 digits
StartDate
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
Last day of the range of days for the report being requested. The format is yyyy-MM-dd.
yyyy – The current year as 4 digits
EndDate
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
Indicates how patient compliance should be calculated:
True – Specifies that Blower Duration Time should be used in calculations of
average patient compliance during the period specified by the start-date and end-
UseBlowerTime
date parameters.
False – {default} Specifies that Usage will be used as the basis for the compliance
average calculations.

9.2 Therapy Reports Response

An example of the therapy report response in XML can be found below:

<ReportResponse xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<EndDate>12/11/2012 12:00:00 AM</EndDate>
<ReportData>VGhpcyBpcyBhIG1lc3NhZ2...
.
.
.
</ReportData>
<StartDate>11/11/2012 12:00:00 AM</StartDate>
</ReportResponse>

An example of the therapy report response in JSON can be found below:

{"Result":"Success","ResultCode":1,"EndDate":"12\/11\/2012 12:00:00
AM","ReportData":" VGhpcyBpcyBhIG1lc3NhZ2...","StartDate":"11\/11\/2012 12:00:00
AM"}

The table below shows the meaning of some of the HTTP Status Codes returned when a therapy report request
is made.

Confidential Page 34
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
ResetContent (205) InvalidInputValues The patient token has expired.
AuthenticationFailed Improperly formatted request header.
BadRequest (400)
InvalidInputValues Improperly formatted dates or patient token.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Integrator lacks permission to access this endpoint.
Unauthorized (401) Improperly formatted request header.
AuthorizationFailed The integrator lacks permission to access this patient's
reports.
No data was found for this patient within the provided date
NoData
range.
NotFound (404) InvalidInputValues Start date is greater than the end date.
The integrator may not be properly configured to access the
Error
Encore reports for this patient.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.

The following table shows the meaning and interpretation of the XML elements returned in the Therapy Report
Response.

C#
XML Element Data Meaning
Type
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Specifies the actual end date used to generate the report. The format for the EndDate
is MM/dd/yyyy hh:mm:ss XX.
<EndDate> string The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
<ReportData> string Contains the report requested. The report is generated in base-64 encoded format.
Specifies the actual start date used to generate the report. The format for the
StartDate is MM/dd/yyyy hh:mm:ss XX. The webpage
<StartDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.

Confidential Page 35
© 2019 KPNV All Rights Reserved
The following table shows the meaning and interpretation of the JSON elements returned in the Therapy Report
Response.

C#
JSON
Data Meaning
Element
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
Specifies the actual end date used to generate the report. The format for the EndDate
is MM/dd/yyyy hh:mm:ss XX.
“EndDate” string The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
“ReportData” string Contains the report requested. The report is generated in base-64 encoded format.
Specifies the actual start date used to generate the report. The format for the
StartDate is MM/dd/yyyy hh:mm:ss XX. The webpage
“StartDate” string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.

Confidential Page 36
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

10. Best 30 Day Compliance Reports GET


10.1 Best 30 Day Compliance Reports Request

The syntax for the report request and an example of a request can be found below:
GET https://{host}/ReportIntegrationExternal.v001/Patient/{patient-
token}/Report/Best30DayCompliance/{reportType}?
&StartDate={startDate}
&EndDate={endDate}
&UseBlowerTime={useBlowerTime}
Example:
https://Integration.EncoreAnywhere.com/ReportIntegrationExternal.v001/Patient/23
4163c1-ebf6-41a3-ac0b-ca038e85d036/Report/Best30DayCompliance
/Summary?StartDate=2012-01-01&EndDate=2012-03-31

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
{host} Name of the host for EncoreAnywhere.
Token that uniquely identifies the patient whose history is being requested. This value can be
obtained with the Patient Locator APIs in the <Token> element:
{patient- • General Patient Locator V1 GET (Section 62.1 on page 166)
token} • General Patient Locator GET (Section 6 on page 15)
• Patient Locator by UUID GET (Section 7 on page 19)

Type of report to generate for this request. The possible values are:
• Summary
{reportType}
• Trend
• Detail

Confidential Page 37
© 2019 KPNV All Rights Reserved
The use of the query string fields are shown in the following table.

Query String
Meaning
Fields
First day of the range of days for the report being requested. The format: yyyy-MM-dd.
yyyy – The current year as 4 digits
StartDate
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
Last day of the range of days for the report being requested. The format is yyyy-MM-dd.
yyyy – The current year as 4 digits
EndDate
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
Indicates how patient compliance should be calculated:
True – Specifies that Blower Duration Time should be used in calculations of
average patient compliance during the period specified by the start-date and end-
UseBlowerTime
date parameters.
False – {default} Specifies that Usage will be used as the basis for the compliance
average calculations.

10.2 Best 30 Day Compliance Reports Response

An example of the therapy report response in XML can be found below:

<ReportResponse xmlns="services.encoreanywhere.com/REST/PayerIntegration/v002"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Best30EndDate>11/10/2012 12:00:00 AM</Best30EndDate>
<Best30StartDate>10/12/2012 12:00:00 AM</Best30StartDate>
<EndDate>11/10/2012 12:00:00 AM</EndDate>
<ReportData>VGhpcyBpcyBhIG1lc3NhZ2...
.
.
.
</ReportData>
<StartDate>10/12/2012 12:00:00 AM</StartDate>
</ReportResponse>

An example of the therapy report response in JSON can be found below:

{"Result":"Success","ResultCode":1,"Best30EndDate":"11\/10\/2012 12:00:00
AM","Best30StartDate":"10\/12\/2012 12:00:00 AM","EndDate":"11\/10\/2012
12:00:00 AM","ReportData":"VGhpcyBpcyBhIG1lc3NhZ2...","StartDate":"10\/12\/2012
12:00:00 AM"}

Confidential Page 38
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning of some of the HTTP Status Codes returned when a report request is made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
ResetContent (205) InvalidInputValues The patient token has expired.
AuthenticationFailed Improperly formatted request header.
BadRequest (400)
InvalidInputValues Improperly formatted dates or patient token.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Integrator lacks permission to access this endpoint.
Unauthorized (401)
Improperly formatted request header.
AuthorizationFailed
The integrator lacks permission to access this patient's reports.
NoData No data was found for this patient within the provided date range.
InvalidInputValues Start date is greater than the end date.
NotFound (404)
The integrator may not be properly configured to access the
Error
Encore reports for this patient.
PreconditionFailed Request timestamp differs too much from the server time.
AuthenticationFailed
(412)

The following table shows the meaning and interpretation of the XML elements returned in the report response.

C# Data
XML Element Meaning
Type
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Specifies the end date of the best 30 days for the patient. The format for the
EndDate is MM/dd/yyyy hh:mm:ss XX.
<Best30EndDate> datetime The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the startdate of the best 30 days for the patient. The format for the
EndDate is MM/dd/yyyy hh:mm:ss XX.
<Best30StartDate> datetime The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the actual end date used to generate the report. The format for the
EndDate is MM/dd/yyyy hh:mm:ss XX.
<EndDate> datetime The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Contains the report requested. The report is generated in base-64 encoded
<ReportData> string
format.

Confidential Page 39
© 2019 KPNV All Rights Reserved
C# Data
XML Element Meaning
Type
Specifies the actual start date used to generate the report. The format for the
StartDate is MM/dd/yyyy hh:mm:ss XX. The webpage
<StartDate> datetime https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.

The following table shows the meaning and interpretation of the JSON elements returned in the report
response.

C# Data
JSON Element Meaning
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
Specifies the end date of the best 30 days for the patient. The format for the
EndDate is MM/dd/yyyy hh:mm:ss XX.
“Best30EndDate” datetime The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the startdate of the best 30 days for the patient. The format for the
EndDate is MM/dd/yyyy hh:mm:ss XX.
“Best30StartDate” datetime The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the actual end date used to generate the report. The format for the
EndDate is MM/dd/yyyy hh:mm:ss XX.
“EndDate” datetime The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Contains the report requested. The report is generated in base-64 encoded
“ReportData” string
format.
Specifies the actual start date used to generate the report. The format for the
StartDate is MM/dd/yyyy hh:mm:ss XX. The webpage
“StartDate” datetime https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.

Confidential Page 40
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

11. Questionnaire Reports GET


The Questionnaire report endpoint provides an Adobe® Portable Document Format (PDF) version of an
EncoreAnywhere Questionnaire Reports for a particular patient and questionnaire template id (if provided). The
patient Guid identifies the patient whose report is being requested. If the optional questionnaire template id is
not provided, report will include all questionnaire reports available for the patient.

The report itself is transmitted as Base64 encoded text.

11.1 Questionnaire Reports GET request

The syntax for the questionnaire report request and an example of a request can be found below:

GET
https://{host}/ReportIntegrationExternal.v001/Patient/{patientGuid}/Report/Quest
ionnaires/{questionnaireTemplateId}
Example:
https://Integration.EncoreAnywhere.com/ReportIntegrationExternal.v001/Patient/23
4163c1-ebf6-41a3-ac0b-ca038e85d036/Report/Questionnaires/1

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


{host} Name of the host for EncoreAnywhere.
Specifies the GUID for the patient for whom the report is requests. The maximum
{patientGuid}
length is 40 characters.
{questionnaireTemplateId} Specifies the unique identifier of a questionnaire template.

11.2 Questionnaire Reports GET response

An example of the questionnaire report response in XML can be found below:

<QuestionnaireReportResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<QuestionnaireReports>
<QuestionnaireReport>
<QuestionnaireId>1</QuestionnaireId>
<QuestionnaireTemplateId>17</QuestionnaireTemplateId>
<TemplateName>TestTemplateName</TemplateName>
<TemplateVersion>1</TemplateVersion>
<TemplateIsActive>true</TemplateIsActive>
<TemplateNewest>true</TemplateNewest>
<CompletionDate>2018-11-27T15:33:33</CompletionDate>
<ReportData>VGhpcyBpcyBhIG1lc3NhZ2...
.
.
.
</ReportData>

Confidential Page 41
© 2019 KPNV All Rights Reserved
</QuestionnaireReport>
</QuestionnaireReports>
</QuestionnaireReportResponse>

An example of the questionnaire report response in JSON can be found below:

{
"Result": "Success",
"ResultCode": 1,
"QuestionnaireReports": [
{
"CompletionDate": "2018-11-27T15:33:33",
"QuestionnaireId": 1,
"QuestionnaireTemplateId": 17,
"ReportData": "VGhpcyBpcyBhIG1lc3NhZ2......",
"TemplateIsActive": true,
"TemplateName": "TestTemplateName",
"TemplateNewest": true,
"TemplateVersion": 1
}
]
}

The table below shows the meaning of some of the HTTP Status Codes returned when a report request is made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailed Improperly formatted request header.
Invalid Questionnaire Template Id.
BadRequest (400)
InvalidInputValues Invalid Patient Guid.
Invalid Integrator credentials.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
Integrator does not have permission to access patient’s
AuthorizationFailed
Forbidden (403) questionnaire reports.
AuthenticationFailed The patient’s assigned clinician was not found.
No data was found for the provided Patient Guid and
NotFound (404) NoData Questionnaire Template Id.
Patient was not found.
PreconditionFailed Request timestamp differs too much from the server time.
AuthenticationFailed
(412)
Internal Server Error Error occurred while fetching questionnaire report.
Error (500)

The following table shows the meaning and interpretation of the XML elements returned in the report response.

Confidential Page 42
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Meaning
Type
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
<QuestionnaireReports> List List of questionnaire report objects
<QuestionnaireReport> class Contains properties of a questionnaire report
Specifies the completion date of a questionnaire. The completion date is
<CompletionDate> string
UTC and in the format of “yyyy-MM-ddTHH:mm:ss”.
<QuestionnaireId> int Specifies the identifier of a questionnaire
Contains the report requested. The report is generated in base-64
<ReportData> string
encoded format.
<QuestionnaireTemplateId> int Specifies the indentifier of a questionnaire template
<TemplateIsActive> bool Specifies whether the questionnaire template is active
<TemplateNewest> bool Specifies whether the questionnaire template is newest
<TemplateName> string Specifies the name of the questionnaire template
<TemplateVersion> int Specifies the version number of the questionnaire template

The following table shows the meaning and interpretation of the JSON elements returned in the report
response.

C# Data
JSON Element Meaning
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“QuestionnaireReports” List List of questionnaire report objects
Specifies the completion date of a questionnaire. The completion date
“CompletionDate” string
is UTC and in the format of “yyyy-MM-ddTHH:mm:ss”.
“QuestionnaireId” int Specifies the identifier of a questionnaire
Contains the report requested. The report is generated in base-64
“ReportData” string
encoded format.
“QuestionnaireTemplateId” int Specifies the indentifier of a questionnaire template
“TemplateIsActive” bool Specifies whether the questionnaire template is active
“TemplateNewest” bool Specifies whether the questionnaire template is newest
“TemplateName” string Specifies the name of the questionnaire template
“TemplateVersion” int Specifies the version number of the questionnaire template

12. Patient Insert POST


The patient insert endpoint inserts patient data. The endpoint accepts the demographic data of a patient and
attempts to insert the patient into the EncoreAnywhere database. The first step of the process is to validate the

Confidential Page 43
© 2019 KPNV All Rights Reserved
request against the business rules of the system. When the validation passes, the patient data is inserted into
the EncoreAnywhere database. Business rules for fields in Insert are company-specific.

NOTE: The Patient Insert POST endpoint only supports XML in the request and response body.

12.1 Patient Insert Request

The syntax for the HTTP request and an example of a completely formatted transaction status request are
below:

POST https://{host}/PatientIntegrationExternal.v002/Sync/Patient
<InsertPatientRequest
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<CompanyAccessGuid>1627aea5-8e0a-4371-9022-9b504344e724</CompanyAccessGuid>
<Patient>
<BirthDate>1999-05-31T11:20:00</BirthDate>
<Comments>Detailed Comments</Comments>
<ContactInformation>
<AlternatePhone>(412) 555-1212</AlternatePhone>
<BestTimeToContact>Mornings</BestTimeToContact>
<Email>test.patient@philips.com</Email>
<Fax>(724) 555-1212 </Fax>
<HomePhone>(412) 555-2121</HomePhone>
<PreferredContactMethod>Home</PreferredContactMethod>
<WorkPhone>(412) 555-4444</WorkPhone>
</ContactInformation>
<CustomFields>
<CustomField1>Custom Data Field 1</CustomField1>
<CustomField2>Custom Data Field 2</CustomField2>
<CustomField3>Custom Data Field 3</CustomField3>
<CustomField4>Custom Data Field 4</CustomField4>
<CustomField5>Custom Data Field 5</CustomField5>
</CustomFields>
<FirstName>Test</FirstName>
<FirstNamePronunciation>Test</FirstNamePronunciation>
<Gender>Male</Gender>
<GovernmentId>200-01-0000</GovernmentId>
<LastName>Testing</LastName>
<LastNamePronunciation>Testing</LastNamePronunciation>
<MaritalStatus>Unspecified</MaritalStatus>
<MiddleName>T.</MiddleName>
<OfficeGuid>1627aea5-8e0a-4371-9022-9b504344e724</OfficeGuid>
<ClinicianGuid>bad785f6-b9e0-49ac-8e15-12671e09971d</ClinicianGuid>
<PatientAddress>
<Address1>2800 Golden Mile Highway</Address1>
<Address2>Apt 10</Address2>
<City>Pittsburgh</City>
<Country>USA</Country>
<PostalCode>84959</PostalCode>
<State>PA</State>
</PatientAddress>
<PatientUuid>UX94-859-A-55</PatientUuid>
<PrimaryCarePhysicianGuid>bad785f6-b9e0-49ac-8e15-
12671e09971e</PrimaryCarePhysicianGuid>
<PrimaryPolicy>
<GroupNumber>BU3-DD3-A</GroupNumber>
<InsuranceNum>118495952</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test T. Testing</PolicyholderName>

Confidential Page 44
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

</PrimaryPolicy>
<SecondaryPolicy>
<GroupNumber>7748-A</GroupNumber>
<InsuranceNum>991984981981515</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test Testing</PolicyholderName>
</SecondaryPolicy>
<SetupDate>2015-03-04T00:00:00</SetupDate>
<SleepDoctorGuid>bad785f6-b9e0-49ac-8e15-12671e09971f</SleepDoctorGuid>
<SleepLabGuid>bad785f6-b9e0-49ac-8e15-12671e09971g</SleepLabGuid>
<StartOfDayHour>12</StartOfDayHour>
<Suffix>Jr.</Suffix>
<Title>Dr.</Title>
</Patient>
</InsertPatientRequest>
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Pati
ent

The table below shows the meaning of the HTTP arguments:


HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.

NOTE: This endpoint does not use a query string.

The table below describes the Patient Insert Request object.

C#
XML Element Data Meaning
Type
<InsertPatientRequest
xmlns="http://services.encoreanywhere.com class Specifies the insert patient request message.
/REST/PatientIntegration/v002">
Specifies the identifier that indicates the company to
which the patient belongs. This value will be used to set
<CompanyAccessGuid> string the office and clinician for the patient. The maximum
length is 40 characters. See Company Access List. This
element is required.
<Patient> class Specifies the patient data to be added to the database.
Specifies the date of birth for the patient being added.
The format for the date is yyyy-MM-ddTHH:mm:ss. The
<BirthDate> string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime class.
Specifies an unstructured character string that contains
<Comments> string additional details about the patient. This field may be
used in anyway needed.

Confidential Page 45
© 2019 KPNV All Rights Reserved
C#
XML Element Data Meaning
Type
<ContactInformation> class Specifies patient contact information.
Specifies an alternate phone number that can be used to
<AlternatePhone> string
contact patient.
<BestTimeToContact> string Specifies the best time to contact the patient by phone.
<Email> string Specifies the email address for the patient.
Specifies a phone number that can be used to send the
<Fax> string
patient a fax.
Specifies the home phone number for the patient being
<HomePhone> string
inserted.
Specifies the contact mechanism that the patient
prefers. The possible values are:
Home Phone,
Work Phone,
Alternate Phone,
<PreferredContactMethod> enum
Fax,
Email,
Text,
Do Not Contact, or
Unspecified.
Specifies the phone number that can be used to contact
<WorkPhone> string
this patient at the patient’s job.
<CustomFields> class Contains the company specific fields.
Specifies a company-specific field for storing
<CustomField1> string
information.
Specifies a company-specific field for storing
<CustomField2> string
information.
Specifies a company-specific field for storing
<CustomField3> string
information.
Specifies a company-specific field for storing
<CustomField4> string
information.
Specifies a company-specific field for storing
<CustomField5> string
information.
Specifies the first name of the patient being inserted.
<FirstName> string The maximum length of this element is 25 characters.
This element is required.
Specifies the phonetic pronunciation of the patient’s
<FirstNamePronunciation> string
given name.
Specifies the patient’s gender; domain is Male, Female,
<Gender> string
or Unspecified.

Confidential Page 46
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Meaning
Type
<GovernmentId> string Specifies the social security number for the patient.
Specifies the last (family) name of the patient. The
<LastName> string maximum length of this element is 25 characters. This
element is required.
Specifies the phonetic pronunciation of the patient’s
<LastNamePronunciation> string
family name.
Specifies the relationship status of the patient; the
<MaritalStatus> string acceptable values are Single, Married, Separated,
Divorced, Widowed, and Unspecified.
<MiddleName> string Specifies the patient‘s middle name or middle initial.
Specifies the globally-unique identifier of the patient’s
<OfficeGuid> string DME office; value must be recognizable as a GUID. The
maximum length is 40 characters.
Specifies the globally-unique identifier of the patient’s
<ClinicianGuid> string clinician of the patient; value must be recognizable as a
GUID. The maximum length is 40 characters.
Specifies the first line of the patient’s address, usually a
<Address1> string
number and the street name.
Specifies the second line of the patient’s address, usually
<Address2> string an apartment number or clarifying detail of a patient’s
address.
<City> string Specifies the city of the patient’s address.
Specifies the three-letter country code for the address.
<Country> string
Currently, this must be “USA”. This element is required.
Specifies the postal code (‘Zip Code’) for the patient’s
<PostalCode> string
address.
Specifies the two-letter abbreviation of the state for the
<State> string patient’s address. This field may be up to 50 characters
long.
Specifies the UUID for the patient. Typically, this value is
a unique identifier in the company’s system. The
<PatientUuid> string
maximum length is 40 characters. This element is
required.
This part of the XML request identifies the primary
<PrimaryPolicy> class
insurance policy for the patient.
Specifies the group number of the primary insurance
<GroupNumber> string
policy for the patient.
Specifies the number of the primary insurance policy for
<InsuranceNum> string
the patient.

Confidential Page 47
© 2019 KPNV All Rights Reserved
C#
XML Element Data Meaning
Type
Specifies the relationship of the policy holder to the
<PolicyRelationship> string patient. This pertains to the patient’s primary insurance
policy.
Specifies the name of the policy holder of the patient’s
<PolicyHolderName> string
primary insurance.
This part of the XML request identifies the secondary
<SecondaryPolicy> class
insurance policy for the patient.
Specifies the group number of the secondary insurance
<GroupNumber> string
policy for the patient.
Specifies the number of the secondary insurance policy
<InsuranceNum> string
for the patient.
Specifies the relationship of the policy holder to the
<PolicyRelationship> string patient. This pertains to the patient’s secondary
insurance policy.
Specifies the name of the policy holder of the patient’s
<PolicyHolderName> string
secondary insurance.
The GUID of the primary care physician of the patient;
<PrimaryCarePhysicianGuid> string value must be recognizable as a GUID. The maximum
length is 40 characters.
Specifies the date on which the patient was setup the
DME supplier. The format for the date is yyyy-MM-
ddTHH:mm:ss. The webpage
<SetupDate> string
https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx
describes the use of the DateTime class.
Specifies the GUID of the sleep doctor of the patient;
<SleepDoctorGuid> string value must be recognizable as a GUID. The maximum
length is 40 characters.
Specifies the globally-unique identifier of the sleep lab of
<SleepLabGuid> string the patient; value must be a recognizable as a GUID. The
maximum length is 40 characters.
Specifies the hour on which the day begins in the
<StartOfDayHour> int EncoreAnywhere system, usually 12. This is a required
element.
Specifies the suffix of the patient’s name, such as “Jr.”,
<Suffix> string
“MD”, etc.
Specifies the title of the patient’s name, such as “Dr.”,
<Title> string
“Hon.”, etc.

Confidential Page 48
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

12.2 Patient Insert Response

Calls to the service return a patient insert response that includes both a transaction result and patient
demographics. The transaction result is useful for determining the success/failure of the request, and looking at
any validation errors. This information can be obtained in a Transaction Status request. The patient
demographics object in the request is the patient that was inserted into the database if the insert was
successful. If unsuccessful, the patient demographics object in the response is null.

An example of the patient insert response can be seen below:

<UpdatePatientResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PatientDemographics>
<BirthDate>1992-03-02T00:00:00</BirthDate>
<Comments>This is comment number 68</Comments>
<ContactInformation>
<AlternatePhone>(477) 931-8628</AlternatePhone>
<BestTimeToContact/>
<Email>Jennifer.Jones@mail.philips.com</Email>
<Fax>(751) 360-8008</Fax>
<HomePhone>(795) 236-7624</HomePhone>
<PreferredContactMethod>Unspecified</PreferredContactMethod>
<WorkPhone>(855) 692-5202</WorkPhone>
</ContactInformation>
<CustomFields>
<CustomField1>This is custom field number 1 67</CustomField1>
<CustomField2>This is custom field number 2 95</CustomField2>
<CustomField3>This is custom field number 3 22</CustomField3>
<CustomField4>This is custom field number 4 42</CustomField4>
<CustomField5>This is custom field number 5 15</CustomField5>
</CustomFields>
<FirstName>Jennifer</FirstName>
<FirstNamePronunciation>Jennifer</FirstNamePronunciation>
<Gender>Female</Gender>
<GovernmentId>853-80-0955</GovernmentId>
<LastName>Jones</LastName>
<LastNamePronunciation>Jones</LastNamePronunciation>
<MaritalStatus>Single</MaritalStatus>
<MiddleName>H</MiddleName>
<OfficeGuid>a46b8689-16ae-4898-9fee-a07e17baf14d</OfficeGuid>
<ClinicianGuid>bad785f6-b9e0-49ac-8e15-12671e09971d</ClinicianGuid>
<PatientAddress>
<Address1>687 Carson St</Address1>
<Address2>453 Apartment 2</Address2>
<City>Pittsburgh</City>
<Country>USA</Country>
<PostalCode>47531</PostalCode>
<State>PA</State>
</PatientAddress>
<PatientUuid>X907799251</PatientUuid>
<PrimaryCarePhysicianGuid>bad785f6-b9e0-49ac-8e15-
12671e09971d</PrimaryCarePhysicianGuid>
<PrimaryPolicy>
<GroupNumber>GN-1371015344</GroupNumber>
<InsuranceNum>I-1947513517</InsuranceNum>
<PolicyRelationship>Self 1</PolicyRelationship>
<PolicyholderName>Jennifer Jones924</PolicyholderName>
</PrimaryPolicy>

Confidential Page 49
© 2019 KPNV All Rights Reserved
<SecondaryPolicy>
<GroupNumber>GN-696798126</GroupNumber>
<InsuranceNum>I-60399732</InsuranceNum>
<PolicyRelationship>Self 2</PolicyRelationship>
<PolicyholderName>Jennifer Jones924</PolicyholderName>
</SecondaryPolicy>
<SetupDate>2015-03-04T00:00:00</SetupDate>
<SleepDoctorGuid>bad785f6-b9e0-49ac-8e15-12671e09971e</SleepDoctorGuid>
<SleepLabGuid>bad785f6-b9e0-49ac-8e15-12671e09971g</SleepLabGuid>
<StartOfDayHour>12</StartOfDayHour>
<Suffix/>
<Title>M.D.</Title>
</PatientDemographics>
<TransactionResponse>
<EndDate>2014-08-05T11:24:12.297</EndDate>
<Messages>
<string>Created transaction</string>
<string>Patient Validated Successfully</string>
<string>Preparing Patient Update</string>
<string>Transaction completed.</string>
</Messages>
<PatientGuid>9caeeed6-702a-489b-aae0-e5dcd2e2ce78</PatientGuid>
<RequestDate>2014-08-05T11:24:12.173</RequestDate>
<TransactionGuid>ddac5b7c-01d9-4f6a-9cdb-
8dd1deac82e8</TransactionGuid>
<TransactionStatusCode>Completed</TransactionStatusCode>
</TransactionResponse>
</UpdatePatientResponse>

The table below shows the meaning of some of the HTTP status codes returned when a patient insert request is
made.

HTTP Status Possible Causes


OK (200) Successful request to make an update.
BadRequest (400) Improperly formatted request header, improperly formatted request body.
Integrator credentials are unknown.
Unauthorized (401) Disabled, integrator lacks permission to access this endpoint.
Improperly formatted request header.
NotFound (404) Supplied company identifier is unknown.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

Prior to enabling the insert patient functionality, a default office and clinician will be identified in the system for
any inserted patients. All patients inserted through the service will be assigned to this default office and clinician
within the specified company. Optionally, default sleep lab, primary care doctor, and sleep doctor can also be
specified. These values are stored internally. Only the office and clinician can be supplied through the service
interface.

The following table describes the meaning of the XML elements returned in the response message.

Confidential Page 50
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
<InsertPatientResponse> class Contains patient insert response.
<PatientDemographics> class Contains the patient demographic information.
Contains the date of birth for the patient being added. The format for
the date is yyyy-MM-ddTHH:mm:ss. The webpage
<BirthDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains an unstructured character string that contains additional
<Comments> string
details about the patient. This field may be used in anyway needed.
Contains an alternate phone number that can be used to contact
<AlternatePhone> string
patient.
<ContactInformation> class Contains contact information
<BestTimeToContact> string Contains the best time to contact the patient by phone.
<Email> string Contains the email address for the patient.
<Fax> string Contains a phone number that can be used to send the patient a fax.
<HomePhone> string Contains the home phone number for the patient being inserted.
Contains the contact mechanism that the patient prefers; the possible
values are:
Home Phone,
Work Phone,
Alternate Phone,
<PreferredContactMethod> enum
Fax,
Email,
Text,
Do Not Contact, and
Unspecified.
Contains the phone number that can be used to contact this patient at
<WorkPhone> string
the patient’s job.
<CustomFields> class Contains the custom fields.
<CustomField1> string Contains a company-specific field for storing information.
<CustomField2> string Contains a company-specific field for storing information.
<CustomField3> string Contains a company-specific field for storing information.
<CustomField4> class Contains a company-specific field for storing information.
<CustomField5> string Contains a company-specific field for storing information.
Contains the first name of the patient being inserted. The maximum
<FirstName> string
length of this element is 25 characters.
<FirstNamePronunciation> string Contains the phonetic pronunciation of the patient’s given name.
<Gender> string Contains the patient’s gender; domain is Male, Female, or Unspecified.
<GovernmentId> string Contains the social security number for the patient.
Contains the last (family) name of the patient. The maximum length of
<LastName> string
this element is 25 characters.

Confidential Page 51
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
<LastNamePronunciation> string Contains the phonetic pronunciation of the patient’s family name.
Contains the relationship status of the patient; the possible values are
<MaritalStatus> string
Single, Married, Separated, Divorced, Widowed, and Unspecified.
<MiddleName> string Contains the patient‘s middle name or middle initial.
Contains the GUID of the patient’s DME office; value must be
<OfficeGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Contains the GUID of the patient’s clinician of the patient; value must
<ClinicianGuid> string
be recognizable as a GUID. The maximum length is 40 characters.
<PatientAddress> class Contains the patient’s address information.
Contains the first line of the patient’s address, usually a number and the
<Address1> string
street name.
Contains the second line of the patient’s address, usually an apartment
<Address2> string
number of clarifying detail of an address.
<City> string Contains the city of the patient’s address.
Contains the three-letter country code for the address. Currently, this
<Country> string
must be “USA”.
<PostalCode> string Contains the postal code (‘Zip Code’) for the patient’s address.
Contains the two-letter abbreviation of the state for the patient’s
<State> string
address. This field may be up to 50 characters long.
Contains the UUID of the patient. Typically, this value is a unique
<PatientUuid> string identifier in the company’s system. The maximum length is 40
characters.
This part of the XML request identifies the primary insurance policy for
<PrimaryPolicy> class
the patient.
Contains the group number of the primary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Contains the number of the primary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s primary insurance policy.
Contains the name of the policy holder of the patient’s primary
<PolicyHolderName> string
insurance to the patient.
This part of the XML request identifies the secondary insurance policy
<SecondaryPolicy> class
for the patient.
Contains the group number of the secondary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Contains the number of the secondary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s secondary insurance policy.
Contains the name of the policy holder of the patient’s secondary
<PolicyHolderName> string
insurance.

Confidential Page 52
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Contains the GUID of the primary care physician of the patient; value
<PrimaryCarePhysicianGuid> string
must be recognizable as a GUID. The maximum length is 40 characters.
Contains the date on which the patient was setup the DME supplier.
The format for the date is yyyy-MM-ddTHH:mm:ss. The webpage
<SetupDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains the GUID of the sleep doctor of the patient; value must be
<SleepDoctorGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Contains the GUID of the sleep lab of the patient; value must be a
<SleepLabGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Contains the hour on which the day begins in the EncoreAnywhere
<StartOfDayHour> string
system, usually 12. This is a required element.
<Suffix> string Contains the suffix of the patient’s name, such as “Jr.”, “MD”, etc.
<Title> string Contains the title of the patient’s name, such as “Dr.”, “Hon.”, etc.
Contains the transaction response, which indicates the result of the
<TransactionResponse> string
transaction.
Contains the date on which the patient was setup the DME supplier.
The format for the date is yyyy-MM-ddTHH:mm:ss.fff. The webpage
<EndDate> int https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains a set of strings that are messages to the user of the patient
<Messages> string[]
data.
Contains the patient’s GUID. The maximum length is 40 characters. This
<PatientGuid> string value is necessary for subsequent General Patient Locator Request,
Patient Update PUT, and all of the Register Device requests.
Contains a timestamp that indicates when the patient data was
requested. The format for the date is yyyy-MM-ddTHH:mm:ss.fff. The
<RequestDate> string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains the transaction’s GUID. This can be used in a subsequent
<TransactionGuid> string request to the Transaction Status endpoint. The maximum length is 40
characters.
Contains the Status code for the request. The possible values are:
Requested
<TransactionStatusCode> enum Completed
ValidationFailure
SystemError

Confidential Page 53
© 2019 KPNV All Rights Reserved
13. Patient Update PUT
The patient update endpoint updates patient data. The endpoint updates the patient’s demographic data in the
EncoreAnywhere database. The first step of the process is to validate the request against the business rules of
the system. When the validation passes, the patient data is updated in the EncoreAnywhere database. Business
rules for fields in Update are company-specific.

Requests to the service return a patient update response that includes both a transaction result and patient
demographics. The transaction result is useful for determining the success/failure of the request, and looking at
any validation errors. The patient demographics object is the patient that was inserted into the database if the
update was successful. If unsuccessful, the patient demographics object is null.

NOTE: The Patient Update PUT endpoint only supports XML in the request and response body.

13.1 Patient Update Request

The syntax for the patient update request, including the XML information, and an example of a completely
formatted transaction status request are shown below:

PUT https://{host}/PatientIntegrationExternal.v002/Sync/Patient

<UpdatePatientRequest>
<CompanyAccessGuid>1627aea5-8e0a-4371-9022-9b504344e724</CompanyAccessGuid>
<Patient>
<BirthDate>1999-05-31T11:20:00</BirthDate>
<Comments>Detailed Comments</Comments>
<ContactInformation>
<AlternatePhone>(412) 555-1212</AlternatePhone>
<BestTimeToContact>Mornings</BestTimeToContact>
<Email>test.patient@philips.com</Email>
<Fax>(724) 555-1212 </Fax>
<HomePhone>(412) 555-2121</HomePhone>
<PreferredContactMethod>Home</PreferredContactMethod>
<WorkPhone>(412) 555-4444</WorkPhone>
</ContactInformation>
<CustomFields>
<CustomField1>Custom Data Field 1</CustomField1>
<CustomField2>Custom Data Field 2</CustomField2>
<CustomField3>Custom Data Field 3</CustomField3>
<CustomField4>Custom Data Field 4</CustomField4>
<CustomField5>Custom Data Field 5</CustomField5>
</CustomFields>
<FirstName>Test</FirstName>
<FirstNamePronunciation>Test</FirstNamePronunciation>
<Gender>Male</Gender>
<GovernmentId>200-01-0000</GovernmentId>
<LastName>Testing</LastName>
<LastNamePronunciation>Testing</LastNamePronunciation>
<MaritalStatus>Unspecified</MaritalStatus>
<MiddleName>T.</MiddleName>
<OfficeGuid>1627aea5-8e0a-4371-9022-9b504344e724</OfficeGuid>
<ClinicianGuid>bad785f6-b9e0-49ac-8e15-12671e09971d</ClinicianGuid>
<PatientAddress>
<Address1>2800 Golden Mile Highway</Address1>
<Address2>Apt 10</Address2>

Confidential Page 54
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

<City>Pittsburgh</City>
<Country>USA</Country>
<PostalCode>84959</PostalCode>
<State>PA</State>
</PatientAddress>
<PatientUuid>UX94-859-A-55</PatientUuid>
<PrimaryCarePhysicianGuid>bad785f6-b9e0-49ac-8e15-
12671e09971b</PrimaryCarePhysicianGuid>
<PrimaryPolicy>
<GroupNumber>BU3-DD3-A</GroupNumber>
<InsuranceNum>118495952</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test T. Testing</PolicyholderName>
</PrimaryPolicy>
<SecondaryPolicy>
<GroupNumber>7748-A</GroupNumber>
<InsuranceNum>991984981981515</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test Testing</PolicyholderName>
</SecondaryPolicy>
<SetupDate>2015-03-04T00:00:00</SetupDate>
<SleepDoctorGuid>bad785f6-b9e0-49ac-8e15-12671e09971a</SleepDoctorGuid>
<SleepLabGuid>bad785f6-b9e0-49ac-8e15-12671e09971g</SleepLabGuid>
<StartOfDayHour>12</StartOfDayHour>
<Suffix>Jr.</Suffix>
<Title>Dr.</Title>
</Patient>
</UpdatePatientRequest>
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Pati
ent

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.

NOTE: This endpoint does not use a query string.

The table below describes the patient update request XML object.

C#
XML Element Data Description
Type
<UpdatePatientRequest> class Contains the update request.
Identifier for patient’s company. This value will be used to set the Office
<CompanyAccessGuid> string and clinician for the patient. The maximum length is 40 characters. See
Company Access List. This is a required field.

Confidential Page 55
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
Specifies the GUID for the patient. The maximum length is 40 characters.
This API requires one of the following sets of elements to be specified:
<PatientGuid> string <FirstName> and <LastName>
<PatientUuid>
<PatientGuid>
<Patient> class Specifies patient demographic information.
Specifies the date of birth for the patient being added. The format for
the date is yyyy-MM-ddTHH:mm:ss The webpage
<BirthDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies an unstructured character string that contains additional details
<Comments> string
about the patient. This field may be used in anyway needed.
Specifies an alternate phone number that can be used to contact
<AlternatePhone> string
patient.
<BestTimeToContact> string Specifies the best time to contact the patient by phone.
<Email> string Specifies the email address for the patient.
<Fax> string Specifies a phone number that can be used to send the patient a fax.
<HomePhone> string Specifies the home phone number for the patient being inserted.
Specifies the contact mechanism that the patient prefers; the possible
values are:
Home Phone,
Work Phone,
Alternate Phone,
<PreferredContactMethod> string
Fax,
Email,
Text,
Do Not Contact, and
Unspecified.
Specifies the phone number that can be used to contact this patient at
<WorkPhone> string
the patient’s job.
CustomFields> Class Specifies company specific information.
<CustomField1> string Specifies a company-specific field for storing information.
<CustomField2> string Specifies a company-specific field for storing information.
<CustomField3> string Specifies a company-specific field for storing information.
<CustomField4> string Specifies a company-specific field for storing information.
<CustomField5> string Specifies a company-specific field for storing information.

Confidential Page 56
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Specifies the first name of the patient being inserted. The maximum
length of this element is 25 characters. This API requires one of the
following sets of elements to be specified:
<FirstName> string
<FirstName> and <LastName>
<PatientUuid>
<PatientGuid>
<FirstNamePronunciation> string Specifies the phonetic pronunciation of the patient’s given name.
<Gender> string Specifies the patient’s gender; domain is Male, Female, or Unspecified.
<GovernmentId> string Specifies the social security number for the patient.
Specifies the last (family) name of the patient. The maximum length of
this element is 25 characters. This API requires one of the following
sets of elements to be specified:
<LastName> string
<FirstName> and <LastName>
<PatientUuid>
<PatientGuid>
<LastNamePronunciation> string Specifies the phonetic pronunciation of the patient’s family name.
Specifies the relationship status of the patient; the possible values are
<MaritalStatus> string
Single, Married, Separated, Divorced, Widowed, and Unspecified.
<MiddleName> string Specifies the patient‘s middle name or middle initial.
Specifies the GUID of the patient’s DME office; value must be
<OfficeGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Specifies the GUID of the patient’s clinician of the patient; value must be
<ClinicianGuid> string
recognizable as a GUID. The maximum length is 40 characters.
<PatientAddress> Class Contains address information for a patient.
Specifies the first line of the patient’s address, usually a number and the
<Address1> string
street name.
Specifies the second line of the patient’s address, usually an apartment
<Address2> string
number of clarifying detail of an address.
<City> string Specifies the city of the patient’s address.
Specifies the three-letter country code for the patient’s address.
<Country> string
Currently, this must be “USA”. This is a required field.
<PostalCode> string Specifies the postal code (‘Zip Code’) for the patient’s address.
Specifies the two-letter abbreviation of the state portion of the patient’s
<State> string
address. This field may be up to 50 characters long.
Specifies the universally unique identifier (UUID) of the patient.
Typically, this value is a unique identifier in the company’s system. The
maximum length is 40 characters. This API requires one of the following
<PatientUuid> string elements to be specified:
<FirstName> and <LastName>
<PatientUuid>
<PatientGuid>

Confidential Page 57
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
This part of the XML request identifies the primary insurance policy for
<PrimaryPolicy> class
the patient.
<GroupNumber> string Specifies the group number of the patient’s primary insurance policy.
<InsuranceNum> string Specifies the number of the patient’s primary insurance policy.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s primary insurance policy.
Specifies the name of the policy holder of the patient’s primary
<PolicyHolderName> string
insurance.
This part of the XML request identifies the secondary insurance policy for
<SecondaryPolicy> class
the patient.
Specifies the group number of the secondary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Specifies the number of the secondary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s secondary insurance policy.
<PolicyHolderName> string Specifies the name of the policy holder of the patient’s insurance.
The GUID of the primary care physician of the patient; value must be
<PrimaryCarePhysicianGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Specifies the date on which the patient was setup the DME supplier. The
format for the date is yyyy-MM-ddTHH:mm:ss The webpage
<SetupDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies the GUID of the sleep doctor of the patient. The value must be
recognizable as a GUID. Sleep doctors can be added to the
<SleepDoctorGuid> string
EncoreAnywhere database using the browser user interface. The
maximum length is 40 characters.
Specifies the GUID of the sleep lab of the patient; value must be a
recognizable as a GUID. Sleep Labs can be added to the EncoreAnywhere
<SleepLabGuid> string
database using the browser user interface. The maximum length is 40
characters.
Specifies the hour on which the day begins in the EncoreAnywhere
<StartOfDayHour> int
system; usually 12.
<Suffix> string Specifies the suffix of the patient’s name, such as “Jr.”, “MD”, etc.
<Title> string Specifies the title of the patient’s name, such as “Dr.”, “Hon.”, etc.

Fields that are not provided in the request are assumed to be unchanged. For example, an update request that
does not include the patient’s first name will not attempt to modify the first name element.

Confidential Page 58
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

13.2 Patient Update Response

The syntax for the patient update response, including the XML information, and an example of a completely
formatted transaction status response are shown below:

<UpdatePatientResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PatientDemographics>
<BirthDate>1992-03-02T00:00:00</BirthDate>
<Comments>This is comment number 68</Comments>
<ContactInformation>
<AlternatePhone>(477) 931-8628</AlternatePhone>
<BestTimeToContact/>
<Email>Jennifer.Jones@mail.philips.com</Email>
<Fax>(751) 360-8008</Fax>
<HomePhone>(795) 236-7624</HomePhone>
<PreferredContactMethod>Unspecified</PreferredContactMethod>
<WorkPhone>(855) 692-5202</WorkPhone>
</ContactInformation>
<CustomFields>
<CustomField1>This is custom field number 1 67</CustomField1>
<CustomField2>This is custom field number 2 95</CustomField2>
<CustomField3>This is custom field number 3 22</CustomField3>
<CustomField4>This is custom field number 4 42</CustomField4>
<CustomField5>This is custom field number 5 15</CustomField5>
</CustomFields>
<FirstName>Jennifer</FirstName>
<FirstNamePronunciation>Jennifer</FirstNamePronunciation>
<Gender>Female</Gender>
<GovernmentId>853-80-0955</GovernmentId>
<LastName>Jones</LastName>
<LastNamePronunciation>Jones</LastNamePronunciation>
<MaritalStatus>Single</MaritalStatus>
<MiddleName>H</MiddleName>
<OfficeGuid>a46b8689-16ae-4898-9fee-a07e17baf14d</OfficeGuid>
<ClinicianGuid>bad785f6-b9e0-49ac-8e15-12671e09971d</ClinicianGuid>
<PatientAddress>
<Address1>687 Carson St</Address1>
<Address2>453 Apartment 2</Address2>
<City>Pittsburgh</City>
<Country>USA</Country>
<PostalCode>47531</PostalCode>
<State>PA</State>
</PatientAddress>
<PatientUuid>X907799251</PatientUuid>
<PrimaryPolicy>
<GroupNumber>GN-1371015344</GroupNumber>
<InsuranceNum>I-1947513517</InsuranceNum>
<PolicyRelationship>Self 1</PolicyRelationship>
<PolicyholderName>Jennifer Jones924</PolicyholderName>
</PrimaryPolicy>
<SecondaryPolicy>
<GroupNumber>GN-696798126</GroupNumber>
<InsuranceNum>I-60399732</InsuranceNum>
<PolicyRelationship>Self 2</PolicyRelationship>
<PolicyholderName>Jennifer Jones924</PolicyholderName>
</SecondaryPolicy>
<StartOfDayHour>12</StartOfDayHour>
<Suffix/>
<Title>M.D.</Title>
</PatientDemographics>

Confidential Page 59
© 2019 KPNV All Rights Reserved
<TransactionResponse>
<EndDate>2014-08-05T11:24:12.297</EndDate>
<Messages>
<string>Created transaction</string>
<string>Patient Validated Successfully</string>
<string>Preparing Patient Update</string>
<string>Transaction completed.</string>
</Messages>
<PatientGuid>9caeeed6-702a-489b-aae0-e5dcd2e2ce78</PatientGuid>
<RequestDate>2014-08-05T11:24:12.173</RequestDate>
<TransactionGuid>ddac5b7c-01d9-4f6a-9cdb-
8dd1deac82e8</TransactionGuid>
<TransactionStatusCode>Completed</TransactionStatusCode>
</TransactionResponse>
</UpdatePatientResponse>

The table below shows the meaning of the HTTP arguments:

HTTP Status Possible Causes


OK (200) Successful request to make an update.
Improperly formatted request header.
BadRequest (400)
Improperly formatted request body.
Integrator credentials are unknown.
Unauthorized (401) Disabled, Integrator lacks permission to access this endpoint.
Improperly formatted request header.
NotFound (404) Supplied company identifier is unknown.
PreconditionFailed Request timestamp differs too much from the server time.
(412)
InternalServerError The request could not be processed due to a failure on the service host.
(500)

The table below describes the properties of the patient object.

C#
XML Element Data Description
Type
<UpdatePatientResponse> class Contains the Update response.
<PatientDemographics> class Contains demographic information for the patient.
Contains the date of birth for the patient being added. The format for
the date is yyyy-MM-ddTHH:mm:ss. The webpage
<BirthDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains an unstructured character string that contains additional details
<Comments> string
about the patient. This field may be used in anyway needed.
<ContactInformation> class Contains contact information for the patient.
Contains an alternate phone number that can be used to contact
<AlternatePhone> string
patient.

Confidential Page 60
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
<BestTimeToContact> string Contains the best time to contact the patient by phone.
<Email> string Contains the email address for the patient.
<Fax> string Contains a phone number that can be used to send the patient a fax.
<HomePhone> string Contains the home phone number for the patient being inserted.
Contains the contact mechanism that the patient prefers; the possible
<PreferredContactMethod> string values are Home Phone, Work Phone, Alternate Phone, Fax, Email, Text,
Do Not Contact, Unspecified.
Contains the phone number that can be used to contact this patient at
<WorkPhone> string
the patient’s job.
CustomFields class Contains company specific information.
<CustomField1> string Contains a company-specific field for storing information.
<CustomField2> string Contains a company-specific field for storing information.
<CustomField3> string Contains a company-specific field for storing information.
<CustomField4> string Contains a company-specific field for storing information.
<CustomField5> string Contains a company-specific field for storing information.
Contains the first name of the patient. The maximum length of this
<FirstName> string element is 25 characters. If the <FirstName> and <LastName> elements
are not provided the <PatientUuid> element will be used.
<FirstNamePronunciation> string Contains the phonetic pronunciation of the patient’s given name
<Gender> string Contains the patient’s gender; domain is Male, Female, or Unspecified.
<GovernmentId> string Contains the social security number for the patient.
Contains the last (family) name of the patient. The maximum length of
<LastName> string this element is 25 characters. If the <FirstName> and <LastName>
elements are not provided the <PatientUuid> element will be used.
<LastNamePronunciation> string Contains the phonetic pronunciation of the patient’s family name.
Contains the relationship status of the patient; the possible values are
<MaritalStatus> string
Single, Married, Separated, Divorced, Widowed, and Unspecified
<MiddleName> string Contains the patient‘s middle name or middle initial.
Contains the GUID of the patient’s DME office; value must be
<OfficeGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Contains the GUID of the patient’s clinician of the patient; value must be
<ClinicianGuid> string
recognizable as a GUID. The maximum length is 40 characters.
<PatientAddress> class Contains patient address information
Contains the first line of the patient’s address, usually a number and the
<Address1> string
street name.
Contains the second line of the patient’s address, usually an apartment
<Address2> string
number of clarifying detail of an address.
<City> string Contains the city of the patient’s address.
Contains the three-letter country code for the patient’s address.
<Country> string
Currently, this must be “USA”.

Confidential Page 61
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
<PostalCode> string Contains the postal code (‘Zip Code’) for the patient’s address.
Contains the two-letter abbreviation of the state of the patient’s
<State> string
address. This field may be up to 50 characters long.
Specifies the UUID of the patient. Typically, this value is a unique
<PatientUuid> string identifier in the company’s system. The maximum length is 40
characters.
This part of the XML request Contains the primary insurance policy for
<PrimaryPolicy> class
the patient.
Contains the group number of the primary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Contains the number of the primary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s primary insurance policy.
<PolicyHolderName> string Contains the name of the policy holder of the patient’s insurance.
This part of the XML request contains the secondary insurance policy for
<SecondaryPolicy> class
the patient.
Contains the group number of the secondary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Contains the number of the secondary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s secondary insurance policy.
Contains the name of the policy holder of the patient’s secondary
<PolicyHolderName> string
insurance.
Contains the hour on which the day begins in the EncoreAnywhere
<StartOfDayHour> string
system, usually 12.
<Suffix> string Contains the suffix of the patient’s name, such as “Jr.”, “MD”, etc.
<Title> string Contains the title of the patient’s name, such as “Dr.”, “Hon.”, etc.
<TransactionResponse> class Contains the transaction response.
<EndDate> string Contains the end date for the patient.
<Messages> string[] Contains messages set at creation time.
<PatientGuid> string Contains the GUID of the patient. The maximum length is 40 characters.
Contains the GUID of the sleep lab of the patient; value must be a
<SleepLabGuid> string
recognizable as a GUID. The maximum length is 40 characters.
Contains the transaction response, which indicates the result of the
<TransactionResponse> class
transaction.
Contains a set of strings that are messages to the user of the patient
<Messages> string[]
data.
<PatientGuid> string Contains the patient’s GUID. The maximum length is 40 characters.

Confidential Page 62
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Contains a timestamp that indicates when the patient data was
requested. The format for the date is yyyy-MM-ddTHH:mm:ss.fff. The
<RequestDate> string webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains the transaction’s GUID. This can be used in a subsequent call to
<TransactionGuid> string the Transaction Status API to get the status of the insert request. The
maximum length is 40 characters.
Contains the Status code for the request. The possible values are:
Requested
<TransactionStatusCode> enum Completed
ValidationFailure
SystemError

Confidential Page 63
© 2019 KPNV All Rights Reserved
14. Patient Upsert POST
The patient upsert (update/insert) endpoint inserts or updates patient data. The endpoint accepts the
demographic data of a patient and stores it for asynchronous validation and processing. When the validation
passes, the patient data is inserted or updated into the EncoreAnywhere database. Business rules for fields in
upsert are company-specific.

Patient upsert is an asynchronous operation that returns a transaction ID that can be used in a subsequent
Transaction Status request to determine the outcome of the request. Patient Update and Patient Insert are
synchronous requests.

NOTE: The Patient Upsert POST endpoint only supports XML in the request and response body.

14.1 Patient Upsert Request

The syntax for the patient upsert request, including the XML information, and an example of a completely
formatted transaction status request are shown below:

POST https://{host}/PatientIntegrationExternal.v002/Async/Patient

<UpsertPatientRequest>
<CompanyAccessGuid>1627aea5-8e0a-4371-9022-9b504344e724</CompanyAccessGuid>
<Patient>
<BirthDate>1999-05-31T11:20:00</BirthDate>
<Comments>Detailed Comments</Comments>
<ContactInformation>
<AlternatePhone>(412) 555-1212</AlternatePhone>
<BestTimeToContact>Mornings</BestTimeToContact>
<Email>test.patient@philips.com</Email>
<Fax>(724) 555-1212 </Fax>
<HomePhone>(412) 555-2121</HomePhone>
<PreferredContactMethod>Home</PreferredContactMethod>
<WorkPhone>(412) 555-4444</WorkPhone>
</ContactInformation>
<CustomFields>
<CustomField1>Custom Data Field 1</CustomField1>
<CustomField2>Custom Data Field 2</CustomField2>
<CustomField3>Custom Data Field 3</CustomField3>
<CustomField4>Custom Data Field 4</CustomField4>
<CustomField5>Custom Data Field 5</CustomField5>
</CustomFields>
<FirstName>Test</FirstName>
<FirstNamePronunciation>Test</FirstNamePronunciation>
<Gender>Male</Gender>
<GovernmentId>200-01-0000</GovernmentId>
<LastName>Testing</LastName>
<LastNamePronunciation>Testing</LastNamePronunciation>
<MaritalStatus>Unspecified</MaritalStatus>
<MiddleName>T.</MiddleName>
<OfficeGuid>1627aea5-8e0a-4371-9022-9b504344e724</OfficeGuid>
<ClinicianGuid>bad785f6-b9e0-49ac-8e15-12671e09971d</ClinicianGuid>
<PatientAddress>
<Address1>2800 Golden Mile Highway</Address1>
<Address2>Apt 10</Address2>
<City>Pittsburgh</City>

Confidential Page 64
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

<Country>USA</Country>
<PostalCode>84959</PostalCode>
<State>PA</State>
</PatientAddress>
<PatientUuid>UX94-859-A-55</PatientUuid>
<PrimaryCarePhysicianGuid>bad785f6-b9e0-49ac-8e15-
12671e09971e</PrimaryCarePhysicianGuid>
<PrimaryPolicy>
<GroupNumber>BU3-DD3-A</GroupNumber>
<InsuranceNum>118495952</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test T. Testing</PolicyholderName>
</PrimaryPolicy>
<SecondaryPolicy>
<GroupNumber>7748-A</GroupNumber>
<InsuranceNum>991984981981515</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test Testing</PolicyholderName>
</SecondaryPolicy>
<SetupDate>2015-03-04T00:00:00</SetupDate>
<SleepDoctorGuid>bad785f6-b9e0-49ac-8e15-12671e09971f</SleepDoctorGuid>
<SleepLabGuid>bad785f6-b9e0-49ac-8e15-12671e09971g</SleepLabGuid>
<StartOfDayHour>12</StartOfDayHour>
<Suffix>Jr.</Suffix>
<Title>Dr.</Title>
</Patient>
</UpsertPatientRequest>
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Async/Pat
ient

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.

NOTE: This endpoint does not use a query string.

The table below describes the patient upsert request XML object.

C#
XML Element Data Description
Type
<UpsertPatientResponse> class Contains the upsert request.
Identifier for patient’s company. This value will be used to set the Office
<CompanyAccessGuid> string and clinician for the patient. The maximum length is 40 characters. See
Company Access List. This field is required.
<Patient> class Contains the patient’s information.

Confidential Page 65
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
Specifies the date of birth for the patient being added. The format for the
date is yyyy-MM-ddTHH:mm:ss. The webpage
<BirthDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies an unstructured character string that contains additional details
<Comments> string
about the patient. This field may be used in anyway needed.
<ContactInformation> class Contains contact information for the patient.
<AlternatePhone> string Specifies an alternate phone number that can be used to contact patient.
<BestTimeToContact> string Specifies the best time to contact the patient by phone.
<Email> string Specifies the email address for the patient.
<Fax> string Specifies a phone number that can be used to send the patient a fax.
<HomePhone> string Specifies the home phone number for the patient being inserted.
Specifies the contact mechanism that the patient prefers; the possible
<PreferredContactMethod> string values are Home Phone, Work Phone, Alternate Phone, Fax, Email, Text,
Do Not Contact, Unspecified.
Specifies the phone number that can be used to contact this patient at
<WorkPhone> string
the patient’s job.
<CustomFields class Contains the company specific information.
<CustomField1> string Specifies a company-specific field for storing information.
<CustomField2> string Specifies a company-specific field for storing information.
<CustomField3> string Specifies a company-specific field for storing information.
<CustomField4> string Specifies a company-specific field for storing information.
<CustomField5> string Specifies a company-specific field for storing information.
Specifies the first name of the patient being inserted. The maximum
<FirstName> string
length of this element is 25 characters. This element is required.
<FirstNamePronunciation> string Specifies the phonetic pronunciation of the patient’s given name.
<Gender> string Specifies the patient’s gender; domain is Male, Female, or Unspecified.
<GovernmentId> string Specifies the social security number for the patient.
Specifies the last (family) name of the patient. The maximum length of
<LastName> string
this element is 25 characters. This element is required.
<LastNamePronunciation> string Specifies the phonetic pronunciation of the patient’s family name.
Specifies the relationship status of the patient; the range of acceptable
<MaritalStatus> string values is Single, Married, Separated, Divorced, Widowed, and
Unspecified.
<MiddleName> string Specifies the patient‘s middle name or middle initial.
Specifies the globally-unique identifier of the patient’s DME office; value
<OfficeGuid> string
must be recognizable as a GUID. The maximum length is 40 characters.

Confidential Page 66
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Specifies the globally-unique identifier of the patient’s clinician of the
<ClinicianGuid> string patient; value must be recognizable as a GUID. The maximum length is 40
characters.
<PatientAddress> class Contains the patient’s address information.
Specifies the first line of the patient’s address, usually a number and the
<Address1> string
street name.
Specifies the second line of the patient’s address, usually an apartment
<Address2> string
number of clarifying detail of an address.
<City> string Specifies the city of the address.
Specifies the three-letter country code for the address. Currently, this
<Country> string
must be “USA”. This field is required.
<PostalCode> string Specifies the postal code (‘Zip Code’) for the address.
Specifies the two-letter abbreviation of the state. This field may be up to
<State> string
50 characters long.
Specifies the universally unique identifier (UUID) of the patient. Typically,
<PatientUuid> string this value is a unique identifier in the company’s system. The maximum
length is 40 characters. This element is required.
This part of the XML request identifies the primary insurance policy for
<PrimaryPolicy> class
the patient.
Specifies the group number of the primary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Specifies the number of the primary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This pertains
<PolicyRelationship> string
to the patient’s primary insurance policy.
<PolicyHolderName> string Specifies the name of the policy holder of the patient’s primary insurance.
Specifies the part of the XML request identifies the secondary insurance
<SecondaryPolicy> class
policy for the patient.
Specifies the group number of the secondary insurance policy for the
<GroupNumber> string
patient.
<InsuranceNum> string Specifies the number of the secondary insurance policy for the patient.
Specifies the relationship of the policy holder to the patient. This pertains
<PolicyRelationship> string
to the patient’s secondary insurance policy.
<PolicyHolderName> string Specifies the name of the policy holder of the patient’s insurance.
Specifies the date on which the patient was setup the DME supplier. The
format for the date is yyyy-MM-ddTHH:mm:ss. The webpage
<SetupDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.

Confidential Page 67
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
Specifies the GUID of the sleep doctor of the patient; value must be
recognizable as a GUID. Sleep doctors can be added to the
<SleepDoctorGuid> string
EncoreAnywhere database using the browser user interface. The
maximum length is 40 characters.
Specifies the GUID of the sleep lab of the patient; value must be a
recognizable as a GUID. Sleep labs can be added to the EncoreAnywhere
<SleepLabGuid> string
database using the browser user interface. The maximum length is 40
characters.
Specifies the hour on which the day begins in the EncoreAnywhere
<StartOfDayHour> int
system, usually 12. This is a required element.
<Suffix> string Specifies the suffix of the patient’s name, such as “Jr.”, “MD”, etc.
<Title> string Specifies the title of the patient’s name, such as “Dr.”, “Hon.”, etc.

Fields that are not provided in the request are assumed to be unchanged. For example, an update request that
does not include the patient’s first name will not attempt to modify the first name element.

Requests to the service endpoint return a TransactionID in the response. It can be used in a subsequent request
to the transaction status endpoint.

14.2 Patient Upsert Response

An example of the patient upsert response is shown below:

<UpsertPatientResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<TransactionId>1627aea5-8e0a-4371-9022-9b504344e724</TransactionId>
</UpsertPatientResponse>

The table below shows the meaning of some of the HTTP status codes returned when a therapy report request is
made.

HTTP Status Possible Causes


OK (200) Successful request to make an update.
Badrequest (400) Improperly formatted request header, or improperly formatted request body.
Integrator credentials are unknown.
Unauthorized (401) Disabled, integrator lacks permission to access this endpoint.
Improperly formatted request header.
NotFound (404) Supplied company identifier is unknown.
PreconditionFailed Request timestamp differs too much from the server time.
(412)
InternalServerError The request could not be processed due to a failure on the service host.
(500)

Confidential Page 68
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning of the XML elements returned in the response.

C#
XML Element Data Description
Type
<UpsertPatientResponse class Contains the upsert response.
Contains the transaction ID for the Patient Upsert request. This may be
<TransactionId> string
used in a subsequent Transaction Status Requests.

Prior to enabling the Patient Upsert functionality, a default office and clinician will be identified in the system for
any inserted patients. All patients inserted through the service will be assigned to this default office and
clinician within the specified company. Optionally, default sleep lab, primary care doctor, and sleep doctor can
also be specified. These values are stored internally. Only the office can be supplied through the service
interface.

Because this operation is asynchronous, the service does not provide an expected completion on any given
transaction. Transactions are processed in a First-In, First-Out manner.

15. Patient List GET


The Patient List GET endpoint provides a list of Patients with PatientGuid and Status for patients who were
created within a given date range. If the CompanyAccessGUID is provided only patients for the respective
company are returned. If no CompanyAccessGUID is provided, patients for all companies that the integrator has
access to are provided.

NOTES:
• The given date range should be limited to 6 months or less.
• This endpoint only supports JSON in the response body.

15.1 Patient List GET Request

The syntax for the Patient List request and an example of its usage is shown below:

GET
https://{Host}/EncoreExternalServices.REST/v1/patients?startDate={StartDate}&end
Date={EndDate}&companyAccessGuid={CompanyAccessGuid}
Example:
https://integration.encoreanywhere.com/
EncoreExternalServices.REST/v1/patients?startDate=2018-07-01&endDate=2018-12-
31&companyAccessGuid=95078FB5-10C7-488C-A70A-8E6F64CE1AD6
OR

https://integration.encoreanywhere.com/
EncoreExternalServices.REST/v1/patients?startDate=2018-07-01&endDate=2018-12-31

Confidential Page 69
© 2019 KPNV All Rights Reserved
HTTP Argument Meaning and Usage
{Host} Specifies the host name for EncoreAnywhere that was received from Philips Respironics.

The Patient List endpoint uses the query string fields listed in the table below:

Query String Fields Meaning


First day of the range of days for the Patient List being requested. The format is:
yyyy-MM-dd.
{StartDate} yyyy – The current year as 4 digits
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
Last day of the range of days for the Patient List being requested. The format is:
yyyy-MM-dd.
{EndDate} yyyy – The current year as 4 digits
MM – The current month of the year as 2 digits (01-12)
dd – The day of the month as 2 digits
(Optional) Specifies the company GUID. This is the value returned from the
{CompanyAccessGuid}
Company Access List endpoint. The maximum length is 40 characters.

15.2 Patient List GET Response

An example of a Patient List response in JSON format is shown below:

[
{
"PatientGuid": "015fe463-c503-4265-b948-ef6b1ba4d1b4",
"Active": true
},
{
"PatientGuid": "8bc93b3c-7cc4-4b27-8e90-9b19dbe9bec1",
"Active": false
}
]

The possible HTTP status values and the result codes associated with those status values are shown below.

HTTP Status Possible Causes


OK (200) Successful request.
Improperly formatted request header.
Improperly formatted dates or CompanyAccessGUID.
BadRequest (400) Start date and End date contain time component.
Date range exceeds 6 months.
Start date is greater than the end date.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.

Confidential Page 70
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

HTTP Status Possible Causes


Forbidden (403) Integrator does not have access to any patients.
NotFound (404) No Patients were found within the provided date range.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) A server side malfunction has occurred.

The meaning and use of the JSON elements from the body of the response are shown in the table below.

JSON Element C# Data Type Meaning


“PatientGuid” string GUID for the patient, which has a maximum length of 40 characters
“Active” bool Indicates whether the patient is active

16. Transaction Status GET


The transaction status endpoint checks the state of an upsert request that was previously submitted. The
endpoint accepts a transaction ID that was returned in a response message. If the transaction was unsuccessful
due to a violation of business rules, the service’s response includes a list of messages that describe the detected
problems.

A transaction moves from ‘Requested’ to ‘Completed’ when successful. A request that does not meet the
established business rules moves to ‘Validation Failure.’ A request that cannot be processed due to an internal
failure moves to ‘System Error.’

16.1 Transaction Status Request

The syntax for the HTTP request and an example of a completely formatted transaction status request is shown
below:

GET
https://{host}/PatientIntegrationExternal.v002/Sync/Transaction/{transactionId}
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Tran
saction/2871aec1-ec14-41b3-d40b-ca038e85d184

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
{transactionId} Specifies the transaction ID received in a previous Patient Upsert Response.

The transaction status endpoint does not use a query string.

Confidential Page 71
© 2019 KPNV All Rights Reserved
16.2 Transaction Status Response

An example of the transaction status response in XML is shown below:

<GetTransactionResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<EndDate>1999-05-31T11:20:00</EndDate>
<Messages />
<RequestDate>1999-05-31T11:20:00</RequestDate>
<TransactionGuid>1627aea5-8e0a-4371-9022-9b504344e724</TransactionGuid>
<TransactionStatusCode>Completed</TransactionStatusCode>
</GetTransactionResponse>

An example of the transaction status response in JSON is shown below:

{"EndDate":null,"Messages":["Created transaction","CustomFields.Field1 - Field 1


must have a value.","CustomFields.Field1 - Field 1 cannot be shorter than the
minimum length 1.","CustomFields.Field3 - Field 3 must have a
value.","Transaction failed due to business rule validation
error."],"PatientGuid":null,"RequestDate":"\/Date(1521556489943-
0400)\/","TransactionGuid":"2254159c-7b24-42fb-9fbd-
96b2d7f80e0e","TransactionStatusCode":"ValidationFailure"}

The table below shows the meaning of some of the HTTP status codes returned when a transaction status
request is made.

HTTP Status Possible Causes


OK (200) Successful request to get data.
BadRequest (400) Improperly formatted request header, or Improperly formatted request body.
Integrator credentials are unknown.
Unauthorized (401) Disabled, integrator lacks permission to access this endpoint.
Improperly formatted request header.
PreconditionFailed (412) Request timestamp differs too much from the server time.
The TransactionId was not a valid GUID.
InternalServerError (500)
The request could not be processed due to a failure on the service host.

The table below shows the meaning of the XML elements returned in the response.

C#
XML Element Data Description
Type
<GetTransactionResponse> class Contains the response from the transaction status request.
<Messages> string[] Contains the messages concerning the transaction.
Specifies the end date of the transaction. The format for the date is yyyy-
MM-ddTHH:mm:ss. The webpage https://msdn.microsoft.com/en-
<EndDate> string
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.

Confidential Page 72
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Specifies the timestamp for the request of the initial Upsert request. The
format for the date is yyyy-MM-ddTHH:mm:ss.fff. The webpage
<RequestDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies the Transaction GUID received in a previous response. The
<TransactionGuid> string
maximum length is 40 characters.
Specifies the status code for the transaction. The possible values are:
Requested
<TransactionStatusCode> enum Completed
ValidationFailure
SystemError

The table below shows the meaning of the JSON elements returned in the response.

C# Data
JSON Element Description
Type
“Messages” string[] Contains the messages concerning the transaction.
Specifies the end date of the transaction. The format for the date is yyyy-
MM-ddTHH:mm:ss. The webpage https://msdn.microsoft.com/en-
“EndDate” string
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies the timestamp for the request of the initial Upsert request. The
format for the date is yyyy-MM-ddTHH:mm:ss.fff. The webpage
“RequestDate” string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies the Transaction GUID received in a previous response. The
“TransactionGuid” string
maximum length is 40 characters.
Specifies the status code for the transaction. The possible values are:
Requested
“TransactionStatusCode” enum Completed
ValidationFailure
SystemError

Confidential Page 73
© 2019 KPNV All Rights Reserved
17. Register Device POST
The register device endpoint uses the POST verb to associate a device or a modem with a patient. With the POST
verb, this endpoint accepts the patient’s identifier (GUID) and the serial number(s) of the device or modem. If
the assignment is successful, a response message is returned with the patient GUID and serial number(s). If the
assignment is unsuccessful, an error response is sent to the caller, and the response message will be empty.

If the patient already has a CPAP device or modem assigned to him or her, this request will fail. The PUT verb
replaces a device or modem that has already been assigned.

NOTE: The Register Device POST endpoint only supports XML in the request and response body.

17.1 Register Device POST Request

The syntax for the HTTP request and an example of a completely formatted register device POST request is
shown below:

POST https://{host}/PatientIntegrationExternal.v002/Sync/DeviceRegistration
<DeviceRegistrationRequest
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<PatientGuid>1627aea5-8e0a-4371-9022-9b504344e724</PatientGuid>
<DeviceSerialNumberNew> P018087192F00</DeviceSerialNumberNew>
<ModemSerialNumberNew> W000011414</ModemSerialNumberNew>
<DeactivateInDays>120</DeactivateInDays>
</DeviceRegistrationRequest>

Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Devi
ceRegistration

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.

NOTE: This endpoint does not use a query string.

The table below describes the register device request XML object.

C#
XML Element Data Description
Type
<DeviceRegistrationRequest> class Contains the device registration request for a POST or PUT.
Specifies the GUID for the patient for whom the device is being
<PatientGuid> string
registered. The maximum length is 40 characters.

Confidential Page 74
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Specifies the serial number of the device being registered.
<DeviceSerialNumberNew> string
Recommended to be sent in upper case.
This field is ignored. It is enabled to allow legacy code to function, but no
<ModemSerialNumberNew> string
action is taken.
This field is ignored. It is enabled to allow legacy code to function, but no
<DeactivateInDays> int
action is taken.

17.2 Register Device POST Response

An example of the register device response when using the POST verb is shown below:
<DeviceRegistrationResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<PatientGuid>1627aea5-8e0a-4371-9022-9b504344e724</PatientGuid>
<DeviceSerialNumberNew>P018087192F00</DeviceSerialNumberNew>
<ModemSerialNumberNew/>
</DeviceRegistrationResponse>

The table below shows the meaning of some of the HTTP status codes returned when a register device POST
request is made.

HTTP Status Possible Causes


OK (200) Successful request.
Improperly formatted request header.
Improperly formatted request body.
BadRequest (400) Patient has a device or modem already assigned.
Device already assigned to a different patient.
The patient GUID was invalid.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
Conflict (409) Unassignable device exception occurred (invalid serial number).
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

Confidential Page 75
© 2019 KPNV All Rights Reserved
The table below describes the Insert register device response XML object.

C#
XML Element Data Description
Type
Contains the response to the register transaction request POST, PUT
<DeviceRegistrationResponse> class
or GET.
Specifies the GUID for the patient for whom the device is being
<PatientGuid> string
registered. The maximum length is 40 characters.
Specifies the serial number of the device being registered.
<DeviceSerialNumberNew> string
Recommended to be sent in upper case.
This field is not used. It is enabled to allow legacy code to function, but
<ModemSerialNumberNew> string no value will be present. This field will be set to blank regardless of the
setting of the request.
This field is not used. It is enabled to allow legacy code to function, but
<DeactivateInDays> int no value will be present. This field will be set to zero regardless of the
setting of the request.

Confidential Page 76
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

18. Register Device PUT


The register device endpoint uses the PUT verb associates a device with a patient. With the PUT verb, this
endpoint accepts the patient’s identifier (GUID) and the serial number(s) of the device. If the patient had no
device associated with him or her, this request will associate a device with the specified patient. If the patient
already has a device registered to him or her, this request will replace the existing registration.

If the request is successful, the response message will contain the new created or updated device registration
information. If the request is unsuccessful, the response message will be empty.

NOTE: The Register Device PUT endpoint only supports XML in the request and response body.

18.1 Register Device PUT Request

The syntax for the HTTP request and an example of a completely formatted register device PUT request is shown
below:
PUT https://{host}/PatientIntegrationExternal.v002/Sync/DeviceRegistration
<DeviceRegistrationRequest
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<PatientGuid>1627aea5-8e0a-4371-9022-9b504344e724</PatientGuid>
<DeviceSerialNumberNew> P018087192F00</DeviceSerialNumberNew>
<ModemSerialNumberNew> W000011414</ModemSerialNumberNew>
<DeactivateInDays>120</DeactivateInDays>
</DeviceRegistrationRequest>
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Devi
ceRegistration

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.

NOTE: This endpoint does not use a query string.

The table below describes the register device request XML object.

C#
XML Element Data Description
Type
<DeviceRegistrationRequest> class Contains the device registration request for a POST or PUT.
Specifies the GUID for the patient for whom the device is being
<PatientGuid> string
registered. The maximum length is 40 characters.

Confidential Page 77
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
Specifies the serial number of the device being registered.
<DeviceSerialNumberNew> string
Recommended to be sent in upper case.
This field is present for legacy reasons, but the field is not used by the
<ModemSerialNumberNew> string endpoint. This field will be set to blank regardless of the setting of the
request.
This field is present for legacy reasons, but the field is not used by the
<DeactivateInDays> int endpoint. This field will be set to zero regardless of the setting of the
request. Default value is 0.

18.2 Register Device PUT Response

An example of the register device response when using the PUT verb is shown below:
<DeviceRegistrationResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<PatientGuid>1627aea5-8e0a-4371-9022-9b504344e724</PatientGuid>
<DeviceSerialNumberNew>P018087192F00</DeviceSerialNumberNew>
<ModemSerialNumberNew/>
</DeviceRegistrationResponse>

The table below shows the meaning of some of the HTTP status codes returned when a register device PUT
request is made.

HTTP Status Possible Causes


OK (200) Successful request to update data.
Improperly formatted request header.
BadRequest (400)
Improperly formatted request body.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
Device already assigned to a different patient.
Conflict (409)
Invalid serial number.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

The table below describes the Insert Register Device Response XML object.

Confidential Page 78
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Contains the response to the register transaction request POST, PUT or
<DeviceRegistrationResponse> class
GET.
Specifies the GUID for the patient for whom the device is being
<PatientGuid> string
registered. The maximum length is 40 characters.
Specifies the serial number of the device being registered.
<DeviceSerialNumberNew> string
Recommended to be sent in upper case.
This field is present for legacy reasons, but the field is not used by the
<ModemSerialNumberNew> string
endpoint.
This field is present for legacy reasons, but the field is not used by the
<DeactivateInDays> int
endpoint.

Confidential Page 79
© 2019 KPNV All Rights Reserved
19. Register Device GET
The register device endpoint uses the GET verb obtains the device or a modem serial numbers associated with a
patient. With the GET verb, this endpoint accepts the patient’s identifier (GUID). If the request is successful, a
response message is returned with the Patient GUID and device and modem serial numbers registered to the
patient. If the assignment is unsuccessful, an error response is sent to the caller.

NOTE: The Register Device GET endpoint only supports XML in the request and response body.

19.1 Register Device GET Request

The syntax for the HTTP request and an example of a completely formatted register device GET request is shown
below:

GET https://{host}/
PatientIntegrationExternal.v002/Sync/DeviceRegistration/{patientguid}
Example:
https://Integration.EncoreAnywhere.com/
PatientIntegrationExternal.v002/Sync/DeviceRegistration/4be50061-2088-4894-942f-
ff6caa3f1a87

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
Specifies the GUID of the patient for whom the registered device information is being
{PatientGuid}
obtained. The maximum length is 40 characters.

NOTE: The register device endpoint does not use a query string.

19.2 Register Device GET Response

An example of the register device response when using the GET verb is shown below:
<DeviceRegistrationResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<PatientGuid>1627aea5-8e0a-4371-9022-9b504344e724</PatientGuid>
<DeviceSerialNumberNew>P018087192F00</DeviceSerialNumberNew>
<ModemSerialNumberNew/>
</DeviceRegistrationResponse>

The table below shows the meaning of some of the HTTP status codes returned when a register device GET
request is made.

Confidential Page 80
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

HTTP Status Possible Causes


OK (200) Successful request to update data.
Improperly formatted request header.
BadRequest (400) Improperly formatted request body.
The patient GUID was invalid.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Forbidden (403) Requestor lacks credentials to get device information for the specified patient.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

The table below describes the Insert register device response XML object.

C#
XML Element Data Description
Type
Contains the response to the register transaction request POST, PUT,
<DeviceRegistrationResponse> class
or GET.
Specifies the GUID for the patient for whom the device is being
<PatientGuid> string
registered. The maximum length is 40 characters.
Specifies the serial number of the device being registered.
<DeviceSerialNumber> string
Recommended to be sent in upper case.
This field is present for legacy reasons, but the field is not used by
the endpoint. However, if the modem calls in it may have a
<ModemSerialNumberNew> string
meaningful value. The modem hasn’t reported in to
EncoreAnywhere.
This field is present for legacy reasons, but the field is not used by
<DeactivateInDays> int
the endpoint. It will always be zero.

Confidential Page 81
© 2019 KPNV All Rights Reserved
20. Register Device DELETE
The register device endpoint using the DELETE verb removes the registration between a patient and a device
and/or a modem. With the DELETE verb, this endpoint accepts the patient’s identifier (GUID). When the
assignment is successful, the HTTP status code will be 200 “OK”. When the deletion is unsuccessful, the service
sends an error HTTP status code to the caller.

NOTE: The Register Device DELETE endpoint only supports XML in the request and response body.

20.1 Register Device DELETE Request

The syntax for the HTTP request and an example of a completely formatted transaction status request is shown
below:

DELETE https://{host}/PatientIntegrationExternal.v002/Sync/DeviceRegistration/{
patientguid}

Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Devi
ceRegistration/4be50061-2088-4894-942f-ff6caa3f1a87

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
Specifies the GUID for the patient for whom the device is being disassociated. The maximum
{PatientGuid}
length is 40 characters.

The register device endpoint does not use a query string.

Confidential Page 82
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

20.2 Register Device DELETE Response

An example of the register device response when using the DELETE verb is shown below:

StatusCode: 200, ReasonPhrase: 'OK'

The register device endpoint does not send a response message beyond the HTTP Status code. The table below
shows the meaning of some of the HTTP Status Codes returned when a register device DELETE request is made.

HTTP Status Possible Causes


OK (200) Successful request to update data.
Improperly formatted request header.
BadRequest (400) Improperly formatted request body.
The patient GUID was invalid.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Requestor lacks credentials to delete the device assignment for the specified
Forbidden (403)
patient.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

Confidential Page 83
© 2019 KPNV All Rights Reserved
21. Compliant Patient List GET
The compliant patient list endpoint provides a list of all patients that are in compliance with their insurance
company requirements. The patients can be from the list of all DME companies or one specific DME company to
which the provided integrator credentials has access. The endpoint accepts a date range from which compliance
history of a patient is queried, and an optional company access GUID which provides two ways to retrieve the
list of patients:

• With a company access GUID, this endpoint will return a list of compliant patients of a specific company.
• Without company access GUID, this endpoint will return a list of all the compliant patients from every
DME company to which the integrator has access.

NOTE: The list of compliant patients cannot exceed 16,000, so date range requests should be restricted to
follow this limit.

The list of compliant patients in the response including:

• Company Access GUID – The Globally Unique Identifier (GUID) provided for a company to be accessed
by the given integrator
• Compliant Date – The date for a patient to be compliant
• First Interaction Date – The date of the first use of the CPAP machine
• First Name – The first name of the patient
• Last Name – The last name of the patient
• Date of Birth – The date of birth of the patient
• Patient GUID – The GUID of a patient
• Patient UUID – The UUID of a patient. This identifier is unique to this patient within the company
associated with the patient.

21.1 Compliant Patient List Request

The syntax for the compliant patient list request and an example of a completely formatted transaction status
request is shown below:

GET https://{host}/PayerIntegrationExternal.v001/CompliantPatient?
StartDate={startDate}
&EndDate={endDate
&CompanyAccessGuid={companyAccessGuid}

Example:
http://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/CompliantPat
ient?StartDate=2014-09-22 13:13:14&EndDate=2014-09-30
08:30:30&CompanyAccessGuid=b1ee9b0f-ec20-44c3-b37d-051355750f3e

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

Confidential Page 84
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The compliant patient list endpoint uses a query string the fields and their meanings are shown in the table
below:

Query String Fields Meaning


Specifies the start date of the compliance information. The format for the date is
yyyy-MM-dd HH:mm:ss. The webpage https://msdn.microsoft.com/en-
{StartDate}
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the end date of the compliance information. The format for the date is
yyyy-MM-dd HH:mm:ss. The webpage https://msdn.microsoft.com/en-
{EndDate}
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the GUID that indicates the company to which the patient belongs. This is
{CompanyAccessGuid} the value returned from the Company Access List endpoint. The maximum length is
40 characters.

21.2 Compliant Patient List Response

An example of the compliant patient list response in XML is shown below:

<CompliantPatientListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCodeResultCode>
<Patients>
<CompliantPatient>
<CompanyAccessGuid>b1ee9b0f-ec20-44c3-b37d-
051355750f3e</CompanyAccessGuid>
<CompliantDate>2014-09-25T10:00:00</CompliantDate>
<FirstInteractionDate>2014-09-30T11:00:00</FirstInteractionDate>
<FirstName>Don</FirstName>
<LastName>Donaldson</LastName>
<PatientGuid>dd8eeed7-884f-44b3-9bc6-c0b1cb053cd5</PatientGuid>
<PatientUuid>ABCDEF2588702</PatientUuid>
</CompliantPatient>
<CompliantPatient>
<CompanyAccessGuid>b1ee9b0f-ec20-44c3-b37d-
051355750f3e</CompanyAccessGuid>
<CompliantDate>/Date(1411358400000-0400)/</CompliantDate>
<FirstInteractionDate>/Date(1412568000000-0400)/</FirstInteractionDate>
<FirstName>Tom</FirstName>
<LastName>Thomas</LastName>
<PatientGuid>40a11c7c-1325-43f6-98ee-7b10eb3b4734</PatientGuid>
<PatientUuid>ABCDEF2072244</PatientUuid>
</CompliantPatient>
</Patients>
</CompliantPatientListResponse>

Confidential Page 85
© 2019 KPNV All Rights Reserved
An example of the compliant patient list response in JSON is shown below:

{"Result":"Success","ResultCode":1,"Patients":[{"CompanyAccessGuid":"2598f53e-
6dca-4b98-ace3-6fc960bce096","CompliantDate":"\/Date(1503979200000-
0400)\/","DateOfBirth":"\/Date(-295128000000-
0400)\/","FirstInteractionDate":"\/Date(1501473600000-
0400)\/","FirstName":"Jack","LastName":"Williams315","PatientGuid":"1c5b3708-
cb3d-444e-b348-226be0a3f6b8","PatientUuid":"X611646620"}]}

The table below shows the meaning of some of the HTTP status codes returned when a compliant patient list
response is made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailed Improperly formatted request header.
BadRequest (400)
InvalidInputValues Improperly formatted request header.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Integrator is not authorized to perform the operation.
No companies found or no compliant patient found for
NoData
provided criteria.
NotFound (404)
Start date is greater than the end date or start date is later
InvalidInputValues
than current time.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid company access GUID

The table below describes the Insert compliant patient response XML object.

C#
XML Element Data Description
Type
Contains the response message from the compliant patient list
<CompliantPatientListResponse> class
request.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
<Patients> list Contains patient information for each compliant patient.
Specifies compliance information for a single patient. This class will
<CompliantPatient> class
be repeated as often as necessary.
Specifies the GUID for the patient for whom the device is being
<CompanyAccessGuid> string
registered. The maximum length is 40 characters.
<ComplianceDate> string Specifies the serial number of the device being registered.
Specifies the serial number for the modem associated with the
<FirstInteractionDate> string
device being registered.

Confidential Page 86
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Specifies the first name of a compliant patient. The maximum length
<FirstName> string
of this element is 25 characters.
Specifies the last name of a compliant patient. The maximum length
<LastName> string
of this element is 25 characters.
Specifies the GUID for the patient. The maximum length is 40
<PatientGuid> string
characters.
Specifies the UUID for the patient. This is an identifier that is unique
<PatientUuid> string to this patient within the company associated with the patient. The
maximum length is 40 characters.

The table below describes the Insert compliant patient response JSON object.

C# Data
JSON Element Description
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“Patients” list Contains patient information for each compliant patient.
Specifies the GUID for the patient for whom the device is being
“CompanyAccessGuid” string
registered. The maximum length is 40 characters.
“ComplianceDate” string Specifies the serial number of the device being registered.
Specifies the serial number for the modem associated with the device
“FirstInteractionDate” string
being registered.
Specifies the first name of a compliant patient. The maximum length of
“FirstName” string
this element is 25 characters.
Specifies the last name of a compliant patient. The maximum length of
“LastName” string
this element is 25 characters.
“PatientGuid” string Specifies the GUID for the patient. The maximum length is 40 characters.
Specifies the UUID for the patient. This is an identifier that is unique to
“PatientUuid” string this patient within the company associated with the patient. The
maximum length is 40 characters.

Confidential Page 87
© 2019 KPNV All Rights Reserved
22. Clinician List GET
The clinician’s list endpoint provides the list of all DME clinicians to which the provided company has access. The
list contains a unique identifier in the form of a GUID, name for each clinician, and clinician contact information.
The identifier can be used in other endpoints where a specific clinician must be defined.

NOTE: Philips reserves the right to change these clinician identifiers at any time.

22.1 Clinician List Request

The syntax for the HTTP request and an example of a completely formatted clinician list request is shown below:

GET
https://{host}/PayerIntegrationExternal.v001/Company/{companyaccessguid}/Clinici
an
Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/4be
50061-2088-4894-942f-ff6caa3f1a87/Clinician

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the identifier that indicates the company to which the patient belongs. This
{companyAccessGuid} value will be used to get the for the clinician information. The maximum length is 40
characters.

The Clinician List endpoint does not use a query string.

22.2 Clinician List Response

An example of the clinician list response in XML is shown below:

<ClinicianListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Clinicians>
<Clinician>
<City>Pittsburgh</City>
<CompanyGuid>7dc20a7f-d549-4aec-9685-7bbda935730d</CompanyGuid>
<FirstName>Jane</FirstName>
<LastName>Seymor</LastName>
<OfficeGuid>852a372b-1625-44e4-9384-662455016d02</OfficeGuid>
<ClinicianGuid>643ce7fc-860f-4cda-babf-
0d32df613324</ClinicianGuid>
<State>PA</State>
<UserName>jseymor</UserName>
<WorkPhone>412-976-6666</WorkPhone>

Confidential Page 88
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

</Clinician>
</Clinicians>
</ClinicianListResponse>

An example of the clinician list response in JSON is shown below:

{"Result":"Success","ResultCode":1,"ClinicalUsers":[{"ClinicianGuid":"643ce7fc-
860f-4cda-babf-0d32df613324","CompanyGuid":"7dc20a7f-d549-4aec-9685-7bbda935730d
","FirstName":"Jane","LastName":"Seymor","OfficeGuid":"852a372b-1625-44e4-9384-
662455016d02","UserName":"jseymor"}]}

The table below shows the meaning of some of the HTTP status codes returned when a clinician list request is
made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailed Improperly formatted request header.
BadRequest (400) InvalidInputValues Improperly formatted request header.
InvalidCompany Improperly formatted companyAccessGuid.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData Provided company has no clinicians.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid company access GUID

The table below describes the Insert clinician list response XML object.

C# Data
XML Element Description
Type
<ClinicianListResponse> class Contains the response to the clinician list request.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
<ClinicalUsers> list Contains a list of clinician classes.
<ClinicalUser> class Contains the information associated with a given clinician.
<City> string Contains the name of the city for the clinician.
Contains the company GUID for the clinician. The maximum length is 40
<CompanyGuid> string
characters.
Contains the first name for the clinician. The maximum length of this
<FirstName> string
element is 25 characters.
Contains the last name for the clinician. The maximum length of this
<LastName> string
element is 25 characters.
<ClinicianGuid> string Contains the GUID for the clinician. The maximum length is 40 characters.

Confidential Page 89
© 2019 KPNV All Rights Reserved
C# Data
XML Element Description
Type
Contains the state for the clinician. This field may be up to 50 characters
<State> string
long.
<UserName> string Contains the user name for the clinician.
<WorkPhone> string Contains the work phone number for the clinician.

The table below describes the Insert clinician list response JSON object.

C# Data
JSON Element Description
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“ClinicalUsers” list Contains a list of clinician classes.
“City” string Contains the name of the city for the clinician.
Contains the company GUID for the clinician. The maximum length is 40
“CompanyGuid” string
characters.
Contains the first name for the clinician. The maximum length of this element is
“FirstName” string
25 characters.
Contains the last name for the clinician. The maximum length of this element is
“LastName” string
25 characters.
“ClinicianGuid” string Contains the GUID for the clinician. The maximum length is 40 characters.
“State” string Contains the state for the clinician. This field may be up to 50 characters long.
“UserName” string Contains the user name for the clinician.
“WorkPhone” string Contains the work phone number for the clinician.

Confidential Page 90
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

23. Sleep Lab List GET


The sleep lab list endpoint provides the list of all DME sleep lab offices to which the specified company has
access. The list contains a unique identifier in the form of a GUID, name for each sleep lab office, and sleep lab
office contact information. The identifier can be used in other endpoints where a specific sleep lab must be
defined.

NOTE: Philips reserves the right to change these sleep lab identifiers at any time.

23.1 Sleep Lab List Request

The syntax for the sleep lab list request and an example of a completely formatted clinician list request is shown
below:
GET
https://{host}/PayerIntegrationExternal.v001/Company/{companyaccessguid}/SleepLa
b
Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/4be
50061-2088-4894-942f-ff6caa3f1a87/SleepLab

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{companyAccessGuid} Specifies the company access GUID. The maximum length is 40 characters.

The sleep lab list endpoint does not use a query string.

23.2 Sleep Lab List Response

An example of the sleep lab list response in XML is shown below:

<SleepLabListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<SleepLabs>
<SleepLab>
<Address1>123 Main Street</Address1>
<Address2>Suite 123</Address2>
<BelongsToRequestedCompany>false</BelongsToRequestedCompany>
<City>Monroeville</City>
<ContactName>Mario Lewis</ContactName>
<SleepLabGUID>a46b8689-16ae-4898-9fee-a07e17baf14d</SleepLabGUID>
<SleepLabName>Common SL Office (-5)</SleepLabName>
<PostalCode>15146</PostalCode>
<State>PA</State>
</SleepLab>

</SleepLabs>

Confidential Page 91
© 2019 KPNV All Rights Reserved
</SleepLabListResponse>

An example of the sleep lab list response in JSON is shown below:

{"Result":"Success","ResultCode":1,"SleepLabs":[{"Address1":"123
Main","Address2":"Suite 123","City":"Monroeville","ContactName":"Mario Lewis
","PostalCode":"15146","SleepLabGUID":"a46b8689-16ae-4898-9fee-
a07e17baf14d","SleepLabName":"Common SL Office","State":"PA"}]}

The table below shows the meaning of some of the HTTP status codes returned when a sleep lab list request is
made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailedImproperly formatted request header.
BadRequest (400) InvalidInputValues Improperly formatted request header.
InvalidCompany Improperly formatted company Access ID.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData Provided company has no sleep labs.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid company access GUID

The table below describes the Insert sleep lab list response XML object.

C#
XML Element Data Description
Type
<SleepLabListResponse> class Contains the response to a sleep lab list request.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
<SleepLabs> list Contains a list of all sleep labs associated with the specified company.
<SleepLab> class Contains the information associated with a given sleep lab.
Contains the first line of the sleep lab’s address, usually a number and the
<Address1> string
street name.
Contains the second line of the sleep lab’s address, usually an apartment
<Address2> string
number of clarifying detail of an address.
<City> string Contains the sleep labs of the patient’s address.
<ContactName> string Contains the name of the person to contact at the sleep lab.
<SleepLabGUID> string Contains the GUID for the sleep lab. The maximum length is 40 characters.
<SleepLabName> string Contains the name of the sleep lab.

Confidential Page 92
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
Contains the postal code (Zip Code) for the patient’s address. This field may
<PostalCode> string
be up to 25 characters long.
Contains the two-letter abbreviation of the state for the patient’s address.
<State> string
This field may be up to 50 characters long.

The table below describes the Insert sleep lab list response JSON object.

JSON Element C# Data Type Description


“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“SleepLabs” list Contains a list of all sleep labs associated with the specified company.
Contains the first line of the sleep lab’s address, usually a number and the
“Address1” string
street name.
Contains the second line of the sleep lab’s address, usually an apartment
“Address2” string
number of clarifying detail of an address.
“City” string Contains the sleep labs of the patient’s address.
“ContactName” string Contains the name of the person to contact at the sleep lab.
“SleepLabGUID” string Contains the GUID for the sleep lab. The maximum length is 40 characters.
“SleepLabName” string Contains the name of the sleep lab.
Contains the postal code (Zip Code) for the patient’s address. This field may
“PostalCode” string
be up to 25 characters long.
Contains the two-letter abbreviation of the state for the patient’s address.
“State” string
This field may be up to 50 characters long.

Confidential Page 93
© 2019 KPNV All Rights Reserved
24. Sleep Doctor List GET
The sleep doctor list endpoint provides the list of all DME sleep doctors to which the provided company has
access. The list contains a unique identifier in the form of a GUID, name for each sleep doctor, and sleep doctor
contact information. The identifier can be used in other endpoints where a specific sleep doctor must be
defined.

NOTE: Philips reserves the right to change these sleep doctor identifiers at any time.

24.1 Sleep Doctor List Request

The syntax for the sleep doctor list request and an example of a completely formatted sleep doctor list request
is shown below:

GET
https://{host}/PayerIntegrationExternal.v001/Company/{companyaccessguid}/SleepDo
ctor
Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/4be
50061-2088-4894-942f-ff6caa3f1a87/SleepDoctor

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{companyAccessGuid} Specifies the company access GUID. The maximum length is 40 characters.

The sleep doctor list endpoint does not use a query string.

24.2 Sleep Doctor List Response

An example of the sleep doctor list response in XML is shown below:

<SleepDoctorListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<SleepDoctors>
<SleepDoctor>
<City>Pittsburgh</City>
<CompanyGuid>7dc20a7f-d549-4aec-9685-7bbda935730d</CompanyGuid>
<FirstName>Jane</FirstName>
<LastName>Seymor</LastName>
<OfficeGuid>852a372b-1625-44e4-9384-662455016d02</OfficeGuid>
<SleepDoctorGuid>643ce7fc-860f-4cda-babf-
0d32df613324</SleepDoctorGuid>
<State>PA</State>
<UserName>jseymor</UserName>
<WorkPhone>412-976-6666</WorkPhone>
</SleepDoctor>

Confidential Page 94
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

</SleepDoctors>
</SleepDoctorListResponse>

An example of the sleep doctor list response in JSON is shown below:

{"Result":"Success","ResultCode":1,"SleepDoctors":[{"City":"Pittsburgh","Company
Guid":"7dc20a7f-d549-4aec-9685-
7bbda935730d","FirstName":"Jane","LastName":"Seymor","OfficeGuid":"852a372b-
1625-44e4-9384-662455016d02","SleepDoctorGuid":"643ce7fc-860f-4cda-babf-
0d32df613324","State":"PA","WorkPhone":"412-976-6666"}]}

The table below shows the meaning of some of the HTTP Status Codes returned when a sleep doctor list
Request is made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailedImproperly formatted request header.
BadRequest (400) InvalidInputValues Improperly formatted request header.
InvalidCompany Improperly formatted company Access ID.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData Provided company has no sleep doctors.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid company access GUID

The table below describes the sleep doctor list Response XML object.

C#
XML Element Data Description
Type
<SleepDoctorListResponse> class This XML element is repeated as often as necessary to list all sleep labs.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Contains the list of all sleep doctors associated with the specified
<SleepDoctors> List
company.
<SleepDoctor> class Contains the information associated with a specific sleep doctor.
<City> string Contains the city of the sleep doctor’s address.
Contains the GUID of the company associated with the doctor. This is the
<CompanyGuid> string value returned from the Company Access List endpoint. The maximum
length is 40 characters.
Contains the sleep doctor’s first name. The maximum length of this
<FirstName> string
element is 25 characters.

Confidential Page 95
© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
Contains the sleep doctor’s last name. The maximum length of this
<LastName> string
element is 25 characters.
Contains the GUID for the office to which the doctor is associated. This is
<OfficeGuid> string the value returned from the office access list endpoint for the company
identified in <CompanyGuid>. The maximum length is 40 characters.
<SleepDoctorGuid> string Contains the sleep doctor’s GUID. The maximum length is 40 characters.
Contains the name of the sleep lab’s to which the doctor is
<SleepLabName> string
associated. The maximum length is 50 characters.
Contains the postal code (aka, ‘Zip Code’) for the sleep doctor’s address.
<PostalCode> string
This field may be up to 25 characters long.
Contains the two-letter abbreviation of the state for the sleep doctor’s
<State> string
address. The maximum length is 50 characters.
Contains the user name for the sleep doctor. The maximum length is 50
<UserName> string
characters.
<WorkPhone> string Contains the work phone number for the sleep doctor.

The table below describes the sleep doctor list Response JSON object.

JSON Element C# Data Type Description


“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
Contains the list of all sleep doctors associated with the specified
“SleepDoctors” List
company.
“City” string Contains the city of the sleep doctor’s address.
Contains the GUID of the company associated with the doctor. This is the
“CompanyGuid” string value returned from the Company Access List endpoint. The maximum
length is 40 characters.
Contains the sleep doctor’s first name. The maximum length of this
“FirstName” string
element is 25 characters.
Contains the sleep doctor’s last name. The maximum length of this
“LastName” string
element is 25 characters.
Contains the GUID for the office to which the doctor is associated. This is
“OfficeGuid” string the value returned from the office access list endpoint for the company
identified in <CompanyGuid>. The maximum length is 40 characters.
“SleepDoctorGuid” string Contains the sleep doctor’s GUID. The maximum length is 40 characters.
Contains the name of the sleep lab’s to which the doctor is
“SleepLabName” string
associated. The maximum length is 50 characters.
Contains the postal code (aka, ‘Zip Code’) for the sleep doctor’s address.
“PostalCode” string
This field may be up to 25 characters long.
Contains the two-letter abbreviation of the state for the sleep doctor’s
“State” string
address. The maximum length is 50 characters.

Confidential Page 96
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

JSON Element C# Data Type Description


Contains the user name for the sleep doctor. The maximum length is 50
“UserName” string
characters.
“WorkPhone” string Contains the work phone number for the sleep doctor.

25. Primary Care Physician List GET


The primary care physician list endpoint provides the list of all DME physicians to which the provided company
has access. The list contains a unique identifier in the form of a GUID, name for each physician, and physician
contact information. The identifier can be used in other endpoints where a specific physician must be defined.

NOTE: Philips Respironics reserves the right to change these physician identifiers at any time.

25.1 Primary Care Physician List Request

The syntax for the primary care physician list request and an example of a completely formatted clinician list
request is shown below:

GET
https://{host}/PayerIntegrationExternal.v001/Company/{companyaccessguid}/Primary
CarePhysician
Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/4be
50061-2088-4894-942f-ff6caa3f1a87/PrimaryCarePhysician

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{companyAccessGuid} Specifies the company access GUID. The maximum length is 40 characters.

NOTE: The primary care physician list endpoint does not use a query string.

Confidential Page 97
© 2019 KPNV All Rights Reserved
25.2 Primary Care Physician List Response

An example of the primary care physician list response in XML is shown below:

<PrimaryCarePhysicianListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Physicians>
<Physician>
<City>Pittsburgh</City>
<CompanyGuid>7dc20a7f-d549-4aec-9685-7bbda935730d</CompanyGuid>
<FirstName>Jane</FirstName>
<LastName>Seymor</LastName>
<OfficeGuid>852a372b-1625-44e4-9384-662455016d02</OfficeGuid>
<PhysicianGuid>643ce7fc-860f-4cda-babf-
0d32df613324</PhysicianGuid>
<State>PA</State>
<UserName>jseymor</UserName>
<WorkPhone>412-976-6666</WorkPhone>
</Physician>
</Physicians>
</PrimaryCarePhysicianListResponse>

An example of the primary care physician list response in JSON is shown below:

{"Result":"Success","ResultCode":1,"Physicians":[{"City":"Pittsburgh","CompanyGu
id":"7dc20a7f-d549-4aec-9685-
7bbda935730d","FirstName":"Jane","LastName":"Seymor","OfficeGuid":"852a372b-
1625-44e4-9384-662455016d02","PhysicianGuid":"643ce7fc-860f-4cda-babf-
0d32df613324","State":"PA","WorkPhone":"412-976-6666"}]}

The table below shows the meaning of some of the HTTP status codes returned when a primary care physician
list request is made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailed Improperly formatted request header.
BadRequest (400) InvalidInputValues Improperly formatted request header.
InvalidCompany Improperly formatted company Access ID.
Integrator credentials are unknown or disabled, or
AuthenticationFailed
Unauthorized (401) integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData Provided company has no sleep doctors.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid company access GUID

The table below describes the primary care physician list response XML object.

Confidential Page 98
© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C# Data
XML Element Description
Type
<PrimaryCarePhysician
class Contains the response to the primary care physician list request.
ListResponse>
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Contains the list of all primary care physicians associated with the specified
<Physicians> list
company.
<Physician> class Contains the information for a particular primary care physician.
<City> string Contains the city of the primary care physician’s address
Contains the GUID of the company associated with the doctor. The
<CompanyGuid> string
maximum length is 40 characters.
Contains the primary care physician’s first name. The maximum length of
<FirstName> string
this element is 25 characters.
Contains the primary care physician’s last name. The maximum length of
<LastName> string
this element is 25 characters.
Contains the GUID of the primary care physician’s office. The maximum
<OfficeGuid> string
length is 40 characters.
Contains the primary care physician’s GUID. The maximum length is 40
<PhysicianGuid> string
characters.
<SleepLabName> string Contains the name of the sleep lab associated with this doctor.
Contains the postal code (aka, ‘Zip Code’) for the primary care physician’s
<PostalCode> string
address. This field may be up to 25 characters long.
Contains the two-letter abbreviation of the state for the primary care
<State> string
physician’s address. This field may be up to 50 characters long.
<UserName> string Contains the user name for the primary care physician doctor.
<WorkPhone> string Contains the primary care physician’s work phone number.

The table below describes the primary care physician list response JSON object.

C#
JSON Element Data Description
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“Physicians” List Contains the list of all sleep doctors associated with the specified company.
“City” string Contains the city of the sleep doctor’s address.
Contains the GUID of the company associated with the doctor. This is the value
“CompanyGuid” string returned from the Company Access List endpoint. The maximum length is 40
characters.
Contains the sleep doctor’s first name. The maximum length of this element is 25
“FirstName” string
characters.

Confidential Page 99
© 2019 KPNV All Rights Reserved
C#
JSON Element Data Description
Type
Contains the sleep doctor’s last name. The maximum length of this element is 25
“LastName” string
characters.
Contains the GUID for the office to which the doctor is associated. This is the value
“OfficeGuid” string returned from the office access list endpoint for the company identified in
<CompanyGuid>. The maximum length is 40 characters.
“PhysicianGuid” string Contains the sleep doctor’s GUID. The maximum length is 40 characters.
Contains the name of the sleep lab’s to which the doctor is associated. The
“SleepLabName” string
maximum length is 50 characters.
Contains the postal code (aka, ‘Zip Code’) for the sleep doctor’s address. This field
“PostalCode” string
may be up to 25 characters long.
Contains the two-letter abbreviation of the state for the sleep doctor’s address.
“State” string
The maximum length is 50 characters.
Contains the user name for the sleep doctor. The maximum length is 50
“UserName” string
characters.
“WorkPhone” string Contains the work phone number for the sleep doctor.

Confidential Page 100


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

26. Patient Notes GET


26.1 Patient Notes Request

NOTE: The Patient Notes GET endpoint only supports XML in the response body.

The syntax for the patient notes request and an example of a completely formatted patient notes request
appears below:

GET
https://{host}/PatientIntegrationExternal.v002/Sync/PatientNotes/{PatientGuid}
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Pati
entNotes/852E0680-E5C2-45BA-9A2D-197D1377182E

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
Specifies the GUID for the patient being located. This identifier is unique to this patient within
{PatientGuid}
the company associated with the patient.

Confidential Page 101


© 2019 KPNV All Rights Reserved
26.2 Patient Notes Response

An example of the patient notes response appears below:

<GetPatientNotesResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PatientNotes>
<PatientNote>
<NoteText>Test Note 2</NoteText>
<CreationDate>2016-01-28T16:09:28.23</CreationDate>
</PatientNote>
<PatientNote>
<NoteText>Test Note 1</NoteText>
<CreationDate>2016-01-28T16:09:15.527</CreationDate>
</PatientNote>
</PatientNotes>
</GetPatientNotesResponse>

The table below shows the meaning of some of the HTTP status codes returned when a patient notes request is
made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailed Improperly formatted request header.
BadRequest (400) InvalidInputValues Improperly formatted request header.
InvalidCompany Improperly formatted company Access ID.
Integrator credentials are unknown or disabled, or
AuthenticationFailed
Unauthorized (401) integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData Patient notes not found.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid patient GUID

The table below describes the patient notes response XML object.

C# Data
XML Element Description
Type
<GetPatientNotesResponse > class Patient note response.
<PatientNotes> list List of patient notes.
<PatientNote> class Patient note information for an individual patient note.
<NoteText> sting Note text for an individual patient note.
<CreationDate> datetime Creation date of an individual patient note.

Confidential Page 102


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

27. Patient Notes POST


27.1 Patient Notes POST Request

Creates a note for the patient and alternatively sends a notification to the patient’s sleep doctor. Notification
is sent only if the patient has a sleep doctor assigned.

NOTE: The Patient Notes POST endpoint only supports XML in the request and response body.

The syntax for the HTTP request and an example of a completely formatted patient notes POST request appear
below:

<InsertPatientNotesRequest
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<PatientGuid>067a6f7d-4ca6-44f8-8042-ff178aa8c657</PatientGuid>
<NoteText>Test Note 2</NoteText>
<SendNotification>false</SendNotification>
<UserName>clinuser</UserName>
</InsertPatientNotesRequest>
https://{host}/PatientIntegrationExternal.v002/Sync/PatientNotes
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Pati
entNotes

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.

The table below describes the patient notes request XML object.

C# Data
XML Element Description
Type
<InsertPatientNotesRequest> class Patient note request for POST.
<PatientGuid> string Identifier information for the patient.
<NoteText> string Note text for the patient note.
<SendNotification> Boolean Flag for send notification.
Optional user name to set as author of the note. Must be valid
<Username> string
user for patients company. Defaults to System user if not specified.

Confidential Page 103


© 2019 KPNV All Rights Reserved
27.2 Patient Note POST Response

An example of the patient note response for POST appears below:


<InsertPatientNotesResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NoteGuid>abd3ebdc-17d4-4b3d-b756-cb724cebc127</NoteGuid>
</InsertPatientNotesResponse>

The table below shows the meaning of some of the HTTP status codes returned when a patient note POST
request is made.

HTTP Status Possible Causes


OK (200) Successful request.
Improperly formatted request header.
Improperly formatted request body.
BadRequest (400)
The patient GUID was invalid.
Note text is NULL or empty.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Forbidden (403) Requestor lacks access to the specified patient.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

The table below describes the patient note XML object.

C# Data
XML Element Description
Type
<InsertPatientNotesResponse > class Contains the patient note response for POST.
<NoteGuid> GUID Contains the note identifier.

Confidential Page 104


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

28. Patient Custom Fields GET


28.1 Patient Custom Fields Request

The syntax for the patient custom fields request and an example of a completely formatted patient custom fields
request appears below:

GET
https://{host}/PayerIntegrationExternal.v001/Company/{CompanyAccessGuid}/CustomF
ields
Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Company/4be
50061-2088-4894-942f-ff6caa3f1a87/CustomFields

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access
{CompanyAccessGuid}
List endpoint. The maximum length is 36 characters, including four hyphens.

Confidential Page 105


© 2019 KPNV All Rights Reserved
28.2 Patient Custom Fields Response

An example of the patient custom fields response in XML appears below:

<CustomFieldListResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<CustomFields>
<CustomField>
<DefaultValue>CustomField1</DefaultValue>
<FieldId>CustomField1</FieldId>
<Label>CustomField1</Label>
<MaximumLength>75</MaximumLength>
<MinimumLength>1</MinimumLength>
<Required>true</Required>
</CustomField>
<CustomField>
<DefaultValue>CustomField2</DefaultValue>
<FieldId>CustomField2</FieldId>
<Label>CustomField2</Label>
<MaximumLength>75</MaximumLength>
<MinimumLength>0</MinimumLength>
</CustomField>
<CustomField>
<DefaultValue>CustomField3</DefaultValue>
<FieldId>CustomField3</FieldId>
<Label>CustomField3</Label>
<ListOfValues>
<string>CustomField1</string>
<string>CustomField2</string>
<string>CustomField3</string>
<string>CustomField4</string>
<string>CustomField5</string>
</ListOfValues>
<MaximumLength>75</MaximumLength>
<MinimumLength>1</MinimumLength>
<Required>true</Required>
</CustomField>
<CustomField>
<DefaultValue>CustomField4</DefaultValue>
<FieldId>CustomField4</FieldId>
<Label>CustomField4</Label>
<ListOfValues>
<string>CustomField1</string>
<string>CustomField2</string>
<string>CustomField3</string>
<string>CustomField4</string>
<string>CustomField5</string>
</ListOfValues>
<MaximumLength>75</MaximumLength>
<MinimumLength>0</MinimumLength>
</CustomField>
</CustomFields>
</CustomFieldListResponse>

Confidential Page 106


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

An example of the patient custom fields response in JSON appears below:

{"Result":"Success","ResultCode":1,"CustomFields":[{"DefaultValue":"CustomField1
","FieldId":"CustomField1","Label":"CustomField1","MaximumLength":"75","MinimumL
ength":"1","Required":true},{"DefaultValue":"CustomField2","FieldId":"CustomFiel
d2","Label":"CustomField2","MaximumLength":"75","MinimumLength":"0"},{"DefaultVa
lue":"CustomField3","FieldId":"CustomField3","Label":"CustomField3","ListOfValue
s":["CustomField1","CustomField2","CustomField3","CustomField4","CustomField5"],
"MaximumLength":"75","Required":true},{"DefaultValue":"CustomField4","FieldId":"
CustomField4","Label":"CustomField4","ListOfValues":["CustomField1","CustomField
2","CustomField3","CustomField4","CustomField5"],"MaximumLength":"75"}]}

The table below shows the meaning of some of the HTTP status codes returned when a patient custom fields
request is made.

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
AuthenticationFailed Improperly formatted request header.
BadRequest (400) InvalidInputValues Improperly formatted request header.
InvalidCompany Improperly formatted company Access ID.
Integrator credentials are unknown or disabled, or
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData Provided company has no sleep doctors.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.
Forbidden (403) AuthorizationFailed Invalid company access GUID

Confidential Page 107


© 2019 KPNV All Rights Reserved
The table below describes the patient custom fields response XML object.

C# Data
XML Element Description
Type
<CustomFieldListResponse> class Custom Field List response
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
<CustomFields> list Contains a list of company-specific custom fields.
<CustomField> string Specifies company-specific custom field information.
<DefaultValue> string Default value for the company-specific custom field.
<FieldId> string Field ID for the company-specific custom field.
<Label> string Label for the company-specific custom field.
<ListOfValues> list Contains a list of company-specific custom field values.
<string> string Specifies company-specific custom field information.
<MaximumLength> string Maximum length for the company-specific custom field.
<MinimumLength> string Minimum length for the company-specific custom field.
Contains an indication whether the company-specific custom field is
<Required> Boolean
required.

The table below describes the patient custom fields response JSON object.

C# Data
JSON Element Description
Type
“Result” string Result message that explains the ResultCode in more detail
“ResultCode” enum Custom response code for the response
“CustomFields” list Contains a list of company-specific custom fields.
“DefaultValue” string Default value for the company-specific custom field.
“FieldId” string Field ID for the company-specific custom field.
“Label” string Label for the company-specific custom field.
“ListOfValues” list Contains a list of company-specific custom field values.
“MaximumLength” string Maximum length for the company-specific custom field.
“MinimumLength” string Minimum length for the company-specific custom field.
“Required” Boolean Contains an indication whether the company-specific custom field is required.

Confidential Page 108


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

29. Patient Communication POST


The PatientCommunicationApi provides a means to add a patient contact record to a patient’s profile.

NOTE: All Patient Communication endpoints only support JSON in the request and response body.

29.1 Patient Communication Request

The syntax for the HTTP request and an example of a completely formatted patient communication request
appear below:

POST
https://{host}/EncoreExternalServices.REST/v1/patient-communications
Example of request:
https://Integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patient-
communications
Example of request body:
{
"PatientCommunicationGuid": "00000000-0000-0000-0000-000000000000",
"ClinicianGuid": "94b8229e-f032-4578-801f-024932c36ba7",
"CompanyGuid": "c436fc3d-5721-4769-8efe-45466e08dd92",
"CommunicationDate": "2017-03-08T19:14:22.0487893Z",
"CommunicationMethod": {
"MethodOfCommunication": "Phone",
"CommunicationMethodGuid": "82b0cf42-3821-4c1b-8a8c-5386ac343610"
},
"CommunicationReason": {
"ReasonForCommunication": "Followup",
"CommunicationReasonGuid": "ba1a3a22-02a6-4b56-857c-aadfce6d10f2"
},
"Notes": "Example notes",
"PatientGuid": "f3d78ab6-836c-4e04-93a9-2f753c600873"
}

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

Confidential Page 109


© 2019 KPNV All Rights Reserved
29.2 Patient Communication Response

The table below shows the meaning of some of the HTTP status codes returned when a patient communication
request is made.

HTTP Status Possible Causes


BadRequest (400) Improperly formatted request body.
Unauthorized (401) Integrator credentials are unknown or disabled.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
InternalServerError (500) Indicates server side malfunction.

The table below shows the properties of the patient object request.

C# Data
JSON Element Description
Type
“PatientCommunicationGuid”string Contains the GUID for the patient.
Contains the GUID for the patients clinician; value must be
“ClinicianGuid” string
recognizable as a GUID. The maximum length is 40 characters.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“CommunicationDate” string Contains date of communication.
“CommunicationMethod” string Contains method of communication.
“CommunicationReason” string Contains reason why communication was initiated.
“Notes” string Contains information about communication.
Specifies the GUID for the patient. The maximum length is 40
“PatientGuid” string
characters
“MethodOfCommunication” string Contains method of communication.
“CommunicationMethodGuid” string Contains the GUID for the communication method.
“ReasonForCommunication” string Contains reasons for communication
“CommunicationReasonGuid” String Contains the GUID for communication reason.

Confidential Page 110


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

30. Communications Methods GET


30.1 Communications Methods Request

NOTE: All Communications Methods endpoints only support JSON in the request and response body.

The syntax for the communications methods request and an example of a completely formatted request
appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/companies/{CompanyAccessGuid}/comm
unication-methods
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies/
3ACC257F-79A8-48EF-89CC-57A002ED1340/communication-methods

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access
{CompanyAccessGuid}
List endpoint. The maximum length is 36 characters, including four hyphens.

30.2 Communication Methods Response

An example of the communication methods response appears below:

Response Body:

[
{
"MethodOfCommunication": "Phone",
"CommunicationMethodGuid": "770ce996-18e5-4859-bbc7-31beb45cd1a5"
},
{
"MethodOfCommunication": "Fax",
"CommunicationMethodGuid": "cbb4c6a4-6421-4763-9a6a-732b181f6724"
},
{
"MethodOfCommunication": "E-mail",
"CommunicationMethodGuid": "6e5b820c-bd6a-4f5e-934b-f8d0bc3d9833"
},
{
"MethodOfCommunication": "Home visit",
"CommunicationMethodGuid": "6b4b9fb9-65c5-4083-8e86-924a8c4d34e9"
},
{
"MethodOfCommunication": "Office visit",
"CommunicationMethodGuid": "8e94273c-ee61-4145-a6a0-c5fbe09d4292"
},
{
"MethodOfCommunication": "Clinic visit",
"CommunicationMethodGuid": "b3209c8d-67ca-4142-8494-2bf7feee5132"

Confidential Page 111


© 2019 KPNV All Rights Reserved
},
{
"MethodOfCommunication": "Letter",
"CommunicationMethodGuid": "26b3246c-544f-4bc7-a595-284ebe705fe0"
},
{
"MethodOfCommunication": "Text",
"CommunicationMethodGuid": "4c5d779e-a934-4644-9969-1e496c1c364f"

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C# Data
JSON Element Description
Type
“MethodOfCommunication” string Contains method of communication.
“CommunicationMethodGuid” string Contains the GUID for the communication method.

Confidential Page 112


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

31. Communications Reasons GET


31.1 Communications Reasons Request

NOTE: All Communications Reasons endpoints only support JSON in the request and response body.

The syntax for the communications reasons request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/companies/{CompanyAccessGuid}/comm
unication-reasons
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies/
3ACC257F-79A8-48EF-89CC-57A002ED1340/communication-reasons

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access
{CompanyAccessGuid}
List endpoint. The maximum length is 36 characters, including four hyphens.

31.2 Communication Reasons Response

An example of the communication methods response appears below:

GET --header 'Accept: application/json' --header 'Timestamp: 20170209152354' --


header 'Authorization:
TestIntegratorDME:ThGQgsMRxwgK00UQhqskb8RoGZS6XpeprHMAaKUXZgQ='
‘https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies
/3ACC257F-79A8-48EF-89CC-57A002ED1340/communication-reasons'

Response Body:
[
{
"ReasonForCommunication": "Compliance download",
"CommunicationReasonGuid": "34f476f1-d419-4559-8d88-9e7e9beb288d"
},
{
"ReasonForCommunication": "Followup",
"CommunicationReasonGuid": "53dda71c-af3b-47cf-8ce3-a2b88ff63edb"
},
{
"ReasonForCommunication": "Mask refit",
"CommunicationReasonGuid": "d4652e26-e899-4201-8b6c-324e87ab43db"
},
{
"ReasonForCommunication": "Mask replacement",
"CommunicationReasonGuid": "145053ee-750e-44f1-be80-6973e5b1951d"
},
{

Confidential Page 113


© 2019 KPNV All Rights Reserved
"ReasonForCommunication": "Low compliance",
"CommunicationReasonGuid": "247cbe79-f1ed-468a-a3d7-3974042e07b5"

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C# Data
JSON Element Description
Type
“ReasonForCommunication” string Contains reasons for communication
“CommunicationReasonGuid” string Contains the GUID for communication reason.

32. Patient Communications GET by Company


32.1 Communications Request

NOTE: All Patient Communications endpoints only support JSON in the request and response body.

The syntax for the patient communications request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/companies/{CompanyAccessGuid}/pati
ent-communications

Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies/
3ACC257F-79A8-48EF-89CC-57A002ED1340/patient-communications

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access
{CompanyAccessGuid}
List endpoint. The maximum length is 36 characters, including four hyphens.

Confidential Page 114


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

32.2 Communication Methods Response

An example of the communication methods response appears below:

GET --header 'Accept: application/json' --header 'Timestamp: 20170209152840' --


header 'Authorization:
TestIntegratorDME:4kpnX0wc4IfZ+cVfd+LOh4J4rGxF3Y2Fb6KTJBC5Fp0='
‘https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies
/3ACC257F-79A8-48EF-89CC-57A002ED1340/patient-communications'

Response Body:
[
{
"PatientCommunicationGuid": "f8f91b4a-7788-4c37-8fcc-534256de4964",
"ClinicianGuid": "ea65c6c6-2c5c-4744-a95e-dfb6ff47c3c6",
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"CommunicationDate": "2017-01-31T14:16:42.543",
"CommunicationMethod": {
"MethodOfCommunication": "Fax",
"CommunicationMethodGuid": "cbb4c6a4-6421-4763-9a6a-732b181f6724"
},
"CommunicationReason": {
"ReasonForCommunication": "Compliance download",
"CommunicationReasonGuid": "34f476f1-d419-4559-8d88-9e7e9beb288d"
},
"Notes": "Example notes",
"PatientGuid": "fca57c4c-a767-4701-b129-ae7bffb66706"
}
]

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C# Data
JSON Element Description
Type
“PatientCommunicationGuid” string Contains the GUID for the patient.
Contains the GUID for the patients clinician; value must be
“ClinicianGuid” string
recognizable as a GUID. The maximum length is 40 characters.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“CommunicationDate” string Contains date of communication.

Confidential Page 115


© 2019 KPNV All Rights Reserved
C# Data
JSON Element Description
Type
“CommunicationMethod” string Contains method of communication.
“CommunicationReason” string Contains reason why communication was initiated.
“Notes” string Contains information about communication.
Specifies the GUID for the patient. The maximum length is 40
“PatientGuid” string
characters.
“MethodOfCommunication” string Contains method of communication.
“CommunicationMethodGuid” string Contains the GUID for the communication method.
“ReasonForCommunication” string Contains reasons for communication
“CommunicationReasonGuid” string Contains the GUID for communication reason.

33. Patient Communications GET by Patient


33.1 Communications Request

NOTE: All Patient Communications endpoints only support JSON in the request and response body.

The syntax for the patient communications request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/patients/{PatientGuid}/patient-
communications
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/3
ACC257F-79A8-48EF-89CC-57A002ED1340/patient-communications

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Patient Access List
{PatientGuid}
endpoint. The maximum length is 36 characters, including four hyphens.

33.2 Communication Response

An example of the patient communication response appears below:

GET --header 'Accept: application/json' --header 'Timestamp: 20170209153228' --


header 'Authorization:
TestIntegratorDME:9YDwT+N+j+ZdZaP8vMGw7jkHJNU7GsH0Ydo9lMgzB+E='
‘https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/
BB71B626-02A2-4D90-BBDA-3F690E64BEFA/patient-communications'

Confidential Page 116


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

Response Body:
[
{
"PatientCommunicationGuid": "cf0fac87-bdfb-4f04-a7d0-215a577b2a6c",
"ClinicianGuid": "ea65c6c6-2c5c-4744-a95e-dfb6ff47c3c6",
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"CommunicationDate": "2017-01-17T14:05:27.633",
"CommunicationMethod": {
"MethodOfCommunication": "Phone",
"CommunicationMethodGuid": "770ce996-18e5-4859-bbc7-31beb45cd1a5"
},
"CommunicationReason": {
"ReasonForCommunication": "Followup",
"CommunicationReasonGuid": "53dda71c-af3b-47cf-8ce3-a2b88ff63edb"
},
"Notes": "That's just wrong",
"PatientGuid": "bb71b626-02a2-4d90-bbda-3f690e64befa"
}
]

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.
HTTP Status Possible Causes
BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found or clinician not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.


C# Data
JSON Element Description
Type
“PatientCommunicationGuid” string Contains the GUID for the patient.
Contains the GUID for the patients clinician; value must be
“ClinicianGuid” string
recognizable as a GUID. The maximum length is 40 characters.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“CommunicationDate” string Contains date of communication.
“CommunicationMethod” string Contains method of communication.
“CommunicationReason” string Contains reason why communication was initiated.
“Notes” string Contains information about communication.
Specifies the GUID for the patient. The maximum length is 40
“PatientGuid” string
characters.
“MethodOfCommunication” string Contains method of communication.
“CommunicationMethodGuid” string Contains the GUID for the communication method.
“ReasonForCommunication” string Contains reasons for communication
“CommunicationReasonGuid” string Contains the GUID for communication reason.

Confidential Page 117


© 2019 KPNV All Rights Reserved
34. Patient Communications GET by Clinicians
34.1 Communications Request

NOTE: All Patient Communications endpoints only support JSON in the request and response body.

The syntax for the clinician’s communications request and an example of a completely formatted request
appears below:
GET
https://{host}/EncoreExternalServices.REST/v1/clinicians/{ClinicianGuid}/patient
-communications
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/clinicians
/3ACC257F-79A8-48EF-89CC-57A002ED1340/patient-communications

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the clinician GUID. This is the value returned from the clinician
{ClinicianGuid}
endpoint. The maximum length is 36 characters, including four hyphens.

34.2 Communication Response

An example of the patient communication response appears below:


GET --header 'Accept: application/json' --header 'Timestamp: 20170209153529' --
header 'Authorization:
TestIntegratorDME:QxviquD115f7Dd+k/5fA4yTlhu7eUXPlsg8ls/9xXK8='
‘https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/clinician
s/EA65C6C6-2C5C-4744-A95E-DFB6FF47C3C6/patient-communications'

Response Body:
[
{
"PatientCommunicationGuid": "614385ba-27e4-423a-9581-e6a82d0a1afb",
"ClinicianGuid": "ea65c6c6-2c5c-4744-a95e-dfb6ff47c3c6",
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"CommunicationDate": "2017-01-16T16:06:57.857",
"CommunicationMethod": {
"MethodOfCommunication": "Phone",
"CommunicationMethodGuid": "770ce996-18e5-4859-bbc7-31beb45cd1a5"
},
"CommunicationReason": {
"ReasonForCommunication": "Followup",
"CommunicationReasonGuid": "53dda71c-af3b-47cf-8ce3-a2b88ff63edb"
},
"Notes": "Just tryin' this out",
"PatientGuid": "7d45be3b-818e-4e19-922d-248de1a12fa7"
}
]

Confidential Page 118


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C# Data
JSON Element Description
Type
“PatientCommunicationGuid” string Contains the GUID for the patient.
Contains the GUID for the patients clinician; value must be
“ClinicianGuid” string
recognizable as a GUID. The maximum length is 40 characters.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“CommunicationDate” string Contains date of communication.
“CommunicationMethod” string Contains method of communication.
“CommunicationReason” string Contains reason why communication was initiated.
“Notes” string Contains information about communication.
Specifies the GUID for the patient. The maximum length is 40
“PatientGuid” string
characters.
“MethodOfCommunication” string Contains method of communication.
“CommunicationMethodGuid” string Contains the GUID for the communication method.
“ReasonForCommunication” string Contains reasons for communication
“CommunicationReasonGuid” string Contains the GUID for communication reason.

35. Patient Communication GET by Communication GUID


35.1 Communications Request

NOTE: All Patient Communication endpoints only support JSON in the request and response body.

The syntax for the patient communications request appears below:

GET

https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patient-
communications/{CommunicationGUID}
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patient-
communications/4d6b520e-4427-491c-80bf-402c0a0fba46

Confidential Page 119


© 2019 KPNV All Rights Reserved
The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access
{CompanyAccessGuid}
List endpoint. The maximum length is 36 characters, including four hyphens.

35.2 Communication Response

An example of the patient communication response appears below:

GET --header 'Accept: application/json' --header 'Timestamp: 20170209153829' --


header 'Authorization:
TestIntegratorDME:6+gaGVTDmWPuBoSNfVAG3aIVlkLXQQBQt+YYD5y2rpc='
‘https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patient-
communications/4d6b520e-4427-491c-80bf-402c0a0fba46'

Response Body:
{
"PatientCommunicationGuid": "4d6b520e-4427-491c-80bf-402c0a0fba46",
"ClinicianGuid": "ea65c6c6-2c5c-4744-a95e-dfb6ff47c3c6",
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"CommunicationDate": "2017-01-16T05:00:00",
"CommunicationMethod": {
"MethodOfCommunication": "Fax",
"CommunicationMethodGuid": "cbb4c6a4-6421-4763-9a6a-732b181f6724"
},
"CommunicationReason": {
"ReasonForCommunication": "Mask replacement",
"CommunicationReasonGuid": "145053ee-750e-44f1-be80-6973e5b1951d"
},
"Notes": "Mask replacement 1/16/2017",
"PatientGuid": "7d45be3b-818e-4e19-922d-248de1a12fa7"
}

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

Confidential Page 120


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C# Data
JSON Element Description
Type
“PatientCommunicationGuid”string Contains the patient communication GUID.
Contains the GUID for the patients clinician; value must be
“ClinicianGuid” string
recognizable as a GUID. The maximum length is 40 characters.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“CommunicationDate” string Contains date of communication.
“CommunicationMethod” string Contains method of communication.
“CommunicationReason” string Contains reason why communication was initiated.
“Notes” string Contains information about communication.
“PatientGuid” string Contains the GUID for the patient.
“MethodOfCommunication” string Contains method of communication.
“CommunicationMethodGuid” string Contains the GUID for the communication method.
“ReasonForCommunication” string Contains reasons for communication
“CommunicationReasonGuid” string Contains the GUID for communication reason.

36. Patient Demographics GET


36.1 Patient Demographics Request

NOTE: All Patient Demographics endpoints only support JSON in the request and response body.

The syntax for the patient demographics request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/patients/{PatientGuid}/demographic
s
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/3
ACC257F-79A8-48EF-89CC-57A002ED1340/demographics

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Company Access List
{PatientGuid}
endpoint. The maximum length is 36 characters, including four hyphens.

Confidential Page 121


© 2019 KPNV All Rights Reserved
36.2 Patient Demographics Response

An example of the patient demographics communication response appears below:

Response Body:
{
"Address1": null,
"Address2": null,
"AlternatePhone": null,
"BestTimeToContact": null,
"BirthDate": null,
"City": null,
"ClinicianGuid": "ea65c6c6-2c5c-4744-a95e-dfb6ff47c3c6",
"Comments": null,
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"Country": "USA",
"PatientCustomFields": {
"Field1": null,
"Field2": null,
"Field3": null,
"Field4": null,
"Field5": null
},
"Email": null,
"Fax": null,
"FirstName": "tc0106",
"FirstNamePronunciation": null,
"Gender": "Unspecified",
"GovernmentId": null,
"HomePhone": null,
"PrimaryInsuranceProviderGuid": "06aba874-b504-4be0-9899-f8353ff67a75",
"PrimaryInsuranceNum": "",
"PrimaryGroupNum": "",
"PrimaryPolicyholderName": "",
"PrimaryPolicyRelationship": "",
"SecondaryInsuranceProviderGuid": null,
"SecondaryInsuranceNum": "",
"SecondaryGroupNum": "",
"SecondaryPolicyholderName": "",
"SecondaryPolicyRelationship": "",
"LastName": "two",
"LastNamePronunciation": null,
"MaritalStatus": "Unspecified",
"MiddleName": null,
"PatientGuid": "7d45be3b-818e-4e19-922d-248de1a12fa7",
"PatientPreferredContactMethod": "Unspecified",
"PatientUuid": "tc01069633502",
"PcpGuid": "d5774deb-4c16-48d9-b764-aef57b6e68be",
"PersonOfficeGuid": "7c361057-3d72-45e5-a867-7cc46ebd3957",
"PostalCode": null,
"SleepDrGuid": "d5774deb-4c16-48d9-b764-aef57b6e68be",
"SleepLabGuid": "7837de3e-5242-4fbb-b219-551c62c588f3",
"StartOfDayHour": 12,
"State": null,
"Suffix": null,
"Title": null,
"WorkPhone": null,
"SetupDate": "2017-01-06T00:00:00"
"TimeZone": -5.0
}

Confidential Page 122


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning of some of the HTTP status codes returned when a patient demographics
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C#
JSON Element Data Description
Type
Contains the GUID for the patients clinician; value must be
“ClinicianGuid” string
recognizable as a GUID. The maximum length is 40 characters.
Contains the company GUID for the clinician. The maximum
“CompanyGuid” string
length is 40 characters.
“PatientGuid” string Contains the GUID for the patient.
“Address1” string Patient address
“Address2” string Patient address
“AlternatePhone” string Patient alternate phone number
“BestTimeToContact” string Best time to contact
“BirthDate” string Patient birth date
“City” string Patient birth city
“Comments” string Patient comments
“Country” string Patient country
“PatientCustomFields” string Patient custom fields
“Email” string Patient email
“Fax” string Patient fax
“First name” string Patient first name
“FirstNamePronunciation” string Patient first name pronunciation
“Gender” string Patient Gender
“GovernmentId “ string Patient government ID
“HomePhone” string Patient home phone number
“PrimaryInsuranceProviderGuid” string Patient insurance provider GUID
“PrimaryInsuranceNum” string Patient primary insurance number
“PrimaryGroupNum” string Patient insurance group number
“PrimaryPolicyholderName” string Patient primary policy holder name
“PrimaryPolicyRelationship” string Patient policy relationship to primary holder
“SecondaryInsuranceProviderGuid” string Patient secondary insurance provider GUID

Confidential Page 123


© 2019 KPNV All Rights Reserved
C#
JSON Element Data Description
Type
“SecondaryInsuranceNum” string Patient primary insurance number
“SecondaryGroupNum” string Patient secondary insurance group number
“SecondaryPolicyholderName” string Patient secondary policy holder name
“SecondaryPolicyRelationship” string Patient secondary policy relationship to primary holder
“LastName” string Patient last name
“LastNamePronunciation” string Patient last name pronunciation
“MaritalStatus” string Patient marital status
“MiddleName” string Patient middle name
“PatientPreferredContactMethod” string Patient preferred contact method
“PatientUuid” string Patient UUID
“PcpGuid” string Patient PCP GUID
“PersonOfficeGuid” string Patient person of office GUID
“PostalCode” string Patient postal code
“SleepDrGuid” string Patient sleep physician GUID
“SleepLabGuid” string Patient sleep lab GUID
“StartOfDayHour” string Patient care start of day (hour)
“State” string Patient State
“Suffix” string Patient suffix
“Title” string Patient title
“WorkPhone” string Patient work phone
“SetupDate” string Patient setup date
“TimeZone” double Patient time zone offset

Confidential Page 124


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

37. Reminder POST


The Reminder API provides a means to add a patient reminder record to a patient’s profile.

NOTE: All Reminder endpoints only support JSON in the request and response body.

37.1 Reminder POST Request

The syntax for the HTTP request and an example of a completely formatted patient communication request
appear below:

POST
https://{host}/EncoreExternalServices.REST/v1/reminders
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminders
Example of request body:
{
"ReminderGuid": "00000000-0000-0000-0000-000000000000",
"Completed": false,
"DueDate": "2017-03-08T18:35:27.6617603Z",
"PatientGuid": "2703de5a-84fe-4866-8169-74464a599e87",
"ReminderText": "Example reminder text"
}

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

37.2 Reminder POST Response

The table below shows the meaning of some of the HTTP status codes returned when a patient communication
request is made.

HTTP Status Possible Causes


BadRequest (400) Improperly formatted request body.
Unauthorized (401) Integrator credentials are unknown or disabled.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
InternalServerError (500) Indicates server side malfunction.
Created (201) Successful reminder creation.

The created reminder GUID is returned in the “Location” contained in the response header.

Confidential Page 125


© 2019 KPNV All Rights Reserved
38. Reminder DELETE
NOTE: All Reminder endpoints only support JSON in the request and response body.

The syntax for the reminder delete request appears below:

DELETE
https://{host}/EncoreExternalServices.REST/v1/reminders/{ReminderGuid}
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminders/
b9b0ea79-ed95-4c1f-a974-c618e2b2317d

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{ReminderGuid} Specifies the reminder GUID.

The table below shows the meaning of some of the HTTP status codes returned when a reminder delete request
is made.

HTTP Status Possible Causes


OK (200) Successful request.
BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

Confidential Page 126


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

39. Reminder GET by Reminder GUID


39.1 Reminder GET Request

NOTE: All Reminder endpoints only support JSON in the request and response body.

The Reminder GET retrieves all reminders associated to a specific reminderGuid. The syntax for the reminder
request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/reminders/{ReminderGuid}
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminders/
560f188b-67d9-490a-97a0-f0b7cbb1010c

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{ReminderGuid} Specifies the reminder GUID.

39.2 Reminder GET Response

An example of the patient communication response appears below:

GET --header 'Accept: application/json' --header 'Timestamp: 20170209155837' --


header 'Authorization:
TestIntegratorDME:ze39XvKS9viZxah9K2HIqiad8Ff/fHlLPcTmZNErueg='
'https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminders
/560f188b-67d9-490a-97a0-f0b7cbb1010c'

Response Body:
{
"ReminderGuid": "560f188b-67d9-490a-97a0-f0b7cbb1010c",

"Completed": false,
"DueDate": "2017-02-01T15:30:00",
"PatientGuid": "c87c92de-fb9f-4c4c-b3c3-6f549d9b1032",
"ReminderText": "Example reminder text"
}

The table below shows the meaning of some of the HTTP status codes returned when a reminder request is
made.

Confidential Page 127


© 2019 KPNV All Rights Reserved
HTTP Status Possible Causes
BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C# Data
JSON Element Description
Type
“ReminderGuid” string Contains the reminder GUID for the patient.

“Completed” Boolean HTTP status for reminder completion.


“DueDate” string Contains reminder due date.
“PatientGuid” string Contains the GUID for the patient.
“ReminderTest” string Contains reminder text.

Confidential Page 128


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

40. Reminder PATCH

NOTE: All Reminder endpoints only support JSON in the request and response body.

The syntax for the reminder request appears below:

PATCH
https://{host}/EncoreExternalServices.REST/v1/reminders/{ReminderGuid}
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminders/
560f188b-67d9-490a-97a0-f0b7cbb1010c

PATCH --header 'Content-Type: application/json-patch+json' --header 'Accept:


application/json' --header 'Timestamp: 20170209160609' --header 'Authorization:
TestIntegratorDME:16/8jIXiw4HGPVpirV+d2F8DD6ZHLjzGMr9CjSPz4rM=' -d '[ \
{ \
"op": "replace", \
"path": "Completed", \
"value": "true" \
} \
]'
‘https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/remind
ers/560f188b-67d9-490a-97a0-f0b7cbb1010c'

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{ReminderGuid} Specifies the reminder GUID.

The table below properties of the reminder object.

C# Data
JSON Element Description
Type
<Operations> array Contains the operations reminder for the patient.
<HasOperations> Boolean HTTP request for has operations.
<Operation> string Contains operation reminder information.
<FromPath> string Contains from path information.
<ParsedFromPath> array Contains path component information
<Path> string Contains path information.
<ParsedPath> array Contains path component information.
<Value> object Reminder value
<Name> string Reminder name
<ComponentType> string Contains component type information
<IsCollection> Boolean HTTP request for is collection.

Confidential Page 129


© 2019 KPNV All Rights Reserved
41. Reminder PUT
NOTE: All Reminder endpoints only support JSON in the request and response body.

The syntax for the reminder put request and an example of a completely formatted patient communication
request appear below:

PUT
https://{host}/EncoreExternalServices.REST/v1/reminders/{ReminderGUID}
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminders
Example of request body:
{
"ReminderGuid": "00000000-0000-0000-0000-000000000000",
"Completed": false,
"DueDate": "2017-03-08T18:35:27.6617603Z",
"PatientGuid": "2703de5a-84fe-4866-8169-74464a599e87",
"ReminderText": "Example reminder text"
}

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

The table below shows the meaning of some of the HTTP status codes returned when a patient communication
request is made.

HTTP Status Possible Causes


OK (201) Successful operation. Reminder created.
BadRequest (400) Improperly formatted request body.
Unauthorized (401) Integrator credentials are unknown or disabled.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
InternalServerError (500) Indicates server side malfunction.
OK (200) Reminder was updated.

The table below properties of the reminder request object.

C# Data
XML Element Description
Type
“ReminderGUID” string Contains the reminder GUID for the patient.
“”

Confidential Page 130


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C# Data
XML Element Description
Type
“Completed” Boolean Completed flag.
“DueDate” string Contains reminder due date.
“PatientGuid” string Specifies the GUID for the patient. The maximum length is 40 characters.
“ReminderText” string Contains reminder text.

42. Reminder GET by Patient


42.1 Reminder Request

NOTE: All Reminder endpoints only support JSON in the request and response body.

The syntax for the reminder request and an example of a completely formatted request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/patients/{PatientGuid}/reminders
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/8
36F4227-E923-4EBB-834A-52BEA7A94E06/reminders

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{PatientGuid} Specifies the patient GUID.

42.2 Reminder Response

An example of this response appears below:

GET --header 'Accept: application/json' --header 'Timestamp: 20170209160927' --


header 'Authorization:
TestIntegratorDME:Hncp6RF5QyJ1ByxqiBXRd8SQafjpODSAwUuZnk8FrCU='
'https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/
836F4227-E923-4EBB-834A-52BEA7A94E06/reminders'

Response Body:
[
{
"ReminderGuid": "81ff2ff2-4545-4fff-8b83-8d67fc39beb5",
"Completed": false,
"DueDate": "2017-02-16T00:00:00",
"PatientGuid": "836f4227-e923-4ebb-834a-52bea7a94e06",
"ReminderText": "Top o' the mornin' to ya"
}
]

Confidential Page 131


© 2019 KPNV All Rights Reserved
The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below properties of the reminder response object.

C# Data
JSON Element Description
Type
”ReminderGUID” string Contains the reminder GUID for the patient.

”Completed” Boolean Completed flag.


”DueDate” string Contains reminder due date.
”PatientGuid” string Specifies the GUID for the patient. The maximum length is 40 characters.
”ReminderText” string Contains reminder text.

43. Reminder Group POST


The ReminderGroupApi provides a means to add a reminder group to one or more patients.

NOTE: All Reminder Group endpoints only support JSON in the request and response body.

43.1 Reminder API Request

The syntax for the HTTP request and an example of a formatted patient communication request appear below:

POST
https://{host}/EncoreExternalServices.REST/v1/reminder-groups/apply
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminder-
groups/apply
Example of body request:
{
"ReminderGroupGuid": "dc1e4340-473e-441f-8c7e-2f4e89f414f1",
"PatientsGuids": [
"f7671217-3569-4307-93a4-a8a349799bab",
"35ddaf5b-72f8-4c21-b7dc-3732f612363a"
]
}

Confidential Page 132


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

43.2 Reminder API Response

An example of the reminder response is below:

Response Body:
{
"PatientReminderUris": [
"http://1integration.encoreanywhere.com:55000/EncoreExternalServices.REST/v1/rem
inders/b6470230-c672-48af-a10b-a96ab1cb5142",
"http://integration.encoreanywhere.com:55000/EncoreExternalServices.REST/v1/remi
nders/858a538d-06e6-4f56-9966-22b54c11bf7d",
"http://integration.encoreanywhere.com:55000/EncoreExternalServices.REST/v1/remi
nders/7778d4ef-17ff-4783-83ad-72826f0d8708",
]
}

The table below shows the meaning of some of the HTTP status codes returned when a patient communication
request is made.

HTTP Status Possible Causes


BadRequest (400) Improperly formatted request body.
Unauthorized (401) Integrator credentials are unknown or disabled.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object:

C# Data
JSON Element Description
Type
“PatientReminderUris” string[] List of “Reminder GET by Reminder GUID” URLs applied to the patient.

Confidential Page 133


© 2019 KPNV All Rights Reserved
44. Reminder Groups GET by Reminder GUID
44.1 Reminder Request

NOTE: All Reminder Groups endpoints only support JSON in the request and response body.

The syntax for the reminder groups request and an example of a completely formatted request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/reminder-
groups/{ReminderGroupGUID}
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminder-
groups/3ACC257F-79A8-48EF-89CC-57A002ED1340

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{ReminderGroupGuid} Specifies the reminder GUID.

44.2 Reminder Response

An example of the reminder response appears below:

Response Body:
[
{
"ReminderGroupGuid": "92985795-20d5-4b16-99f8-e07c2955929f",
"ApplyToNewPatients": false,
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"ReminderGroupName": "tc0106_RG1",
"ReminderTemplates": [
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 14,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Compliance download",
"DaysOffsetVal": 10,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 6,
"DaysOffsetFrom": "DaysAfterSetup"
}
]
}
]

Confidential Page 134


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

C# Data
JSON Element Description
Type
“ReminderGroupGUID” string Contains the reminder GUID for the patient.
“ApplyToNewPatients” Boolean HTTP status for apply to new patient request.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“ReminderGroupName” string Contains reminder group name.
“ReminderTemplates” array Contains reminder template info.
“TemplateText” string Contains template text.
“DaysOffsetVal” integer Contains number of days offset
“DaysOffsetFrom” string Contains the days offset from reference point.

45. Reminder Groups GET by Integrator


45.1 Reminder Group Request

NOTE: All Reminder Groups endpoints only support JSON in the request and response body.

The syntax for the reminder groups request and an example of a completely formatted request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/reminder-groups
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/reminder-
groups

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

Confidential Page 135


© 2019 KPNV All Rights Reserved
45.2 Reminder Group Response

An example of the reminder response appears below:

Response Body:

[
{
"ReminderGroupGuid": "92985795-20d5-4b16-99f8-e07c2955929f",
"ApplyToNewPatients": false,
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"ReminderGroupName": "tc0106_RG1",
"ReminderTemplates": [
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 14,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Compliance download",
"DaysOffsetVal": 10,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 6,
"DaysOffsetFrom": "DaysAfterSetup"
}
]
}
]

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

JSON Element C# Data Description


Type
“ReminderGroupGUID” string Contains the reminder GUID for the patient.
“ApplyToNewPatients” Boolean HTTP status for apply to new patient request.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“ReminderGroupName” string Contains reminder group name.
“ReminderTemplates” array Contains reminder template info.

Confidential Page 136


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

JSON Element C# Data Description


Type
“TemplateText” string Contains template text.
“DaysOffsetVal” integer Contains number of days offset
“DaysOffsetFrom” string Contains the days offset from reference point.

46. Reminder Groups GET by Company


46.1 Reminder Groups Request

NOTE: All Reminder Groups endpoints only support JSON in the request and response body.

The syntax for the reminder groups request and an example of a completely formatted request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/companies/{CompanyAccessGuid}/remi
nder-groups

Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies/
3ACC257F-79A8-48EF-89CC-57A002ED1340/reminder-groups

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.

46.2 Reminder Groups Response

An example of the reminder response appears below:

Response Body:
[
{
"ReminderGroupGuid": "92985795-20d5-4b16-99f8-e07c2955929f",
"ApplyToNewPatients": false,
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"ReminderGroupName": "tc0106_RG1",
"ReminderTemplates": [
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 14,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Compliance download",
"DaysOffsetVal": 10,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Contact DME for followup",

Confidential Page 137


© 2019 KPNV All Rights Reserved
"DaysOffsetVal": 6,
"DaysOffsetFrom": "DaysAfterSetup"
}
]
}
]

The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

JSON Element C# Data Description


Type
“ReminderGroupGUID” string Contains the reminder GUID for the patient.
“ApplyToNewPatients” Boolean HTTP status for apply to new patient request.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“ReminderGroupName” string Contains reminder group name.
“ReminderTemplates” array Contains reminder template info.
“TemplateText” string Contains template text.
“DaysOffsetVal” integer Contains number of days offset
“DaysOffsetFrom” string Contains the days offset from reference point.

Confidential Page 138


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

47. Patient Reminder Groups GET by Patient


47.1 Reminder Groups Request

NOTE: All Patient Reminder Groups endpoints only support JSON in the request and response body.

The syntax for the reminder request and an example of a completely formatted request appears below:

GET
https://{host}/EncoreExternalServices.REST/v1/patients/{PatientGuid}/reminder-
groups
Example:
https://qa1integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patient
s/FCA57C4C-A767-4701-B129-AE7BFFB66706/reminder-groups

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{PatientGuid} Specifies the patient GUID.

47.2 Reminder Groups Response

An example of the reminder response appears below:

Response Body:
[
{
"ReminderGroupGuid": "92985795-20d5-4b16-99f8-e07c2955929f",
"ApplyToNewPatients": false,
"CompanyGuid": "3acc257f-79a8-48ef-89cc-57a002ed1340",
"ReminderGroupName": "tc0106_RG1",
"ReminderTemplates": [
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 14,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Compliance download",
"DaysOffsetVal": 10,
"DaysOffsetFrom": "DaysAfterSetup"
},
{
"TemplateText": "Contact DME for followup",
"DaysOffsetVal": 6,
"DaysOffsetFrom": "DaysAfterSetup"
}
]
}
]

Confidential Page 139


© 2019 KPNV All Rights Reserved
The table below shows the meaning of some of the HTTP status codes returned when a patient communications
request is made.

HTTP Status Possible Causes


BadRequest (400) Invalid identifier supplied.
Unauthorized (401) Integrator has invalid credentials.
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) Communication method(s) not found.
InternalServerError (500) Indicates server side malfunction.

The table below describes the response JSON object.

JSON Element C# Data Description


Type
“ReminderGroupGUID” string Contains the reminder GUID for the patient.
“ApplyToNewPatients” Boolean HTTP status for apply to new patient request.
Contains the company GUID for the clinician. The maximum length is
“CompanyGuid” string
40 characters.
“ReminderGroupName” string Contains reminder group name.
“ReminderTemplates” array Contains reminder template info.
“TemplateText” string Contains template text.
“DaysOffsetVal” integer Contains number of days offset
“DaysOffsetFrom” string Contains the days offset from reference point.

48. Patient Equipment POST Mask


48.1 Post Mask Request

NOTE: All Patient Equipment endpoints only support JSON in the request and response body.

The syntax for the patient equipment request and an example of a completely formatted request appears
below:

POST
https://{host}/EncoreExternalServices.REST/v1/patients/{patientGuid}/mask
Example of request:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/
patients/{patientGuid}/mask
Example of request body with a reminder:
{
"EquipmentGuid": "95FE8218-7129-4CFC-97C9-D019D94142C2",
"LotNumber": "ABC123-XYZPDQ",
"Comments": "This is a mask.",
"IssuedOn": "2018-05-24",
"ReminderDuration": "Weeks",

Confidential Page 140


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

"ReminderIncrement": 2
}
Example of request body without a reminder:
{
"EquipmentGuid": "95FE8218-7129-4CFC-97C9-D019D94142C2",
"LotNumber": "ABC123-XYZPDQ",
"Comments": "This is a mask.",
"IssuedOn": "2018-05-24"
}

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Patient Communication
{patientGuid} GET by Communication GUID endpoint. The maximum length is 36 characters, including
four hyphens.

The table below describes the patient equipment object request.

JSON Element C# Data Description


Type
“EquipmentGuid” Guid Contains the GUID for the equipment, which is a mask.
Contains the Lot Number (Serial Number) of the mask. The maximum
“LotNumber” string
length is 25 characters.
Contains optional Comments about the mask. The maximum length is 50
“Comments” string
characters.
“IssuedOn” datetime Contains date mask was issued on.
“ReminderDuration” (Optional) Contains duration of reminder. Valid values are “Weeks” or
string
“Months”
“ReminderIncrement” int (Optional) Contains the reminder increment. Valid values are 1 to 24.

48.2 Post Mask Response

An example of the Patient Equipment – Post Mask response appears below:

Example of a Created (201) response header with a reminder:


{
"pragma": "no-cache",
"date": "Wed, 30 May 2018 14:32:53 GMT",
"server": "Microsoft-IIS/10.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"content-type": "application/json; charset=utf-8",

Confidential Page 141


© 2019 KPNV All Rights Reserved
"location":
"http://localhost/EncoreExternalServices.REST/v1/reminders/512002f4-2fb0-4557-
a8e0-ca59d82f1d49",
"cache-control": "no-cache",
"content-length": "2",
"expires": "-1"
}

Example of an OK (200) response header without a reminder:


{
"pragma": "no-cache",
"date": "Wed, 30 May 2018 14:41:47 GMT",
"server": "Microsoft-IIS/10.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"cache-control": "no-cache",
"content-length": "0",
"expires": "-1",
"content-type": null
}

The table below shows the meaning of some of the HTTP status codes returned when a patient equipment
request is made.

HTTP Status Possible Reasons


OK (200) Success: A Mask has been assigned with no reminder.
Success: A Mask and Reminder are assigned and the URI to the Reminder is
Created (201)
contained in the response header.
Client Error: Invalid property specified in object body.
BadRequest (400)
Client Error: Mask does not exist or is unavailable to the patient.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.
Client Error: Mask assignment was attempted for a patient who already has a
mask.
Method Not Allowed (405)
Client Error: Mask assignment was attempted with equipment inaccessible to
patient’s company.
Internal Server Error (500) Server Error: A server side malfunction has occurred.

49. Patient Equipment PUT Mask


49.1 Put Mask Request

NOTE: All Patient Equipment endpoints only support JSON in the request and response body.

The syntax for the patient equipment request and an example of a completely formatted request appears
below:

Confidential Page 142


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

PUT
https://{host}/EncoreExternalServices.REST/v1/patients/{patientGuid}/mask
Example of request:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/
patients/{patientGuid}/mask
Example of request body with a reminder:
{
"EquipmentGuid": "95FE8218-7129-4CFC-97C9-D019D94142C2",
"LotNumber": "ABC123-XYZPDQ",
"Comments": "This mask is assigned to Patient X",
"IssuedOn": "2018-05-24",
"ReminderDuration": "Months",
"ReminderIncrement": 3
}
Example of request body without a reminder:
{
"EquipmentGuid": "95FE8218-7129-4CFC-97C9-D019D94142C2",
"LotNumber": "ABC123-XYZPDQ",
"Comments": "This mask is assigned to Patient X",
"IssuedOn": "2018-05-24"
}

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Patient Communication
{patientGuid} GET by Communication GUID endpoint. The maximum length is 36 characters, including
four hyphens.

49.2 Put Mask Response

An example of the Patient Equipment – Put Mask response appears below:

Example of a Created (201) response header with a reminder:


{
"pragma": "no-cache",
"date": "Wed, 30 May 2018 14:46:31 GMT",
"server": "Microsoft-IIS/10.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"content-type": "application/json; charset=utf-8",
"location":
"http://localhost/EncoreExternalServices.REST/v1/reminders/2d517ebb-cce9-46af-
93aa-3679a9ef8ef7",
"cache-control": "no-cache",
"content-length": "2",

Confidential Page 143


© 2019 KPNV All Rights Reserved
"expires": "-1"
}
Example of an OK (200) response header without a reminder:
{
"pragma": "no-cache",
"date": "Wed, 30 May 2018 14:48:33 GMT",
"server": "Microsoft-IIS/10.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"cache-control": "no-cache",
"content-length": "0",
"expires": "-1",
"content-type": null
}

The table below shows the meaning of some of the HTTP status codes returned when a patient equipment
request is made.

HTTP Status Possible Reasons


OK (200) Success: A Mask has been assigned with no reminder.
Success: A Mask and Reminder are assigned and the URI to the Reminder is
Created (201)
contained in the response header.
Client Error: Invalid property specified in object body.
BadRequest (400)
Client Error: Mask does not exist or is unavailable to the patient.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.
Internal Server Error (500) Server Error: A server side malfunction has occurred.

The table below describes the patient equipment object request.

C# Data
JSON Element Description
Type
“EquipmentGuid” Guid Contains the GUID for the equipment, which is a mask.
Contains the Lot Number (Serial Number) of the mask. The
“LotNumber” string
maximum length is 25 characters.
Contains optional Comments about the mask. The maximum
“Comments” string
length is 50 characters.
“IssuedOn” datetime Contains date mask was issued on.
(Optional) Contains duration of reminder. Valid values are
“ReminderDuration” string
“Weeks” or “Months”
(Optional) Contains the reminder increment. Valid values are 1 to
“ReminderIncrement” int
24.

Confidential Page 144


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

50. Patient Equipment GET Mask Assigned to Patient


50.1 Get Mask Request

NOTE: All Patient Equipment endpoints only support JSON in the request and response body.

The syntax for the patient equipment request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/patients/{patientGuid}/mask
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/E
45802A2-83BB-4660-9ECD-DB8B02519AE7/mask

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Patient
{patientGuid} Communication GET by Communication GUID endpoint. The maximum length is 36
characters, including four hyphens.

The table below describes the patient equipment object request.

C# Data
JSON Element Description
Type
“EquipmentGuid” Guid Contains the GUID for the equipment, which is a mask.
“ReminderGuid” Guid Contains the GUID for the reminder, if a reminder exists.
“MaskModel” string Contains description of mask model.
“LotNumber” string Contains the Lot Number (Serial Number) of the mask.
“Comments” string Contains optional Comments about the mask.
“ReminderIncrement” int Contains the reminder increment, if a reminder exists.
“ReminderDuration” string Contains duration of reminder, if a reminder exists.
“IssuedOn” datetime Contains date mask was issued on.
“ReplacementReminder” datetime Contains date of reminder, if a reminder exists.

Confidential Page 145


© 2019 KPNV All Rights Reserved
50.1 Get Mask Response

An example of the Patient Equipment – Get Mask response appears below:

Example of Response Body with a reminder:

[
{
"EquipmentGuid": "95fe8218-7129-4cfc-97c9-d019d94142c2",
"ReminderGuid": "606753e7-4b3b-4553-98c8-afa34a681527",
"MaskModel": "TestEquipment",
"LotNumber": "ABC123-XYZPDQ",
"Comments": "This mask is assigned to Patient X",
"ReminderIncrement": 2,
"ReminderDuration": "Weeks",
"IssuedOn": "2018-05-24T00:00:00",
"ReplacementReminder": "2018-06-07T00:00:00"
}
]
Example of Response Body without a reminder:
[
{
"EquipmentGuid": "95fe8218-7129-4cfc-97c9-d019d94142c2",
"ReminderGuid": null,
"MaskModel": "TestEquipment",
"LotNumber": "ABC123-XYZPDQ",
"Comments": "This mask is assigned to Patient X",
"ReminderIncrement": null,
"ReminderDuration": null,
"IssuedOn": "2018-05-24T00:00:00",
"ReplacementReminder": null
}
]

HTTP Status Possible Reasons


OK (200) Successful Operation.
BadRequest (400) Client Error: Unable to parse Patient Guid.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.
Not Found (404) Client Error: Mask was not found.
Internal Server Error (500) Server Error: A server side malfunction has occurred.

Confidential Page 146


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

51. Patient Equipment POST Accessory


51.1 Post Accessory Request

NOTE: All Patient Equipment endpoints only support JSON in the request and response body.

The syntax for the patient equipment request and an example of a completely formatted request appears
below:

POST
https://{host}/EncoreExternalServices.REST/v1/patients/{patientGuid}/accessories
Example of request:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/
patients/{patientGuid}/accessories
Example of request body with a reminder:
{
"EquipmentGuid": "95FE8218-7129-4CFC-98C9-D019D94145F7",
"LotNumber": "XX1-001",
"Comments": "Accessory Assignment",
"IssuedOn": "2018-05-24",
"ReminderDuration": "Weeks",
"ReminderIncrement": 4
}
Example of request body without a reminder:
{
"EquipmentGuid": "95FE8218-7129-4CFC-98C9-D019D94145F7",
"LotNumber": "XX1-001",
"Comments": "Accessory Assignment",
"IssuedOn": "2018-05-24"
}

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Patient
{patientGuid} Communication GET by Communication GUID endpoint. The maximum length is 36
characters, including four hyphens.

The table below describes the patient equipment object request:

C# Data
JSON Element Description
Type
“EquipmentGuid” Guid Contains the GUID for the equipment, which is an accessory.
Contains the Lot Number (Serial Number) of the accessory. The
“LotNumber” string
maximum length is 25 characters.

Confidential Page 147


© 2019 KPNV All Rights Reserved
C# Data
JSON Element Description
Type
Contains optional Comments about the accessory. The maximum
“Comments” string
length is 50 characters.
“IssuedOn” datetime Contains date accessory was issued on.
(Optional) Contains duration of reminder. Valid values are
“ReminderDuration” string
“Weeks” or “Months”
(Optional) Contains the reminder increment. Valid values are 1 to
“ReminderIncrement” int
24.

51.2 Post Accessory Response

An example of the Patient Equipment – Post Accessory response appears below:

Example of a Created (201) response header with a reminder:

{
"pragma": "no-cache",
"date": "Wed, 30 May 2018 14:55:36 GMT",
"server": "Microsoft-IIS/10.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"content-type": "application/json; charset=utf-8",
"location":
"http://localhost/EncoreExternalServices.REST/v1/reminders/257724e5-bf88-414e-
8f80-f98c74f7872b",
"cache-control": "no-cache",
"content-length": "2",
"expires": "-1"
}

Example of an OK (200) response header without a reminder:


{
"pragma": "no-cache",
"date": "Wed, 30 May 2018 15:23:09 GMT",
"server": "Microsoft-IIS/10.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"cache-control": "no-cache",
"content-length": "0",
"expires": "-1",
"content-type": null
}

The table below shows the meaning of some of the HTTP status codes returned when a patient equipment
request is made.:

HTTP Status Possible Reasons


OK (200) Success: An Accessory has been assigned with no reminder.
Success: An Accessory and Reminder are assigned and the URI to the Reminder
Created (201)
is contained in the response header.

Confidential Page 148


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

HTTP Status Possible Reasons


Client Error: Invalid property specified in object body.
BadRequest (400)
Client Error: Accessory does not exist or is unavailable to the patient.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.
Internal Server Error (500) Server Error: A server side malfunction has occurred.

52. Patient Equipment GET Accessory Assigned to Patient


52.1 Get Accessory Request

NOTE: All Patient Equipment endpoints only support JSON in the request and response body.

The syntax for the patient equipment request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/patients/{patientGuid}/accessories
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/patients/E
45802A2-83BB-4660-9ECD-DB8B02519AE7/accessories

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
Specifies the patient GUID. This is the value returned from the Patient Communication GET by
{patientGuid}
Communication GUID endpoint. The maximum length is 36 characters, including four hyphens.

The table below describes the patient equipment object request:

JSON Element C# Data Type Description


“EquipmentGuid” Guid Contains the GUID for the equipment, which is an accessory.
“ReminderGuid” Guid Contains the GUID for the reminder, if a reminder exists.
“ItemDescription” string Contains description of accessory.
“SerialNumber” string Contains the Serial Number of the accessory.
“Comments” string Contains optional Comments about the accessory.
“ReminderIncrement” int Contains the reminder increment, if a reminder exists.
“ReminderDuration” string Contains duration of reminder, if a reminder exists.
“IssuedOn” datetime Contains date accessory was issued on.
“ReplacementReminder” datetime Contains date of reminder, if a reminder exists.

Confidential Page 149


© 2019 KPNV All Rights Reserved
52.2 Get Accessory Response

An example of the Patient Equipment – Get Accessory response appears below:

Example response body when a patient has two accessories; one with and one
without a reminder:
{
"EquipmentGuid": "95fe8218-7130-4cfc-97a9-d019d96142c2",
"ReminderGuid": null,
"ItemDescription": "TestEquipment",
"SerialNumber": "",
"Comments": "This is an accessory without a reminder.",
"ReminderIncrement": null,
"ReminderDuration": null,
"IssuedOn": "2018-05-30T00:00:00",
"ReplacementReminder": null
},
{
"EquipmentGuid": "95fe8218-7129-4cfc-98c9-d019d94145f7",
"ReminderGuid": "3358a226-0b4c-4483-88d6-e5636623524e",
"ItemDescription": "TestEquipment",
"SerialNumber": "",
"Comments": "This is an accessory with a reminder.",
"ReminderIncrement": 2,
"ReminderDuration": "Weeks",
"IssuedOn": "2018-05-30T00:00:00",
"ReplacementReminder": "2018-06-13T00:00:00"
}
]

HTTP Status Possible Reasons


OK (200) Successful Operation.
BadRequest (400) Client Error: Unable to parse Patient Guid.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.
Not Found (404) Client Error: Accessory was not found.
Internal Server Error (500) Server Error: A server side malfunction has occurred.

Confidential Page 150


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

53. Company Equipment GET Accessories for Company


53.1 Get Accessories List Request

NOTE: All Company Equipment endpoints only support JSON in the request and response body.

The syntax for the company equipment request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/companies/{companyAccessGuid}/list
s/accessories
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies/
AA7550E9-61ED-429F-AFC8-AFE7D20069DD/lists/accessories

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{companyAccessGuid} Specifies the identifier that indicates the company to which the patient belongs.

53.2 Get Accessory List Response

An example of the Company Equipment – Get Accessories response appears below:

Response Body:

[
{
"EquipmentGUID": "95fe8218-7129-4cfc-98c9-d019d94145f7",
"TypeDesc": "Accessory",
"Description": "TestEquipment",
"ExternalId": "TestExternalID"
},
{
"EquipmentGUID": "95fe8218-7130-4cfc-97a9-d019d96142c2",
"TypeDesc": "Accessory",
"Description": "TestEquipment",
"ExternalId": "TestExternalID"
}
[

HTTP Status Possible Reasons


OK (200) Successful Operation.
BadRequest (400) Client Error: Invalid identifier (companyAccessGuid) supplied.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.

Confidential Page 151


© 2019 KPNV All Rights Reserved
HTTP Status Possible Reasons
Not Found (404) Client Error: Company Equipment List not found
Internal Server Error (500) Server Error: A server side malfunction has occurred.

The table below describes the company equipment object response.

C# Data
JSON Element Description
Type
“EquipmentGuid” Guid Contains the GUID for the equipment, which is an accessory.
Contains the type of equipment requested. For this endpoint the
“TypeDesc” string
TypeDesc is “Accessory”
“Description” string Contains description of equipment.
“ExternalID” string Contains company reference data.

54. Company Equipment GET Mask List for Company


54.1 Get Company Mask List Request

NOTE: All Company Equipment endpoints only support JSON in the request and response body.

The syntax for the company equipment request and an example of a completely formatted request appears
below:

GET
https://{host}/EncoreExternalServices.REST/v1/companies/{companyAccessGuid}/list
s/masks
Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/companies/
AA7550E9-61ED-429F-AFC8-AFE7D20069DD/lists/masks

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
{companyAccessGuid} Specifies the identifier that indicates the company to which the patient belongs.

Confidential Page 152


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

54.2 Get Company Mask List Response

An example of the Company Equipment – Get Company Mask List response appears below:

Response Body:

[
{
"EquipmentGUID": "95fe8218-7129-4cfc-97c9-d019d94142f2",
"TypeDesc": "Mask",
"Description": "TestEquipment",
"ExternalId": "TestExternalID"
},
{
"EquipmentGUID": "95fe8218-7129-4cfc-97c9-d019d94142c2",
"TypeDesc": "Mask",
"Description": "TestEquipment",
"ExternalId": "TestExternalID"
}
]

HTTP Status Possible Reasons


OK (200) Successful Operation.
BadRequest (400) Client Error: Invalid identifier (companyAccessGuid) supplied.
Unauthorized (401) Client Error: Integrator has invalid credentials.
Client Error: Integrator has valid credentials, but is not allowed to perform the
Forbidden (403)
operation.
Not Found (404) Client Error: Company Equipment List not found
Internal Server Error (500) Server Error: A server side malfunction has occurred.

The table below describes the company equipment object response.

JSON Element C# Data Type Description


“EquipmentGuid” Guid Contains the GUID for the equipment, which is an accessory.
Contains the type of equipment requested. For this endpoint the
“TypeDesc” string
TypeDesc is “Mask”.
“Description” string Contains description of equipment.
“ExternalID” string Contains company reference data.

55. Patient Escalation GET


The Patient Escalation endpoint searchs patient communications and patient notes data in Encore Anywhere for
a single patient. This data includes and will be returned if matching the search criteria of patient GUID, start
date time, end date time, and list of contact types:

• List of Patient Communications


o Patient Communication GUID
o Communication Date

Confidential Page 153


© 2019 KPNV All Rights Reserved
o Communication Method
o Communication Reason
o Notes
• List of Patient Notes
o Note Text
o Creation Date

This contact type parameter also supports partial and full search of the CommunicationMethod element of the
Patient Communication and partial search of the NoteText element of the Patient Note.

NOTE: The Patient Escalation GET endpoint only supports JSON in the response body and has a query string limit
of 2,048 bytes.

55.1 Patient Escalations GET Request

The syntax for the Patient Escalations request and an example of its usage is below:

GET
https://{Host}/EncoreExternalServices.REST/v1/Patients/{PatientGuid}/Escalations
?startDateTime={StartDateTime}&endDateTime={EndDateTime}&contactTypes={ContactTy
pes}

Example:
https://integration.encoreanywhere.com/EncoreExternalServices.REST/v1/Patients/2
34163c1-ebf6-41a3-ac0b-ca038e85d036/Escalations?startDateTime=2012-01-
01T08:00:00&endDateTime=2012-01-
01T12:00:00&contactTypes=PAMS%20Escalated&contactTypes=Some%20Other%20Escalation

HTTP Argument Meaning and Usage


Specifies the host name for EncoreAnywhere that was received from Philips
{Host}
Respironics.
Specifies the GUID of the patient for whom the escalation information is being
{PatientGuid}
obtained. The maximum length is 40 characters.

The patient escalations endpoint uses the required query string fields listed in the table below:

Query String Fields Meaning


Specifies the UTC start date and time of the patient escalation information. The format
for the date is yyyy-MM-dd HH:mm:ss. The webpage https://msdn.microsoft.com/en-
{StartDateTime}
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies the UTC end date and time of the patient escalation information. The format
for the date is yyyy-MM-dd HH:mm:ss. The webpage https://msdn.microsoft.com/en-
{EndDateTime}
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of the
DateTime class.
Specifies a list of contact types used in partial searching the Patient Communication
{ContactTypes} CommunicationMethod and the Patient Note NotesText elements. To search for
multiple contact types, repeat the contactTypes parameter and value for each contact

Confidential Page 154


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

type. Each contact type has a maximum limit of 100 characters. At least one contact
type must be provided.

Example of one contact type:


https://..&contactTypes=Contact%20Type%201
Example of three contact types:
https://..&contactTypes=Contact%20Type%201&contactTypes=
Contact%20Type%202&contactTypes=Contact%20Type%203

NOTE: Be sure to URL encode each contactType value to escape non-alphanumeric


and reserved (e.g. ;/?:@=&) characters.

55.2 Patient Escalations GET Response

An example of a Patient Escalations response in JSON is shown below when a single contact type, “PAMS-
Escalated” is requested:
{
"PatientCommunications": [
{
"PatientCommunicationGuid": "c7ecba44-3712-443e-8331-5e5160e3c757",
"CommunicationDate": "2018-08-03T14:10:10",
"CommunicationMethod": "PAMS-Escalated non Clinical",
"CommunicationReason": "Email Notification-PAMS",
"Notes": "PAMS-Escalated non Clinical-Email Notification,Reminder Sent to
Patient for action"
}
],
"PatientNotes": [
{
"NoteText": "PAMS-Escalated non Clinical-Email Notification,Reminder Sent
to Patient and a representative needs to follow-up with the patient in one
week",
"CreationDate": "2018-08-03T14:11:10"
}
]
}

The possible HTTP status values and possible causes are shown below.

HTTP Status Possible Causes


OK (200) Successful request that contains a list of patient notes or list of patient
communications or both lists that match the search criteria.
BadRequest (400) Improperly formatted request header.
Improperly formatted date times or patient GUID.
Start date time is greater than the end date time.
Contact types contain too few or too many elements, elements are empty or
whitespace, or elements exceed the maximum character length.
Unauthorized (401) Integrator credentials are unknown or disabled.
Integrator lacks permission to access this endpoint.
Improperly formatted request header.

Confidential Page 155


© 2019 KPNV All Rights Reserved
HTTP Status Possible Causes
Forbidden (403) Integrator has valid credentials, but is not allowed to perform the operation.
NotFound (404) No escalations found for the patient and list of contact types in the date time
range.
Patient not found.
InternalServerError (500) The request could not be processed due to a failure on the service host.

The meaning and use of the JSON elements from the body of the response is shown in the table below.

JSON Element C# Data Type Meaning


“PatientCommunications” List<PatientCommunication> List of patient communications
“PatientCommunicationGUID” Contains the GUID of the specific patient
Guid
communication
“CommunicationDate” Contains the date and time that the
DateTime
communication occurred.
“CommunicationMethod” Contains the name of the method of
communication. This communication method
string
partially or fully matches at least one of the
elements in the requested list of contact types.
“CommunicationReason” Contains the name of the reason why
string
communication was initiated.
“Notes” string Contains notes associated with the
communication
“PatientNotes” List<PatientNote> List of patient notes.
“NoteText” Note text for an individual patient note. This note
string partially matches at least one of the elements in
the requested list of contact types.
“CreationDate” Creation date and time of an individual patient
DateTime
note.

56. EMR Integration


The payer integration services can send therapy data or reports, and receive patient demographic data, using
HL7 messaging formats ORU and ORM, respectively, to integrate with an electronic medical record (EMR)
system. The specific technical details around the integration vary by customer—which requires coordination
between technical and operational resources at both Philips Respironics and the customer’s organization. To
begin the necessary discussions, contact product support (Respironics.Encore.Support@philips.com or
800-345-6443).

Confidential Page 156


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

57. Advanced Statistics Flag GET


NOTE: The Advanced Statistics Flag GET endpoint only supports XML in the response body.

This flag determines if a patient is eligible for Advanced Statistics.

57.1 Advanced Statistics Flag GET Request

The syntax for the HTTP request and an example of a completely formatted advanced statistics flag request
appear below:

GET
https://{host}/PatientIntegrationExternal.v002/Sync/Patient/{PatientGuid}/Settin
gs/AdvanceStatisticsFlag
Example:
https://Integration.EncoreAnywhere.com/
PatientIntegrationExternal.v002/Sync/Patient/4be50061-2088-4894-942f-
ff6caa3f1a87/Settings/AdvanceStatisticsFlag

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
Specifies the GUID of the patient for whom the advanced statistic information is being
{PatientGuid}
obtained. The maximum length is 40 characters.

57.2 Advanced Statistics Flag GET Response

An example of the advanced statistics flag response when using the GET verb is shown below:

<AdvanceStatisticsFlag
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AdvanceStatisticsStatus>true</AdvanceStatisticsStatus>
</AdvanceStatisticsFlag>

Confidential Page 157


© 2019 KPNV All Rights Reserved
The table below shows the meaning of some of the HTTP status codes returned when an advanced statistics flag
GET request is made:

HTTP Status Possible Causes


OK (200) Successful request to update data.
Improperly formatted request header.
BadRequest (400) Improperly formatted request body.
The patient GUID was invalid.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Forbidden (403) Requestor lacks credentials to get device information for the specified patient.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

The table below describes the advanced statistics flag response XML object.

C# Data
XML Element Description
Type
Contains the response to the advanced statistics flag transaction
<AdvanceStatisticsFlag> class
request GET.
<AdvanceStatisticsStatus> Boolean Determines whether a patient is eligible for advanced statistics.

Confidential Page 158


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

58. Advanced Statistics Flag PUT


NOTE: The Advanced Statistics Flag PUT endpoint only supports XML in the request and response body.

The advanced statistics flag endpoint using the PUT verb associates an advanced statistics flag with a patient.
With the PUT verb, this endpoint accepts the patient’s identifier (GUID) and an advanced statistics flag which
controls whether a patient is eligible for advanced statistics. If this flag is true, a patient will be updated to be
eligible for advanced statistics. If false, a patient will be updated to not to be eligible for advanced statistics.

If the request is successful, the response HTTP status code will be 200 for success. If the request is unsuccessful,
the HTTP status code will contain a value other than 200.

58.1 Advanced Statistics Flag PUT Request

The syntax for the HTTP request and an example of a completely formatted advanced statistics flag PUT request
is shown below:

PUT
https://{host}/PatientIntegrationExternal.v002/Sync/Patient/{PatientGuid}/Settin
gs/AdvanceStatisticsFlag
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v002/Sync/Pati
ent/16ea9dc1-1fcc-415b-a9c4-ca4391948509/Settings/AdvanceStatisticsFlag

The request content should be passing the AdvanceStatisticsFlag in XML format as below:

<AdvanceStatisticsFlag
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v002">
<AdvanceStatisticsStatus>true</AdvanceStatisticsStatus>
</AdvanceStatisticsFlag>

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
{host}
when they register with Philips Respironics.
Specifies the GUID of the patient for whom the advanced statistic information is being obtained.
{PatientGuid}
The maximum length is 40 characters.

Confidential Page 159


© 2019 KPNV All Rights Reserved
58.2 Advanced Statistics Flag PUT Response

The response denotes whether the update is successful or not. An example of the advanced statistics flag
response when using the PUT verb is shown below:

StatusCode: 200, ReasonPhrase: 'OK'

The table below shows the meaning of some of the HTTP status codes returned when an advanced statistics flag
PUT request is made.

HTTP Status Possible Causes


OK (200) Successful request to update data.
Improperly formatted request header.
BadRequest (400)
Improperly formatted request body.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
Forbidden (403) Requestor lacks credentials to register a device with the specified patient.
Company to which patient is associated, is not enabled for advanced statistics OR
PreconditionFailed (412)
Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

59. Questionnaire Templates GET


NOTE: The Questionnaire Templates GET endpoint only supports JSON in the response body.

The questionnaire templates endpoint returns the list of questionnaire templates for a company including
questionnaire templates from other authorized companies. The list includes QuestionnaireId,
QuestionnaireTemplateId, TemplateName, TemplateVersion, TemplateNewest and TemplateIsActive properties.
The QuestionnaireId and QuestionnaireTemplateId identifiers can be used with other endpoints where a specific
questionnaire or questionnaire template has to be considered.

59.1 Questionnaire Templates GET Request

The syntax for the HTTP request and an example of a completely formatted Questionnaire Templates GET
request appear below:

Confidential Page 160


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

GET
https://{host}/EncoreExternalServices.REST/v1/Companies/{companyAccessGuid}/Ques
tionnaireTemplates/{includeInactiveTemplates}
Example:
https://Integration.EncoreAnywhere.com/EncoreExternalServices.REST/v1/Companies/
4be50061-2088-4894-942f-ff6caa3f1a87/QuestionnaireTemplates/
https://Integration.EncoreAnywhere.com/EncoreExternalServices.REST/v1/Companies/
4be50061-2088-4894-942f-ff6caa3f1a87/QuestionnaireTemplates/true

HTTP Argument Meaning


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access
{companyAccessGuid}
List endpoint. The maximum length is 40 characters.
(Optional) Active status of the QuestionnaireTemplate with possible values of
“true” and “false.” This value indicates whether to return only active or active and
{includeInactiveTemplates}
inactive questionnaire templates. By default, it is “false” and returns only active
questionnaire templates.

59.2 Questionnaire Templates GET Response

An example of the questionnaire templates endpoint response when using the GET verb appear below:

[
{
"QuestionnaireId": 1,
"QuestionnaireTemplateId": 17,
"TemplateName": "TestTemplateNameVersion1",
"TemplateVersion": 1,
"TemplateNewest": false,
"TemplateIsActive": false
},
{
"QuestionnaireId": 1,
"QuestionnaireTemplateId": 33,
"TemplateName": "TestTemplateNameVersion2",
"TemplateVersion": 2,
"TemplateNewest": true,
"TemplateIsActive": true
}
]

The possible HTTP status values and the result codes associated with those status codes is shown below:

HTTP Status Possible Causes


OK (200) Successful request
Improperly formatted request header
BadRequest (400)
Invalid includeInactiveTemplates value

Confidential Page 161


© 2019 KPNV All Rights Reserved
HTTP Status Possible Causes
Improperly formatted companyAccessGuid
Integrator credentials are unknown or disabled.
Unauthorized (401)
Integrator lacks permission to access this endpoint.
Forbidden (403) Integrator does not have access to the companyAccessGuid
Not Found (404) No Questionnaire templates returned

The meaning of the elements in the response are detailed in the table below:

C# Data
JSON Element Meaning
Type
“QuestionnaireId” int Unique identifier of a questionnaire
“QuestionnaireTemplateId” int Unique identifier of a questionnaire template
“TemplateName” string Name of a questionnaire template
“TemplateVersion” int Version of a questionnaire template
“TemplateNewest” bool A boolean flag which denotes whether the template is the newest.
“TemplateIsActive” bool A boolean flag which denotes whether the template is active.

60. Questions GET


NOTE: The Questions GET endpoint only supports JSON in the response body.

The questions endpoint with GET verb returns the latest version of the list of the questions for the provided
Company Access Guid and Questionnaire Id. This endpoint also includes the latest version of questions from
questionnaires of other authorized companies.

60.1 Questions GET request

The syntax for the HTTP request and an example of a completely formatted Questions GET request appear
below:

GET
https://{host}/EncoreExternalServices.REST/v1/Companies/{companyAccessGuid}/Ques
tions/{questionnaireId}
Example:
https://Integration.EncoreAnywhere.com/EncoreExternalServices.REST/v1/Companies/
4be50061-2088-4894-942f-ff6caa3f1a87/Questions/1

HTTP Argument Meaning


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the company GUID. This is the value returned from the Company Access List
{companyAccessGuid}
endpoint. The maximum length is 40 characters.

Confidential Page 162


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

{questionnaireId} Specifies the Questionnaire Id for which the list of questions shall be returned.

60.2 Questions GET response

An example of the questions endpoint response when using the GET verb appear below:

[
{
"QuestionId": 1,
"QuestionText": "FirstQuestion",
"QuestionTypeDescription": "Boolean (Yes/No)",
"QuestionOrder": 1,
"IsRequired": true
},
{
"QuestionId": 2,
"QuestionText": "SecondQuestion",
"QuestionTypeDescription": "Text (Limit 1,000 characters)",
"QuestionOrder": 2,
"IsRequired": true
},
{
"QuestionId": 3,
"QuestionText": "ThirdQuestion",
"QuestionTypeDescription": "Numeric",
"QuestionOrder": 3,
"IsRequired": false
},
{
"QuestionId": 4,
"QuestionText": "FourthQuestion",
"QuestionTypeDescription": "Date",
"QuestionOrder": 4,
"IsRequired": false
}
]

The possible HTTP status values and the result codes associated with those status codes is shown below:

HTTP Status Possible Causes


OK (200) Successful request
Improperly formatted request header
BadRequest (400) Improperly formatted Company Access Guid
Invalid Questionnaire Id
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header
Forbidden (403) Integrator does not have access to the Company Access Guid
Not Found (404) No Questionnaire templates returned

The meaning of the elements in the response are detailed in the table below:

Confidential Page 163


© 2019 KPNV All Rights Reserved
C#
JSON Element Data Meaning
Type
“QuestionId” int Unique identifier of a question
“QuestionText” string A question in text format
“QuestionTypeDescription” string Data type of the question
“QuestionOrder” int Order of the question
“IsRequired” bool A boolean flag which denotes whether question is required or optional

61. Question Responses POST


NOTE: The Questions Response POST endpoint only supports JSON in the request and response body.

The questions response endpoint with POST verb inserts the responses for the list of the questions for a
questionnaire id associated to a patient. The requested questionnaire must be active. All required questions
must have a valid answer provided.

Optional Questions
Optional questions can be absent from the list of question responses. If there is a response with no Answer
property, the Answer will be saved as null. If all questions are optional, at least one of the answers must have a
valid value.

61.1 Question Responses POST request

The syntax for the HTTP request and an example of a completely formatted questions response request appear
below:

POST
https://{host}/EncoreExternalServices.REST/v1/Patients/{patientGuid}/Questionnai
re/{questionnaireId}/Responses
Example of request:
https://Integration.encoreanywhere.com/EncoreExternalServices.REST/v1/Patients/4
be50061-2088-4894-942f-ff6caa3f1a87/Questionnaire/1/Responses

Example of request body:


[
{
"QuestionId": 1,
"Answer": "Yes"
},
{
"QuestionId": 2,
"Answer": "Some text answer"
},
{
"QuestionId": 3,
"Answer": "10"
},
{
"QuestionId": 4,

Confidential Page 164


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

"Answer": "2018-10-01"
}
]

The table below shows the meaning of the HTTP arguments:

HTTP Argument Meaning and Usage


Specifies the name of the host for EncoreAnywhere. This host name is given to the
{host}
integrators when they register with Philips Respironics.
Specifies the GUID of the patient for whom the question responses will be saved.
{patientGuid}
The maximum length is 40 characters
Specifies the integer identifier of a questionnaire which is associated to a patient and
{questionnaireId}
for which the responses for the questions will be saved

The table below describes the question responses request body.

JSON Element C# Data Description


Type
“QuestionId” int Unique identifier of a question
Contains the answer to the question. The provided answer’s datatype
must match the question’s datatype.

Providing a valid answer to required and optional questions


These are the acceptable formats or values for each question type:
• “Boolean (Yes/No)”: Only accepts “Yes” and “No”
• “Date”: Only accepts dates in the format of “yyyy-MM-dd” or
“yyyy-MM-dd HH:mm:ss”
• “Text (Limit 1,000 characters)”: Only accepts text length less
“Answer” string than or equal to 1,000 characters excluding leading and trailing
whitespace
• “Numeric”: Only accepts numeric formats that use commas as
thousand separators, a period as a decimal, and a dash “-“ as a
negative symbol
o -123
o 123
o 123.45
o 123456.78
o 123,456.78

61.2 Question Responses POST response

The table below shows the meaning of some of the HTTP status codes returned when a request to Question
Responses with POST verb is made.

Confidential Page 165


© 2019 KPNV All Rights Reserved
HTTP Status Possible Causes
OK (200) Successful request
Improperly formatted request header
Improperly formatted request body
Improperly formatted patientGuid
BadRequest (400) Invalid questionnaire id
No questionnaire responses or empty list of question responses provided in the
request body
Invalid answer provided based on the question’s data type
Additional question responses provided in the request body
Required question(s) do not have a valid answer
All questions do not have an answer. At least one of the questions must have a
valid answer.
Integrator credentials are unknown or disabled.
Unauthorized (401)
Integrator lacks permission to access this endpoint.
Forbidden (403) Integrator does not have access to the patient
Questionnaire does not exist
NotFound (404)
The patient’s company is not authorized to the questionnaire
PreconditionFailed (412) Questionnaire is inactive
InternalServerError (500) Indicates server side malfunction

62. Legacy APIs (Endpoints)


Version 1 of the APIs is being deprecated. The V1 is maintained for backwards compatibility with legacy
software. Existing clients of V1 are strongly encouraged to move to the V2 APIs, and new clients should use V2.
We are also including some SOAP endpoints that use the Simple Object Access Protocol (SOAP).

62.1 General Patient Locator V1 GET

The general patient locator endpoints are designed to uniquely identify patients within EncoreAnywhere. A
temporary token is returned from a successful patient locator call. This token can be used to request and review
the patient's compliance data or compliance reports. This patient locator endpoint will identify a patient by the
supplied identity filters in any of the companies to which the integrator has access. The identity filters available
are:

• Last Name
• First Name
• Date of Birth
• Health Plan
• Membership Id
• Patient UUID

The request MUST contain at least one identity filter. In order for a request to succeed, the caller MUST supply
enough identity filters to uniquely identify one patient only. If more than one patient matches, the response

Confidential Page 166


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

returns MultipleResults/Ambiguous (300). If no patients match, the response returns NotFound (404) is
returned.

62.1.1 General Patient Locator Request


The syntax for the general patient locator and examples of its usage is shown below:

GET https://{host}/PayerIntegrationExternal.v001/Patient?
LastName={last-name}
&FirstName={first-name}
&DateOfBirth={date-of-birth}
&HealthPlan={health-plan}
&MemberID={membership-id}
&PatientGuid={patient-GUID}

Example:
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Patient?Las
tName=Smith&DateOfBirth=1965-01-23
https://Integration.EncoreAnywhere.com/PayerIntegrationExternal.v001/Patient?Pat
ientGuid=852E0680-E5C2-45BA-9A2D-197D1377182E

HTTP
Meaning
Argument
{host} Specifies the host name for EncoreAnywhere that was received from Philips Respironics.

The general patient locator endpoint uses the query string fields listed in the table below:

Query String
Meaning
Fields
Specifies the last name of the patient being located. This is the last name specified when
{LastName}
the patient was created or last updated. The maximum length of this field is 25 characters.
Specifies the first name of the patient being located. This is the first name specified when
{FirstName}
the patient was created or last updated. The maximum length of this field is 25 characters.
Specifies the date of birth of the patient being located. This data was specified when the
patient was created or last updated. The format for the date is yyyy-MM-dd
{DateOfBirth} yyyy – The current year as 4 digits
MM – The current month of the year as 2 digits (01-12).
dd – The day of the month as 2 digits
{HealthPlan} Specifies the name of the health plan to which the search limited.
Specifies the member’s ID within the health plan. This value may be health plan
{MembershipId}
membership ID or policy number.
Specifies the GUID for the patient being located. This identifier is unique to this patient
{PatientGuid}
within the company associated with the patient. The maximum length is 40 characters.

Confidential Page 167


© 2019 KPNV All Rights Reserved
62.1.2 General Patient Locator Response
An example of a general patient locator response is shown below:
<PatientLocatorResponse
xmlns="services.encoreanywhere.com/REST/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Result>Success</Result>
<ResultCode>Success</ResultCode>
<Expiration>2012-12-09T14:36:53.9324951Z</Expiration>
<Token>234163c1-ebf6-41a3-ac0b-ca038e85d036</Token>
</PatientLocatorResponse>

The possible HTTP status values and the result codes associated with those status codes is shown below:

HTTP Status Result Code Possible Causes


OK (200) Success Successful request.
MultipleChoices The provided identity filters matched more than one patient.
MultipleResults
Ambiguous (300)
BadRequest (400) AuthenticationFailed Improperly formatted request header.
Integrator credentials are unknown or disabled.
AuthenticationFailed
Unauthorized (401) Integrator lacks permission to access this endpoint.
AuthorizationFailed Improperly formatted request header.
NotFound (404) NoData No patient matched the provided identity filters.
PreconditionFailed (412) AuthenticationFailed Request timestamp differs too much from the server time.

The meaning and use of the XML elements from the body of the response is shown in the table below:

C# Data
XML Element Description
Type
<PatientLocatorResponse> class Contains the response to the primary care physician list request.
<Result> enum Contains the HTTP status result.
<ResultCode> string Contains the description of the result code.
Contains the expiration time of the token specified below. In general a
token is valid for only 15 minutes. The format for the date is yyyy-MM-
<Expiration> datetime ddTHH:mm:ss.fff. The webpage https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Contains a unique patient token for the patient. The <Expiration>
<Token> string
element indicates when this element will expire.

62.2 Patient Upsert V1 POST

The patient upsert (update/insert) endpoint is used to insert and update patient data. The endpoint accepts the
demographic data of a patient and stores it for asynchronous validation and processing. When the validation
passes, the patient data is inserted or updated into the EncoreAnywhere database. Business rules for fields in
upsert are company-specific.

Confidential Page 168


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

Calls to the service return a transaction ID that can be used to query the status of the upsert. A transaction
moves from ‘Requested’ to ‘Completed’ when successful. A request that does not meet the established
business rules moves to ‘Validation Failure.’ A request that cannot be processed due to an internal failure
moves to ‘System Error.’ The status of a given request can be obtained with the Transaction Status V1 request.

62.2.1 Patient Upsert V1 Request


The syntax for the patient upsert request and an example of a completely formatted patient upsert request is
shown below:

POST https://{host}/PatientIntegrationExternal.v001/Patient
<UpsertPatientRequest>
<CompanyAccessGuid>1627aea5-8e0a-4371-9022-
9b504344e724</CompanyAccessGuid>
<Patient>
<BirthDate>1999-05-31T11:20:00</BirthDate>
<Comments>Detailed Comments</Comments>
<ContactInformation>
<AlternatePhone>(412) 555-1212</AlternatePhone>
<BestTimeToContact>Mornings</BestTimeToContact>
<Email>test.patient@philips.com</Email>
<Fax>(724) 555-1212 </Fax>
<HomePhone>(412) 555-2121</HomePhone>
<PreferredContactMethod>Home</PreferredContactMethod>
<WorkPhone>(412) 555-4444</WorkPhone>
</ContactInformation>
<CustomFields>
<CustomField1>Custom Data Field 1</CustomField1>
<CustomField2>Custom Data Field 2</CustomField2>
<CustomField3>Custom Data Field 3</CustomField3>
<CustomField4>Custom Data Field 4</CustomField4>
<CustomField5>Custom Data Field 5</CustomField5>
</CustomFields>
<FirstName>Test</FirstName>
<FirstNamePronunciation>Test</FirstNamePronunciation>
<Gender>Male</Gender>
<GovernmentId>200-01-0000</GovernmentId>
<LastName>Testing</LastName>
<LastNamePronunciation>Testing</LastNamePronunciation>
<MaritalStatus>Unspecified</MaritalStatus>
<MiddleName>T.</MiddleName>
<OfficeGuid>1627aea5-8e0a-4371-9022-9b504344e724</OfficeGuid>
<PatientAddress>
<Address1>2800 Golden Mile Highway</Address1>
<Address2>Apt 10</Address2>
<City>Pittsburgh</City>
<Country>USA</Country>
<PostalCode>84959</PostalCode>
<State>PA</State>
</PatientAddress>
<PatientUuid>UX94-859-A-55</PatientUuid>
<PrimaryPolicy>
<GroupNumber>BU3-DD3-A</GroupNumber>
<InsuranceNum>118495952</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>
<PolicyholderName>Test T. Testing</PolicyholderName>
</PrimaryPolicy>
<SecondaryPolicy>
<GroupNumber>7748-A</GroupNumber>
<InsuranceNum>991984981981515</InsuranceNum>
<PolicyRelationship>Self</PolicyRelationship>

Confidential Page 169


© 2019 KPNV All Rights Reserved
<PolicyholderName>Test Testing</PolicyholderName>
</SecondaryPolicy>
<StartOfDayHour>12</StartOfDayHour>
<Suffix>Jr.</Suffix>
<Title>Dr.</Title>
</Patient>
</UpsertPatientRequest>
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v001/Patient

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning
Argument
{host} Specifies the name of the host for EncoreAnywhere. This host name is given to the integrators
when they register with Philips Respironics.

The patient upsert endpoint does not use a query string.

The table below shows the meaning and use of each of the XML elements that may be supplied in the upsert
request.

C# Data
XML Element Description
Type
<UpsertPatientRequest> class Contains the patient information for the upsert request.
Specifies the GUID that uniquely identifies the company to which the
<CompanyAccessGuid> string patient belongs. The maximum length is 40 characters. This field is
required.
<Patient> class Contains the patient’s information for the request.
Specifies the date of birth of the patient. The format for the date is
yyyy-MM-ddTHH:mm:ss. The webpage
<BirthDate> datetime https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use
of the DateTime class.
Specifies an unformatted string that provides additional details about
<Comments> string
the patient.
<ContactInformation> class Contains the contact information for the patient.
Specifies an alternate phone number that can be used to contact this
<AlternatePhone> string
patient (other than home/work/fax).
Specifies a description of the time of the day that the patient prefers to
<BestTimeToContact> string be called. This is a string that may contain any set of characters. The
most commonly used terms are mornings, afternoons, or evenings.
<Email> string Specifies the patient’s email address.
<Fax> string Specifies a phone number that can be used to send the patient a fax.
Specifies a phone number that can be used to contact the patient at
<HomePhone> string
his/her residence.

Confidential Page 170


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C# Data
XML Element Description
Type
Specifies the preferred method to use to contact the patient. This
unstructured string describes a contact method. The possible values
are:
Home Phone,
Work Phone,
<PreferredContactMethod> enum Alternate Phone,
Fax,
Email,
Text,
Do Not Contact, or
Unspecified.
Specifies the phone number that can be used to contact this patient at
<WorkPhone> string
the patient’s job.
<CustomFields> class Contains the company specific information.
<CustomField1> string Specifies a company-specific field for storing information.
<CustomField2> string Specifies a company-specific field for storing information.
<CustomField3> string Specifies a company-specific field for storing information.
<CustomField4> string Specifies a company-specific field for storing information.
<CustomField5> string Specifies a company-specific field for storing information.
Specifies the patient’s first name. If this field is not specifies the UUID
will be used to identify the patient record being updated. The
<FirstName> string
maximum length of this field is 25 characters. If the patient UUID is
not specified this element is required.
<FirstNamePronunciation> string Specifies the phonetic pronunciation of the patient’s given name.
Specifies the patient’s gender; the possible values are Male, Female, or
<Gender> string
Unspecified.
<GovernmentId> string Specifies the social security number for the patient.
Specifies the last name for the patient. If this field is not specifies the
UUID will be used to identify the patient record being updated. The
<LastName> string
maximum length of this field is 25 characters. If the patient UUID is not
specified this element is required.
<LastNamePronunciation> string Specifies the phonetic pronunciation of the patient’s family name.
Specifies the marital status of the patient; the possible values are
<MaritalStatus> string Single, Married, Separated, Divorced, Widowed, Unspecified. This
element is required.
<MiddleName> string Specifies the middle name of the patient.
Specifies the GUID of the DME office of the patient; value must be
<OfficeGuid> string
recognizable as a GUID. The maximum length is 40 characters.
<PatientAddress> class Contains the patient’s address information.
Specifies the first line of the patient’s address, usually a number and
<Address1> string
the street name.

Confidential Page 171


© 2019 KPNV All Rights Reserved
C# Data
XML Element Description
Type
Specifies the second line of the patient’s address, usually an apartment
<Address2> string
number of clarifying detail of an address.
<City> string Specifies the city of the patient’s address.
Specifies the three-letter country of the address. This element must be
<Country> string
set to “USA”. This element is required.
<PostalCode> string Specifies the postal code (aka, ‘Zip Code’) for the patient’s address.
Specifies the two-letter abbreviation of the state for the patient’s
<State> string
address. This field may be up to 50 characters long.
Specifies the UUID of the patient. This value is generally used as the
unique identifier in the client’s system. The maximum length is 40
<PatientUuid> string
characters. If this element is not specified, the patient’s first and last
name are used.
Contains the information that identifies the primary health insurance
<PrimaryPolicy> class
policy.
<GroupNumber> string Specifies the group number of the insurance policy for the patient.
<InsuranceNum> string Specifies the member ID number for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s primary insurance policy.
Specifies the name of the holder of the policy of the patient’s
<PolicyHolderName> string
insurance.
Contains the information that identifies the secondary health insurance
<SecondaryPolicy> class
policy.
<GroupNumber> string Specifies the group number of the insurance policy for the patient.
<InsuranceNum> string Specifies the member ID number for the patient.
Specifies the relationship of the policy holder to the patient. This
<PolicyRelationship> string
pertains to the patient’s primary insurance policy.
Specifies the name of the holder of the policy of the patient’s
<PolicyHolderName> string
insurance.
Specifies the hour on which the day begins in the EncoreAnywhere
<StartOfDayHour> int
system, usually 12. This is a required element.
<Suffix> string Specifies the suffix for the patient’s name, such as “Jr.”, “MD”, etc.
<Title> string Specifies the title of the patient’s name, such as “Dr.”, “Hon.”, etc.

Confidential Page 172


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

62.2.2 Patient Upsert V1 Response


An example of the patient upsert V1 response is shown below:

<UpsertPatientResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v001">
<TransactionId>1627aea5-8e0a-4371-9022-9b504344e724</TransactionId>
</UpsertPatientResponse>

The table below shows the meaning of some of the HTTP status codes returned when a patient upsert request is
made.

HTTP Status Possible Causes


OK (200) Successful request to make an update.
BadRequest (400) Improperly formatted request header.
Improperly formatted request body.
Unauthorized (401) Integrator credentials are unknown or disabled.
Integrator lacks permission to access this endpoint.
Improperly formatted request header.
NotFound (404) Supplied company identifier is unknown.
PreconditionFailed (412) Request timestamp differs too much from the server time.
InternalServerError (500) The request could not be processed due to a failure on the service host.

The table below shows the meaning of the XML elements returned in the response.

C# Data
XML Element Description
Type
Specifies the transaction ID for the Patient Upsert request. This may be used in a
<TransactionId> string
subsequent Transaction Status V1.

Prior to enabling the Patient Upsert functionality, a default office and clinician will be identified in the system for
any inserted patients. All patients inserted through the service will be assigned to this default office and
clinician within the specified company. Optionally, default sleep lab, primary care doctor, and sleep doctor can
also be specified. These values are stored internally. Only the office can be supplied through the service
interface.

62.3 Transaction Status V1 GET

The transaction status endpoint is used to check the state of an upsert request that was previously
submitted. The endpoint accepts the transaction ID that was returned when the request was sent to the
service. If the transaction was unsuccessful due to a violation of business rules, the service’s response includes a
list of messages that describe the detected problems.

Confidential Page 173


© 2019 KPNV All Rights Reserved
62.3.1 Transaction Status V1 Request
The syntax for the HTTP request and an example of a completely formatted transaction status request is shown
below:

GET https://(host)/PatientIntegrationExternal.v001/Transaction/{transactionId}
Example:
https://Integration.EncoreAnywhere.com/PatientIntegrationExternal.v001/Transacti
on/2871aec1-ec14-41b3-d40b-ca038e85d184

The table below shows the meaning of the HTTP arguments:

HTTP
Meaning and Usage
Argument
{host} Specifies the name of the host for EncoreAnywhere. This host name is given to the
integrators when they register with Philips Respironics.
{transactionId} Specifies the transaction ID received in a previous Patient Upsert Response.

The transaction status endpoint does not use a query string.

62.3.2 Transaction Status V1 Response


An example of the patient upsert v1 response can be seen below:
<GetTransactionResponse
xmlns="http://services.encoreanywhere.com/REST/PatientIntegration/v001">
<TransactionId>1627aea5-8e0a-4371-9022-9b504344e724</TransactionId>
</GetTransactionResponse>

The table below shows the meaning of some of the HTTP status codes returned when a transaction status v1
request is made.

HTTP Status Possible Causes


OK (200) Successful request to get data.
BadRequest (400) Improperly formatted request header, or Improperly formatted request body.
Integrator credentials are unknown or disabled.
Unauthorized (401) Integrator lacks permission to access this endpoint.
Improperly formatted request header.
PreconditionFailed (412) Request timestamp differs too much from the server time.
The TransactionId was determined to not be a valid GUID.
InternalServerError (500)
The request could not be processed due to a failure on the service host.

The table below shows the meaning of the XML elements returned in the response:

Confidential Page 174


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

C#
XML Element Data Description
Type
<GetTransactionResponse> class Contains the response message for a transaction status request.
Specifies the end date of the transaction. The format for the date is yyyy-
MM-ddTHH:mm:ss. The webpage https://msdn.microsoft.com/en-
<EndDate> string
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of
the DateTime class.
<Messages> string[] Contains any messages associated with the transaction.
Specifies the timestamp for the request of the transaction status. The
format for the date is yyyy-MM-ddTHH:mm:ss. The webpage
<RequestDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the use of
the DateTime class.
<TransactionGuid> string Specifies the Transaction GUID. The maximum length is 40 characters.
Contains the Status code for the request. The possible values are:
Requested
<TransactionStatusCode> enum Completed
ValidationFailure
SystemError

62.4 Patient Compliance Data (SOAP) POST

The patient compliance data SOAP endpoint helps to review a patient's compliance status and other details. The
endpoint accepts an input context object. The input context object contains the information to identify a patient
and an end date from which compliance history of the patient is queried.
It is important to note that Philips Respironics manages a template for each set of integrator credentials, which
regulates the following:

• The number of calls that an integrator can make to collect compliance data per day.
• The minimum and maximum range in days that an integrator can when requesting compliance data.
• The compliance MinimumUsage is used to calculate whether a patient is considered compliant.
• The aggregate compliance variables and their various values returned to the integrator requesting
compliance data.
• Whether historical data also returned to the integrator requesting compliance data.

For each of these variables, the following values would be returned irrespective of the configuration for the
integrator:

• Average – The average daily usage of the equipment


• Start Date – Start date of the compliance
• End Date – End date of the compliance
• Percentage – Percent of days used in the last 90 days
• Status – Status of the device
• Compliant – Patient compliance status Yes/No/NA
• Serial Number – Device Serial Number (Reserved for future use)

Confidential Page 175


© 2019 KPNV All Rights Reserved
• Make – Manufacturer of the Device (Reserved for future use)
• Model – Device Model Number (Reserved for future use)
• Nights Of Use – Nights count between start and end date

62.4.1 Patient Compliance Data (SOAP) Request


The syntax for the patient compliance data (SOAP) request and an example of the compliance data input are
shown below:

POST
https://{host}/PayerIntegration.V1.External.SOAP/PatientCompliance/{ComplianceDa
taInput}

Sample Body Request:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/"
xmlns:v001="urn:services.encoreanywhere.com/SOAP/PayerIntegration/v001">
<soapenv:Header/>
<soapenv:Body>
<tem:PatientCompliance>
<!--Optional:-->
<tem:input>
<v001:InputContext>
<v001:ApplicationId>1</v001:ApplicationId>
<v001:CorrelationId>1</v001:CorrelationId>
<v001:UserDomain>1</v001:UserDomain>
<v001:UserId>AIMIntegrator</v001:UserId>
</v001:InputContext>
<v001:Request>
<!--Optional:-->
<v001:City>1</v001:City>
<v001:DateOfBirth>1982-06-05</v001:DateOfBirth>
<v001:DateOfService>2014-04-01</v001:DateOfService>
<v001:Duration>90</v001:Duration>
<!--Optional:-->
<v001:ExternalMemberId>1</v001:ExternalMemberId>
<v001:FirstName>1</v001:FirstName>
<v001:HealthPlan>1</v001:HealthPlan>
<v001:HealthPlanId>1</v001:HealthPlanId>
<v001:InsuranceId>1</v001:InsuranceId>
<v001:LastName>1</v001:LastName>
<v001:MemberId>77561507</v001:MemberId>
<!--Optional:-->
<v001:Phone>1</v001:Phone>
<v001:State>1</v001:State>
<!--Optional:-->
<v001:Zip>1</v001:Zip>
</v001:Request>
</tem:input>
</tem:PatientCompliance>
</soapenv:Body>
</soapenv:Envelope>

Confidential Page 176


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

HTTP Argument Meaning and Usage


Specifies the host name for EncoreAnywhere that was received from Philips
{host}
Respironics.
Specifies the compliance data for the request. The compliance data is encoded using
{ComplianceDataInput}
XML.

The sample request includes the HTTP POST verb and the XML that modifies the action of the verb.

The table below shows the meaning and use of the XML elements in the request.

C#
XML Element Data Description
Type
<soapenv:Envelope> class Contains the patient compliance data SOAP request.
<soapenv:Header> class Contains the header for the patient compliance data SOAP request.
<soapenv:Body> class Contains the body for the patient compliance data SOAP request.
<tem:PatientCompliance> class Contains the patient input for the patient compliance data SOAP request.
<tem:input> class Contains the patient input for the patient compliance information.
<tem:InputContext> class Contains the patient input context for the request.
<v001:ApplicationId> string Specifies the application ID for the patient’s compliance data.
Specifies a correlation ID that will be returned in the response to this
<v001:CorrelationId> string
request.
<v001:UserDomain> string Specifies the user domain.
<v001:UserId> string Specifies the user ID of the patient.
<v001:Request> class Contains details for the patient being requested.
<v001:City> string Specifies the city in which the patient lives.
Specifies the date of birth of the patient. The format is yyyy-MM-dd
where
<v001:DateOfBirth> string yyyy – The current year as 4 digits.
MM – The current month of the year as 2 digits (01-12).
dd – The day of the month as 2 digits.
Specifies the date on which service was started. The format is yyyy-MM-
dd
where
<v001:DateOfService> string
yyyy – The current year as 4 digits.
MM – The current month of the year as 2 digits (01-12).
dd – The day of the month as 2 digits.
<v001:Duration> int Specifies the number of days to provide service to the patient.
<v001:ExternalMemberId> string Specifies the external member ID for the patient.
Specifies the first name of the patient. The maximum length of this
<v001:FirstName> string
element is 25 characters.
<v001:HealthPlan> string Specifies the name of the health plan for the patient.
<v001:HealthPlanId> string Specifies the health plan ID for the patient’s health plan.

Confidential Page 177


© 2019 KPNV All Rights Reserved
C#
XML Element Data Description
Type
<v001:InsuranceId> string Specifies the insurance Id for the patient.
Specifies the last name of the patient. The maximum length of this
<v001:LastName> string
element is 25 characters.
<v001:MemberId> string Specifies the insurance member ID of the patient.
<v001:Phone> string Specifies the phone number for the patient.
Specifies the state for the patient’s address. This field may be up to 50
<v001:State> string
characters long.
<v001:Zip> string Specifies the zip code for the patient’s address.

62.4.2 Patient Compliance Data (SOAP) Response


A sample of a patient compliance data (SOAP) response XML is shown below:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<ActivityId CorrelationId="b9f018e4-50c7-4d8a-8d9e-3b862bccc192"
xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">c825893f-
aba5-435b-a02e-f3a9e863d1b2</ActivityId>
</s:Header>
<s:Body>
<PatientComplianceResponse xmlns="http://tempuri.org/">
<PatientComplianceResult
xmlns:a="urn:services.encoreanywhere.com/SOAP/PayerIntegration/v001"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:OutputContext>
<a:CorrelationId>1</a:CorrelationId>
</a:OutputContext>
<a:ComplianceData>
<a:Average>5.11</a:Average>
<a:EndDate>2014-04-01T00:00:00</a:EndDate>
<a:IsCompliant>Yes</a:IsCompliant>
<a:Make>Philips</a:Make>
<a:Model>CPAP</a:Model>
<a:NightsOfUse>17</a:NightsOfUse>
<a:Percentage> i:nil="true"/>
<a:SerialNumber/>
<a:StartDate>2014-01-02T00:00:00</a:StartDate>
<a:Status/>
</a:ComplianceData>
</PatientComplianceResult>
</PatientComplianceResponse>
</s:Body>
</s:Envelope>

Confidential Page 178


© 2019 KPNV All Rights Reserved
Payer Integration Service - API User Guide

The table below shows the meaning and use of the XML elements in the response.

C# Data
XML Element Description
Type
<s:Envelope> class Contains the response to the patient compliance data SOAP request.
Contains the header for the response to the patient compliance data
<s:Header> class
SOAP request.
<ActivityId CorrelationId> string Contains the GUID for the patient.
Contains the body for the response to the patient compliance data
<s:Body> class
SOAP request.
Contains the compliance response to the patient compliance data
<PatientComplianceResponse> class
SOAP request.
<PatientComplianceResult> class Contains the result to the patient compliance data SOAP request.
<a:OutputContext> class Contains the result to the patient compliance data SOAP request.
Contains the correlation ID for the response to the patient
<a:CorrelationId> string
compliance data SOAP request.
<a:ComplianceData> class Contains the compliance data requested.
<a:Average> float Contains the average of usage of the CPAP machine.
Contains the end date for the compiling compliance data. The format
for the date is yyyy-MM-ddTHH:mm:ss. The webpage
<a:EndDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the
use of the DateTime class.
<a:IsCompliant> Boolean Contains an indication whether the patient is compliant.
<a:Make> string Contains the name of the manufacturer of the CPAP machine.
<a:Model> string Contains the model of the CPAP machine.
<a:NightsOfUse> int Contains the number of nights that the CPAP machine was used.
<a:Percentage> float Contains the percentage of nights the CPAP machine has been used.
<a:SerialNumber> string Contains the serial number of the CPAP machine.
Contains the start date for compiling compliance data. The format for
the date is yyyy-MM-ddTHH:mm:ss. The webpage
<a:StartDate> string https://msdn.microsoft.com/en-
us/library/System.DateTime.DateTime(v=vs.110).aspx describes the
use of the DateTime class.
<a:Status> string Contains a description of the status of the CPAP machine.

Confidential Page 179


© 2019 KPNV All Rights Reserved
How to Contact Philips Respironics
If you need to contact Philips Respironics directly, call the Philips Respironics Customer Service 1-800-345-6443
or 1-724-387-4000, or at the following address:

1103212

1114980 R24
MGM 8/7/2019
English

The following symbols appear within this manual.

Symbol Definition Reference


Manufacturer IEC 60878
Indicates the medical device manufacturer. ISO 7000-3082
Symbol 5.11, ISO 15223-1
Authorized representative in the European IEC 60878
Community Symbol 5.1.2, ISO 15223-1

Reorder number ISO 7000-2493


Indicated the manufacturer’s catalog number so the Symbol 5.1.16, ISO 15223-1
medical device can be identified.

ISO 7000:2014, Graphical symbols for use on equipment—Registered symbols.


ISO 15223-1: 2012, Medical devices—Symbols to be used with medical devices labels—General requirements.
IEC/TR 60878: 2015, Graphical symbols for electrical equipment in medical practice.

Confidential Page 180


© 2019 KPNV All Rights Reserved

Potrebbero piacerti anche