The client is described by industry and scale, without a name. KPI figures are targets agreed with the client after a baseline measurement.
In brief
- Problem
- Exchange of medical records with the P1 platform runs with errors, and results from external laboratories arrive in different formats.
- Approach
- An integration bus based on HL7 FHIR that handles exchange with P1 (electronic medical records, e-referrals), laboratories, and internal systems.
- Goal
- Lost or duplicated messages: 0 in resilience tests; Service availability: ≥ 99.9% per month.
Client context
Medical facilities in Poland operate within the ecosystem of the P1 platform (e-prescriptions, e-referrals, electronic medical records), which dictates integration and testing standards. The client is a multi-specialty hospital with an HIS, a laboratory system, PACS, and several line-of-business systems.
Challenge
Exchange of medical records with the P1 platform runs with errors, and results from external laboratories arrive in different formats. Doctors look for data in several systems.
Requirements and constraints
- The Polish Act on the Healthcare Information System regulates electronic medical records, data exchange with the P1 platform (e-prescriptions, e-referrals, electronic medical records), and the rules for accessing patient data. Integrations must be certified and tested in the CeZ (Center for Health Information Systems) integration environment. (source)
- GDPR, i.e. Regulation (EU) 2016/679, requires data minimization, a legal basis for processing, processing agreements, and, for high-risk processing, a data protection impact assessment (DPIA). In practice it rules out copying production data into test environments without anonymization or pseudonymization. (source)
- NIS2, i.e. Directive (EU) 2022/2555, and the amendment to the Polish National Cybersecurity System Act (KSC) require essential and important entities to implement cybersecurity risk management measures and supply chain security, and to report incidents within short deadlines (an early warning within 24 hours). Management is personally liable, so documentation of decisions is part of the product. (source)
- The Polish National Cybersecurity System Act (KSC) defines the obligations of operators of essential services, including incident handling, cooperation with CSIRTs, and security audits every two years. The project must provide for an incident reporting procedure and audit trails. (source)
- Project constraints: work only on anonymized or synthetic data outside production, access to systems through the client's infrastructure, and every deliverable shipped with documentation the client's team can take over.
Approach and architecture
We use the strangler fig pattern: new APIs gradually take over traffic from the old ESB, and an anti-corruption layer translates the old data model into the new one. This way the migration happens piece by piece, with no big bang, and every step is reversible. Contract tests (consumer-driven) make sure a change on one side does not break the other.
An integration bus based on HL7 FHIR that handles exchange with P1 (electronic medical records, e-referrals), laboratories, and internal systems. Every message is monitored, and errors go to a queue with the cause attached.
Key elements of the solution:
- An integration bus with an HL7 FHIR profile
- Exchange with P1: electronic medical records, e-referrals
- Integration with external laboratories
- Message monitoring and an error queue
Team and roles
| Role | Count | Responsibility |
|---|---|---|
| Solution architect | 1 | target architecture, ADR decisions, technical reviews |
| Integration engineer | 2 | API contracts, Kafka, ESB, contract tests |
| Backend developer (Java/Kotlin) | 1 | domain services, API, unit tests |
| Test analyst (ISTQB) | 1 | designing and executing test cases, reporting defects |
| Product owner and domain experts (client side) | as needed | priorities, business decisions, acceptance |
Phased schedule
| Phase | Weeks | Deliverable |
|---|---|---|
| 1. Integration inventory | 1–4 | flow map, interface catalog |
| 2. Contract and platform design | 5–9 | API specifications, schema registry |
| 3. Build and incremental migration | 10–19 | new interfaces, traffic switchovers |
| 4. Contract and resilience testing | 20–23 | contract tests, failure scenarios |
| 5. Retiring old connections | 24–24 | decommissioning plan, documentation |
Technology stack
HAPI FHIR, Mirth Connect or another bus, Java, PostgreSQL, Grafana.
Risks and how we mitigate them
| Risk | How we mitigate it |
|---|---|
| A large number of integrations with unclear owners | an integration catalog with owners, contract tests, prioritization by criticality |
| Processing of especially sensitive data | DPIA before the start, pseudonymization, role-based access, read logging |
| Dependence on an external vendor and its deadlines | early agreement on API contracts, a stub environment, a weekly dependency review |
Measurable goals and KPIs
The values below are targets that we set with the client after a baseline measurement in the first phase.
| KPI | Target | How it is measured |
|---|---|---|
| Lost or duplicated messages | 0 in resilience tests | chaos tests, event reconciliation |
| Service availability | ≥ 99.9% per month | synthetic monitoring, SLO |
| Share of records meeting quality rules | ≥ 98% in critical tables | data quality tests |
Lessons learned and good practices
An error queue with the cause attached cuts integration troubleshooting from days to hours. The FHIR standard makes it easier to add further partners. Idempotency on the consumer side is cheaper than an exactly-once delivery guarantee.
Why B2B.net
We combine two models: we provide individual specialists and entire teams (time and materials, team leasing), and when a client prefers to hand over responsibility for the outcome, we work at a fixed price for a defined scope. We have access to a large network of engineers in six cities, SAP Center of Expertise competencies, and experience with ISO 27001, DORA, and NIS2 requirements. If someone leaves the team, a replacement is in place within 5 business days.
Acceptance criteria
Each phase ends with formal acceptance against criteria agreed at the start. In this engagement, acceptance covers: flow map, interface catalog; API specifications, schema registry; new interfaces, traffic switchovers; contract tests, failure scenarios; decommissioning plan, documentation. Final acceptance requires a KPI measurement report against the baseline, complete documentation handed over to the client's team, and a list of recommendations for the next stage, with a cost and risk assessment for each.
Next step
If you recognize these problems in your organization, let's start with a short diagnosis: one workshop with your team and written recommendations. Write to us at office@b2bnetwork.pl.
What would this look like for you?
Book a 30-minute call. We will prepare a plan for the first weeks and a team matched to your system.
Let's talkB2Bnetwork · B2B.net S.A. · accredited exam center. We describe clients by industry and scale, without names.