Reviews for a Single Physician
Endpoint
POSThttps://api1.consumerism.pressganey.com/api/external/bsr/v2/reviews
Header Parameters
| Property | Type | Description | Required/Optional |
|---|---|---|---|
| Content-Type | application/json | Content in JSON format | Required |
| Access-Token | String | Access token received from the platform | Required |
POST Request Parameters
| Property | Type | Description | Required/Optional |
|---|---|---|---|
| personId | String | Unique identifier of a Physician. Can be NPI or a proprietary identifier guaranteed to be unique across all providers | Required |
| perPage | Integer | The number of reviews per page | Optional, default is up to 20 |
| minThreshold | String | Minimum threshold for the comments Values between 0 and 5 Note: Minimum threshold is compared to the overall rating value associated with the comments | Optional, by default threshold is not considered |
| days | Integer | Maximum age of the reviews in days. For example, days=7 means reviews from the past 1 week | Optional, default is 365 days |
| minSurveyCount | Integer | Returns responses only when there are at least as many survey responses as specified in minSurveyCount | Optional, default is 0 |
| minRatingCount | Integer | Returns responses only when there are at least as many ratings as specified in minRatingCount. | Optional, default is 0 |
| minWordCount | Integer | Returns only those reviews, which have minimum number of words in it. | Default is 0, meaning, no restriction on word count |
| showRatings | Boolean | If you don't need rating, send this parameter as false | Default is true |
| showReviews | Boolean | If you don't need comments, send this parameter as false | Default is true |
| scrollKey | String | The encrypted key to scroll to the next page, call the API with scroll key to get next page | Default is empty |
| additionalFields | List<String> | List of string which specifies the additional fields needed in the API response. See Additional fields. | Optional |
Additional fields
Following are the additional fields we support. Pass one or more of them in additionalFields (for example, ["reviewSummary", "firstName"]) and the corresponding fields will be returned in the response.
| Property | Type | Description | Required/Optional |
|---|---|---|---|
| reviewSummary | String | API will return an AI generated summary of comments for a provider or location. These summaries reference the last 90 days of published comments. The minimum comment limit is 5. See Review summary format. | Optional |
| firstName | String | API will return the respondent's first name on each review, when the survey collected it and the response is approved. Omitted from the review when no name is available. | Optional |
| lastInitial | String | API will return the uppercase first letter of the respondent's last name on each review, when the survey collected it and the response is approved. Omitted from the review when no name is available. | Optional |
Review summary format
To receive the AI summary, include "reviewSummary" in the additionalFields array of the request:
"additionalFields": ["reviewSummary"]
The summary is returned as a single string in entities[].reviewSummary. It contains exactly three paragraphs separated by a blank line (\n\n), and no headings or labels:
| Paragraph | Index (0-based) | Content |
|---|---|---|
| 1 | 0 | Key positive points and strengths patients mentioned, focused on the most commonly praised aspects. |
| 2 | 1 | Main opportunities for improvement raised in the reviews. |
| 3 | 2 | Overall summary of the patient experience and a high-level takeaway of how patients feel about their care. |
The API always returns the full three-paragraph text. To use an individual paragraph, split the string on \n\n:
- JavaScript
- Python
- Java
const parts = entity.reviewSummary ? entity.reviewSummary.split('\n\n') : [];
const [positives, improvements, overall] = parts;
parts = entity["reviewSummary"].split("\n\n") if entity.get("reviewSummary") else []
positives, improvements, overall = (parts + [None] * 3)[:3]
String summary = entity.getReviewSummary();
String[] parts = (summary == null || summary.isEmpty()) ? new String[0] : summary.split("\n\n");
String positives = parts.length > 0 ? parts[0] : null;
String improvements = parts.length > 1 ? parts[1] : null;
String overall = parts.length > 2 ? parts[2] : null;
note
- If
reviewSummaryis not requested, the field isnull. - If it is requested but no summary is available for the entity (for example, too few recent comments), the field is an empty string (
""). Check for this before splitting. - Paragraph order is stable, but guard against fewer than three paragraphs (for example,
parts.length >= 3) rather than assuming they are all present.
JSON Response
A JSON object containing the latest comments.
{
"status": {
"message": "SUCCESS",
"code": 200
},
"data": {
"client": "Demo",
"entities": [
{
"id": "Demo Provider",
"name": "Demo Provider Name",
"reviewSummary":"The reviews highlighted several positive points about the healthcare provider. Patients felt the doctor was professional, caring, a good listener, and took time to understand their concerns. Multiple patients were very happy with their treatment and grateful for the care they received. However, one patient had an unsatisfactory experience feeling the doctor seemed annoyed, rushed, and uncaring about their condition. This highlights an opportunity for the provider to improve patient interactions by showing more empathy, fully listening to patient concerns, and taking whatever time is needed, regardless of schedule constraints. Additionally, the cost of prescriptions should be considered to provide affordable treatment options. Overall most patients reported very positive experiences feeling heard, understood, and effectively treated. But the one negative review shows room for improving patient interactions and affordability of care. Addressing those factors could help create consistently positive experiences for all patients.",
"totalCommentCount": 5,
"totalRatingCount": 11,
"totalSurveyCount": 11,
"overallRating": {
"name": "Overall Satisfaction",
"value": 4.7,
"categoryResponseCount": 4,
"questionRatings": [
{
"name": "The doctor's interest in, and attention to, my problem?",
"value": 4.4,
"responseCount": 4
},
{
"name": "The thoroughness of the doctor's examination?",
"value": 4.6,
"responseCount": 3
},
{
"name": "Overall satisfaction with my doctor this visit?",
"value": 5.0,
"responseCount": 3
},
{
"name": "The doctor's explanation of my problems(s) and the need for additional tests and treatment?",
"value": 5.0,
"responseCount": 3
}
]
},
"reviews": [
{
"documentId": 3840508,
"surveyKey": "42c59691-adfd-44f2-aeff-e91fcb3d040c",
"source": "Demo Source",
"mentionTime": "2020-11-29T06:13:01Z",
"comment": {
"commentId": 12552895,
"wordCount": 4,
"comment": "Great doctor and staff"
},
"ratings": [
{
"name": "Scheduling",
"value": 3.75
}
],
"overallRating": {
"name": "Overall Satisfaction",
"value": 3.75
}
},
{
"documentId": 3840516,
"surveyKey": "04b47591-db9a-4349-8070-3aa2d0e01a7e",
"source": "Demo Source",
"mentionTime": "2020-11-18T12:20:08Z",
"comment": {
"commentId": 12552985,
"wordCount": 1,
"comment": "excellent"
},
"ratings": [
{
"name": "Scheduling",
"value": 3.75
},
{
"name": "staff",
"value": 3.75
},
{
"name": "Clean",
"value": 5.0
}
],
"overallRating": {
"name": "Overall Satisfaction",
"value": 4.38
}
},
{
"documentId": 3840514,
"surveyKey": "3d4c3921-4bb6-4fca-829d-7f9b77082f0d",
"source": "Demo Source",
"mentionTime": "2020-11-10T12:20:08Z",
"comment": {
"commentId": 12552921,
"wordCount": 1,
"comment": "great"
},
"ratings": [
{
"name": "Scheduling",
"value": 5.0
},
{
"name": "staff",
"value": 5.0
},
{
"name": "Clean",
"value": 5.0
}
],
"overallRating": {
"name": "Overall Satisfaction",
"value": 5.0
}
},
{
"documentId": 3807834,
"surveyKey": "7c1eceed-398a-4d9f-8455-0e3da1cba124",
"source": "Demo Source",
"mentionTime": "2020-09-24T13:11:12Z",
"comment": {
"commentId": 12552785,
"wordCount": 7,
"comment": "Test web survey on 24th Sep 2020"
},
"ratings": [
{
"name": "Scheduling",
"value": 5.0
},
{
"name": "staff",
"value": 5.0
},
{
"name": "Clean",
"value": 5.0
}
],
"overallRating": {
"name": "Overall Satisfaction",
"value": 5.0
}
},
{
"documentId": 3807834,
"surveyKey": "7c1eceed-398a-4d9f-8455-0e3da1cba124",
"source": "Demo Source",
"mentionTime": "2020-09-24T13:11:12Z",
"comment": {
"commentId": 12552786,
"wordCount": 7,
"comment": "Test Web Survey on 24th 09 2020"
},
"ratings": [
{
"name": "Scheduling",
"value": 5.0
},
{
"name": "staff",
"value": 5.0
},
{
"name": "Clean",
"value": 5.0
}
],
"overallRating": {
"name": "Overall Satisfaction",
"value": 5.0
}
}
],
"ratings": [
{
"name": "Scheduling",
"value": 4.4,
"categoryResponseCount": 4,
"questionRatings": [
{
"name": "The doctor's interest in, and attention to, my problem?",
"value": 4.4,
"responseCount": 4
}
]
},
{
"name": "staff",
"value": 4.6,
"categoryResponseCount": 3,
"questionRatings": [
{
"name": "The thoroughness of the doctor's examination?",
"value": 4.6,
"responseCount": 3
}
]
},
{
"name": "Clean",
"value": 5.0,
"categoryResponseCount": 3,
"questionRatings": [
{
"name": "The doctor's explanation of my problems(s) and the need for additional tests and treatment?",
"value": 5.0,
"responseCount": 3
}
]
}
]
}
],
"filter": {
"clientId": "Demo",
"entityId": 580714,
"scrollKey": "6bd9041e37b675273ff3da2de6cb2c10c4e7703a30f084b78d07d9bc0b6720a0",
"person": true,
"reqFromDate": null,
"reqToDate": null,
"days": 365,
"minThreshold": 0.0,
"minRatingCount": 0,
"minSurveyCount": 0,
"minWordCount": 0,
"showComments": true,
"showRatings": true,
"showToneCategory": false,
"showVarName": false,
"pgVendor": false,
"page": 0,
"perPage": 20,
"startPageIndex": -1,
"configVersion": "v2",
"sourceProductId": 1
}
}
}
JSON Response Tags
| Property | Type | Description |
|---|---|---|
| filter | Object | The filters applied on the testimonials |
| entities | Array | The physician entities for which data is being returned |
| entities.id | String | Unique identifier of the entity |
| entities.Name | String | The name of the entity |
| entities.reviewSummary | String | Full AI summary: three paragraphs separated by \n\n. See Review summary format. |
| entities.totalRatingCount | Integer | Total number of survey responses available for primary rating. |
| entities.totalCommentCount | Integer | Number of actual comments available for the entity |
| entities.totalSurveyCount | Integer | Total number of surveys available for the entity |
| overallRating.name | String | Overall Rating name |
| overallRating.value | Decimal | Overall rating of the Provider |
| overallRating.questionRatings | Array | Individual question level rating which contributed for the overall rating |
| overallRating.questionRatings.name | String | Question name contributed for overall rating |
| overallRating.questionRatings.value | Decimal | Star rating of the question |
| overallRating.questionRatings.responseCount | Integer | No. of responses received for this questiong |
| ratings | Array | The ratings for this entity |
| ratings.name | String | The name of the rating |
| ratings.value | Decimal | The score |
| ratings.questionRatings | Array | List of questions used for calculating this rating |
| ratings.questionRatings.name | String | Question text |
| ratings.questionRatings.value | Decimal | Question rating |
| ratings.questionRatings.responseCount | Integer | Total number of responses for this question |
| reviews | Array | The reviews for this entity |
| reviews.documentId | Integer | Unique identifier of the review |
| reviews.surveyKey | String | The sessionkey for the review |
| reviews.source | String | The source for the review |
| reviews.mentionTime | Datetime (ISO-8601) | The date & time at which this review was mentioned |
| reviews.overallRating | Object | Overall rating of the comment |
| reviews.overallRating.name | String | Overall rating name |
| reviews.overallRating.value | Decimal | Overall rating of the comment |
| reviews.ratings | Array | Individual ratings |
| reviews.ratings.name | String | The name of the rating |
| reviews.ratings.value | Decimal | Individual question rating |
| reviews.comment | Object | Comment of the review |
| reviews.comment.commentId | Integer | Unique identified for the comment |
| reviews.comment.wordCount | Integer | Number of words in the comment |
| reviews.comment.comment | String | The comment content |
| reviews.firstName | String | Respondent's first name. Present only when requested in additionalFields and a name is available |
| reviews.lastInitial | String | First letter of the respondent's last name. Present only when requested in additionalFields and a name is available |