[{"data":1,"prerenderedAt":899},["ShallowReactive",2],{"home":3,"article-\u002Fblog\u002Farchitecting-care-pathway-digitization-software":323},{"id":4,"title":5,"articleCta":6,"capabilities":11,"capabilitiesSectionText":52,"capabilitiesSectionTitle":53,"closing":54,"contact":59,"engagements":71,"engagementsSectionText":106,"engagementsSectionTitle":107,"extension":108,"faq":109,"footer":147,"founder":152,"getStartedSectionTitle":167,"getStartedSteps":168,"heroCtaButton":181,"heroKicker":182,"heroPoints":183,"introSectionText":187,"introSectionTitle":188,"meta":189,"microcopy":190,"navbar":206,"processSectionText":229,"processSectionTitle":230,"processSteps":231,"qualifier":248,"services":267,"servicesSectionText":290,"servicesSectionTitle":291,"stem":292,"trustBar":293,"whyUs":300,"whyUsSectionTitle":321,"__hash__":322},"home\u002Fhome.yaml","AI Automation, Agents & Software Architecture Consultancy",{"kicker":7,"title":8,"primary":9,"secondary":10},"Working on something like this?","A 30-minute call tells us both whether we can help.","Book a discovery call","More field notes",[12,16,20,24,28,32,36,40,44,48],{"title":13,"icon":14,"description":15},"Custom Software, Built Around Your Workflow","code","One-size-fits-all fits nobody in particular. We design and ship software that matches the way your team operates, not the way a generic product wants you to.",{"title":17,"icon":18,"description":19},"AI Automation & Agentic Workflows","workflow","n8n orchestrations, LangGraph agents, and RAG pipelines that quietly handle the repetitive work in the background. Fewer tickets, fewer copy-paste jobs, more throughput.",{"title":21,"icon":22,"description":23},"MCP Integrations for AI-Ready Tools","plug","We build Model Context Protocol servers that expose your internal systems to Claude, ChatGPT, and Copilot, so your team can use AI safely against the data that matters.",{"title":25,"icon":26,"description":27},"ERP, CRM & Data Integrations","database","We wire up the systems that should have been talking years ago. Clean data flows between ERP, CRM, and operational tools, plus dashboards that turn it into decisions.",{"title":29,"icon":30,"description":31},"Full-Stack Engineering","layers","Frontend, backend, databases, APIs: we cover the whole build in Vue, React, Node, Python, PostgreSQL, Redis and MongoDB. One team owning the stack top-to-bottom means fewer seams for bugs to hide in.",{"title":33,"icon":34,"description":35},"Cloud, Platform Engineering & DevOps","cloud","AWS, Azure, GCP. Kubernetes, Terraform, CI\u002FCD pipelines, infrastructure as code. We build the platform your app runs on so deploys are boring, environments are reproducible, and on-call isn't a horror story.",{"title":37,"icon":38,"description":39},"Security, SecOps & Compliance","shield","Security built in from day one, not bolted on before the audit. Threat modelling, least-privilege access, secret management, dependency hygiene, and the paper trail to prove it. Comfortable working under HIPAA, SOC 2, and enterprise security review.",{"title":41,"icon":42,"description":43},"Architecture & System Design","network","Monolith, microservices, event-driven or serverless: we pick the shape that matches your scale, your team, and your budget, not the one that looks impressive in a talk. Clear boundaries, clean contracts, documentation a human can read.",{"title":45,"icon":46,"description":47},"Industry Experience That Transfers","building","Healthcare (HIPAA, HL7, FHIR), insurance, fintech, logistics, SaaS. Different industries share the same underlying problems, and the patterns that solve them carry over.",{"title":49,"icon":50,"description":51},"The Idea You Haven't Built Yet","lightbulb","Got a weird integration, a backlog of 'we should automate this', or a product idea that no vendor covers? Tell us about it. The interesting work tends to start with a messy whiteboard.","When the SaaS subscriptions stop adding up and the spreadsheets start creaking, it's time for something built around how your business works. Here's where we come in.","When Off-the-Shelf Software Stops Fitting",{"kicker":55,"title":56,"accent":57,"tagline":58},"Next step","Bring the problem.","We'll bring the architecture.","Software architecture and AI automation consultancy, led by a senior architect.",{"title":60,"description":61,"form":62},"Let's Talk About the Work You'd Rather Not Do Manually.","Tell us what's slow, brittle, or eating your team's week. We'll tell you whether automation, an AI agent, or a proper architecture rethink is the right call, and what it would take.",{"title":63,"description":64,"namePlaceholder":65,"emailPlaceholder":66,"messagePlaceholder":67,"submitButton":68,"errorMessage":69,"thankYouMessage":70},"Get in Touch","Tell us about your project or pain points.","Your Name","Your Email","How can we help?","Let's Talk","Oops! Something went wrong. Please try again later, or email us at","Thank you! We'll be in touch shortly.",[72,78,83,91,96,101],{"title":73,"featured":74,"bestFor":75,"description":76,"price":77},"Discovery Sprint",true,"Best for: teams with a fuzzy problem and a real deadline.","A focused one-to-two week engagement to turn a vague brief into a concrete plan. You walk away with an architecture recommendation, a costed roadmap, and a clear go\u002Fno-go.","Fixed fee · scoped up front",{"title":79,"bestFor":80,"description":81,"price":82},"Architecture Review","Best for: existing systems, vendor proposals, or pre-build sanity checks.","We review your codebase, infrastructure, or an incoming quote and give you a plain-English report: what's solid, what's risky, what to fix first, and what it'll cost.","Fixed fee · 1–2 weeks",{"title":84,"bestFor":85,"description":86,"price":87,"link":88},"System & Architecture Audit","Best for: due diligence, pre-acquisition, or deep technical forensics across a product suite.","An independent review of architecture, codebase, CI\u002FCD, security posture and cloud readiness. Delivered as a written report for executive stakeholders: technical risks, modernization gaps and prioritized recommendations, backed by evidence.","Fixed fee · 1–4 weeks",{"label":89,"url":90},"Audit process and deliverables","\u002Fservices\u002Fsoftware-architecture-audit",{"title":92,"bestFor":93,"description":94,"price":95},"Fractional Architect Retainer","Best for: founders and SMEs without a full-time technical lead.","Ongoing senior technical leadership on a monthly retainer. You get a CTO-level adviser on call for hiring, architecture, vendor calls, and the decisions that are expensive to get wrong.","Monthly retainer · flexible scope",{"title":97,"bestFor":98,"description":99,"price":100},"Fixed-Scope Build","Best for: automations, integrations, and well-defined features.","You know what you need. We scope it, quote it, and ship it in four to twelve weeks, with working software demoed every fortnight.","Fixed quote after discovery",{"title":102,"bestFor":103,"description":104,"price":105},"Ongoing Delivery Partner","Best for: longer builds and teams that want a steady senior partner.","A small, senior pod working alongside your team on a rolling basis. Great for modernization, platform work, and anything that needs architectural consistency over months, not weeks.","Monthly · capped effort","Pick the engagement shape that fits the problem. We'll tell you which one you probably need.","Ways to Work With Us","yaml",{"title":110,"subtitle":111,"cta":112,"questions":113},"Frequently Asked Questions","The questions we hear most often on discovery calls.","Still have questions? Email us at",[114,117,120,123,126,129,132,135,138,141,144],{"question":115,"answer":116},"What does Innovi Pro do?","We're a small software consultancy. Two things we do well: help you make the big technical decisions (architecture, stack, vendors, scaling), and build the software and automations that come out of those decisions. Think senior engineering partner rather than body-shop agency.",{"question":118,"answer":119},"Who do you work with?","Founders and SMEs who've outgrown spreadsheets and SaaS duct tape, scale-ups that need a senior hand on the architecture, and established companies that want to modernize operations without a year-long transformation project. Industry-wise we've shipped work in healthcare, insurance, fintech, logistics, and SaaS.",{"question":121,"answer":122},"How is this different from hiring an agency or a dev shop?","You talk to the people doing the work. No layered account managers, no pitch-deck team handing you off to juniors. Engagements are led by a senior software architect, delivered by a small trusted network, and sized to the outcome — not to fill a bench.",{"question":124,"answer":125},"Do you only do AI work?","No. AI and automation are a big part of what we do because that's where most of the quick wins are right now, but the core of the business is solid software architecture and custom development. Sometimes the best answer is a better database schema, not an AI agent.",{"question":127,"answer":128},"How do engagements typically start?","With a short discovery call: no deck, no hard sell. We want to understand what is slow, brittle, or blocked. From there you get one of three things: a fixed-scope project proposal, a retainer for ongoing architectural guidance, or an honest 'you don't need us for this' and a pointer in the right direction.",{"question":130,"answer":131},"How much does a project cost?","It depends on scope and on how involved you want us to be. Discovery sprints, reviews and audits are fixed-fee and scoped up front. Builds get a fixed quote once discovery has defined them. Advisory and delivery partnerships run on a monthly retainer. Every proposal lists the deliverables, what is out of scope and how each deliverable will be accepted. We'd rather quote accurately than quote fast.",{"question":133,"answer":134},"How quickly can you start?","Discovery calls usually happen within the week. For smaller automation or advisory work we can often start within two weeks. Larger builds are planned around your timeline and ours. We deliberately keep the active client list small so the people you meet are the ones actually doing the work.",{"question":136,"answer":137},"Will you work with our existing team and tools?","Almost always, yes. Most of our work augments an in-house team rather than replacing it. We adapt to your stack, your processes, and your codebase; we're not here to rewrite everything in our favorite framework.",{"question":139,"answer":140},"What about security, compliance, and data protection?","Taken seriously by default. We've worked under HIPAA in healthcare and inside the security expectations of large regulated enterprises. NDAs are standard, data stays where it should, and we're comfortable operating in environments where audit trails and access control aren't optional.",{"question":142,"answer":143},"Do you have a preferred automation platform?","We use n8n heavily because it provides the right balance of power and transparency for most business automation. That said, we're not religious about tools. If a project is better served by a custom workflow engine, a LangGraph agent, or even plain code, that's what we'll recommend.",{"question":145,"answer":146},"We're not sure what we need yet. Is it too early to talk?","That's the best time to talk. A 30-minute call before you commit to a direction tends to save months of rebuilding later. Bring the problem, not a spec, and we'll help you figure out the shape of the solution.",{"title":148,"address":149,"email":150,"copyright":151},"Innovi Pro","Cluj-Napoca, Romania","contact@innovi.pro","© 2025 Innovi Pro. All rights reserved.",{"kicker":153,"name":154,"role":155,"photoAlt":156,"bio":157,"tags":160},"The architect behind Innovi Pro","Mihai Farcas","Lead Software Architect","Mihai Farcas, Lead Software Architect at Innovi Pro",[158,159],"I help teams across industries design and deliver custom software that is secure, scalable, and built around real operational needs. My work combines **architecture consulting** with hands-on delivery through a trusted network of engineers, so you can ship without hiring a full team first.","Our in-house platforms include [Innovi Care](https:\u002F\u002Finnovi.care) for clinical workflows and [RetroAgile](https:\u002F\u002Fretroagile.com) for AI coding agent telemetry, and I write about the engineering behind this work on [mihai.ltd](https:\u002F\u002Fmihai.ltd\u002Fblog) and on the [Innovi Pro blog](\u002Fblog).",[161,162,163,164,165,166],"Software architecture","Agentic AI","n8n","MCP","Kubernetes","Healthcare IT","Get Started In 4 Easy Steps",[169,172,175,178],{"title":170,"description":171},"Reach Out","Email us or fill out the contact form describing your project requirements.",{"title":173,"description":174},"Discovery Call","We'll schedule a discovery call to discuss your vision and goals.",{"title":176,"description":177},"Get a Quote","Get a tailored proposal outlining the recommended solutions, timeline, and cost.",{"title":179,"description":180},"We Start Building","Once you're ready, we kick off the development process and keep you updated every step of the way.","See How We Can Help","Software architecture · AI automation · Cluj-Napoca",[184,185,186],"Led by a senior software architect","Production n8n & agentic AI systems","HIPAA, HL7 and FHIR experience","We build the AI agents, n8n workflows, and MCP integrations that take the repetitive, unglamorous work off your team, so people spend their time on the parts of the job that need a human.","AI Automation Built Around [Your Business.]",{},{"primaryCta":9,"stackTitle":191,"scorecardLink":192,"partnerBadge":193,"qualifierCta":196,"ideaCta":197,"featuredEngagement":198,"engagementsHelp":199,"engagementsHelpLink":200,"whyUsCard":201,"formNote":205},"The stack we ship on","The method",{"kicker":194,"label":195},"Production stack","n8n automation","Sounds like us? Let's talk","Tell us about it","Typical first step","Not sure which one fits?","Book a call and we'll tell you.",{"kicker":202,"title":203,"cta":204},"Start here","A 30-minute call. No deck, no hard sell.","Book it","NDAs are standard. Your message goes straight to the architect.",{"items":207},[208,211,214,217,220,223,226],{"title":209,"url":210},"Services","\u002F#services",{"title":212,"url":213},"Capabilities","\u002F#capabilities",{"title":215,"url":216},"Process","\u002F#process",{"title":218,"url":219},"Engagements","\u002F#engagements",{"title":221,"url":222},"Why Us","\u002F#why-us",{"title":224,"url":225},"Blog","\u002Fblog",{"title":227,"url":228},"Book a Call","\u002F#contact","No mystery, no 40-page Statements of Work. Here is what working with us looks like.","How We Work",[232,236,240,244],{"title":233,"meta":234,"description":235},"1. Discovery Call","30 min · free","A 30-minute conversation. You describe what's slow, broken, or blocking. We ask the awkward questions. No deck, no pitch, no obligation. If we're not the right fit, we'll say so and point you at someone who is, when we know one.",{"title":237,"meta":238,"description":239},"2. Architecture & Scoping","1–2 weeks · fixed fee","A short, paid deep-dive of one to two weeks. You get a written architecture recommendation, a risk list, and a costed roadmap. This alone is often the most valuable thing clients buy from us.",{"title":241,"meta":242,"description":243},"3. Build, Automate, Integrate","2-week cycles","Delivered in short, visible iterations: two-week cycles with working software at the end of each. We work in the open: shared backlog, shared repo, direct access to the engineers.",{"title":245,"meta":246,"description":247},"4. Handover & Keep-The-Lights-On","Optional retainer","You get clean code, documentation a human can read, and a team that's trained to own it. We stick around on a light retainer if you want ongoing architectural guidance, or step fully out. Your call.",{"title":249,"subtitle":250,"items":251},"Is this you?","Most of our best engagements start with one of these.",[252,255,258,261,264],{"title":253,"description":254},"Your SaaS stack has quietly become a spreadsheet with extra steps.","Ten tools, three of them half-used, and the real process still lives in someone's inbox. You need software that fits the way your team works.",{"title":256,"description":257},"You inherited a codebase and you're not sure if it's salvageable.","Maybe a previous agency, maybe a co-founder who left. You need a clear-eyed second opinion before you put another cent into it.",{"title":259,"description":260},"Your team spends half its week on work a computer should be doing.","Invoicing, triage, copy-pasting between systems, answering the same five questions. You're ready to automate but want it done properly, not with a fragile chain of scripts.",{"title":262,"description":263},"You're about to commit to a 6-figure build and want a second pair of eyes.","An independent architecture review before you sign. Vendor quotes decoded into plain English. A roadmap you can follow.",{"title":265,"description":266},"You know AI should be helping, but you don't know where to start.","Not another chatbot demo: automations and agents plugged into the systems you already run, with straight advice about what is worth doing and what is hype.",[268,280],{"title":269,"description":270,"icon":271,"deliverables":272,"link":278},"Software Architecture & Technical Consultancy","A senior architect in your corner, without the full-time headcount. Independent system and architecture audits, technical due diligence, vendor code reviews, cloud and container readiness assessments, and costed modernization roadmaps. We produce written, data-driven reports executives can act on and engineers actually respect. Especially useful before acquisitions, major rebuilds, or any six-figure technical decision.","architect",[273,274,275,276,277],"Architecture and system audits","Technical due diligence","Vendor code reviews","Cloud and container readiness","Costed modernization roadmaps",{"label":279,"url":90},"How the architecture audit works",{"title":281,"description":282,"icon":283,"deliverables":284},"AI Automation, Agents & n8n Workflows","Production-grade automation, not demo-ware. We design n8n workflows, build custom agentic AI with LangGraph, and ship MCP servers that plug your internal tools straight into Claude, ChatGPT, and Copilot. Autonomous agents for support, invoicing, and back-office ops. Clean integrations between ERP, CRM, and AI that keep working on a Monday morning.","automation",[285,286,287,288,289],"n8n workflows","LangGraph agents","MCP servers for Claude, ChatGPT and Copilot","Support, invoicing and back-office agents","ERP and CRM integrations","Two ways to work with us: strategic consultancy when the decisions are expensive, and hands-on delivery when it's time to build. Often both.","What We Do","home",{"title":294,"items":295},"Senior experience you can reach directly.",[296,297,298,299],"10+ years shipping enterprise software","Experience across healthcare, insurance, fintech & SaaS","Published on DEV, YouTube & industry blogs","HIPAA · HL7 · FHIR experience",[301,305,309,313,317],{"title":302,"icon":303,"description":304},"A Team Led by an Architect","compass","Every engagement is led end-to-end by a senior software architect: the same person on the discovery call, in the design doc, and on the pull requests. No handoff to a junior delivery team, no layer of account managers translating between you and the build.",{"title":306,"icon":307,"description":308},"Deep n8n Expertise, Serious About AI","badge","Extensive production experience in n8n, LangGraph, MCP, and the wider agentic AI stack. We pick the right tool for the job instead of forcing every problem into the same framework.",{"title":310,"icon":311,"description":312},"Enterprise Experience, Startup Pace","gauge","Patterns learned on large-scale enterprise systems, applied at the speed a smaller team needs. Secure, scalable, and not over-engineered.",{"title":314,"icon":315,"description":316},"Small Team, Direct Access","users","You talk to the people doing the work. Decisions happen in hours, not change-request cycles. Lean on purpose, so your budget goes into outcomes instead of overhead.",{"title":318,"icon":319,"description":320},"AI-Accelerated Delivery","sparkles","We use AI to move faster where it helps (code scaffolding, research, testing) and keep humans in charge of the parts that matter. You get more software, sooner, without the usual quality trade-off.","Why Teams Work With Us","Dj-EZ3igbQlCjTsv6YkDyLv7krQIvbbjYK568UeDaTE",{"id":324,"title":325,"author":148,"body":326,"canonical":880,"date":881,"description":882,"extension":883,"image":884,"imageAlt":884,"imageFallback":884,"meta":885,"navigation":74,"ogImage":884,"path":886,"published":74,"readingTime":887,"seo":888,"stem":889,"tags":890,"twitterCard":884,"type":897,"__hash__":898},"blog\u002Fblog\u002Farchitecting-care-pathway-digitization-software.md","Architecting Care Pathway Digitization Software on FHIR R5 and PostgreSQL",{"type":327,"value":328,"toc":869},"minimark",[329,333,357,366,371,374,381,513,522,526,529,541,594,613,617,620,625,632,661,668,672,675,686,689,750,753,757,760,779,794,798,801,804,830,844,848,851,865],[330,331,325],"h1",{"id":332},"architecting-care-pathway-digitization-software-on-fhir-r5-and-postgresql",[334,335,336,337,344,345,350,351,356],"p",{},"Most clinical software projects start with an application-specific relational schema, a set of hand-written REST endpoints for appointments and notes, and a promise to add standards-based interoperability later. Teams usually hit a wall as soon as a clinic needs to connect online booking, pre-visit intake, multidisciplinary encounters, diagnostic results, and between-visit home plans into one longitudinal record, because every new module invents its own identifiers, authorization checks, and export scripts. In this article we lay out the technical architecture we built for ",[338,339,343],"a",{"href":340,"rel":341},"https:\u002F\u002Finnovi.care",[342],"nofollow","Innovi Care"," on PostgreSQL 18, ",[338,346,349],{"href":347,"rel":348},"https:\u002F\u002Fhl7.org\u002Ffhir\u002FR5\u002F",[342],"HL7 FHIR R5",", and ",[338,352,355],{"href":353,"rel":354},"https:\u002F\u002Fmihailtd.github.io\u002Fgraphpg\u002F",[342],"graphpg",", and explain how to design care pathway digitization software that stays fast to build without sacrificing data integrity or portability.",[334,358,359,360,365],{},"Regulatory timelines in Europe make that architectural choice harder to postpone. ",[338,361,364],{"href":362,"rel":363},"https:\u002F\u002Feur-lex.europa.eu\u002Flegal-content\u002FEN\u002FTXT\u002F?uri=CELEX:32025R0327",[342],"Regulation (EU) 2025\u002F327",", which establishes the European Health Data Space (EHDS), begins general application in March 2027, with mandatory cross-border exchange for patient summaries and ePrescriptions starting in 2029 followed by laboratory results, imaging, and discharge reports. Designing the internal data model around open healthcare resources from day one costs far less than translating a bespoke schema into standard clinical bundles five years later.",[367,368,370],"h2",{"id":369},"what-care-pathway-digitization-means-at-the-data-model-layer","What care pathway digitization means at the data-model layer",[334,372,373],{},"From a software architect's point of view, a care pathway is a state machine linked to a single patient identity across time, locations, and clinical roles. When the pathway breaks, it is usually because the booking table, the questionnaire form store, the clinical note document, and the home exercise app do not share foreign keys or consistent lifecycle states.",[334,375,376,377,380],{},"Modeling the pathway directly on ",[338,378,349],{"href":347,"rel":379},[342]," resources gives each clinical step a clear, standard entity:",[382,383,384,401],"table",{},[385,386,387],"thead",{},[388,389,390,395,398],"tr",{},[391,392,394],"th",{"align":393},"left","Pathway stage",[391,396,397],{"align":393},"Core FHIR R5 resources",[391,399,400],{"align":393},"Operational invariants to enforce",[402,403,404,431,447,469,491],"tbody",{},[388,405,406,410,428],{},[407,408,409],"td",{"align":393},"Practitioner availability & booking",[407,411,412,415,416,415,419,415,422,415,425],{"align":393},[14,413,414],{},"PractitionerRole",", ",[14,417,418],{},"Location",[14,420,421],{},"Schedule",[14,423,424],{},"Slot",[14,426,427],{},"Appointment",[407,429,430],{"align":393},"No overlapping active bookings per practitioner or room; idempotent slot transitions",[388,432,433,436,444],{},[407,434,435],{"align":393},"Pre-visit mobile intake",[407,437,438,415,441],{"align":393},[14,439,440],{},"Questionnaire",[14,442,443],{},"QuestionnaireResponse",[407,445,446],{"align":393},"Versioned form definitions linked to the patient and upcoming appointment",[388,448,449,452,466],{},[407,450,451],{"align":393},"Clinical consultation",[407,453,454,415,457,415,460,415,463],{"align":393},[14,455,456],{},"Encounter",[14,458,459],{},"Procedure",[14,461,462],{},"Observation",[14,464,465],{},"ClinicalImpression",[407,467,468],{"align":393},"Consistent patient-to-encounter ownership; idempotent visit start from arrival",[388,470,471,474,488],{},[407,472,473],{"align":393},"Orders & diagnostic results",[407,475,476,415,479,415,482,415,485],{"align":393},[14,477,478],{},"ServiceRequest",[14,480,481],{},"Specimen",[14,483,484],{},"DiagnosticReport",[14,486,487],{},"Binary",[407,489,490],{"align":393},"Results trace back to originating orders; concurrent note saves do not overwrite newer edits",[388,492,493,496,510],{},[407,494,495],{"align":393},"Home care & longitudinal follow-up",[407,497,498,415,501,415,504,415,507],{"align":393},[14,499,500],{},"CarePlan",[14,502,503],{},"Goal",[14,505,506],{},"Task",[14,508,509],{},"Consent",[407,511,512],{"align":393},"Patient-visible home activities linked to the encounter; revocable per-relationship access",[334,514,515,516,518,519,521],{},"Keeping these resources inside one transactional PostgreSQL database means starting a visit from a booked appointment, recording arrival, creating the ",[14,517,456],{},", and linking follow-up ",[14,520,500],{}," activities happen in atomic database transactions rather than fragile cross-service webhooks.",[367,523,525],{"id":524},"hybrid-postgresql-storage-full-fhir-jsonb-plus-promoted-columns","Hybrid PostgreSQL storage: full FHIR JSONB plus promoted columns",[334,527,528],{},"A common objection to storing FHIR resources directly in a relational database is that pure JSONB queries become slow or messy, while fully normalizing every nested FHIR extension into hundreds of join tables turns simple writes into maintenance nightmares.",[334,530,531,532,535,536,540],{},"The pattern we use in ",[338,533,343],{"href":340,"rel":534},[342],", powered by the open-source ",[338,537,355],{"href":538,"rel":539},"https:\u002F\u002Fgithub.com\u002Fmihailtd\u002Fgraphpg",[342]," library, combines both approaches inside PostgreSQL 18:",[542,543,544,560,588],"ul",{},[545,546,547,551,552,555,556,559],"li",{},[548,549,550],"strong",{},"Full resource payload in JSONB."," Each resource table keeps the complete FHIR R5 resource in a ",[14,553,554],{},"payload"," JSONB column, checked structurally with the ",[14,557,558],{},"pg_jsonschema"," extension.",[545,561,562,565,566,415,569,415,572,415,575,415,578,415,581,584,585,587],{},[548,563,564],{},"Promoted columns for hot queries and constraints."," Fields the application filters, joins, or constrains frequently, such as ",[14,567,568],{},"active",[14,570,571],{},"gender",[14,573,574],{},"birth_date",[14,576,577],{},"practitioner_id",[14,579,580],{},"patient_id",[14,582,583],{},"status",", and time ranges, sit as native typed PostgreSQL columns right next to ",[14,586,554],{},".",[545,589,590,593],{},[548,591,592],{},"Database triggers keep both copies synchronized."," Updates compare old and new values so changing either the promoted column or the JSONB payload updates the other copy, while conflicting edits in the same write roll back immediately.",[334,595,596,597,600,601,604,605,608,609,612],{},"For dates, the application also enforces a clear policy: even though FHIR permits partial dates like ",[14,598,599],{},"YYYY"," or ",[14,602,603],{},"YYYY-MM",", storing a native PostgreSQL ",[14,606,607],{},"DATE"," column normalized to ",[14,610,611],{},"YYYY-MM-DD"," lets age sorting, recall scheduling, and range indexes run cleanly without string-parsing hacks.",[367,614,616],{"id":615},"putting-scheduling-integrity-and-privacy-rules-inside-postgresql","Putting scheduling integrity and privacy rules inside PostgreSQL",[334,618,619],{},"Application middleware is a risky place to enforce clinical invariants, because every new endpoint, background job, or coding agent can accidentally bypass a check that lives only in TypeScript or Python. Moving the two highest-risk rules into PostgreSQL closes that gap across every client.",[621,622,624],"h3",{"id":623},"preventing-double-bookings-with-gist-exclusion-constraints","Preventing double bookings with GiST exclusion constraints",[334,626,627,628,631],{},"In a practice that mixes studio rooms, video consultations, and home visits, two patients can easily submit booking requests for the same window within milliseconds of each other. Instead of relying on a read-then-write check in application code, PostgreSQL's ",[14,629,630],{},"btree_gist"," exclusion constraint rejects overlapping periods atomically:",[633,634,639],"pre",{"className":635,"code":636,"language":637,"meta":638,"style":638},"language-sql shiki shiki-themes github-dark-default","ALTER TABLE appointments ADD CONSTRAINT appointments_practitioner_no_overlap\n  EXCLUDE USING gist (practitioner_id WITH =, period WITH &&)\n  WHERE (status NOT IN ('cancelled', 'entered-in-error', 'noshow'));\n","sql","",[14,640,641,649,655],{"__ignoreMap":638},[642,643,646],"span",{"class":644,"line":645},"line",1,[642,647,648],{},"ALTER TABLE appointments ADD CONSTRAINT appointments_practitioner_no_overlap\n",[642,650,652],{"class":644,"line":651},2,[642,653,654],{},"  EXCLUDE USING gist (practitioner_id WITH =, period WITH &&)\n",[642,656,658],{"class":644,"line":657},3,[642,659,660],{},"  WHERE (status NOT IN ('cancelled', 'entered-in-error', 'noshow'));\n",[334,662,663,664,667],{},"When two requests race for the same slot, PostgreSQL commits the first and raises a constraint violation for the second, which the API maps to a typed ",[14,665,666],{},"SLOT_UNAVAILABLE"," error so the UI can show the next open window cleanly.",[621,669,671],{"id":670},"isolating-clinical-roles-and-consent-with-row-level-security","Isolating clinical roles and consent with Row-Level Security",[334,673,674],{},"A digitized care pathway connects receptionists, several clinical specialties, patients, and delegated family members to the same platform, which makes authorization boundaries critical.",[334,676,677,678,681,682,685],{},"In our portal architecture, an OIDC identity provider (ZITADEL) issues short-lived JWTs carrying the user's organization and subject claims. The web app acts as a backend-for-frontend (BFF) and forwards the signed-in token to the API engine, which verifies the signature and executes every query inside PostgreSQL under the ",[14,679,680],{},"authenticated"," role with ",[14,683,684],{},"request.jwt.claims"," populated.",[334,687,688],{},"Row-Level Security (RLS) policies then govern every table directly:",[542,690,691,719,738,744],{},[545,692,693,696,697,700,701,704,705,708,709,415,712,715,716,587],{},[548,694,695],{},"Signed-out visitors"," only reach explicit public directory projections (",[14,698,699],{},"care_directory"," and moderated ",[14,702,703],{},"practitioner_reviews",") through an ",[14,706,707],{},"anon"," role that has zero select permissions on ",[14,710,711],{},"patients",[14,713,714],{},"encounters",", or ",[14,717,718],{},"clinical_notes",[545,720,721,724,725,728,729,731,732,734,735,587],{},[548,722,723],{},"Patients"," read and update their own ",[14,726,727],{},"Patient"," resource, view their own ",[14,730,500],{}," activities and appointments, and manage access permissions, while profile photos and attachments live as FHIR ",[14,733,487],{}," records scoped by ",[14,736,737],{},"securityContext",[545,739,740,743],{},[548,741,742],{},"Reception staff"," manage schedules and arrivals without reading clinical notes.",[545,745,746,749],{},[548,747,748],{},"Clinicians"," open a patient's chart only when an active care relationship or explicit patient approval exists; confidential notes such as psychotherapy records remain isolated to the treating clinician.",[334,751,752],{},"These database controls support European GDPR access-minimization requirements and HIPAA technical safeguards, though software controls alone never replace an organization's legal, hosting, and operational compliance program.",[367,754,756],{"id":755},"removing-crud-plumbing-without-losing-type-safety","Removing CRUD plumbing without losing type safety",[334,758,759],{},"A FHIR R5 model spanning more than 170 tables normally forces a small engineering team to spend months writing pagination, filtering, nested resolvers, and N+1 query fixes before a clinician ever sees a screen.",[334,761,762,763,766,767,769,770,772,773,775,776,778],{},"Because ",[338,764,355],{"href":353,"rel":765},[342]," introspects the PostgreSQL catalog directly and serves both GraphQL and OpenAPI REST from one compiled SQL query plan, adding a column or table in a Drizzle migration automatically updates the API schema and the generated TypeScript operations. A nested patient timeline fetching ",[14,768,727],{},", recent ",[14,771,456],{}," rows, ",[14,774,462],{}," trends, and active ",[14,777,500],{}," items compiles into one SQL statement using lateral joins instead of dozens of network round trips.",[334,780,781,782,787,788,793],{},"We covered the fast verification loop that pairs with this setup in our write-up on ",[338,783,786],{"href":784,"rel":785},"https:\u002F\u002Finnovi.pro\u002Fblog\u002Fagentic-software-factory-fhir-graphpg",[342],"building FHIR software with graphpg and coding agents",". Running the full migration chain and more than 40 database security and scheduling suites on ",[338,789,792],{"href":790,"rel":791},"https:\u002F\u002Fpglite.dev",[342],"PGlite"," (PostgreSQL compiled to WebAssembly) gives engineers and coding agents feedback in seconds during CI.",[367,795,797],{"id":796},"drawing-an-honest-boundary-for-external-hospital-exchange","Drawing an honest boundary for external hospital exchange",[334,799,800],{},"One architectural mistake we see often in healthcare consulting is trying to make a clinic's internal product database act directly as a hospital-grade HL7 interface engine.",[334,802,803],{},"An internal FHIR R5 PostgreSQL model with JSON Schema checks gives you clean structure, fast UI queries, and straightforward data export. It is not by itself a certified, conformant FHIR server, and HL7 does not endorse it. When a clinic or health system needs live hospital exchange, national switch connectivity, external Laboratory Information System (LIS) result transport, or PACS\u002FDICOMweb archive integration, treat that boundary as a dedicated integration tier:",[542,805,806,818,824],{},[545,807,808,811,812,817],{},[548,809,810],{},"Legacy hospital feeds (HL7 v2 over MLLP, ADT\u002FORM\u002FORU messages):"," Place a dedicated integration engine such as Mirth Connect (or the community-maintained ",[338,813,816],{"href":814,"rel":815},"https:\u002F\u002Fgithub.com\u002Fnextgenhealthcare\u002Fconnect",[342],"Open Integration Engine",") at the perimeter to normalize, route, audit, and retry hospital traffic before mapping into your core database.",[545,819,820,823],{},[548,821,822],{},"Conformant FHIR exchange and EHDS gateways:"," Keep profile validation, national terminology bindings, and audit logging in an explicit exchange adapter rather than leaking regional quirks into every product screen.",[545,825,826,829],{},[548,827,828],{},"AI and automation workflows:"," Keep LLMs and agentic helpers behind typed, read-scoped or propose-only boundaries so an AI step never writes directly to clinical or billing records without deterministic validation and clinician review.",[334,831,832,833,838,839,587],{},"For the business and clinical workflow side of this architecture, see our companion guide on ",[338,834,837],{"href":835,"rel":836},"https:\u002F\u002Finnovi.care\u002Fblog\u002Fcare-pathway-digitization-software",[342],"care pathway digitization software on Innovi Care",". For a first-person look at how ten years across radiology HL7 integrations, enterprise patient portals, and pharma AI shaped these decisions, read Mihai Farcas's essay on ",[338,840,843],{"href":841,"rel":842},"https:\u002F\u002Fmihai.ltd\u002Fblog\u002Ften-years-building-healthcare-software-hl7-fhir-ai\u002F",[342],"mihai.ltd",[367,845,847],{"id":846},"plan-your-healthcare-architecture-with-innovi-pro","Plan your healthcare architecture with Innovi Pro",[334,849,850],{},"If you are building a clinical platform, modernizing a legacy EHR, or preparing a European health product for FHIR and EHDS interoperability, getting the database boundaries right early prevents years of rework.",[334,852,853,854,859,860,864],{},"At Innovi Pro we start with a focused ",[338,855,858],{"href":856,"rel":857},"https:\u002F\u002Finnovi.pro\u002Fservices\u002Fsoftware-architecture-audit",[342],"software architecture audit"," or a fixed-fee one-to-two-week scoping engagement that delivers a written architecture blueprint, security and RLS model, integration risk map, and costed roadmap. ",[338,861,9],{"href":862,"rel":863},"https:\u002F\u002Finnovi.pro\u002F#contact",[342]," to walk through your clinical workflow and technical constraints.",[866,867,868],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":638,"searchDepth":651,"depth":651,"links":870},[871,872,873,877,878,879],{"id":369,"depth":651,"text":370},{"id":524,"depth":651,"text":525},{"id":615,"depth":651,"text":616,"children":874},[875,876],{"id":623,"depth":657,"text":624},{"id":670,"depth":657,"text":671},{"id":755,"depth":651,"text":756},{"id":796,"depth":651,"text":797},{"id":846,"depth":651,"text":847},"https:\u002F\u002Finnovi.pro\u002Fblog\u002Farchitecting-care-pathway-digitization-software","2026-11-19","A technical blueprint for care pathway digitization software: modeling the patient journey on HL7 FHIR R5, enforcing booking and consent rules in PostgreSQL, and drawing clean boundaries for hospital exchange.","md",null,{},"\u002Fblog\u002Farchitecting-care-pathway-digitization-software","8 min",{"title":325,"description":882},"blog\u002Farchitecting-care-pathway-digitization-software",[891,892,893,894,895,355,896],"healthcare software","care pathway digitization","FHIR","PostgreSQL","Row-Level Security","architecture","article","5aDhoWBbsF5dAMtFF2ZgartL8ymruxWRov8jUEmC_Q0",1795072233925]