Planned Data in Healthcare

A microservice platform for coordinating patient care across organisations and providers, built on FHIR R5 standards in a Swedish healthcare context.

Project Architecture Knowledge graph Partners Document Presentations Contact Disclaimers

Project

PDHC - Patient in the centre

PDHC — Planned Data in Healthcare — is a software platform built to support the coordination of patient care across organisations and providers in a Swedish healthcare context. A Vinnova-funded (2023–2028) public–private collaboration, the project demonstrates solutions that support the transition of healthcare from intervention-based care to continuous health management along the patient trajectory.

The central premise is straightforward: healthcare involves multiple parties — patients, clinicians, care providers, administrative staff — and the data that flows between them must be structured, secure, and standards-compliant. PDHC addresses this by decomposing the problem into discrete microservices that communicate through well-defined APIs, all grounded in the FHIR R5 specification, the most current version of the international standard for health data exchange.

The project is based on preplanning data around locally developed healthcare processes. Once a workflow is defined, data collection can be fully structured and reused across EMRs, quality registries, and clinical research protocols. A better information service layer promotes interprofessional interoperability and patient participation.

Background

Semantic interoperability enables healthcare systems to share and understand data consistently, ensuring information keeps its meaning across settings. This is essential for outcomes-driven services, where accurate, comparable data is required to measure results, improve care quality, and drive evidence-based decisions. It is a foundation in the drive for personalised and precision medicine.

Mind map of the semantic model: a transaction resolves at term level into how/what, who and by whom, and at sequence level into sequence and state.
A depiction of the semantic model where relations between transactions are carried by the connection to a careplan

Subprojects

Subproject 1 — Specialty-Level Healthcare

Concomitant processes for collecting the correct information for better clinical management, EMR documentation, reporting to quality registries, and clinically embedded observational research. More than 800 patients have participated. Partners: Region Västra Götaland, Swedish Airway Quality Registry, Cambio, Karolinska Institutet.

Subproject 2 — Rare Diseases

Distributed support for patients with rare diseases. Standard information models for self-management support in rare diseases enable assistance for correct disease management across national borders. A forceful application of semantic interoperability standards simplifies real-time support and quality control. Partners: SOBI/FLORI, Karolinska Institutet.

Subproject 3 — Patient Self-Monitoring

Patient self-monitoring is highly desired by patients and providers. Current legislation and technical shortcomings have resulted in widespread development of monolithic solutions. While excellent within a single diagnosis and data stream, they become expensive and difficult to maintain. This subproject aims at understanding general requirements and real-world testing of interoperable solutions. Partners: Region Uppsala, Medituner AB, Cambio, Astma Allergi Förbundet.

Subproject 4 — Datadriven priority setting

Datadriven priority setting for health service provision in primary care has been developed as an alternative to standard timing for revisits in chronic care population based on national guidelines. Instead, each patient is offered services based on known information (including lack of data) where priority is determined by the distance from national guidelines. Partners: Gustavsbergs vårdcentral, Karolinska Institutet.

Design Principles

Common to all activities are the following:

Local Planning Tools

Planning of care must be done with locally available tools

Real-time Feedback

Preplanning of data allows for real-time principles in feedback

Avoid Post-organisation

Avoid post-organisation of data due to costs and risk of errors

Standards First

Built on FHIR R5, with compatibility for OpenEHR, SNOMED CT, LOINC, and OMOP

Security by Design

OAuth 2.0 with PKCE, JWT tokens, audit trails, and rate limiting built into every service

Test Discipline

Every deployment step has corresponding tests — no step advances if its tests fail

Architecture & Services

The platform consists of eleven microservices, seven actively developed and four defined as stubs awaiting future implementation. All services are written in Python using Flask, persist data in PostgreSQL, and run inside Docker containers. The platform is deployed on a Mac Mini server behind nginx, with SSL termination at the reverse proxy layer.

PDHC Platform Architecture

Click to enlarge

Active Services

SSO.pdhc
Active

Authentication and authorisation service. Issues JWT tokens, manages user identities (patients, professionals, superusers), and handles organisation memberships. Implements OAuth 2.0 with PKCE and OIDC-compliant endpoints.

Plan.pdhc
Active

Care plan definition builder. Clinicians define reusable PlanDefinition templates composed of medical concepts, value sets, goals, and activities. Includes a web-based builder with live FHIR JSON preview and SNOMED CT / LOINC terminology support. Also serves the questionnaire API: question definitions become FHIR R5 Questionnaire resources with a draft / active / retired lifecycle, versioned so a form becomes immutable once patient responses exist.

