<commit_before># Routes
Routes that will/could be used in the raddb application

## Dashboards

|Method|Route|Description|Status|
|------|-----|-----------|------|
|GET | / | Main index / Survey schedule | Basic implementation |
|GET | /dashboard | Equipment testing status dashboard ||
|GET | /surveycount/:yr | Graph counts of surveys by month for a selected year ||


## Inventory Reporting
These routes go to pages used to display information about the machines tracked in the database

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /machines | List all machines | Basic implementation |
| GET | /machines/:id | Display details for a specific machine | Basic implementation |
| GET | /machines/modalities | List all machines by modality | Basic implementation |
| GET | /machines/modalities/:id | List machines for specific a specific modality | Basic implementation |
| GET | /machines/locations | List all machines by location | Basic implementation |
| GET | /machines/locations/:id | List all machines for a specific location(s) | Basic implementation |
| GET | /machines/:id/recommendations | Retrieve recommendations for a specific machine | Basic implementation |
| GET | /machines/:id/opnotes | Retrieve operational notes for a specific machine | Basic implementation |
| GET | /machines/:id/gendata | Retrieve generator check data for a specific machine | Basic implementation |
| GET | /machines/:id/tubes | Retrieve x-ray tubes for a specific machine | Basic implementation |

## Inventory manipulation

### Machines
These routes go to pages used to add, edit or delete machines

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /machines/create | Form to create a new machine | Basic implementation. Needs testing |
| POST | /machines | Handle creation of new machine| Basic implementation. Needs testing |
| GET | /machines/:id/edit | Form to edit an existing machine identified by :id | Basic implementation. Needs testing |
| PUT | /machines/:id | Handle updates to machine :id | Basic implementation. Needs testing |
| GET | /machines/:id/delete | Form to confirm deletion of machine :id ||
| DELETE | /machines/:id | Handle deletion of machine :id ||

### X-ray tubes
These routes go to pages used to add, edit or delete x-ray tubes.

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /tubes/:id/create | Form to add a new x-ray tube for machine identified by :id | Basic implementation. Needs testing |
| POST | /tubes | Handle creation of new x-ray tube | Basic implementation. Needs testing |
| GET | /tubes/:id/edit | Form to edit an existing x-ray tube | Basic implementation. Needs testing |
| PUT | /tubes/:id | Handle updates to x-ray tube :id | Basic implementation. Needs testing |
| GET | /tubes/:id/delete | Form to confirm deletion of x-ray tube :id ||
| DELETE | /tubes/:id | Handle deletion of x-ray tube :id ||

### Operational notes
Operational notes are displayed with the machine details (/machines/:id). The only routes we need are ones to handle creating new operational notes for an existing machine

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /opnotes/machine/:id/create | Create a new operational note ||
| POST | /opnotes/machine/:id | Handle creation of an operational note ||

## Survey manipulation

### Surveys
These routes go to pages used to create or edit survey information

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /surveys/:id/create | Form to add a new survey for machine *id* | Needs testing |
| POST | /surveys | Handle creation of a new survey | Needs testing |
| GET | /surveys/:id/edit | Form to edit a survey (usually for date editing)||
| PUT | /surveys/:id | Handle updates to survey :id ||

### Survey recommendations
These routes go to pages used to add or edit survey recommendations

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /recommendations/create | Form to add a survey recommendation ||
| POST | /recommendations | Handle adding survey recommendation ||
| GET | /recommendations/:id/edit | Form to handle resolving survey recommendations||
| GET | /recommendations/:id | Display a list of survey recommendations ||
| PUT | /recommendations/:id | Handle resolving survey recommendation ||

## Survey reporting
These routes go to pages used to display lists of surveys or recommendations

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /surveys | Show list of currently scheduled surveys ||
| GET | /surveys/machine/:machine_id | Show list of surveys for a specific machine ||<commit_msg>Formatting changes to make "Needs testing" text bold<commit_after># Routes
Routes that will/could be used in the raddb application

## Dashboards

