Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions curl-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The following examples can be types into the command line of any terminal that h
- [Get concept descendants](#get-descendants)
- [Get all properties](#get-all-properties)
- [Get property by code (or label)](#get-property-by-code-or-label)
- [Get property values by code (or label)](#get-property-values-by-code-or-label)
- [Get all qualifiers](#get-all-qualifiers)
- [Get qualifier by code (or label)](#get-qualifier-by-code-or-label)
- [Get qualifier values by code (or label)](#get-qualifier-values-by-code-or-label)
Expand Down Expand Up @@ -244,6 +245,20 @@ See sample payload data from this call in:

[Back to Top](#evsrestapi-client-sdk-curl-tutorial)

### Get property values by code (or label)

Return distinct value set for the property with the specified code or label.

```
curl "$API_URL/metadata/ncit/property/P204/values" | jq .
curl "$API_URL/metadata/ncit/property/Accepted_Therapeutic_Use_For/values" | jq .
```

See sample payload data from this call in:
- [`samples/get-property-values-with-code.txt`](samples/get-property-values-with-code.txt)

[Back to Top](#evsrestapi-client-sdk-curl-tutorial)

### Get all qualifiers

Return all qualifiers. The first sample below returns just the names and codes
Expand Down
1 change: 1 addition & 0 deletions curl-examples/samples/get-property-values-with-code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

9 changes: 9 additions & 0 deletions go-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ All commands to run these tests should be run from that directory.
* [Get concept descendants](#get-concept-descendants)
* [Get all properties](#get-all-properties)
* [Get property by code (or label)](#get-property-by-code-or-label)
* [Get property values by code (or label)](#get-property-values-by-code-or-label)
* [Get all qualifiers](#get-all-qualifiers)
* [Get qualifier by code (or label)](#get-qualifier-by-code-or-label)
* [Get qualifier values by code (or label)](#get-qualifier-values-by-code-or-label)
Expand Down Expand Up @@ -262,6 +263,14 @@ Return property for the specified code or label.

[Back to Top](#evsrestapi-client-sdk-go-tutorial)

### Get property values by code (or label)

Return distinct value set for the property with the specified code or label.

`go test -run "^TestMetadataEndpointsAPIService/GetPropertyValues$" -v`

[See output here](outputs/GetPropertyValues.txt)

### Get all qualifiers

Return all qualifiers for a given terminology with default include setting (minimal).
Expand Down
305 changes: 272 additions & 33 deletions go-examples/api_metadata_endpoints.go

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions go-examples/api_metadata_endpoints_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions go-examples/outputs/GetPropertyValues.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

12 changes: 12 additions & 0 deletions java-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The following examples are exhibited by various unit tests defined in the code i
* [Get concept descendants](#get-descendants)
* [Get all properties](#get-all-properties)
* [Get property by code (or label)](#get-property-by-code-or-label)
* [Get property values by code (or label)](#get-property-values-by-code-or-label)
* [Get all qualifiers](#get-all-qualifiers)
* [Get qualifier by code (or label)](#get-qualifier-by-code-or-label)
* [Get qualifier values by code (or label)](#get-qualifier-values-by-code-or-label)
Expand Down Expand Up @@ -332,6 +333,17 @@ See sample payload data from this call in [`samples/get-property-with-code.txt`]

[Back to Top](#evsrestapi-client-sdk-java-tutorial)

### Get property values by code (or label)

Run the gradle command in the terminal to return distinct value set for the property with the specified code or
label.

`./gradlew test --tests gov.nih.nci.evs.api.MetadataEndpointsApiTest.getPropertyValuesTest`

See sample payload data from this call in [`samples/get-property-values-with-code.txt`](samples/get-property-values-with-code.txt)

[Back to Top](#evsrestapi-client-sdk-java-tutorial)

### Get all qualifiers

Run the gradle command in the terminal to return all qualifiers for a given terminology with default include setting (
Expand Down
1 change: 1 addition & 0 deletions java-examples/samples/get-property-values-with-code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// unimplemented in prod as of now
802 changes: 535 additions & 267 deletions java-examples/src/main/java/gov/nih/nci/evs/api/MetadataEndpointsApi.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,21 @@ public void getTerminologiesTest() throws ApiException {
log.info(" terminologies = " + response);
}

/**
* Get property values for the specified terminology and code/name
*
* @throws ApiException if the Api call fails
*/
@Test
public void getPropertyValuesTest() throws ApiException {
// ARRANGE - using global variable unless otherwise listed
String codeOrName = "P204";
// ACT
List<String> response = api.getPropertyValues(terminology, codeOrName);
// ASSERT
assertFalse(response.isEmpty());
assertTrue(response.size() >= 1);
}
/**
* TODO: VALIDATE THIS IS A VALID API CALL
* Get welcome text for the specified terminology
Expand Down
21 changes: 21 additions & 0 deletions postman-examples/EVSRESTAPI-Postman-Client.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,27 @@
},
"response": []
},
{
"name": "Get property values by code (or label)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{API_URL}}/metadata/ncit/property/P204/values",
"host": [
"{{API_URL}}"
],
"path": [
"metadata",
"ncit",
"property",
"P204",
"values"
]
}
},
"response": []
},
{
"name": "Get property axiom qualifiers by code (or label)",
"request": {
Expand Down
14 changes: 14 additions & 0 deletions python-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ All commands to run these tests should be run from that directory.
* [Get concept descendants](#get-concept-descendants)
* [Get all properties](#get-all-properties)
* [Get property by code (or label)](#get-property-by-code-or-label)
* [Get property values by code (or label)](#get-property-values-by-code-or-label)
* [Get all qualifiers](#get-all-qualifiers)
* [Get qualifier by code (or label)](#get-qualifier-by-code-or-label)
* [Get qualifier values by code (or label)](#get-qualifier-values-by-code-or-label)
Expand Down Expand Up @@ -397,6 +398,19 @@ Return property for the specified code or label.

[Back to Top](#evsrestapi-client-sdk-python-tutorial)

### Get property values by code (or label)

Return distinct value set for the property with the specified code or label.

`pytest tests/test_metadata_endpoints_api.py::TestMetadataEndpointsApi::test_get_property_values`

```
2024-07-03T16:31:33.646 INFO : Get property values for code - P204
2024-07-03T16:31:33.646 INFO : property values - []
```

[Back to Top](#evsrestapi-client-sdk-python-tutorial)

### Get all qualifiers

Return all qualifiers for a given terminology with default include setting (minimal).
Expand Down
Loading