Skip to content

Tutorial 1: FHIR Fundamentals

Pages: 2


📖 Page 1: What is FHIR?

What is FHIR?

FHIR = Fast Healthcare Interoperability Resources

Think of it as a common language for healthcare systems: - Hospital A and Hospital B can share patient data easily using standardised format that everyone understands - Standardized format everyone understands

The 5 Resources We Use

📋 Patient      → Patient demographics (name, age, contact)

👨‍⚕️ Practitioner → Doctor/provider info (name, specialty)

🏥 Organization → Hospital/department (name, address)

📅 Appointment  → Scheduled visits (patient + doctor + time)

📝 AuditEvent   → Activity logs (who did what, when)

Simple Example

Patient in FHIR:

{
  "resourceType": "Patient",
  "id": "123",
  "name": [{"family": "Doe", "given": ["John"]}],
  "gender": "male",
  "birthDate": "1990-05-15"
}

That's it! A patient in FHIR format.


📖 Page 2: How Our App Works

Architecture (7 Layers)

User (Browser)
Controller (Receives requests)
Service (Business logic)
DTO (Simple objects)
Mapper (DTO ↔ FHIR)
FHIR Client (HAPI FHIR)
FHIR Server (Stores data)

Complete Flow Example

Creating a patient:

  1. User fills form: firstName: "John", lastName: "Doe"
  2. Controller receives form data
  3. Service calls Mapper
  4. Mapper converts to FHIR Patient
  5. FHIR Client sends to server
  6. Server saves and returns ID
  7. Success message shown to user

Why This Architecture?

  • Separation of concerns - Each layer has one job
  • Easy to test - Test each layer independently
  • Maintainable - Change one part without breaking others
  • Scalable - Add more resources easily

Key Technologies

Layer Technology
View Thymeleaf (HTML templates)
Controller Spring MVC
Service Spring Service
DTO POJOs + Lombok
Mapper Custom Java classes
FHIR Client HAPI FHIR
Server Public FHIR R4 server

✅ You Now Know

  • What is FHIR (healthcare data standard)
  • 5 resources we will be using
  • How our app architecture works
  • Data flow from user to FHIR server

🚀 Next

You understand FHIR! Now let's build the project.

Tutorial 2: Project Setup


💡 Quick Tips

FHIR Versions

We use FHIR R4 (most popular, stable version)

Test Server

We use https://hapi.fhir.org/baseR4 (free, public server)

No Database

We don't manage a database - FHIR server handles storage!