I do not start integration work by asking what the API can return. I start by asking what the business needs to survive when the EHRs disagree. That sounds philosophical until you are two weeks into a rollout and a therapist can see the wrong facility because one system treats site identity as a durable master record and the other treats it like a context field that can drift. Once that happens, every downstream rule looks broken even when your code is technically correct.
The wrong pattern is to build one set of PointClickCare endpoints and one set of MatrixCare endpoints and let the application decide which one to call. That feels fast. It also hardcodes vendor quirks into every downstream feature. The result is a maze of if-else branches, duplicate mappings, and test cases nobody wants to touch. I have seen teams do this because they want to reassure themselves they are being flexible. What they end up with is two integration stacks hidden inside one product.
The canonical model is not an academic artifact. It is the contract that lets your clinicians, support team, and implementation team stop arguing about vendor wording. I want the model to answer a few hard questions cleanly:
- Which patient identity is authoritative for this workflow?
- Which facility identifier is the system of record for routing and permissions?
- How do we represent an assessment when one EHR gives us a structured object and the other gives us a differently nested payload with partial reuse of template logic?
- What happens when a transaction exists in one system but the matching object has not been created in the other yet?
If your canonical layer cannot answer those questions, it is not canonical. It is just a prettier DTO set.
The first thing I lock down is identity and facility mapping. This is where good integrations quietly fail. A lot of teams assume patient matching is the hard problem. It is not. Patient matching is annoying. Facility mapping is what breaks operational trust because it determines where work appears, who can see it, and which chart context the user lands in. In SNF networks, the same operator may access multiple facilities, multiple facility groups, and multiple EHRs inside one workflow. If your mapping is loose, the user sees the right patient in the wrong place, or the wrong patient in the right place, which is worse.
I treat identity as a deliberately layered problem:
- Establish a local master identity Create an internal person record that is independent of vendor keys. Store the vendor identifiers as references, not as the identity itself.
- Map facility context separately Maintain a facility crosswalk with source-system identifiers, display names, active/inactive state, and any routing metadata needed for permissions or task delivery.
- Resolve at the workflow edge Do not force the application to guess. Resolve patient and facility context before you create or read an operational object.
- Handle collisions explicitly If both systems claim a match with different confidence, stop and surface the exception. Silent merge logic is how local data corruption becomes a production incident.
That last point is where teams usually get sentimental. They want the system to be smart enough to infer the correct match. I disagree. In healthcare operations, the cost of a wrong guess is too high. If the mapping engine lacks confidence, it should ask for help or hold the transaction. Clean failure is a feature.
The second hard problem is divergent assessment structure. PointClickCare and MatrixCare both support structured clinical documentation, but they do not shape it the same way. One system may expose a cleaner hierarchy for sections and items, while the other may split a document into a different combination of templates, responses, and metadata. The trap is trying to preserve the vendor shape inside your core model. That makes every downstream consumer learn two dialects.
I normalize assessments into a path-based internal structure. Not because it is elegant on a whiteboard, but because it survives real differences in source format. A path gives me a stable way to represent nested sections, repeating groups, answer codes, timestamps, and signer context. Then I add adapter-specific transformers that do the painful work:
- flatten or rehydrate nested sections
- map source question codes to internal item keys
- preserve provenance so the original source remains traceable
- translate attachment and signature references without losing context
- store unknown fields for round-trip safety when the destination system supports them later
This is another place where I have watched teams get burned by optimism. They assume the assessment payload can be fully standardized on day one. It cannot. The right move is to normalize what your business needs now, preserve the source shape for traceability, and build a safe extension path for the weird stuff you will discover in production.
That philosophy is exactly why the adapter pattern matters. A PointClickCare adapter and a MatrixCare adapter should each do three jobs well: translate inbound payloads into canonical objects, translate canonical commands into vendor-specific requests, and isolate fallback behavior when the vendor behaves badly. I want each adapter to be small enough that one engineer can reason about it without a conference room full of people pretending they still understand the spec.
Here is the pattern I use when I am designing the edge:
- Inbound normalization Parse the source payload, validate required fields, and convert vendor-specific names into canonical entities.
- Canonical validation Run business rules that are independent of the EHR. If the object fails here, do not even try to publish it downstream.
- Outbound translation Convert the canonical object into the exact shape the destination system expects, including vendor-specific code sets and field constraints.
- Response reconciliation Capture the destination response, persist external IDs, and log any field-level degradation so support can trace what happened.
- Replay safety Make every handler idempotent. Duplicate inbound events happen in both systems, and your integration should treat them as routine, not exceptional.
The testing story is where pretend architecture meets reality. You cannot validate this kind of integration in one sandbox and assume the other will behave the same. I have seen PointClickCare sandbox behavior differ from MatrixCare sandbox behavior in the only way that matters: the broken edge case you discovered in one environment was not the same broken edge case in the other. That means your test strategy has to be dual-track from the start.
My baseline test stack has four layers:
- Contract tests Verify that each adapter can ingest and emit the agreed canonical shape.
- Fixture-based tests Use real-world payload patterns, stripped of PHI, to cover assessments, identity merges, inactive facilities, and error responses.
- Sandbox smoke tests Run the same sequence in both PointClickCare and MatrixCare sandboxes to catch permission, field, and workflow differences.
- Operational replay tests Re-run known production scenarios against both adapters whenever mapping logic changes.
The mistake we made early on was testing the happy path too well. The happy path looked excellent. Then a facility was deactivated in one system but still present in another route table, and the integration quietly aimed work at the wrong place. That failure taught us to test lifecycle state, not just create/read/update verbs. Facilities go inactive. Users change roles. Assessments get amended. The integration has to respect those real states, not just the nominal API shape.
For the implementation itself, I prefer a message-oriented design even when the upstream trigger is synchronous. The event can be received synchronously, but the mapping, validation, and destination dispatch should be handled as explicit steps with checkpoints. That gives you retries without duplicate side effects, better observability, and cleaner failure isolation when one vendor endpoint starts behaving strangely.
We also log more than most teams want to log. Not patient content. Process content. Which adapter handled the record, which canonical shape was generated, which destination mapping rule was applied, which external ID was stored, and what failed. That is how you support a live network when someone on the phone says the chart is missing in one EHR and present in the other. Dummy logs do not solve that. Traceable logs do.
At AST, we have learned that the best integration layer looks boring to the application and very busy to the engineering team. That is the point. The business should see one set of workflows. The engineers should see the edge cases, the mapper versions, the sandbox drift, and the vendor-specific exceptions. If your users are dealing with PointClickCare or MatrixCare complexity directly, your architecture has already failed.
If you are planning this work, do not start with endpoints. Start with the questions your operations team asks when the data is wrong. Which facility did this belong to? Which chart should receive it? Which assessment shape is authoritative? Which system owns the truth if the two disagree? Answer those first, and the integration design becomes obvious. Ignore them, and you will spend the next six months polishing code that still cannot be trusted.
The one integration layer is not a convenience. It is the only sane way to support mixed PointClickCare and MatrixCare environments without multiplying support burden and operational risk. Build the canonical model once. Push EHR-specific logic into adapters. Make identity and facility mapping explicit. Normalize assessments carefully. Test both sandboxes like they can fail differently, because they will.
Build one integration layer instead of two fragile stacks
If your network lives across PointClickCare and MatrixCare, I can help you design the canonical model, adapter boundaries, and test strategy that hold up in production. AST has done this in live respiratory care operations across hundreds of SNFs, and we know where the edge cases hide.




Comments
Comments are warming up. Live, no-sign-in discussion will appear here shortly.
Have a question now? Email info@allstartech.net.