idstringrequired
The resource ID
>= 1
Example:123
The Read AllergyIntolerance method allows you to retrieve a specific allergy record by its unique ID. This is useful when verifying known allergies for a patient before prescribing medication or updating clinical records.
GET /fhir/R4/AllergyIntolerance/{id}
Authorization: Bearer {access\_token}
Accept: application/fhir+json
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The unique identifier of the allergy record. |
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class AllergyIntoleranceSearch {
public static void main(String[] args) throws Exception {
String apiUrl = "https://api.healthgorilla.com/fhir/R4/AllergyIntolerance?patient=67890&clinicalStatus=active";
URL url = new URL(apiUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Authorization", "Bearer your_access_token");
conn.setRequestProperty("Accept", "application/fhir+json");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
}
}
{
"resourceType": "Bundle",
"type": "searchset",
"entry": [
{
"resource": {
"resourceType": "AllergyIntolerance",
"id": "12345",
"clinicalStatus": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"code": "active",
"display": "Active"
}]
},
"category": ["medication"],
"code": {
"coding": [{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "2670",
"display": "Penicillin"
}]
},
"patient": {
"reference": "Patient/67890"
},
"recordedDate": "2024-02-18T12:00:00Z"
}
}
]
}
The resource ID
>= 1
Example:123
Success
A FHIR resource
curl --request GET \
--url http://localhost:8080/fhir/R4/AllergyIntolerance/123 \
--header 'Accept: application/fhir+json, application/fhir+xml' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/fhir+json'{}