nlpmed_portal.nlp.models module

Models for the nlp application.

nlpmed_portal.nlp.models.vte_section_inc_list()[source]
nlpmed_portal.nlp.models.vte_section_exc_list()[source]
nlpmed_portal.nlp.models.vte_keyword_inc_list()[source]
nlpmed_portal.nlp.models.vte_keyword_exc_list()[source]
class nlpmed_portal.nlp.models.ComponentBase[source]

Bases: Model

Base model for component status.

STATUS_CHOICES = [('enabled', 'Enabled'), ('disabled', 'Disabled'), ('excluded', 'Excluded')]
status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Meta[source]

Bases: object

abstract = False
get_status_display(*, field=<django.db.models.fields.CharField: status>)
class nlpmed_portal.nlp.models.NLPSetting[source]

Bases: Model

NLPSetting(id, debug, project)

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
debug

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

project

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

duplicate_checker

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

encoding_fixer

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

joiner

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

ml_inference

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

note_filter

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

objects = <django.db.models.manager.Manager object>
pattern_replacer

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

project_id
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

section_filter

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

section_splitter

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

sentence_expander

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

sentence_filter

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

sentence_segmenter

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

word_masker

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

class nlpmed_portal.nlp.models.EncodingFixer[source]

Bases: ComponentBase

Model for encoding fixer component status.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.PatternReplacer[source]

Bases: ComponentBase

Model for pattern replacer component with pattern and target replacements.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

pattern

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

target

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.WordMasker[source]

Bases: ComponentBase

Model for word masker component with mask settings.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

words_to_mask

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mask_char

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.NoteFilter[source]

Bases: ComponentBase

Model for filtering notes based on keywords.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.SectionSplitter[source]

Bases: ComponentBase

Model for splitting sections using a delimiter.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

delimiter

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.SectionFilter[source]

Bases: ComponentBase

Model for filtering sections based on include and exclude keywords.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

section_inc_list

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

section_exc_list

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

fallback

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.SentenceSegmenter[source]

Bases: ComponentBase

Model for sentence segmentation settings.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

model_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

batch_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_model_name_display(*, field=<django.db.models.fields.CharField: model_name>)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.DuplicateChecker[source]

Bases: ComponentBase

Model for duplicate checking configuration.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

num_perm

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sim_threshold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

length_threshold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.SentenceFilter[source]

Bases: ComponentBase

Model for filtering sentences based on keywords.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.SentenceExpander[source]

Bases: ComponentBase

Model for expanding short sentences.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

length_threshold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.Joiner[source]

Bases: ComponentBase

Model for joining sentences and sections.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

sentence_delimiter

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

section_delimiter

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.MLInference[source]

Bases: ComponentBase

Model for machine learning inference settings.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
nlp_setting

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

model_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

use_preped_text

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_model_name_display(*, field=<django.db.models.fields.CharField: model_name>)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nlp_setting_id
objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save the model instance without creating a historical record.

Make sure you know what you’re doing before using this method.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class nlpmed_portal.nlp.models.NLP[source]

Bases: Model

NLP(id)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class nlpmed_portal.nlp.models.NlpProcessJob[source]

Bases: Model

NlpProcessJob(id, project, user, patient_pks, job_status, total_count, completed_count, error_message, created_at, updated_at)

STATUS_CHOICES = (('pending', 'Pending'), ('in_progress', 'In Progress'), ('completed', 'Completed'), ('failed', 'Failed'))
project

Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

patient_pks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

job_status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

total_count

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

completed_count

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

error_message

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

updated_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property job_progress
mark_in_progress()[source]
mark_completed()[source]
mark_failed(error='')[source]
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

get_job_status_display(*, field=<django.db.models.fields.CharField: job_status>)
get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
project_id
user_id