The labelsByCode query is used to get code records matching with input filters.
Schema |
|
type Query { labelsByCode( first: Int=10, offset: Int=0, criteria: String, locale: String, country: String, codeTypes: [String!]! ): CodesResult }
|
Field |
Type |
Description |
first |
Int |
Optional for pagination. Specifies ... 10 (default) ... to limit the number of results to get for the first page. The same number to limit results can be specified again to limit results for each of the following pages. If this limit exceeds the server's number, then number of results is determined by the server. |
offset |
Int |
Optional for pagination. Specifies ... 0 (default) ... to not offset the first number of results for the first page. However, offset is required for a following page to skip <total number results already retrieved on previous pages> to the next number to get from remaining results. For example: ● "offset: Int = 0" and "first: Int = 10" gets first 10 results for page 1 ● "offset: Int = 10" and "first: Int = 10" skips first 10 results to get next 10 results for page 2 ● "offset: Int = 20" and "first: Int = 10" skips first 20 results to get next 10 results for page 3 |
criteria |
String |
Optional. Specifies free text as criteria for the search. The internal criteria text usage is bound to a specific scope (in the criteriaScope field). For example: criteria: "John doe If not specified, then the default criteria is an empty string. |
locale |
String |
Optional. Specifies the language in which translatable fields are translated. If not specified, then the default locale "en" is used. |
country |
String |
Optional. Restrict the search to activities within a country. |
codeTypes |
[String!]! |
Restrict the search to codes of a specific type. For example: codeTypes: [“SP”,”1SP”] |
|
|
|
CodesResult
A JSON response with an object of the CodesResult type as a result, which is a code label of a specific Liscode type.
ActivityException
If a server error occurs or an incorrect input is specified.
Criteria in this query is from a "search request" made by your app for a search on labels by code, such as inputted on a prebuilt search screen. To get data without implementing a UI, HealthCare Locator provides the following calls:
● fetchLabelBy (SDK for iOS)
● hclAPI.labelsByCode (SDK for JavaScript)
Results are narrowed down to a country and/or code types when specified. If the requesting app's subscription API key is associated with additional countries and/or code types, then results can be maximized by not limiting/specifying the country and/or code types.
This query is sent to the Autocomplete endpoint of the Activity API.
The code criteria scope cannot be specified and is internally set to "CodeCriteriaScopeID".
This query is a specific case of the codesByLabel query to search against the id field.
HealthCare Locator SDK 1.2.15 and higher
GraphQL Activity API 2.0