idstringrequired
The resource ID
>= 1
Example:123
The Delete AllergyIntolerance method allows you to remove an existing allergy or intolerance record for a patient. This is useful when correcting erroneous entries or removing outdated allergy records from a patient’s medical history.
DELETE /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 to delete. |
import java.net.HttpURLConnection;
import java.net.URL;
public class AllergyIntoleranceDelete {
public static void main(String[] args) throws Exception {
String apiUrl = "https://api.healthgorilla.com/fhir/R4/AllergyIntolerance/98765";
URL url = new URL(apiUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("DELETE");
conn.setRequestProperty("Authorization", "Bearer your_access_token");
conn.setRequestProperty("Accept", "application/fhir+json");
int responseCode = conn.getResponseCode();
System.out.println("Response Code: " + responseCode);
}
}
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"details": { "text": "AllergyIntolerance record successfully deleted." }
}
]
}
The resource ID
>= 1
Example:123
Success
A FHIR resource
curl --request DELETE \
--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'{}