Skip to content

Commit

Permalink
📝 Remove debug mode documentation from README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferajiang committed Apr 25, 2023
1 parent df5ca08 commit 8de2508
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 156 deletions.
97 changes: 2 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ Built with Cogstack's [MedCAT](https://github.com/CogStack/MedCAT) package.
1. [Contributors](#Contributors)
2. [Installing](#Installing)
3. [Testing](#Testing)
4. [MIADE Notereader Debug Mode](#miade-notereader-debug-mode)
5. [Contributing](#Contributing)
6. [Licence](#Licence)
4. [Contributing](#Contributing)
5. [Licence](#Licence)


## Contributors
Expand Down Expand Up @@ -44,98 +43,6 @@ pytest ./tests/*
```
> Remember, if using a virtual environment, to install pytest within your environment itself, otherwise you will be using the system python install of pytest, which will use system python and will not find your modules.
## MIADE Notereader Debug Mode
The debug mode allows control over the MIADE backend through the EPIC Notereader interface.
Specific pre-configured contents and models can be triggered by typing in keywords in the Notereader text box, allowing users to seamlessly
test and debug the MIADE integration with EPIC Notereader.

There are 3 debug modes available, with varying degree of control over what concepts, models, and CDA specific content are returned to Notereader:
- ```PRESET```: bypasses the NLP model and returns a set of preloaded concepts
- ```CDA```: alters CDA specific content

**TO BE DEVELOPED**
- ```MODEL```: allows control over which version of model MIADE runs, once version control is in place

### Usage
The keywords to trigger the debug mode from Notereader are as follows:
```
***DEBUG PRESET [code]***
***DEBUG CDA [code]***
***DEBUG MODEL [code]***
```
Note that the keywords can appear anywhere in the text. ```CDA``` mode can be used with either ```PRESET``` mode or on its own
. When used alone, ```CDA```mode will return MIADE NLP results as normal and only alter the CDA field contents.
Example uses:
```
***DEBUG PRESET 0***
***DEBUG CDA 3***
The patient is allergic to bee venom. This is an example note and none of the text entered here matters in preset mode.
```
```
***DEBUG CDA 2***
The patient is diagnosed with liver failure. The NLP results will be returned in the CDA, along with any CDA content customisations.
```
### Configurations
Preloaded concepts and CDA customisation can be configured in [```configs/debug_configs.yml```](https://github.com/uclh-criu/miade/blob/master/src/miade/configs/debug_config.yml). An example config file is included as package data
with the MIADE module, but this can also be configured through the server.

The format is as following:
```yaml
Preset:
[Code]:
[Concept Name]:
cui: [int]
ontologies: [str]
dosage: [Optional]
dose:
quantity: [int]
unit: [{ucum} unit]
duration:
low: [date string]
high: [date string]
frequency:
value: [float]
unit: [h/d/w/m/y]
route:
cui: [NCI Thesaurus code]
name: [str]
reaction: [Optional]
cui: [int]
name: [str]
ontologies: SNOMED CT
severity:
cui: [Act code]
name: [str]
ontologies: ActCode
CDA:
[Code]:
Problems:
[CDA field name]: [value to insert]
Medication:
Allergy:

```
The following CDA fields currently allow customisation for testing. More can be added as needed, but require changes to the CDA parser.
#### Problems
```yaml
statusCode: whether problem is an active concern to clinician
actEffectiveTimeHigh: time when the problem stop become a concern to clinician - there will always be a low (implicit)
observationEffectiveTimeLow: problem onset - can be a date in the past
observationEffectiveTimeHigh: problem resolve date
```
#### Medication
```yaml
consumableCodeSystemName: the code system name for medication - medication has separate <translation> blocks for name (NDC) and code (SNOMED CT) in test CDAs, maybe need experimentation?
consumableCodeSystemValue: template id of code system name
```
#### Allergy
```yaml
allergySectionCodeName: either "Propensity to adverse reaction" or "Allergy to substance" - they both appear in test CDAs
allergySectionCodeValue: the SNOMED code for the allergy section code
```
## Contributing
See [contributing](CONTRIBUTING.md)

Expand Down
5 changes: 0 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ def model_directory_path() -> Path:
return Path("./tests/data/models/")


@pytest.fixture(scope="function")
def debug_path() -> Path:
return Path("./tests/examples/example_debug_config.yml")


@pytest.fixture(scope="function")
def test_note() -> Note:
return Note(text="Patient has liver failure and is taking paracetamol.")
Expand Down
56 changes: 0 additions & 56 deletions tests/examples/example_debug_config.yml

This file was deleted.

0 comments on commit 8de2508

Please sign in to comment.