Skip to main content

Survey Data Export

Introduction

A new API need to be designed to extract survey data processed by BHA for a client. The API will return the data based on filter criteria. The filters are locations, providers, sources, from date, to date and page number. Total number of records per API call will be 20 which is in the XML format.

If the client needs historical data, then we will drop the XML file with large data onto an SFTP location.

Before using the API, an application must be provisioned by PressGaney. The application credentials will be made available in the API settings page of the Binary Health Analytics platform. The Application ID and Application Secret create a unique combination that will be used for authorization in all the API calls.

Use the Application ID and Application Secret to receive an Access Token. The access token is needed to start making server to server API calls and is valid for a limited period.

Endpoint

POSThttps://api.binaryfountain.com/api/service/v1/xmlsurveydata

Header Parameters

PropertyTypeDescriptionRequired/Optional
Acceptapplication/json, application/xmlYou can retrieve the data in either JSON or XML formatsRequired
Access-TokenStringAccess token received from the platformRequired

Request Parameters

PropertyTypeDescriptionRequired/Optional
locationsArrayList of unique entity code of a location for which data is requested.Optional – will consider all entities if not passed
providersArrayList of unique entity code of a provider for which data is requested.Optional - will consider all entities if not passed
sourcesArrayList of source names. If not specified, all sources will be returned. Examples of source names are given in appendix below.Optional – will consider all sources if not passed
fromStringfrom date in ISO 8601 formatOptional – will consider last one day as date range if not passed.
toStringTo date in ISO 8601 formatOptional – will consider last one day as date range if not passed.
pageIntegerRequesting page numberOptional – Will consider as 1 if not passed.
structured_questionStringPass “true” to include structured questions in the response. Default is only unstructured questions.Optional – Will consider “false” if not passed.
historical_dataStringPass “true” to get xml survey data as a xml file from AWS S3 locationOptional - Will consider “false” if not passed.
{
"from": "2019-01-01T00:00:00Z",
"historical_data": false,
"locations": [
"5_12062",
"5_54"
],
"page": 1,
"sources": [
"Emergency Department Survey",
"Oncology Survey"
],
"structured_question": false,
"to": "2019-03-20T23:59:59Z"
}

Response

Response Parameters

A XML object containing the API response for provider or location


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data>
<filter>
<period>
<from></from>
<to></to>
</period>
<source/>
<location/>
<provider/>
<page>1</page>
<structured_question>false</structured_question>
</filter>
<documents>
<document>
<document_id>239860593</document_id>
<source_id>Google</source_id>
<location_name>Springs at Venacava</location_name>
<location_id>596873</location_id>
<received_date>01/08/2024</received_date>
<sentiments>
<sentiment>
<question>Your comments:</question>
<comment>Access to social comment data not supported</comment>
<opinion>made us feel welcomed</opinion>
<feature>Jocelyn</feature>
<category>Staff/Team / Leasing Staff</category>
<sentiment>Positive</sentiment>
<csi_score>5</csi_score>
<locationFeatureWord>false</locationFeatureWord>
</sentiment>
<sentiment>
<question>Your comments:</question>
<comment>Access to social comment data not supported</comment>
<opinion>explained</opinion>
<feature>Jocelyn</feature>
<category>Staff/Team / Leasing Staff</category>
<sentiment>Positive</sentiment>
<csi_score>5</csi_score>
<locationFeatureWord>false</locationFeatureWord>
</sentiment>
<sentiment>
<question>Your comments:</question>
<comment>Access to social comment data not supported</comment>
<opinion>made us feel welcomed</opinion>
<feature>Jocelyn</feature>
<category>Staff/Team / Leasing Staff</category>
<sentiment>Positive</sentiment>
<csi_score>5</csi_score>
<locationFeatureWord>false</locationFeatureWord>
</sentiment>
<sentiment>
<question>Your comments:</question>
<comment>Access to social comment data not supported</comment>
<opinion>explained</opinion>
<feature>Jocelyn</feature>
<category>Staff/Team / Leasing Staff</category>
<sentiment>Positive</sentiment>
<csi_score>5</csi_score>
<locationFeatureWord>false</locationFeatureWord>
</sentiment>
<sentiment>
<question>Your comments:</question>
<comment>Access to social comment data not supported</comment>
<opinion>amazing</opinion>
<feature>amenities</feature>
<category>Amenities / Amenities - General Amenities</category>
<sentiment>Positive</sentiment>
<csi_score>5</csi_score>
<locationFeatureWord>false</locationFeatureWord>
</sentiment>
<sentiment>
<question>Your comments:</question>
<comment>Access to social comment data not supported</comment>
<opinion>Huge</opinion>
<feature>complex</feature>
<category>Community / Overall Community Quality</category>
<sentiment>Positive</sentiment>
<csi_score>5</csi_score>
<locationFeatureWord>false</locationFeatureWord>
</sentiment>
</sentiments>
</document>
</documents>
<page_number>1</page_number>
<total_pages>1</total_pages>
<total_records>12</total_records>
<status>
<message>success</message>
<code>200</code>
</status>
<version>v1.0</version>
</data>
PropertyTypeDescription
documentsXMLObjectXML Object
document.source_idStringSource name
document.pg_survey_idIntegerPG Survey id
document.document_idIntegerDocument id
document.location_nameStringLocation name
document.location_idIntegerLocation id
document.provider_nameStringProvider name
document.provider_idIntegerProvider id
document.service_lineStringService line
document.received_dateDateDocument received date (format - DD/MM/YYYY)
document.sentimentsXMLObjectXML Object
sentiment.questionStringSurvey question
sentiment.commentStringResponse of unstructured question
sentiment.responseStringResponse of structured question
sentiment.opinionStringOpinion
sentiment.featureStringFeature
sentiment.categoryStringCategory or Theme
sentiment.sentimentStringSentiment
sentiment.pfs_scoreDoubleDocument PFS score for all healthcare clients
sentiment.csi_scoreDoubleDocument CSI score for all non-healthcare clients
sentiment.locationFeatureWordbooleanTrue when entityname matches with feature
page_numberIntegerPage number – each page contains 20 records
total_pagesIntegerTotal number of pages
total_recordsIntegerTotal number of records
status.messageStringAPI status message
status.codeIntegerAPI status code