HealthSync

Simplifying healthcare software development and QA for applications that need to interface with Electronic Health Records

Available API Endpoints

HealthSync provides a comprehensive suite of healthcare APIs

Standard RESTful APIs

  • Patient Management
  • Appointment Scheduling
  • Clinical Observations
  • Medication Orders

FHIR APIs (R4)

  • Patient Resources
  • Observation Resources
  • Appointment Resources
  • SMART on FHIR Auth

HL7 Integration

  • ADT Message Processing
  • ORU Message Processing
  • SIU Message Handling
  • MDM Document Management

LLM Development

  • Model Context Protocol
  • Clinical Summarization
  • Medical RAG System
  • Clinical Decision Support

Powerful Healthcare API Solutions

⚙️

Standard APIs

Access standard healthcare APIs with comprehensive documentation and examples to accelerate your development process.

🔄

FHIR Integration

Seamlessly integrate with FHIR APIs including full support for SMART on FHIR authorization workflows.

📊

HL7 Support

Complete HL7 message parsing, generation, and validation for healthcare interoperability.

🧠

LLM Integration

Utilize our Model Context Protocol (MCP) for seamless LLM development in healthcare applications.

🏥

EHR Simulator

Full EHR simulator environment for non-developers to test app integrations with modern EHR systems.

📱

Multi-tenant Support

Build and test healthcare applications that span multiple providers and healthcare organizations.

FHIR API Integration

Build healthcare applications using industry-standard FHIR resources and operations

Patient
Observation
Appointment

Get a Patient Resource

# Python Example import requests headers = { "Authorization": "Bearer YOUR_TOKEN", "Accept": "application/fhir+json" } response = requests.get( "https://api.healthsync.dev/fhir/Patient/123456", headers=headers ) patient = response.json() print(f"Patient name: {patient['name'][0]['given'][0]} {patient['name'][0]['family']}")

Patient Resource Example

{ "resourceType": "Patient", "id": "123456", "meta": { "versionId": "1", "lastUpdated": "2023-06-21T15:30:12.354Z" }, "identifier": [ { "system": "http://hospital.example.org/identifiers/mrn", "value": "MRN12345" } ], "active": true, "name": [ { "use": "official", "family": "Smith", "given": ["John", "Adam"] } ], "gender": "male", "birthDate": "1980-01-15", "address": [ { "use": "home", "line": ["123 Main St"], "city": "Anytown", "state": "CA", "postalCode": "12345", "country": "USA" } ] }

Create an Observation

# JavaScript Example async function createObservation(patientId, code, value) { const observation = { resourceType: "Observation", status: "final", code: { coding: [ { system: "http://loinc.org", code: code, display: "Blood Pressure" } ] }, subject: { reference: `Patient/${patientId}` }, valueQuantity: { value: value, unit: "mm[Hg]", system: "http://unitsofmeasure.org", code: "mm[Hg]" }, effectiveDateTime: new Date().toISOString() }; const response = await fetch("https://api.healthsync.dev/fhir/Observation", { method: "POST", headers: { "Authorization": "Bearer YOUR_TOKEN", "Content-Type": "application/fhir+json" }, body: JSON.stringify(observation) }); return response.json(); } // Usage createObservation("123456", "8480-6", 120) .then(result => console.log("Created observation:", result.id));

Search for Appointments

# Python Example import requests from datetime import datetime, timedelta # Get appointments for next 7 days start_date = datetime.now().strftime("%Y-%m-%d") end_date = (datetime.now() + timedelta(days=7)).strftime("%Y-%m-%d") headers = { "Authorization": "Bearer YOUR_TOKEN", "Accept": "application/fhir+json" } response = requests.get( f"https://api.healthsync.dev/fhir/Appointment?date=ge{start_date}&date=le{end_date}", headers=headers ) appointments = response.json() print(f"Found {len(appointments['entry'])} appointments") # Process appointments for entry in appointments.get("entry", []): appointment = entry["resource"] print(f"Appointment: {appointment['id']}") print(f" Status: {appointment['status']}") print(f" Start: {appointment['start']}")

SMART on FHIR App Launch

Build and test EHR-integrated applications with our SMART on FHIR simulator

Standalone Launch
EHR Launch

Standalone SMART App Launch

Implement a standalone launch sequence that allows patients to authorize your application:

// JavaScript SMART on FHIR Client Example (using smart-on-fhir JS client) import FHIR from 'fhirclient'; // Initialize SMART app const smartLaunch = () => { FHIR.oauth2.authorize({ clientId: 'YOUR_CLIENT_ID', scope: 'launch/patient patient/*.read openid fhirUser', redirectUri: 'https://your-app.example.com/callback', iss: 'https://api.healthsync.dev/fhir' }); }; // When your app loads, call this function document.getElementById('launch-btn').addEventListener('click', smartLaunch); // In your callback page FHIR.oauth2.ready() .then(client => { // The client is ready and authenticated // You can now use client.request() for FHIR API calls return client.request('Patient/' + client.patient.id); }) .then(patient => { console.log('Retrieved patient', patient); document.getElementById('patient-name').textContent = `${patient.name[0].given[0]} ${patient.name[0].family}`; });

