Requirements
Before installing the Dental Odontogram application, ensure you have the following:Web server
The application must be served from a web server due to CORS restrictions when loading JSON data files. You can use:-
Python HTTP server (recommended for development)
-
Node.js http-server
- Apache or nginx (for production)
Browser requirements
- Modern web browser with HTML5 Canvas support
- JavaScript enabled
- Minimum viewport width of 1024px recommended
The application uses the HTML5 Canvas API. Older browsers may not be supported. The canvas element displays a fallback message: “Tu navegador no soporta canvas. Por favor actualiza tu navegador.”
Frontend dependencies
The application requires the following client-side dependencies:jQuery
The application uses jQuery 3.3.1 for DOM manipulation and event handling:Core files
The following files are required in your project directory:- jquery.odontogram.js - The odontogram plugin (based on Adhiana46’s work)
- dental-app.js - Main application logic
- patient-display.js - Patient information handling
- style.css - Application styles
- dientes_fdi_completo.json - FDI tooth information data
- index.html - Main HTML page
Backend dependencies (optional)
If you want to use the upload and integration features, you’ll need a Node.js backend with the following packages:package.json
Install backend dependencies
The backend dependencies are only required if you plan to use the file upload and cloud storage features. The core odontogram functionality works without a backend.
File structure
A typical Dental Odontogram installation has the following structure:Installation steps
Download or clone the repository
Get the application files from your repository or download the source code.
Verify required files
Ensure all core files are present:You should see:
- index.html
- jquery.odontogram.js
- dental-app.js
- patient-display.js
- style.css
- dientes_fdi_completo.json
Install backend dependencies (optional)
If you plan to use the upload features, install the Node.js dependencies:
Serving the application
Development server
For local development, use Python’s built-in HTTP server:http://localhost:8000.
Production server
For production deployment, configure a proper web server:Apache
Add to your virtual host configuration:nginx
Add to your nginx configuration:Configuration options
The application can be configured by modifying parameters indental-app.js:
Odontogram dimensions
PNG report settings
Locate thegenerateProfessionalPNG() function in dental-app.js to customize:
- PNG teeth limit
- Column layout
- Fonts and sizes
- Odontogram scale
- Header information
Patient name handling
The application reads patient names from:- DOM element
#patientName - URL parameters (
recordIdorid)
getPatientNameFromDOM() function:
Backend integration
To enable file uploads and cloud storage, you need to implement the backend endpoint:api/upload-odontogram.js
Troubleshooting
Canvas not displaying
If the odontogram canvas doesn’t appear:- Check browser console for errors
- Verify jQuery is loaded before
jquery.odontogram.js - Ensure canvas element has
id="odontogram" - Check that
dental-app.jsis loaded after the plugin
JSON data not loading
If tooth information is missing:- Verify
dientes_fdi_completo.jsonis in the same directory - Check browser console for CORS errors
- Ensure you’re using a web server (not file:// protocol)
- Verify JSON file is valid and properly formatted
Treatment colors not showing
If treatments appear in wrong colors:- Check that annotation layer is selected
- Verify
LAYER_COLORSconfiguration injquery.odontogram.js - Ensure treatments are being saved with layer information
Next steps
Quickstart guide
Learn how to use the application
User guide
Learn the odontogram interface