GET method and filter conditions such as test item codes, numerical values, and units using standard search parameters.Observation resource, including: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. |
subject | String | No | Filters by the associated patient, typically in the format Patient/{id}. Here, {id} is the unique identifier of the referenced resource, which can be obtained via the Basic Search API or the console resource viewer. |
category | String | No | Filters by resource category. In this example, it is the laboratory category, such as http://hl7.org/fhir/observation-category%7Claboratory. |
code | String | No | Filters by test item code, typically a standard terminology code, such as http://loinc.org%7C6298-4. Note that the vertical bar | in the URL system%7Ccode must be encoded as %7C. |
value-quantity | String | No | Filters by value and unit, typically in the format [prefix][value]%7C[system]%7C[unit]. Here, prefix is the comparison prefix (for example, lt, le, gt, ge), and the vertical bar | must be encoded as %7C. |
category parameter can be used to restrict the results to only laboratory-type Observation resources.code parameter is commonly used to search for a specific test item, such as a potassium ion test.value-quantity parameter supports comparison prefixes, such as lt, le, gt, ge, and others.\\| used to separate system and code must be encoded as %7C in the URL; otherwise, the request may fail.200 OK is typically returned. The response body is usually a Bundle resource, which contains a list of Observation resources that meet the specified criteria, along with pagination information.Field | Type | Description |
resourceType | String | Returns the resource type, usually Bundle. |
id | String | Unique ID of the Bundle resource, usually a UUID. |
meta | Object | Metadata of the Bundle, containing fields such as lastUpdated. |
meta.lastUpdated | String | Generation time of the Bundle, in ISO 8601 format. |
type | String | The Bundle type is usually searchset in search scenarios. |
link | Array | Pagination link information, containing relation and url. |
link[].relation | String | Type of the link relation, such as self, next, and previous. |
link[].url | String | The complete request URL for the corresponding pagination. |
entry | Array | The list of search results. |
entry[].fullUrl | String | The complete access URL of the resource. |
entry[].resource | Object | The content of the matched Observation resource. |
entry[].resource.id | String | Unique ID of the resource. |
entry[].resource.meta | Object | Metadata of the resource, containing fields such as versionId, lastUpdated, and source. |
entry[].resource.status | String | The status of the observation result, such as final, preliminary, and so on. |
entry[].resource.category | Array | Resource categorization information, such as laboratory classification. |
entry[].resource.code | Object | Information about the test item code. |
entry[].resource.subject | Object | Reference information of the associated patient. |
entry[].resource.valueQuantity | Object | Information about the test value and its unit. |
entry[].search.mode | String | The search hit mode, such as match. |
GET /INSTANCE_ID/fhir/Observation?subject=Patient/h0e270d9-ed56-4041-9dec-a45a73461c66&category=http://hl7.org/fhir/observation-category%7Claboratory HTTP/1.1Host: HOSTNAMEAuthorization: Bearer <AccessToken>Accept: application/fhir+json
GET /INSTANCE_ID/fhir/Observation?code=http://loinc.org%7C6298-4 HTTP/1.1Host: HOSTNAMEAuthorization: Bearer <AccessToken>Accept: application/fhir+json
GET /INSTANCE_ID/fhir/Observation?code=http://loinc.org%7C6298-4&value-quantity=lt4.0%7Chttp://unitsofmeasure.org%7Cmmol/L HTTP/1.1Host: HOSTNAMEAuthorization: Bearer <AccessToken>Accept: application/fhir+json
{"resourceType": "Bundle","id": "a9fdb12d-8a08-4cfb-8d8c-13f8a0fa50ad","meta": {"lastUpdated": "2026-07-08T21:24:14.191+08:00"},"type": "searchset","link": [{"relation": "self","url": "https://HOSTNAME/INSTANCE_ID/fhir/Observation?code=http%3A%2F%2Floinc.org%7C6298-4&value-quantity=lt4.0%7Chttp%3A%2F%2Funitsofmeasure.org%7Cmmol%2FL"}],"entry": [{"fullUrl": "https://HOSTNAME/INSTANCE_ID/fhir/Observation/9a6adc7c-2496-43b9-881f-72a3f3067544","resource": {"resourceType": "Observation","id": "9a6adc7c-2496-43b9-881f-72a3f3067544","meta": {"versionId": "1","lastUpdated": "2026-07-08T21:24:13.487+08:00","source": "#nB7pryS0ElzarOdc"},"status": "final","category": [{"coding": [{"system": "http://hl7.org/fhir/observation-category","code": "laboratory"}]}],"code": {"coding": [{"system": "http://loinc.org","code": "6298-4","display": "Potassium"}]},"subject": {"reference": "Patient/f25a8f0c-3473-4deb-8917-45d967263a1e"},"valueQuantity": {"value": 3.8,"system": "http://unitsofmeasure.org","code": "mmol/L"}},"search": {"mode": "match"}}]}
Error Code | Description |
400 Bad Request | The search parameter format is incorrect, or the numeric/unit expression is invalid. |
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. |
フィードバック