Skip to content

Commit e589c8f

Browse files
authored
healthcare API: use dataset path instead of FHIR store path when list… (GoogleCloudPlatform#2856)
* healthcare API: use dataset path instead of FHIR store path when listing FHIR stores Fixes b/155924462 * Fix var
1 parent bd87a1b commit e589c8f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

healthcare/v1/src/main/java/snippets/healthcare/fhir/FhirStoreList.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@
3434
import java.util.List;
3535

3636
public class FhirStoreList {
37-
private static final String FHIR_NAME = "projects/%s/locations/%s/datasets/%s/fhirStores/%s";
37+
private static final String DATASET_NAME = "projects/%s/locations/%s/datasets/%s";
3838
private static final JsonFactory JSON_FACTORY = new JacksonFactory();
3939
private static final NetHttpTransport HTTP_TRANSPORT = new NetHttpTransport();
4040

41-
public static void fhirStoreList(String fhirStoreName) throws IOException {
42-
// String fhirStoreName =
43-
// String.format(
44-
// FHIR_NAME, "your-project-id", "your-region-id", "your-dataset-id", "your-fhir-id");
41+
public static void fhirStoreList(String datasetName) throws IOException {
42+
// String datasetName =
43+
// String.format(DATASET_NAME, "your-project-id", "your-region-id", "your-dataset-id");
4544

4645
// Initialize the client, which will be used to interact with the service.
4746
CloudHealthcare client = createClient();
@@ -57,7 +56,7 @@ public static void fhirStoreList(String fhirStoreName) throws IOException {
5756
.locations()
5857
.datasets()
5958
.fhirStores()
60-
.list(fhirStoreName)
59+
.list(datasetName)
6160
.setPageSize(100) // Specify pageSize up to 1000
6261
.setPageToken(pageToken);
6362

0 commit comments

Comments
 (0)