Request.pdhc
Active

Patient records and care plan execution. Manages FHIR Patient resources, provides care plan readout with filtering and CSV export, and dispatches care plans to providers with receipt tracking.

Provider.pdhc
Active

Care provider portal. Providers authenticate via API key, receive dispatched tasks, acknowledge receipt, and submit structured completion reports. Enforces idempotency and maintains an immutable receipt trail.

IPS.pdhc
Active

International Patient Summaries. Generates standardised FHIR bundles compiling conditions, observations, medications, allergies, immunisations, and procedures into portable documents with delivery tracking.

Contract.pdhc
Active

Healthcare contracts between payers and providers. FHIR R5-compliant contract resources with version tracking, search and filter capabilities, and a web-based administration interface.

Onboard.pdhc
Active

Guided two-sided provider onboarding. One shared record with two windows on it while both parties are on the telephone: an SU-admin window and a non-SSO provider window gated by an invite token, a room code spoken on the call, and a liveness check so the room opens only while an admin is hosting. The call ends with a PDHC-minted access token rather than one the provider generated.

Gateway.pdhc
Active

Provider dispatch gateway. Issues HMAC-signed grants, pushes care-plan reports to external providers, and ingests receipts with a full audit trail. Enforces PAT validation and per-contract scope checks on every request.

CDR.pdhc
Active

Clinical Data Repository. Stores normalised FHIR R5 resources aggregated across services with pgvector-backed semantic search for cross-plan queries. Analysis-phase gated.

Rosetta.pdhc
Active

Code-system translation service. Maps between SNOMED CT, LOINC, ICD-10 and internal vocabularies using versioned FHIR ConceptMap resources. Used by every service that needs to exchange coded data.

Termbank.pdhc
Active

Bulk canonical terminology store. Imports and serves upstream vocabularies as-is — Socialstyrelsen termbank, LOINC, ICD-10/11, ATC and the SNOMED CT SE subset. Read-only over HTTP; mutations happen through the import CLI. It is the source of canonical URIs for the curated working set in Plan and for every service that stores clinical data.

Dashboard.pdhc
Active

Operational analytics dashboard. Aggregates dispatch, provider delivery, and report ingestion metrics across organisations with role-scoped views (SU admin vs. analysis-phase professional).

Analyse.pdhc
Active

The population and federated-events half of the platform, in its own service. Hosts the researcher and cohort engine, fans reads out across the clinical data repositories and merges the results. Gated on the analysis phase rather than care delivery, and every result passes a k-anonymity floor before it is shown.

CGM.pdhc
Active

Continuous glucose monitoring integration. Receives device reports from CGM providers via API-key auth and normalises them into FHIR Observation resources for the wider care-plan pipeline.

1177.pdhc
Active

Integration with Sweden's 1177 patient portal. Handles inbound questionnaire-response webhooks and outbound form delivery, bridging 1177 submissions into FHIR QuestionnaireResponse resources.

Current knowledge graph describing the platform. Each node is a service and each edge an outbound call found in the source, so the picture is generated from the code rather than maintained by hand.

Partners

The PDHC project is the result of collaboration between several organizations in healthcare, academic institutions, and industry.

Document

About the Platform

The platform implements a comprehensive healthcare workflow management system built on FHIR R5 standards. It enables semantic interoperability across healthcare systems, supporting structured data collection that can be reused across EMRs, quality registries, and clinical research protocols. The system includes role-based access control, API key management, and comprehensive documentation.

Comprehensive documentation is available for download below. All documents are provided as direct downloads and do not require login or API key access.

Presentations

Presentations and demonstration materials from the project.

Project Presentation

View the main project presentation with overview of features and capabilities.

Contact

Project Lead

Professor Martin Ingvar, MD, PhD

Karolinska Institutet

Martin.ingvar@ki.se

+46 70 484 12 47

Disclaimers

GDPR Compliance

All data handling follows GDPR (General Data Protection Regulation) standards and regulations. Personal data is handled in accordance with applicable data protection legislation.

Important Information

This platform is under active development and is intended for development and testing purposes.

Terms of Use

  • The platform may only be used for development and testing purposes
  • No sensitive patient data should be handled in the current version
  • Users are responsible for complying with applicable data protection regulations (GDPR)
  • The platform is provided "as is" without warranties

Data Protection

All data handling follows GDPR regulations. For more information about how we handle personal data or to exercise your rights under GDPR, please contact the project team.