Patient pipeline
Step ①
Patient DB
Pull records
→
Step ②
medent FHIR
Name+DOB+Ins/MRN
→
Step ③
Nutrition Care Program
Enroll patient
↔
Step ④
Notes writeback
PDF → Program EMR + EHR
In DB
0
Matched
0
No match
0
Enrolled
0
Notes back
0
| DB ID | Name | Clinic → EHR | DOB | Ins. ID | Conditions | EHR match | Confidence | Program | Notes |
|---|
PDF notes written back to Program EMR + EHR DocumentReference
No notes yet — run the pipeline first
Clinic directory — EHR routing
Field mapping — both EHR targets
① Patient DB → middleware
db.first_name + last_name→match.namekey 1
db.date_of_birth→match.dobkey 2
db.insurance_id (optional)→match.insuranceIdkey 3 if present
db.mrn (optional)→match.mrndeterministic key
medent ② FHIR patient search + confidence scoring
GET /Patient?family={ln}&given={fn}&birthdate={dob}→candidatesbase +25 pts
Patient.identifier[mrn] == db.mrn→+40 ptsdeterministic
Patient.identifier[insurance] == db.insId→+35 pts (if present)confirmatory
score ≥70 → matched · 50–69 → review · <50 → unmatched→matchStatusthreshold
Auth: RS384 JWT → POST /token/index.php?medent_practice_id=…→Bearer token (300s)per MEDENT docs
POST {medentBase}/DocumentReference→medent patient chartwriteback
Epic ② Sandbox FHIR patient search + confidence scoring
GET /Patient?family={ln}&given={fn}&birthdate={dob}→candidatesbase +25 pts
Patient.identifier[MR] == db.mrn→+40 ptsMR identifier type
Patient.identifier[MB/SN] == db.insId→+35 pts (if present)MB=Medicare/SN=subscriber
score ≥70 → matched · 50–69 → review · <50 → unmatched→matchStatussame threshold
Auth: JWT assertion → POST /oauth2/token (Backend Services)→Bearer tokenRS384 JWT
Sandbox base: fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4→all FHIR callssandbox
POST {epicBase}/DocumentReference→Epic patient chartwriteback
③ Middleware → Nutrition Care Program (same regardless of EHR)
patient.fhirId→sylvan.externalEhrIdcross-ref key
patient.ehrSystem ('medent' | 'epic')→sylvan.externalEhrSystemrouting metadata
patient.name · dob · mrn · conditions · payer→sylvan enrollment payloadintake context
④ Notes writeback — PDF as FHIR DocumentReference (same FHIR resource, different base URL)
sylvan PDF bytes (base64)→content[0].attachment.datainline PDF
LOINC 11488-4→type.coding[0].codeConsult note
LOINC LP29684-5→category[0].coding[0].codeNutrition & dietetics
patient.fhirId→subject = "Patient/{id}"patient link
medent: POST medentfhir.com/…/DocumentReference→medent chartmedent FHIR
Epic: POST fhir.epic.com/…/api/FHIR/R4/DocumentReference→Epic chartEpic sandbox