EHR-Launched SMART App

Implement an EHR launch sequence where your app is launched from within an EHR:

// JavaScript SMART on FHIR Client for EHR Launch import FHIR from 'fhirclient'; // In your app's launch page FHIR.oauth2.authorize({ clientId: 'YOUR_CLIENT_ID', scope: 'launch patient/*.read openid fhirUser', redirectUri: 'https://your-app.example.com/callback', // No ISS parameter needed for EHR launch - it's passed in the launch URL }); // In your callback page FHIR.oauth2.ready() .then(client => { // You now have an authenticated client console.log('Authorized client context:', client.state); // Get the currently selected patient return client.patient.read(); }) .then(patient => { console.log('Current patient context:', patient); // You can now make API calls with the client's context // Example: get observations for this patient return client.request(`Observation?patient=${patient.id}`); }) .then(observations => { console.log('Patient observations:', observations); });

Testing Your App in the HealthSync EHR Simulator

To test your SMART app in our simulator:

  1. Register your app in the HealthSync Developer Dashboard
  2. Configure your app's redirect URI
  3. Use our EHR Simulator to launch your app in a simulated EHR environment
  4. Test different patient contexts and permission scopes

LLM Integration with Model Context Protocol

Develop healthcare AI applications with our specialized LLM tooling

Context Protocol
Clinical Summarization
Medical RAG

Model Context Protocol (MCP)

Our MCP enables LLMs to access patient context safely and compliantly:

# Python Example using the HealthSync MCP Client from healthsync import MCPClient # Initialize the MCP client with your API key mcp_client = MCPClient(api_key="YOUR_API_KEY") # Prepare patient context (with proper patient consent) patient_context = mcp_client.prepare_context( patient_id="123456", context_type="clinical_summary", time_range="6months" ) # Call your LLM with the prepared context response = mcp_client.generate_with_context( model="openai/gpt-4", prompt="Summarize the patient's recent conditions", context=patient_context, max_tokens=500 ) print(response.summary)

Clinical Note Summarization

Use our specialized clinical summarization endpoints:

import requests import json # Your clinical note clinical_note = """ Patient presents with recurring headaches for the past 3 weeks. Reports pain intensity of 7/10, predominantly in the frontal and temporal regions. Headaches are associated with photophobia and occasionally nausea. Patient has tried OTC pain medications with minimal relief. No previous history of migraines. Family history positive for migraines (mother). Vital signs stable. Neurological exam normal. Assessment: Probable migraine, new onset. Plan: Trial of sumatriptan 50mg. Neurology referral if symptoms persist. """ # Call the HealthSync summarization API headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } response = requests.post( "https://api.healthsync.dev/llm/summarize", headers=headers, json={ "note": clinical_note, "target_length": "brief", "audience": "patient" } ) result = response.json() print("Patient-friendly summary:", result["summary"])

Medical Retrieval-Augmented Generation (RAG)

Incorporate medical knowledge bases in your LLM applications:

// Node.js Example const axios = require('axios'); async function medicalQuery(patientContext, userQuery) { try { const response = await axios.post( 'https://api.healthsync.dev/llm/medical-rag', { patient_context: patientContext, query: userQuery, knowledge_bases: ['snomed', 'rxnorm', 'loinc'], citation_level: 'detailed' }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); return response.data; } catch (error) { console.error('Error querying medical RAG system:', error); throw error; } } // Usage const patientContext = { conditions: ['diabetes-type2', 'hypertension'], medications: ['metformin', 'lisinopril'], allergies: ['penicillin'] }; medicalQuery(patientContext, "What are the potential medication interactions I should be aware of?") .then(result => { console.log("RAG Response:", result.response); console.log("Citations:", result.citations); });

Powerful Healthcare API Solutions

HealthSync provides a comprehensive suite of healthcare APIs

⚙️

Standard APIs

Access standard healthcare APIs with comprehensive documentation and examples to accelerate your development process.

🔄

FHIR Integration

Seamlessly integrate with FHIR APIs including full support for SMART on FHIR authorization workflows.

📊

HL7 Support

Complete HL7 message parsing, generation, and validation for healthcare interoperability.

🧠

LLM Integration

Utilize our Model Context Protocol (MCP) for seamless LLM development in healthcare applications.

🏥

EHR Simulator

Full EHR simulator environment for non-developers to test app integrations with modern EHR systems.

📱

Multi-tenant Support

Build and test healthcare applications that span multiple providers and healthcare organizations.