Chat with Clinical Practice Guidelines - Intelligent chat system that uses RAG (Retrieval-Augmented Generation) to query public clinical practice guidelines from EsSalud.
ChatGPC is a learning project that implements an intelligent chat system using RAG (Retrieval-Augmented Generation) to query information from official clinical practice guidelines from EsSalud. The project allows healthcare professionals and students to interactively consult verified medical documents through a modern conversational interface.
The system uses LangChain and LangGraph to orchestrate conversational agents that can retrieve relevant information from a vector store and generate contextualized responses based on official documents. The application includes two clinical practice guidelines: management of asthmatic crisis in children and adolescents, and diagnosis of pulmonary arterial hypertension.
- RAG with LangChain/LangGraph: Implementation of retrieval and augmented generation
- Intelligent Chat: Modern conversational interface with light/dark mode
- Semantic Search: Vector embeddings to find relevant information
- Verified Sources: All responses include references to official documents
- Responsive Design: Optimized for mobile and desktop devices
Backend:
- LangChain + LangGraph for conversational agent orchestration
- OpenAI GPT-4 for response generation
- Express.js + Vector Store for REST API and semantic search
- PostgreSQL for data persistence
Frontend:
- React 19 + TypeScript + Vite
- Modern CSS with variable system and themes
- Responsive interface with sidebar and chat container
Deployment:
- Genezio (serverless platform for full-stack deployment)
-
Clinical Practice Guideline for the Management of Asthmatic Crisis in Children and Adolescents (EsSalud 2023)
- Initial evaluation protocols and treatment by severity
- Recommendations for inhaler and nebulizer use
- Hospital discharge criteria and outpatient follow-up
-
Clinical Practice Guideline for the Diagnosis and Follow-up of Pulmonary Arterial Hypertension (EsSalud 2024)
- Echocardiographic screening criteria
- Mortality risk stratification scales
- Follow-up and treatment evaluation parameters
# Backend
cd server && npm install
# Configure OPENAI_API_KEY in .env file
# Frontend
cd client && npm install
# Local development
npm run dev # run in both foldersThe system allows natural language queries about the included clinical guidelines:
- "What is the treatment for severe asthmatic crisis in children?"
- "What echocardiographic criteria are used to screen for pulmonary hypertension?"
- "When should magnesium sulfate be used in asthmatic crisis?"
- "What are the follow-up parameters in PAH?"
This project was built as a learning exercise about RAG (Retrieval-Augmented Generation) following the tutorial from notJust․dev. Significant modifications were made to the frontend and functionalities were adapted for the medical domain, implementing a chat system specialized in clinical practice guidelines.
- Fork the repository
- Create your feature branch
- Commit and push your changes
- Open a Pull Request
- Developer: BrikHMP18
- Email: a20202489@pucp.edu.pe
- GitHub: BrikHMP18
Note: This is an educational project developed to learn about RAG and is based on public guidelines from EsSalud. For real medical decisions, always consult with healthcare professionals.