nlpmed_portal.annotations.models module¶
- class nlpmed_portal.annotations.models.Project[source]¶
Bases:
ModelProject(id, name, description, disp_range_months_before_idx, disp_range_months_after_idx, run_nlp, annotation_type, required_patient_annotations, required_patient_adjudications, created_at, updated_at)
- CLASSIFICATION = 'classification'¶
- NER = 'ner'¶
- ANNOTATION_TYPE_CHOICES = [('classification', 'Classification'), ('ner', 'Named-Entity Recognition')]¶
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- disp_range_months_before_idx¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- disp_range_months_after_idx¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- run_nlp¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- annotation_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- required_patient_annotations¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- required_patient_adjudications¶
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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- get_annotation_type_display(*, field=<django.db.models.fields.CharField: annotation_type>)¶
- 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.
- import_jobs¶
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.
- label_categories¶
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.
- nlp_jobs¶
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.
- 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.
- objects = <django.db.models.manager.Manager object>¶
- patients¶
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_memberships_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.
- 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.
- class nlpmed_portal.annotations.models.LabelCategory[source]¶
Bases:
ModelLabelCategory(id, name, project)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- name¶
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
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- label_values¶
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>¶
- 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.
- class nlpmed_portal.annotations.models.LabelValue[source]¶
Bases:
ModelLabelValue(id, name, category)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- category¶
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
- adjudications¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- category_id¶
- 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>¶
- patient_annotations¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- 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.
- class nlpmed_portal.annotations.models.Patient[source]¶
Bases:
ModelPatient(id, pat_id, index_date, project, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- pat_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- index_date¶
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.
- 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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- adjudications¶
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.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_index_date(*, field=<django.db.models.fields.DateField: index_date>, 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_index_date(*, field=<django.db.models.fields.DateField: index_date>, 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.
- labs¶
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.
- ner_annotations¶
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.
- notes¶
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>¶
- patient_annotations¶
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.
- tasks_patient¶
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.annotations.models.Note[source]¶
Bases:
ModelNote(id, note_id, note_text, note_date, note_type, patient, preprocessed_text, predicted_label, predicted_score, important_sentences_count, duplicate_sentences_count, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- note_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note_text¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- TYPE_CHOICES = [('progress', 'Progress Note'), ('radiology', 'Radiology Note'), ('discharge', 'Discharge Summary')]¶
- note_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- patient¶
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.
- preprocessed_text¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- predicted_label¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- predicted_score¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- important_sentences_count¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- duplicate_sentences_count¶
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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- adjudications¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_note_date(*, field=<django.db.models.fields.DateField: note_date>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_note_type_display(*, field=<django.db.models.fields.CharField: note_type>)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_note_date(*, field=<django.db.models.fields.DateField: note_date>, 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.
- ner_annotations¶
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
- note_sections¶
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>¶
- patient_annotations¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- patient_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.
- class nlpmed_portal.annotations.models.Lab[source]¶
Bases:
ModelLab(id, lab_id, patient, component, collection_datetime, value, unit, abnormal, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- lab_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- patient¶
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.
- component¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- collection_datetime¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- unit¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- abnormal¶
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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- get_next_by_collection_datetime(*, field=<django.db.models.fields.DateTimeField: collection_datetime>, is_next=True, **kwargs)¶
- 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_collection_datetime(*, field=<django.db.models.fields.DateTimeField: collection_datetime>, is_next=False, **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>¶
- patient_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.
- class nlpmed_portal.annotations.models.Section[source]¶
Bases:
ModelSection(id, text, start_index, end_index, note, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- text¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- start_index¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end_index¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note¶
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.
- 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 important_sentences¶
- property duplicate_sentences¶
- property expanded_sentences¶
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- 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.
- note_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.
- section_sentences¶
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.annotations.models.Sentence[source]¶
Bases:
ModelSentence(id, text, start_index, end_index, is_duplicate, is_important, is_expanded, section)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- text¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- start_index¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end_index¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_duplicate¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_important¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_expanded¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- section¶
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
- 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>¶
- 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_id¶
- class nlpmed_portal.annotations.models.PatientAnnotation[source]¶
Bases:
ModelPatientAnnotation(id, event_date, comment, patient, annotator, created_at, updated_at)
- event_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- event_label_values¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- comment¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- patient¶
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.
- annotator¶
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.
- notes¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- 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.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- adjudications¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- annotator_id¶
- 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>¶
- patient_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.
- class nlpmed_portal.annotations.models.Adjudication[source]¶
Bases:
ModelAdjudication(id, patient, event_date, adjudicator, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- patient¶
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.
- event_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- event_label_values¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- adjudicator¶
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.
- notes¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- source_annotations¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- 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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- adjudicator_id¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_event_date(*, field=<django.db.models.fields.DateField: event_date>, 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_event_date(*, field=<django.db.models.fields.DateField: event_date>, 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>¶
- patient_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.
- class nlpmed_portal.annotations.models.ProjectMembership[source]¶
Bases:
ModelProjectMembership(id, assignee, project, group, assigner, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- assignee¶
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¶
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.
- group¶
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.
- assigner¶
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.
- 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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- assignee_id¶
- assigner_id¶
- 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)¶
- group_id¶
- 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¶
- 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.
- class nlpmed_portal.annotations.models.Task[source]¶
Bases:
ModelTask(id, assignee, patient, assigner, task_type, status, created_at, updated_at)
- STATUS_CHOICES = [('pending', 'Pending'), ('completed', 'Completed'), ('closed', 'Closed (not needed)')]¶
- CLASSIFICATION = 'classification'¶
- NER = 'ner'¶
- ADJUDICATION = 'adjudication'¶
- TYPE_CHOICES = [('classification', 'Classification'), ('ner', 'NER'), ('adjudication', 'Adjudication')]¶
- assignee¶
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.
- patient¶
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.
- assigner¶
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.
- task_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status¶
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.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- assignee_id¶
- assigner_id¶
- 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)¶
- get_status_display(*, field=<django.db.models.fields.CharField: status>)¶
- get_task_type_display(*, field=<django.db.models.fields.CharField: task_type>)¶
- 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>¶
- patient_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.
- class nlpmed_portal.annotations.models.ImportJob[source]¶
Bases:
ModelImportJob(id, project, user, import_file, import_format, import_target, import_missing_patients, column_map, date_format_map, new_rows_count, job_status, job_progress, error_message, created_at, updated_at)
- STATUS_CHOICES = (('uploaded', 'Uploaded'), ('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.parentis aForwardManyToOneDescriptorinstance.
- import_file¶
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world') as f: ... instance.file = File(f)
- import_format¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_target¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_missing_patients¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- column_map¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- date_format_map¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- new_rows_count¶
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.
- job_progress¶
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.
- delete_import_file(*, save=True)[source]¶
Delete the uploaded source file after it is no longer needed.
- Parameters:
save (bool)
- Return type:
None
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- get_import_target_display(*, field=<django.db.models.fields.CharField: import_target>)¶
- 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¶
- class nlpmed_portal.annotations.models.NERAnnotation[source]¶
Bases:
ModelNERAnnotation(patient, annotator, note, spans, created_at, updated_at)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- patient¶
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.
- annotator¶
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¶
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
- spans¶
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.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- annotator_id¶
- 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)¶
- note_id¶
- objects = <django.db.models.manager.Manager object>¶
- patient_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.
- class nlpmed_portal.annotations.models.ExportAnnotation[source]¶
Bases:
ModelExportAnnotation(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>¶