Skip to content

Vibrant-Practice/document-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Parser

A sample repo using Medplum and AI SDKs for document parsing to the FHIR medical standard.

Setup

This project uses npm for package management. The following packages are installed:

  • @medplum/core
  • @medplum/fhirtypes
  • TypeScript
  • OpenAI SDK
  • Anthropic SDK
  • Vercel AI SDK
  • Langchain

Getting Started

To install dependencies:

npm install

Environment Configuration

Create a .env.local by copying the .env.example file and assigning the appropriate environment variables.

Development

This project is set up with TypeScript.

Available Scripts

  • npm run create-sample-patient - Runs a script that creates a sample patient.
  • npm run document-agent - Runs the document agent script that fetches and processes FHIR documents

Project Structure

  • documents/ - the PDF documents
  • lib/ - Medplum library
  • scripts/ - Utility scripts
    • document-agent.ts - Script for fetching and processing FHIR documents

Document Agent

The document agent script right now only connects to the Medplum API. You are encouraged to use any LLM APIs/SDKs (we have included four of the most common). To run it:

First generate a patient, and take note of its ID:

npm run create-sample-patient

Then request the patient ID when running the document-agent script:

npm run document-agent

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published