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