GET method. The server typically returns the result set in pages and provides links to subsequent pages in the response's Bundle.link. Additionally, the _count parameter can be used to control the number of records returned per page._count to control the number of items returned per request.Parameter Name | Type | Required | Description |
HTTP Method | String | Yes | Fixed as GET. |
URL | String | Yes | The search address, in the format [baseUrl]/[resourceType]?[searchParams]. |
Authorization | String | Yes | The access token, in the format Bearer <AccessToken>. For details on how to obtain it, see Calling Method. |
Accept | String | No | The response format. It is recommended to use application/fhir+json. |
_count | Integer | No | Specifies the number of records to return per page. The default value is 20, and it must be a positive integer. The actual maximum value is constrained by the server configuration. |
Other search parameters | Query String | No | Regular search criteria that can be used in combination with pagination parameters. |
self and next.next link to continue obtaining subsequent pages._count parameter only controls the number of items returned per page. It does not change the total number of matching results.200 OK is typically returned. The response body is usually a Bundle resource, which contains the current page of results, the total number, and pagination link information.Field | Type | Description |
resourceType | String | Returns the resource type, usually Bundle. |
id | String | The unique identifier of the current result set. |
meta.lastUpdated | String | The generation time of the current result set. |
type | String | The Bundle type is usually searchset in search scenarios. |
total | Integer | The total number of matched records. This field may not be returned by default and is only returned when the server can efficiently calculate the total number of records. The current server does not support forcing the return of an accurate total via _total=accurate. |
link | Array | Pagination link information. |
link[].relation | String | The link relation, such as self and next. |
link[].url | String | The access URL for the corresponding pagination. |
entry | Array | The list of resources returned for the current page. |
GET /INSTANCE_ID/fhir/Patient?birthdate=1974-02-13 HTTP/1.1Host: HOSTNAMEAuthorization: Bearer <AccessToken>Accept: application/fhir+json
{"resourceType": "Bundle","id": "3c4b5bfc-a03e-474c-9cb2-bd640022cf20","meta": {"lastUpdated": "2022-10-13T14:07:20.613+00:00"},"type": "searchset","link": [{"relation": "self","url": "https://HOSTNAME/INSTANCE_ID/fhir/Patient?birthdate=1974-02-13"},{"relation": "next","url": "https://HOSTNAME/INSTANCE_ID/fhir?_getpages=3c4b5bfc-a03e-474c-9cb2-bd640022cf20&_getpagesoffset=20&_count=20&_bundletype=searchset"}]}
GET /INSTANCE_ID/fhir/Observation?code=http://loinc.org%7C718-7&_count=20 HTTP/1.1Host: HOSTNAMEAuthorization: Bearer <AccessToken>Accept: application/fhir+json
HTTP/1.1 200 OKContent-Type: application/fhir+jsonx-request-id: ENqsVXqc5SeqLOfU
{"resourceType": "Bundle","id": "3c4b5bfc-a03e-474c-9cb2-bd640022cf20","meta": {"lastUpdated": "2022-10-13T14:07:20.613+00:00"},"type": "searchset","total": 45,"link": [{"relation": "self","url": "https://HOSTNAME/INSTANCE_ID/fhir/Observation?code=http://loinc.org%7C718-7&_count=20"},{"relation": "next","url": "https://HOSTNAME/INSTANCE_ID/fhir?_getpages=3c4b5bfc-a03e-474c-9cb2-bd640022cf20&_getpagesoffset=20&_count=20&_bundletype=searchset"}],"entry": [{"fullUrl": "https://HOSTNAME/INSTANCE_ID/fhir/Observation/OBS001","resource": {"resourceType": "Observation","id": "OBS001","status": "final","code": {"coding": [{"system": "http://loinc.org","code": "718-7","display": "Hemoglobin [Mass/volume] in Blood"}]}},"search": {"mode": "match"}}]}
Error Code | Description |
400 Bad Request | The pagination parameter or the _count parameter is in an incorrect format. |
401 Unauthorized | Not authenticated, and valid credentials are missing. |
403 Forbidden | Authenticated but not authorized to search the resource. |
404 Not Found | The specified resource type does not exist. |
422 Unprocessable Entity | The search parameter syntax is correct, but it fails business or rule validation. |
500 Internal Server Error | Internal server processing exception |
フィードバック