Loading documentation…
Loading documentation…
Common architectures for embedding PearMedica into hospitals, telemedicine platforms, mobile health apps, and EHR systems. Each pattern includes data flow diagrams and code guidance.
Embed the assessment API into a self-service kiosk in the hospital reception area. Patients input symptoms on a tablet, and the API returns triage urgency and recommended department routing.
// 1. Patient inputs symptoms on kiosk touchscreen// 2. Backend server calls PearMedica API// 3. Triage result displayed + printed ticket// Your backend (Node.js / Python / PHP)try {const result = await fetch('https://api.pearmedica.com/v1/assess', {method: 'POST',headers: {'Authorization': 'Bearer sk_live_your_key','Content-Type': 'application/json',},body: JSON.stringify({patient: { age: 45, sex: 'female', location: 'lagos_nigeria' },evidence: [{ id: 's_chest_pain', choice_id: 'present', source: 'initial' },{ id: 's_shortness_of_breath', choice_id: 'present', source: 'initial' },],}),});if (!result.ok) {throw new Error(`API error: ${result.status} ${result.statusText}`);}const assessment = await result.json();// Route patient based on triage urgencyif (assessment.triage.urgency === 'emergency') {// Alert nursing station immediatelyawait alertNursingStation(assessment);} else {// Print queue ticket with department assignmentprintTicket(assessment.triage.recommended_specialist);}} catch (error) {console.error('PearMedica API call failed:', error);// Show fallback UI / manual triage formshowFallbackTriageForm();}
Run a conversational symptom interview before the doctor joins the call. The doctor receives a structured summary with differential diagnosis, urgency rating, and recommended next questions.
Via your app or website. Store the booking ID.
Use the conversational flow API (X-Interview-Id) to gather evidence iteratively.
When should_stop is true, save the assessment result to the appointment record.
Doctor sees structured data: conditions ranked by probability, triage level, and red flags.
PearMedica assessment results include standardised medical identifiers that map to common health data standards:
| API Field | Standard | Use Case |
|---|---|---|
| conditions[].id | Internal → ICD-10 mappable | Diagnosis coding for insurance claims |
| evidence[].id | Internal → SNOMED CT mappable | Clinical documentation in EHR problem list |
| triage.urgency | 4-level triage scale | Triage assignment (5→4 level ESI mapping available) |
| nearest_facilities | Lat/lng coordinates | GIS integration for facility routing |
Use the NLP Parse endpoint to convert free-text patient descriptions into structured evidence, then feed that evidence into the assessment engine:
// Step 1: Parse free text into structured symptomsconst parsed = await fetch('https://api.pearmedica.com/v1/parse', {method: 'POST',headers: { 'Authorization': 'Bearer sk_live_key', 'Content-Type': 'application/json' },body: JSON.stringify({text: "I have a bad headache and fever for 3 days, no cough",age: { value: 30 },sex: "female"}),});const { mentions } = await parsed.json();// mentions → [{ id: "s_headache", choice_id: "present" }, { id: "s_fever", ... }, ...]// Step 2: Feed parsed evidence into assessmentconst assessment = await fetch('https://api.pearmedica.com/v1/assess', {method: 'POST',headers: { 'Authorization': 'Bearer sk_live_key', 'Content-Type': 'application/json' },body: JSON.stringify({patient: { age: 30, sex: 'female' },evidence: mentions.map(m => ({id: m.id, choice_id: m.choice_id, source: 'initial'})),}),});