# International Patient Summary (IPS) in FHIR

> The IPS sections and LOINC codes, how the FHIR document Bundle is built, a real excerpt generated by the platform, and one call to produce a validated IPS.

Source: https://developers.anpheros.com/guides/international-patient-summary-fhir

**The International Patient Summary (IPS) is a standard, minimal health summary — allergies, medications, problems and, when available, immunizations, results and vital signs — packaged as a FHIR document Bundle so it can be read in any country.** It is defined by the HL7 FHIR [IPS implementation guide](https://hl7.org/fhir/uv/ips/) and used by the European Health Data Space for cross-border care. Anpheros generates an IPS for any patient from their FHIR R4 record with one call, `Patient/{id}/$summary`, and the result validates with 0 errors in the official HL7 validator.

## The sections

<!-- visual:ips-sections -->

## How the document is built

A FHIR IPS is a `Bundle` of type `document`, profiled `Bundle-uv-ips`. Its first entry is a `Composition` (LOINC 60591-5 "Patient summary Document"), whose sections reference the resources that follow in the Bundle: the Patient, the AllergyIntolerance, MedicationStatement, Condition, Immunization and Observation resources, and the author and custodian. Every section carries a generated XHTML narrative, so a person can read the document without software.

This excerpt comes from a real document generated by the platform for a synthetic patient (ids shortened):

```json
{
  "resourceType": "Bundle",
  "type": "document",
  "meta": {"profile": ["http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips"]},
  "entry": [
    {"resource": {
      "resourceType": "Composition",
      "status": "final",
      "type": {"coding": [{"system": "http://loinc.org", "code": "60591-5", "display": "Patient summary Document"}]},
      "title": "International Patient Summary",
      "author": [{"reference": "Device/…", "display": "Anpheros Platform"}],
      "custodian": {"reference": "Organization/…", "display": "Anpheros"},
      "section": [
        {"title": "Allergies", "code": {"coding": [{"system": "http://loinc.org", "code": "48765-2"}]},
         "entry": [{"reference": "AllergyIntolerance/…"}]},
        {"title": "Medications", "code": {"coding": [{"system": "http://loinc.org", "code": "10160-0"}]},
         "entry": [{"reference": "MedicationStatement/…"}]}
      ]
    }},
    {"resource": {"resourceType": "Patient"}},
    {"resource": {"resourceType": "AllergyIntolerance"}},
    {"resource": {"resourceType": "MedicationStatement"}}
  ]
}
```

## Generate one

```bash
curl "https://platform.anpheros.com/fhir/R4/Patient/$PID/\$summary?lang=en" \
  -H "Authorization: Bearer $KEY" -o ips.json
```

- Required sections are never empty: when nothing is recorded, they say so with the IPS absent-or-unknown codes, and an application can write an explicit "no known allergies".
- Resources with invalid codes are left out and reported in a response header, so one bad record does not break the document.
- `?lang=en` or `?lang=ro` sets the language of the narrative.
- A patient outside your access returns `404`.

## Frequently asked questions

### What is an International Patient Summary?
A minimal, specialty-agnostic summary of a person's health — allergies, medications and problems, plus immunizations, results and vital signs when available — standardised by HL7 as a FHIR document so it can be shared across borders.

### Which sections are required in an IPS?
Allergies and intolerances (LOINC 48765-2), medication summary (10160-0) and problem list (11450-4). Immunizations, results and vital signs are recommended.

### How do I generate an IPS from FHIR data?
Collect the patient's resources, build a Composition with the IPS sections and narratives, and package everything as a document Bundle. With Anpheros this is one request: `GET /fhir/R4/Patient/{id}/$summary`.

### Is the Anpheros IPS validated?
Yes. The generated document validates with 0 errors in the official HL7 FHIR validator against the IPS implementation guide.

### What is the IPS used for in Europe?
The European Health Data Space lists the patient summary among the priority categories that must be exchangeable in the European format.

<!-- visual:cta-ips -->

## Related

- [FHIR platform](https://developers.anpheros.com/guides/fhir): `$summary`, `$everything` and the 26 resource types
- [European Health Data Space (EHDS) for developers](https://developers.anpheros.com/guides/ehds-for-developers)
- [Longitudinal patient data API](https://developers.anpheros.com/guides/longitudinal-patient-data-api)
- [Healthcare data interoperability](https://developers.anpheros.com/guides/interoperability)
- [The International Patient Summary, for patients](https://anpheros.com/guides/international-patient-summary)
