An AI-powered healthcare document automation system with DocuSign integration, built for the DocuSign Hackathon 2024.
- 🤖 AI-powered document generation using Cohere
- 📄 Dynamic PDF creation with formatted medical records
- ✍️ Secure digital signatures via DocuSign
- 📊 Insurance plan comparison and analysis
- 🗄️ Vector database storage with LanceDB
- 🎯 Role-based document workflows
- 📱 Responsive web interface
- Python 3.8+
- DocuSign Developer Account
- Cohere API Key
- LanceDB (local installation)
-
Clone the repository:
git clone https://github.com/your-username/docusign_hackathon_2024.git cd docusign_hackathon_2024
-
Install Dependencies
pip install -r requirements.txt
-
Set up environment variables in
.env
, most of them you will get when creating a docusign project. Cohere is by register and get the api key yourself.DS_CLIENT_ID=your_docusign_client_id DS_CLIENT_SECRET=your_docusign_client_secret DS_IMPERSONATED_USER_ID=your_docusign_user_id COHERE_API_KEY=your_cohere_api_key APP_URL=http://localhost:3000 LANCEDB_PATH=data/healthcare_db
-
Create DocuSign JWT configuration: a. Generate RSA keypair:
openssl genrsa -out private.key 2048 openssl rsa -pubout -in private.key -out public.key
b. Upload public.key to DocuSign Admin console and note the Integration Key
-
Add session key:
# Generate random session key python -c "import os; print(os.urandom(24).hex())" > .sesskey
-
Update docusign configuration
- put your
private.key
in project root - Configure
DS_JWT
inconfig.py
with your integration key - Set
signer_email
andsigner_name
inDS_CONFIG
- put your
Case:
Insurance, healthcare, apotechary and administration auto contract agent.
Keywords: Remote Signing, Embedded Signing, Contract agents, Agreement Workflow, Optimize Cost.
-
Start the FastHTML server:
// For a FastHTML app python app.py // Integration test python integration_check.py
-
Access the application at http://localhost:3000
/
- Main interface/generate
- Generate medical documents/sign/{doc_id}
- Send document for signing/insurance-comparison
- Compare insurance plans
DocuSign Configuration
- Create a DocuSign developer account
- Create an Integration Key in Admin console
- Enable JWT Grant
- Upload your public key
- Note your Integration Key and User ID
Required Files
-
.env
- Environment variablesDS_CLIENT_ID=your_integration_key DS_CLIENT_SECRET=your_secret DS_IMPERSONATED_USER_ID=your_user_id COHERE_API_KEY=your_cohere_key
-
private.key - RSA private key for DocuSign JWT
- Generate using OpenSSL
- Keep secure and never commit
- Required for JWT authentication
-
.sesskey - Session key for Flask
- Generate random key
- Keep secure and never commit
Security Notes
- Never commit .env, private.key, or .sesskey
- Add them to .gitignore
- Keep backup copies secure
- Rotate keys periodically