|Method|Route|Description|Status|
|------|-----|-----------|------|
|GET | / | Main index / Survey schedule | Basic implementation |
|GET | /dashboard | Equipment testing status dashboard ||
|GET | /surveycount/:yr | Graph counts of surveys by month for a selected year ||


## Inventory Reporting
These routes go to pages used to display information about the machines tracked in the database

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /machines | List all machines | Basic implementation |
| GET | /machines/:id | Display details for a specific machine | Basic implementation |
| GET | /machines/modalities | List all machines by modality | Basic implementation |
| GET | /machines/modalities/:id | List machines for specific a specific modality | Basic implementation |
| GET | /machines/locations | List all machines by location | Basic implementation |
| GET | /machines/locations/:id | List all machines for a specific location(s) | Basic implementation |
| GET | /machines/:id/recommendations | Retrieve recommendations for a specific machine | Basic implementation |
| GET | /machines/:id/opnotes | Retrieve operational notes for a specific machine | Basic implementation |
| GET | /machines/:id/gendata | Retrieve generator check data for a specific machine | Basic implementation |
| GET | /machines/:id/tubes | Retrieve x-ray tubes for a specific machine | Basic implementation |

## Inventory manipulation

### Machines
These routes go to pages used to add, edit or delete machines

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /machines/create | Form to create a new machine | Basic implementation. **Needs testing** |
| POST | /machines | Handle creation of new machine| Basic implementation. **Needs testing** |
| GET | /machines/:id/edit | Form to edit an existing machine identified by :id | Basic implementation. **Needs testing** |
| PUT | /machines/:id | Handle updates to machine :id | Basic implementation. **Needs testing** |
| GET | /machines/:id/delete | Form to confirm deletion of machine :id ||
| DELETE | /machines/:id | Handle deletion of machine :id ||

### X-ray tubes
These routes go to pages used to add, edit or delete x-ray tubes.

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /tubes/:id/create | Form to add a new x-ray tube for machine identified by :id | Basic implementation. **Needs testing** |
| POST | /tubes | Handle creation of new x-ray tube | Basic implementation. **Needs testing** |
| GET | /tubes/:id/edit | Form to edit an existing x-ray tube | Basic implementation. **Needs testing** |
| PUT | /tubes/:id | Handle updates to x-ray tube :id | Basic implementation. **Needs testing** |
| GET | /tubes/:id/delete | Form to confirm deletion of x-ray tube :id ||
| DELETE | /tubes/:id | Handle deletion of x-ray tube :id ||

### Operational notes
Operational notes are displayed with the machine details (/machines/:id). The only routes we need are ones to handle creating new operational notes for an existing machine

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /opnotes/machine/:id/create | Create a new operational note ||
| POST | /opnotes/machine/:id | Handle creation of an operational note ||

## Survey manipulation

### Surveys
These routes go to pages used to create or edit survey information

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /surveys/:id/create | Form to add a new survey for machine *id* | **Needs testing**|
| POST | /surveys | Handle creation of a new survey | **Needs testing** |
| GET | /surveys/:id/edit | Form to edit a survey (usually for date editing)||
| PUT | /surveys/:id | Handle updates to survey :id ||

### Survey recommendations
These routes go to pages used to add or edit survey recommendations

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /recommendations/create | Form to add a survey recommendation ||
| POST | /recommendations | Handle adding survey recommendation ||
| GET | /recommendations/:id/edit | Form to handle resolving survey recommendations||
| GET | /recommendations/:id | Display a list of survey recommendations ||
| PUT | /recommendations/:id | Handle resolving survey recommendation ||

## Survey reporting
These routes go to pages used to display lists of surveys or recommendations

|Method|Route|Description|Status|
|------|-----|-----------|------|
| GET | /surveys | Show list of currently scheduled surveys ||
| GET | /surveys/machine/:machine_id | Show list of surveys for a specific machine ||
{'fraction_non_alphanumeric': 0.1483446519524618, 'fraction_numerical': 0.0, 'mean_word_length': 3.4647086688773094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4699948', 'n_tokens_mistral': 2562, 'n_tokens_neox': 2481, 'n_words': 1035}