The codesByLabel query is used to get code records matching with input filters.
Schema |
|
type Query { codesByLabel( first: Int = 10, offset: Int = 0, criteria: String, codeTypes: [String!]!, locale: String, country: String ): CodeResult }
|
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. |
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" |
codeTypes |
[String!]! |
Specifies one or more types of code as criteria to limit search to code records matching those types. For example: codeTypes: [“SP”,”1SP”] |
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 specific country. |
|
|
|
CodeResult
A JSON response with an object of the CodeResult type as a result, which is a list of one or more types of code.
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 codes, such as inputted on a prebuilt search screen. To get data without implementing a UI, HealthCare Locator SDK provides the following calls:
● getCodeByLabel (SDK for Android)
● fetchCodesByLabel (SDK for iOS)
● hclAPI.codesByLabel (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.
Also, see labelsByCode.
HealthCare Locator SDK 1.0 (and versions earlier than 1.2.15)
GraphQL Activity API 1.0