POST /cid/refresh-local
Loads CID (International Classification of Diseases) codes from a locally saved HTML file and updates the database.Query Parameters
Absolute file system path to the HTML file containing CID codes (e.g.,
/path/to/cid-data.html)Response
Success message with the total number of CID codes processed from the local file
Example Request
cURL
JavaScript
Example Response
200 OK
Implementation Details
FromCidController.java:42-46:
- Reads the HTML file from the specified path
- Parses the CID code data structure
- Updates or inserts codes into the database
- Returns the total count of processed codes
Use Cases
- Offline database initialization when internet access is limited
- Testing with custom CID datasets
- Importing CID codes from previously downloaded DATASUS files
- Development environments without external network access
Error Responses
| Status Code | Description |
|---|---|
| 200 | CID codes successfully loaded from local file |
| 400 | Invalid path or path parameter missing |
| 404 | File not found at specified path |
| 500 | Error reading or parsing the file |
For downloading CID codes directly from DATASUS servers, use
POST /cid/refresh instead.The HTML file format must match the expected DATASUS structure for proper parsing.