main package¶
Subpackages¶
Submodules¶
main.admin module¶
Registers main fEMR-OnChain data model types to the backend administrative system.
-
class
main.admin.
PatientEncounterAdmin
(model, admin_site)¶ Bases:
django.contrib.admin.options.ModelAdmin
Register a PatientEncounterForm as accessible in the Admin site.
-
form
¶ alias of
main.forms.PatientEncounterForm
-
property
media
¶
-
-
class
main.admin.
TreatmentAdmin
(model, admin_site)¶ Bases:
django.contrib.admin.options.ModelAdmin
Register a TreatmentForm as accessible in the Admin site.
-
form
¶ alias of
main.forms.TreatmentForm
-
property
media
¶
-
main.admin_views module¶
View functions for administrative actions.
-
main.admin_views.
add_user_to_campaign
(request, user_id=None)¶
-
main.admin_views.
add_users_to_campaign
(request)¶
-
main.admin_views.
admin_home
(request)¶ The landing page for the authenticated administrative user.
- Parameters
request – Django Request object.
- Returns
An HttpResponse, rendering the home page.
-
main.admin_views.
create_user_view
(request)¶
-
main.admin_views.
cut_user_from_campaign
(request, user_id=None)¶
-
main.admin_views.
export_audit_logs_view
(request)¶
-
main.admin_views.
export_database_logs_view
(request)¶
-
main.admin_views.
filter_audit_logs_view
(request)¶
-
main.admin_views.
filter_database_logs_view
(request)¶
-
main.admin_views.
filter_users_view
(request)¶
-
main.admin_views.
get_audit_logs_view
(request)¶
-
main.admin_views.
get_database_logs_view
(request)¶
-
main.admin_views.
list_users_view
(request)¶
-
main.admin_views.
lock_user_view
(request, id=None)¶
-
main.admin_views.
message_of_the_day_view
(request)¶
-
main.admin_views.
search_audit_logs_view
(request)¶
-
main.admin_views.
search_database_logs_view
(request)¶
-
main.admin_views.
search_users_view
(request)¶
-
main.admin_views.
unlock_user_view
(request, id=None)¶
-
main.admin_views.
update_user_password_view
(request, id=None)¶
-
main.admin_views.
update_user_view
(request, id=None)¶
main.api_permissions module¶
-
class
main.api_permissions.
IsAdmin
¶ Bases:
rest_framework.permissions.BasePermission
-
has_object_permission
(request, view, obj)¶ Return True if permission is granted, False otherwise.
-
main.api_views module¶
Responsible for defining endpoints relevant to data interchange through a RESTful API. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
class
main.api_views.
CampaignViewSet
(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSet
-
permission_classes
= [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'main.api_permissions.IsfEMRAdmin'>]¶
-
queryset
= <QuerySet []>¶
-
serializer_class
¶ alias of
main.serializers.CampaignSerializer
-
-
class
main.api_views.
GroupViewSet
(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSet
API Endpoint Adapter - Allergy
-
permission_classes
= [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'main.api_permissions.IsAdmin'>]¶
-
queryset
= <QuerySet []>¶
-
serializer_class
¶ alias of
main.serializers.GroupSerializer
-
-
class
main.api_views.
InstanceViewSet
(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSet
-
permission_classes
= [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'main.api_permissions.IsfEMRAdmin'>]¶
-
queryset
= <QuerySet []>¶
-
serializer_class
¶ alias of
main.serializers.InstanceSerializer
-
-
class
main.api_views.
PatientEncounterViewSet
(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSet
-
permission_classes
= [<class 'rest_framework.permissions.IsAuthenticated'>]¶
-
queryset
= <QuerySet []>¶
-
serializer_class
¶
-
-
class
main.api_views.
PatientViewSet
(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSet
-
permission_classes
= [<class 'rest_framework.permissions.IsAuthenticated'>]¶
-
queryset
= <QuerySet []>¶
-
serializer_class
¶ alias of
main.serializers.PatientSerializer
-
-
class
main.api_views.
UserViewSet
(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSet
API Endpoint Adapter - Allergy
-
permission_classes
= [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'main.api_permissions.IsAdmin'>]¶
-
queryset
= <QuerySet [<fEMRUser: >]>¶
-
serializer_class
¶ alias of
main.serializers.UserSerializer
-
main.apps module¶
Handles top-level app configuration.
main.auth_views module¶
View functions geared toward user authentication. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
main.auth_views.
all_locked
(request)¶ Response for cases where a page requires an authenticated user with elevated privileges.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
change_password
(request)¶ Handle requests to change passwords for the AUTH_USER model.
- Parameters
request – Django request object. Provided by the URLS config.
- Returns
Renders the change_password page as an HTTPResponse.
-
main.auth_views.
login_view
(request)¶ Handles authenticating existing users.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
logout_view
(request)¶ Handles logout.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
not_logged_in
(request)¶ Response for cases where a page requires an authenticated user with elevated privileges.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
permission_denied
(request)¶ Response on pages that require higher privileges than the requesting user holds.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
please_register
(request)¶ Response for cases where a page requires any general authenticated user.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
register
(request)¶ Allows new user registration.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.auth_views.
required_change_password
(request)¶ Handle requests to change passwords for the AUTH_USER model.
- Parameters
request – Django request object. Provided by the URLS config.
- Returns
Renders the change_password page as an HTTPResponse.
-
main.auth_views.
thank_you_for_registering
(request)¶ Registration success return_response.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
main.autocomplete_views module¶
-
class
main.autocomplete_views.
AdministrationScheduleAutocomplete
(**kwargs)¶ Bases:
dal_select2.views.Select2QuerySetView
-
get_queryset
()¶ Filter the queryset with GET[‘q’].
-
-
class
main.autocomplete_views.
ChiefComplaintAutocomplete
(**kwargs)¶ Bases:
dal_select2.views.Select2QuerySetView
-
get_queryset
()¶ Filter the queryset with GET[‘q’].
-
-
class
main.autocomplete_views.
DiagnosisAutocomplete
(**kwargs)¶ Bases:
dal_select2.views.Select2QuerySetView
-
get_queryset
()¶ Filter the queryset with GET[‘q’].
-
-
class
main.autocomplete_views.
EthnicityAutocomplete
(**kwargs)¶ Bases:
dal_select2.views.Select2QuerySetView
-
get_queryset
()¶ Filter the queryset with GET[‘q’].
-
-
class
main.autocomplete_views.
MedicationAutocomplete
(**kwargs)¶ Bases:
dal_select2.views.Select2QuerySetView
-
get_queryset
()¶ Filter the queryset with GET[‘q’].
-
-
class
main.autocomplete_views.
RaceAutocomplete
(**kwargs)¶ Bases:
dal_select2.views.Select2QuerySetView
-
get_queryset
()¶ Filter the queryset with GET[‘q’].
-
main.background_tasks module¶
Non-view functions used to carry out background processes.
-
main.background_tasks.
reset_sessions
() → None¶ Empty out sessions older than 1 minute. :return:
-
main.background_tasks.
run_encounter_close
()¶ When triggered, this function will search for expired PatientEncounter objects and set them as inactive.
main.delete_views module¶
View functions handling displaying data models as sortable, filterable lists. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
main.delete_views.
delete_chief_complaint
(request, id=None, patient_id=None, encounter_id=None)¶ Delete a selected Chief Complaint and redirect back. :param request: :param id: :param patient_id: :param encounter_id: :return:
-
main.delete_views.
patient_delete_view
(request, id=None)¶ Delete function.
- Parameters
request – Django Request object.
id – The ID of the patient to delete.
- Returns
HTTPResponse.
main.edit_views module¶
Handles template rendering and logic for editing web forms. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
main.edit_views.
aux_form_view
(request, patient_id=None, encounter_id=None)¶ Used to edit Encounter objects.
- Parameters
request – Django Request object.
patient_id – The ID of the object to edit.
encounter_id –
- Returns
HTTPResponse.
-
main.edit_views.
delete_photo_view
(request, patient_id=None, encounter_id=None, photo_id=None)¶ Used to edit Encounter objects.
- Parameters
request – Django Request object.
patient_id –
encounter_id – The ID of the object to edit.
photo_id –
- Returns
HTTPResponse.
-
main.edit_views.
edit_photo_view
(request, patient_id=None, encounter_id=None, photo_id=None)¶ - Parameters
request –
patient_id –
encounter_id –
photo_id –
- Returns
-
main.edit_views.
encounter_edit_form_view
(request, patient_id=None, encounter_id=None)¶ Used to edit Encounter objects.
- Parameters
request – Django Request object.
patient_id – The ID of the object to edit.
encounter_id –
- Returns
HTTPResponse.
-
main.edit_views.
history_view
(request, patient_id=None, encounter_id=None)¶ - Parameters
request –
patient_id –
encounter_id –
- Returns
-
main.edit_views.
hpi_view
(request, patient_id=None, encounter_id=None)¶ - Parameters
request –
patient_id –
encounter_id –
- Returns
-
main.edit_views.
new_diagnosis_view
(request, patient_id=None, encounter_id=None)¶ Used to edit Encounter objects.
- Parameters
request – Django Request object.
patient_id – The ID of the object to edit.
encounter_id –
- Returns
HTTPResponse.
-
main.edit_views.
new_treatment_view
(request, patient_id=None, encounter_id=None)¶ Used to edit Encounter objects.
- Parameters
request – Django Request object.
patient_id – The ID of the object to edit.
encounter_id –
- Returns
HTTPResponse.
-
main.edit_views.
new_vitals_view
(request, patient_id=None, encounter_id=None)¶ Used to edit Encounter objects.
- Parameters
request – Django Request object.
patient_id – The ID of the object to edit.
encounter_id – THe ID of the encounter the vitals object is connected to.
- Returns
HTTPResponse.
-
main.edit_views.
patient_edit_form_view
(request, id=None)¶ Used to edit Patient objects.
- Parameters
request – Django Request object.
id – The ID of the object to edit.
- Returns
HTTPResponse.
-
main.edit_views.
patient_export_view
(request, id=None)¶
-
main.edit_views.
patient_medical
(request, id=None)¶
-
main.edit_views.
submit_hpi_view
(request, patient_id=None, encounter_id=None, hpi_id=None)¶ - Parameters
request –
patient_id –
encounter_id –
hpi_id –
- Returns
-
main.edit_views.
upload_photo_view
(request, patient_id=None, encounter_id=None)¶ - Parameters
request –
patient_id –
encounter_id –
- Returns
main.femr_admin_views module¶
-
main.femr_admin_views.
change_campaign
(request)¶
-
main.femr_admin_views.
edit_campaign_view
(request, id=None)¶
-
main.femr_admin_views.
edit_contact_view
(request, id=None)¶
-
main.femr_admin_views.
edit_instance_view
(request, id=None)¶
-
main.femr_admin_views.
edit_organization_view
(request, id=None)¶
-
main.femr_admin_views.
femr_admin_home
(request)¶
-
main.femr_admin_views.
get_client_ip
(request)¶
-
main.femr_admin_views.
list_campaign_view
(request)¶
-
main.femr_admin_views.
list_instance_view
(request)¶
-
main.femr_admin_views.
list_organization_view
(request)¶
-
main.femr_admin_views.
lock_campaign_view
(request, id=None)¶
-
main.femr_admin_views.
lock_instance_view
(request, id=None)¶
-
main.femr_admin_views.
new_campaign_view
(request)¶
-
main.femr_admin_views.
new_contact_view
(request)¶
-
main.femr_admin_views.
new_ethnicity_view
(request)¶
-
main.femr_admin_views.
new_instance_view
(request)¶
-
main.femr_admin_views.
new_organization_view
(request)¶
-
main.femr_admin_views.
new_race_view
(request)¶
-
main.femr_admin_views.
unlock_campaign_view
(request, id=None)¶
-
main.femr_admin_views.
unlock_instance_view
(request, id=None)¶
-
main.femr_admin_views.
view_contact_view
(request, id=None)¶
main.form_views module¶
Handles template rendering and logic for web forms. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
main.form_views.
patient_encounter_form_view
(request, id=None)¶ Used to create new PatientEncounter objects.
- Parameters
request – Django Request object.
id –
- Returns
HTTPResponse.
-
main.form_views.
patient_form_view
(request)¶ Used to create new Patient objects.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.form_views.
referral_form_view
(request, id=None)¶
main.forms module¶
Classes defining characteristics for data entry forms. Forms are generated as HTML from the structure of each Form’s superclass.
-
class
main.forms.
AddSupplyForm
(*args, **kwargs)¶ Bases:
django.forms.forms.Form
-
base_fields
= {'quantity': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {'quantity': <django.forms.fields.IntegerField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
-
class
main.forms.
AdminPasswordForm
(*args, **kwargs)¶ Bases:
django.contrib.auth.forms.UserCreationForm
Data entry form - fEMRUser
-
class
Meta
¶ Bases:
object
-
fields
= ['password1', 'password2']¶
-
model
¶ alias of
main.models.fEMRUser
-
-
base_fields
= {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
AuxiliaryPatientEncounterForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= ('procedure', 'pharmacy_notes')¶
-
labels
= {'procedure': 'Procedure/Counseling'}¶
-
model
¶ alias of
main.models.PatientEncounter
-
widgets
= {'pharmacy_notes': <django.forms.widgets.Textarea object>, 'procedure': <django.forms.widgets.Textarea object>}¶
-
-
base_fields
= {'pharmacy_notes': <django.forms.fields.CharField object>, 'procedure': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
CSVUploadForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.CSVUploadDocument
-
-
base_fields
= {'document': <django.forms.fields.FileField object>, 'mode_option': <django.forms.fields.TypedChoiceField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
CampaignForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
Data entry form - Campaign
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
exclude
= ('inventory',)¶
-
fields
= '__all__'¶
-
labels
= {'encounter_close': 'Encounter close (Days)', 'instance': 'Operation'}¶
-
model
¶ alias of
main.models.Campaign
-
widgets
= {'ethnicity': <dal_select2.widgets.ModelSelect2Multiple object>, 'race': <dal_select2.widgets.ModelSelect2Multiple object>}¶
-
-
base_fields
= {'active': <django.forms.fields.BooleanField object>, 'admins': <django.forms.models.ModelMultipleChoiceField object>, 'country': <django.forms.fields.CharField object>, 'encounter_close': <django.forms.fields.IntegerField object>, 'ethnicity_options': <django.forms.models.ModelMultipleChoiceField object>, 'instance': <django.forms.models.ModelChoiceField object>, 'main_contact': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'race_options': <django.forms.models.ModelMultipleChoiceField object>, 'telehealth': <django.forms.fields.BooleanField object>, 'timezone': <django.forms.fields.TypedChoiceField object>, 'units': <django.forms.fields.TypedChoiceField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
ChiefComplaintForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
labels
= {'text': 'Chief Complaint'}¶
-
model
¶ alias of
main.models.ChiefComplaint
-
-
base_fields
= {'active': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
ContactForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
Data entry form - Contact
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Contact
-
-
base_fields
= {'email_address': <django.forms.fields.CharField object>, 'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>, 'phone_number': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
DateInputOverride
(attrs=None, format=None)¶ Bases:
django.forms.widgets.DateInput
Overrides the form type for date inputs.
-
input_type
= 'date'¶
-
property
media
¶
-
-
class
main.forms.
DiagnosisForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
labels
= {'text': 'Diagnosis'}¶
-
model
¶ alias of
main.models.Diagnosis
-
-
base_fields
= {'text': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
EthnicityForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
Data entry form - Instance
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Ethnicity
-
-
base_fields
= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
ForgotUsernameForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.forms.Form
-
base_fields
= {'email': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'email': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
-
class
main.forms.
HistoryOfPresentIllnessForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.HistoryOfPresentIllness
-
widgets
= {'tests_ordered': <dal_select2.widgets.ModelSelect2Multiple object>}¶
-
-
base_fields
= {'narrative': <django.forms.fields.CharField object>, 'onset': <django.forms.fields.CharField object>, 'palliates': <django.forms.fields.CharField object>, 'physical_examination': <django.forms.fields.CharField object>, 'provokes': <django.forms.fields.CharField object>, 'quality': <django.forms.fields.CharField object>, 'radiation': <django.forms.fields.CharField object>, 'severity': <django.forms.fields.CharField object>, 'tests_ordered': <django.forms.models.ModelMultipleChoiceField object>, 'time_of_day': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
HistoryPatientEncounterForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= ('medical_history', 'social_history', 'current_medications', 'family_history')¶
-
labels
= {'medical_history': 'Medical/Surgical history'}¶
-
model
¶ alias of
main.models.PatientEncounter
-
widgets
= {'current_medications': <django.forms.widgets.Textarea object>, 'family_history': <django.forms.widgets.Textarea object>, 'medical_history': <django.forms.widgets.Textarea object>, 'social_history': <django.forms.widgets.Textarea object>}¶
-
-
base_fields
= {'current_medications': <django.forms.fields.CharField object>, 'family_history': <django.forms.fields.CharField object>, 'medical_history': <django.forms.fields.CharField object>, 'social_history': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
InstanceForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
Data entry form - Instance
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Instance
-
-
base_fields
= {'active': <django.forms.fields.BooleanField object>, 'admins': <django.forms.models.ModelMultipleChoiceField object>, 'main_contact': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'organization': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
InventoryEntryForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.InventoryEntry
-
-
base_fields
= {'box_number': <django.forms.fields.CharField object>, 'category': <django.forms.models.ModelChoiceField object>, 'count': <django.forms.fields.IntegerField object>, 'expiration_date': <django.forms.fields.DateField object>, 'form': <django.forms.models.ModelChoiceField object>, 'initial_quantity': <django.forms.fields.IntegerField object>, 'item_number': <django.forms.fields.CharField object>, 'manufacturer': <django.forms.models.ModelChoiceField object>, 'medication': <django.forms.models.ModelChoiceField object>, 'quantity': <django.forms.fields.IntegerField object>, 'strength': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
LoginForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.forms.Form
Handles managing forms for user authentication.
-
base_fields
= {'password': <django.forms.fields.CharField object>, 'remember_me': <django.forms.fields.BooleanField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'password': <django.forms.fields.CharField object>, 'remember_me': <django.forms.fields.BooleanField object>, 'username': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
-
class
main.forms.
MOTDForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.MessageOfTheDay
-
widgets
= {'end_date': <main.forms.DateInputOverride object>, 'start_date': <main.forms.DateInputOverride object>, 'text': <django.forms.widgets.Textarea object>}¶
-
-
base_fields
= {'end_date': <django.forms.fields.DateField object>, 'start_date': <django.forms.fields.DateField object>, 'text': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
MedicationForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
labels
= {'text': 'Medication'}¶
-
model
¶ alias of
main.models.Medication
-
-
base_fields
= {'text': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
OrganizationForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Organization
-
-
base_fields
= {'active': <django.forms.fields.BooleanField object>, 'address1': <django.forms.fields.CharField object>, 'address2': <django.forms.fields.CharField object>, 'admins': <django.forms.models.ModelMultipleChoiceField object>, 'city': <django.forms.fields.CharField object>, 'contract_start_date': <django.forms.fields.DateField object>, 'main_contact': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'state': <django.forms.models.ModelChoiceField object>, 'zip_code': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
PatientDiagnosisForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= ('diagnosis',)¶
-
labels
= {'diagnosis': 'RECORD ALL DIAGNOSES HERE'}¶
-
model
¶ alias of
main.models.PatientDiagnosis
-
widgets
= {'diagnosis': <dal_select2.widgets.ModelSelect2Multiple object>}¶
-
-
base_fields
= {'diagnosis': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
PatientEncounterForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Data entry form - PatientEncounter
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
exclude
= ('procedure', 'pharmacy_notes', 'medical_history', 'social_history', 'current_medications', 'family_history')¶
-
fields
= '__all__'¶
-
labels
= {'body_mass_index': 'Body Mass Index', 'community_health_worker_notes': 'Notes', 'timestamp': 'Encounter date'}¶
-
model
¶ alias of
main.models.PatientEncounter
-
widgets
= {'chief_complaint': <dal_select2.widgets.ModelSelect2Multiple object>, 'community_health_worker_notes': <django.forms.widgets.Textarea object>, 'diagnoses': <dal_select2.widgets.ModelSelect2Multiple object>, 'patient_history': <django.forms.widgets.Textarea object>, 'timestamp': <main.forms.DateInputOverride object>}¶
-
-
base_fields
= {'active': <django.forms.fields.BooleanField object>, 'alcohol': <django.forms.fields.BooleanField object>, 'bmi_percentile': <django.forms.fields.IntegerField object>, 'body_height_primary': <django.forms.fields.IntegerField object>, 'body_height_secondary': <django.forms.fields.FloatField object>, 'body_mass_index': <django.forms.fields.FloatField object>, 'body_weight': <django.forms.fields.FloatField object>, 'chief_complaint': <django.forms.models.ModelMultipleChoiceField object>, 'community_health_worker_notes': <django.forms.fields.CharField object>, 'head_occipital_frontal_circumference_percentile': <django.forms.fields.IntegerField object>, 'history_of_diabetes': <django.forms.fields.BooleanField object>, 'history_of_high_cholesterol': <django.forms.fields.BooleanField object>, 'history_of_hypertension': <django.forms.fields.BooleanField object>, 'patient': <django.forms.models.ModelChoiceField object>, 'patient_history': <django.forms.fields.CharField object>, 'photos': <django.forms.models.ModelMultipleChoiceField object>, 'smoking': <django.forms.fields.BooleanField object>, 'timestamp': <django.forms.fields.DateTimeField object>, 'weeks_pregnant': <django.forms.fields.IntegerField object>, 'weight_for_length_percentile': <django.forms.fields.IntegerField object>}¶
-
clean_body_mass_index
()¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
save
(commit=True)¶ Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.
-
class
-
class
main.forms.
PatientForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Data entry form - Patient
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
exclude
= ('campaign',)¶
-
fields
= '__all__'¶
-
labels
= {'email_address': 'Email address', 'phone_number': 'Phone number', 'social_security_number': 'National I.D. Number'}¶
-
model
¶ alias of
main.models.Patient
-
widgets
= {'date_of_birth': <main.forms.DateInputOverride object>, 'state': <dal_select2.widgets.ModelSelect2Multiple object>}¶
-
-
base_fields
= {'address1': <django.forms.fields.CharField object>, 'address2': <django.forms.fields.CharField object>, 'age': <django.forms.fields.IntegerField object>, 'campaign_key': <django.forms.fields.IntegerField object>, 'city': <django.forms.fields.CharField object>, 'current_address': <django.forms.fields.CharField object>, 'date_of_birth': <django.forms.fields.DateField object>, 'email_address': <django.forms.fields.CharField object>, 'ethnicity': <django.forms.models.ModelChoiceField object>, 'explain': <django.forms.fields.CharField object>, 'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>, 'middle_name': <django.forms.fields.CharField object>, 'phone_number': <django.forms.fields.CharField object>, 'phone_number_type': <django.forms.fields.CharField object>, 'preferred_language': <django.forms.fields.CharField object>, 'previous_address': <django.forms.fields.CharField object>, 'race': <django.forms.models.ModelChoiceField object>, 'sex_assigned_at_birth': <django.forms.fields.TypedChoiceField object>, 'shared_email_address': <django.forms.fields.BooleanField object>, 'shared_phone_number': <django.forms.fields.BooleanField object>, 'social_security_number': <django.forms.fields.CharField object>, 'state': <django.forms.models.ModelChoiceField object>, 'suffix': <django.forms.fields.TypedChoiceField object>, 'zip_code': <django.forms.fields.CharField object>}¶
-
clean_date_of_birth
()¶
-
clean_email_address
()¶
-
clean_phone_number
()¶
-
clean_zip_code
()¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
PhotoForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Photo
-
-
base_fields
= {'description': <django.forms.fields.CharField object>, 'imaging_link': <django.forms.fields.CharField object>, 'photo': <django.forms.fields.FileField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
RaceForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
Data entry form - Race
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Race
-
-
base_fields
= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
RegisterForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.forms.Form
Handles managing forms for new user registration.
-
base_fields
= {'email': <django.forms.fields.CharField object>, 'first': <django.forms.fields.CharField object>, 'last': <django.forms.fields.CharField object>, 'password': <django.forms.fields.CharField object>, 'password_conf': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'email': <django.forms.fields.CharField object>, 'first': <django.forms.fields.CharField object>, 'last': <django.forms.fields.CharField object>, 'password': <django.forms.fields.CharField object>, 'password_conf': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
-
class
main.forms.
RemoveSupplyForm
(*args, **kwargs)¶ Bases:
django.forms.forms.Form
-
base_fields
= {'quantity': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {'quantity': <django.forms.fields.IntegerField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
-
class
main.forms.
TreatmentForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
labels
= {'administration_schedule': 'Admin. Schedule'}¶
-
model
¶ alias of
main.models.Treatment
-
widgets
= {'medication': <dal_select2.widgets.ModelSelect2Multiple object>}¶
-
-
base_fields
= {'administration_schedule': <django.forms.models.ModelChoiceField object>, 'days': <django.forms.fields.IntegerField object>, 'diagnosis': <django.forms.models.ModelChoiceField object>, 'medication': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
UserForm
(*args, **kwargs)¶ Bases:
django.contrib.auth.forms.UserCreationForm
Data entry form - fEMRUser
-
class
Meta
¶ Bases:
object
-
fields
= ['first_name', 'last_name', 'email', 'username', 'password1', 'password2', 'groups']¶
-
model
¶ alias of
main.models.fEMRUser
-
-
base_fields
= {'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'last_name': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'groups': <django.forms.models.ModelMultipleChoiceField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
UserUpdateForm
(user, *args, **kwargs)¶ Bases:
django.contrib.auth.forms.UserChangeForm
Data entry form - fEMRUser
-
class
Meta
¶ Bases:
object
-
fields
= ['first_name', 'last_name', 'email', 'username', 'campaigns', 'groups']¶
-
model
¶ alias of
main.models.fEMRUser
-
-
base_fields
= {'campaigns': <django.forms.models.ModelMultipleChoiceField object>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'last_name': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'groups': <django.forms.models.ModelMultipleChoiceField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
password
= None¶
-
class
-
class
main.forms.
VitalsForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Data entry form - Vitals
-
class
Meta
¶ Bases:
object
Metaclass controlling model references.
-
fields
= '__all__'¶
-
labels
= {'alcohol': 'History of Substance/Alcohol Abuse', 'mean_arterial_pressure': 'Mean Arterial Pressure', 'smoking': 'Tobacco Use Disorder'}¶
-
model
¶ alias of
main.models.Vitals
-
-
base_fields
= {'body_temperature': <django.forms.fields.FloatField object>, 'diastolic_blood_pressure': <django.forms.fields.IntegerField object>, 'encounter': <django.forms.models.ModelChoiceField object>, 'glucose_level': <django.forms.fields.FloatField object>, 'heart_rate': <django.forms.fields.IntegerField object>, 'mean_arterial_pressure': <django.forms.fields.FloatField object>, 'oxygen_concentration': <django.forms.fields.IntegerField object>, 'respiratory_rate': <django.forms.fields.IntegerField object>, 'systolic_blood_pressure': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
save
(commit=True)¶ Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.
-
class
-
class
main.forms.
fEMRAdminUserForm
(*args, **kwargs)¶ Bases:
django.contrib.auth.forms.UserCreationForm
Data entry form - fEMRUser
-
class
Meta
¶ Bases:
object
-
fields
= ['first_name', 'last_name', 'email', 'username', 'password1', 'password2', 'groups', 'campaigns']¶
-
model
¶ alias of
main.models.fEMRUser
-
-
base_fields
= {'campaigns': <django.forms.models.ModelMultipleChoiceField object>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'last_name': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
main.forms.
fEMRAdminUserUpdateForm
(*args, **kwargs)¶ Bases:
django.contrib.auth.forms.UserChangeForm
Data entry form - fEMRUser
-
class
Meta
¶ Bases:
object
-
fields
= ['first_name', 'last_name', 'email', 'username', 'groups', 'campaigns']¶
-
model
¶ alias of
main.models.fEMRUser
-
-
base_fields
= {'campaigns': <django.forms.models.ModelMultipleChoiceField object>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'last_name': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
password
= None¶
-
class
-
main.forms.
filter_campaigns_for_instances
(user)¶
main.formulary_management module¶
-
main.formulary_management.
add_supply_view
(request)¶
-
main.formulary_management.
csv_export_view
(request)¶
-
main.formulary_management.
csv_handler_view
(request)¶
-
main.formulary_management.
csv_import_view
(request)¶
-
main.formulary_management.
edit_add_supply_view
(request, id=None)¶
-
main.formulary_management.
edit_sub_supply_view
(request, id=None)¶
-
main.formulary_management.
formulary_home_view
(request)¶
main.list_views module¶
View functions handling displaying data models as sortable, filterable lists. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
main.list_views.
chief_complaint_list_view
(request, patient_id=None, encounter_id=None)¶
-
main.list_views.
filter_patient_list_view
(request)¶ Runs a search of all patients, using a name entered on the List page.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.list_views.
get_latest_timestamp
(patient)¶
-
main.list_views.
patient_csv_export_view
(request)¶ CSV Export of an Administrative/Clinician list of patients entered into the system.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.list_views.
patient_list_view
(request)¶ Administrative/Clinician list of patients entered into the system.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
-
main.list_views.
search_patient_list_view
(request)¶ Runs a search of all patients, using a name entered on the List page.
- Parameters
request – Django Request object.
- Returns
HTTPResponse.
main.middleware module¶
-
class
main.middleware.
CampaignActivityCheckMiddleware
(get_response)¶ Bases:
object
-
class
main.middleware.
CheckBrowserMiddleware
(get_response)¶ Bases:
object
-
class
main.middleware.
CheckForSessionInvalidatedMiddleware
(get_response)¶ Bases:
object
-
class
main.middleware.
ClinicMessageMiddleware
(get_response)¶ Bases:
object
-
class
main.middleware.
HandleErrorMiddleware
(get_response)¶ Bases:
object
-
class
main.middleware.
TimezoneMiddleware
(get_response)¶ Bases:
object
main.models module¶
Enumerates all contents of all database models. Migrations run will generate a table for each of these containing the listed fields.
-
class
main.models.
AdministrationSchedule
(id, text)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
treatment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.models.
AuditEntry
(id, action, ip, username, timestamp, campaign)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
action
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
campaign
¶ 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 aForwardManyToOneDescriptor
instance.
-
campaign_id
¶
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, 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.
-
ip
¶ 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>¶
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
username
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
CSVUploadDocument
(id, document, mode_option)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
document
¶ 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)
-
get_mode_option_display
(*, field=<django.db.models.fields.CharField: mode_option>)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mode_option
¶ 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>¶
-
exception
-
class
main.models.
Campaign
(id, name, active, units, telehealth, encounter_close, country, timezone, instance, inventory, main_contact)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
active
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
admins
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
auditentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
country
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
databasechangelog_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
encounter_close
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ethnicity_options
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
femruser_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
get_timezone_display
(*, field=<django.db.models.fields.CharField: timezone>)¶
-
get_units_display
(*, field=<django.db.models.fields.CharField: units>)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance
¶ 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 aForwardManyToOneDescriptor
instance.
-
instance_id
¶
-
inventory
¶ 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 aForwardManyToOneDescriptor
instance.
-
inventory_id
¶
-
main_contact
¶ 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 aForwardManyToOneDescriptor
instance.
-
main_contact_id
¶
-
name
¶ 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_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
patientencounter_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
race_options
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
telehealth
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
timezone
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
units
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
ChiefComplaint
(id, text, active)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
active
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
historyofpresentillness_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
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>¶
-
patientencounter_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
Contact
(id, first_name, last_name, email_address, phone_number)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
email_address
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
first_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_name
¶ 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>¶
-
phone_number
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
DatabaseChangeLog
(id, action, model, instance, ip, username, timestamp, campaign)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
action
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
campaign
¶ 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 aForwardManyToOneDescriptor
instance.
-
campaign_id
¶
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, 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.
-
instance
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ip
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
model
¶ 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>¶
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
username
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
Diagnosis
(id, text)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
patientdiagnosis_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
treatment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.models.
Ethnicity
(id, name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
campaign_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ 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_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.models.
HistoryOfPresentIllness
(id, chief_complaint, encounter, onset, provokes, palliates, quality, radiation, severity, time_of_day, narrative, physical_examination)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
chief_complaint
¶ 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 aForwardManyToOneDescriptor
instance.
-
chief_complaint_id
¶
-
encounter
¶ 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 aForwardManyToOneDescriptor
instance.
-
encounter_id
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
narrative
¶ 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>¶
-
onset
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
palliates
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
physical_examination
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
provokes
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quality
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
radiation
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
severity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
tests_ordered
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
time_of_day
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
Instance
(id, name, active, main_contact, organization)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
active
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
admins
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
campaign_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
main_contact
¶ 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 aForwardManyToOneDescriptor
instance.
-
main_contact_id
¶
-
name
¶ 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>¶
-
organization
¶ 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 aForwardManyToOneDescriptor
instance.
-
organization_id
¶
-
exception
-
class
main.models.
Inventory
(id)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
campaign_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
entries
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
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>¶
-
exception
-
class
main.models.
InventoryCategory
(id, name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
inventoryentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
name
¶ 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>¶
-
exception
-
class
main.models.
InventoryEntry
(id, category, medication, form, strength, count, quantity, initial_quantity, item_number, box_number, expiration_date, manufacturer, timestamp)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
box_number
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
category
¶ 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 aForwardManyToOneDescriptor
instance.
-
category_id
¶
-
count
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
expiration_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
form
¶ 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 aForwardManyToOneDescriptor
instance.
-
form_id
¶
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, 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.
-
initial_quantity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
inventory_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
item_number
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
manufacturer
¶ 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 aForwardManyToOneDescriptor
instance.
-
manufacturer_id
¶
-
medication
¶ 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 aForwardManyToOneDescriptor
instance.
-
medication_id
¶
-
objects
= <django.db.models.manager.Manager object>¶
-
quantity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
strength
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
InventoryForm
(id, name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
inventoryentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
name
¶ 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>¶
-
exception
-
class
main.models.
Manufacturer
(id, name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
inventoryentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
name
¶ 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>¶
-
exception
-
class
main.models.
Medication
(id, text)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
inventoryentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
objects
= <django.db.models.manager.Manager object>¶
-
text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
treatment_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.models.
MessageOfTheDay
(id, text, start_date, end_date)¶ Bases:
main.models.SingletonModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
end_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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>¶
-
start_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
ModifiedMaxValueValidator
(*args, **kwargs)¶ Bases:
django.core.validators.BaseValidator
-
code
= 'max_value'¶
-
compare
(a, b)¶
-
deconstruct
()¶ Return a 3-tuple of class import path, positional arguments, and keyword arguments.
-
message
= 'Ensure this value is less than %(limit_value)s.'¶
-
-
class
main.models.
Organization
(id, name, active, contract_start_date, address1, address2, zip_code, city, state, main_contact)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
active
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
address1
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
address2
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
admins
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
city
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
contract_start_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
main_contact
¶ 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 aForwardManyToOneDescriptor
instance.
-
main_contact_id
¶
-
name
¶ 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>¶
-
state
¶ 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 aForwardManyToOneDescriptor
instance.
-
state_id
¶
-
zip_code
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
Patient
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Used to manage data elements for the given patient. This may, in clinical settings, be a standalone object, or may be connected directly to a user of the fEMR-OnChain platform.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
address1
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
address2
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
age
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
campaign
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
campaign_key
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
city
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
current_address
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
date_of_birth
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
email_address
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ethnicity
¶ 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 aForwardManyToOneDescriptor
instance.
-
ethnicity_id
¶
-
explain
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
first_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_date_of_birth
(*, field=<django.db.models.fields.DateField: date_of_birth>, is_next=True, **kwargs)¶
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_date_of_birth
(*, field=<django.db.models.fields.DateField: date_of_birth>, is_next=False, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)¶
-
get_sex_assigned_at_birth_display
(*, field=<django.db.models.fields.CharField: sex_assigned_at_birth>)¶
-
get_suffix_display
(*, field=<django.db.models.fields.CharField: suffix>)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
middle_name
¶ 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>¶
-
patientencounter_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
phone_number
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
phone_number_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
preferred_language
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
previous_address
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
race
¶ 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 aForwardManyToOneDescriptor
instance.
-
race_id
¶
-
sex_assigned_at_birth
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
state
¶ 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 aForwardManyToOneDescriptor
instance.
-
state_id
¶
-
suffix
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
survey_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
zip_code
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
PatientDiagnosis
(id, encounter)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
diagnosis
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
encounter
¶ 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 aForwardManyToOneDescriptor
instance.
-
encounter_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>¶
-
exception
-
class
main.models.
PatientEncounter
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Individual data point in a patient’s medical record.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
active
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
alcohol
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
bmi_percentile
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
body_height_primary
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
body_height_secondary
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
body_mass_index
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
body_weight
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
campaign
¶ 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 aForwardManyToOneDescriptor
instance.
-
campaign_id
¶
-
chief_complaint
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
community_health_worker_notes
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
current_medications
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
family_history
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)¶
-
head_occipital_frontal_circumference_percentile
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_of_diabetes
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_of_high_cholesterol
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_of_hypertension
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
historyofpresentillness_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
medical_history
¶ 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
¶ 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 aForwardManyToOneDescriptor
instance.
-
patient_history
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
patient_id
¶
-
patientdiagnosis_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
pharmacy_notes
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
photos
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
procedure
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
save
(*args, **kwargs)¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
save_no_timestamp
(*args, **kwargs)¶
-
smoking
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
treatment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
unit_aware_weight
(unit)¶
-
vitals_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
weeks_pregnant
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
weight_for_length_percentile
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
Photo
(id, description, photo, imaging_link)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
imaging_link
¶ 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>¶
-
patientencounter_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
photo
¶ 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)
-
exception
-
class
main.models.
Race
(id, name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
campaign_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ 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_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.models.
SingletonModel
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
-
delete
(*args, **kwargs)¶
-
classmethod
load
()¶
-
save
(*args, **kwargs)¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
-
class
main.models.
State
(id, name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ 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>¶
-
organization_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
patient_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.models.
Test
(id, text)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
historyofpresentillness_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
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>¶
-
text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
Treatment
(id, administration_schedule, days, prescriber, diagnosis, encounter, timestamp)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
administration_schedule
¶ 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 aForwardManyToOneDescriptor
instance.
-
administration_schedule_id
¶
-
days
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
diagnosis
¶ 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 aForwardManyToOneDescriptor
instance.
-
diagnosis_id
¶
-
encounter
¶ 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 aForwardManyToOneDescriptor
instance.
-
encounter_id
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
medication
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
objects
= <django.db.models.manager.Manager object>¶
-
prescriber
¶ 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 aForwardManyToOneDescriptor
instance.
-
prescriber_id
¶
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
UnitsSetting
(id, units)¶ Bases:
main.models.SingletonModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
get_units_display
(*, field=<django.db.models.fields.CharField: units>)¶
-
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>¶
-
units
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
main.models.
UserSession
(id, user, session_key, timestamp)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, 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>¶
-
session_key
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ 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.place
is aForwardOneToOneDescriptor
instance.
-
user_id
¶
-
exception
-
class
main.models.
Vitals
(id, encounter, diastolic_blood_pressure, systolic_blood_pressure, mean_arterial_pressure, heart_rate, respiratory_rate, body_temperature, oxygen_concentration, glucose_level, timestamp)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
body_temperature
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
diastolic_blood_pressure
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
encounter
¶ 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 aForwardManyToOneDescriptor
instance.
-
encounter_id
¶
-
get_next_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
-
get_previous_by_timestamp
(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)¶
-
glucose_level
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
heart_rate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mean_arterial_pressure
¶ 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>¶
-
oxygen_concentration
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
respiratory_rate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
systolic_blood_pressure
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
unit_aware_temperature
(unit)¶
-
exception
-
main.models.
cal_key
(fk)¶
-
class
main.models.
fEMRUser
(*args, **kwargs)¶ Bases:
django.contrib.auth.models.AbstractUser
Inherits from Django’s AbstractUser, adding fEMR-OnChain-relevant fields to the objects.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
auth_token
¶ 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.restaurant
is aReverseOneToOneDescriptor
instance.
-
campaign_admins
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
campaign_main_contact
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
campaigns
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
change_password
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
comment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
created_by
¶ 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 aForwardManyToOneDescriptor
instance.
-
created_by_id
¶
-
femruser_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.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_date_joined
(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)¶
-
get_next_by_password_reset_last
(*, field=<django.db.models.fields.DateTimeField: password_reset_last>, is_next=True, **kwargs)¶
-
get_previous_by_date_joined
(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)¶
-
get_previous_by_password_reset_last
(*, field=<django.db.models.fields.DateTimeField: password_reset_last>, is_next=False, **kwargs)¶
-
groups
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance_admins
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
instance_main_contact
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
logentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
logged_in_user
¶ 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.restaurant
is aReverseOneToOneDescriptor
instance.
-
organization_admins
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
organization_main_contact
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
password_reset_last
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
recipient
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
sender
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
supportticket_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
treatment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
user_permissions
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
main.models.
get_new_inventory
()¶
-
main.models.
get_nondisclosed_ethnicity
()¶
-
main.models.
get_nondisclosed_race
()¶
-
main.models.
get_test_org
()¶
main.operation_admin_views module¶
-
main.operation_admin_views.
operation_admin_home_view
(request)¶
main.organization_admin_views module¶
-
main.organization_admin_views.
organization_admin_home_view
(request)¶
main.password_validators module¶
main.pharmacy_views module¶
-
main.pharmacy_views.
pharmacy_home_view
(request)¶
main.qldb_interface module¶
Application-wide functions for interfacing with AWS QLDB.
-
main.qldb_interface.
create_new_patient
(patient: dict)¶ Create a new, blank patient record.
-
main.qldb_interface.
create_new_patient_encounter
(patient_encounter: dict)¶ Create a new, blank patient record.
-
main.qldb_interface.
create_tables
()¶
-
main.qldb_interface.
get_all_patient_encounters
()¶ Retrieve all patient data
-
main.qldb_interface.
get_all_patients
()¶ Retrieve all patient data
-
main.qldb_interface.
update_patient
(patient: dict)¶ Update a patient with the provided dataset.
-
main.qldb_interface.
update_patient_encounter
(patient_encounter: dict)¶
main.serializers module¶
Serializer objects defining what fields of each model should be exposed to the API.
-
class
main.serializers.
CampaignSerializer
(*args, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Campaign
-
-
class
-
class
main.serializers.
GroupSerializer
(*args, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializer
Serializes the django.contrib.auth.models.Group model for API consumption.
-
class
main.serializers.
InstanceSerializer
(*args, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Instance
-
-
class
-
class
main.serializers.
PatientEncounterSerializer
(*args, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
Meta
¶ Bases:
object
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.PatientEncounter
-
-
class
-
class
main.serializers.
PatientSerializer
(*args, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializer
Serializes the Patient model for API consumption.
-
class
Meta
¶ Bases:
object
Serializer meta class.
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.Patient
-
-
class
-
class
main.serializers.
UserSerializer
(*args, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializer
Serializes the fEMRUser model for API consumption.
-
class
Meta
¶ Bases:
object
Serializer meta class.
-
fields
= '__all__'¶
-
model
¶ alias of
main.models.fEMRUser
-
-
class
main.small_forms_views module¶
-
main.small_forms_views.
chief_complaint_form_view
(request)¶
-
main.small_forms_views.
diagnosis_form_view
(request)¶
-
main.small_forms_views.
medication_form_view
(request)¶
-
main.small_forms_views.
treatment_form_view
(request)¶
main.survey_models module¶
-
class
main.survey_models.
Survey
(id, patient, item, code, data_type, display_name, value_set, valid_range, field_length, comments)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
code
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
comments
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
data_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
display_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
field_length
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
item
¶ 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
¶ 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 aForwardManyToOneDescriptor
instance.
-
patient_id
¶
-
valid_range
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
value_set
¶ 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 aForwardManyToOneDescriptor
instance.
-
value_set_id
¶
-
exception
-
class
main.survey_models.
SurveyValueSet
(id)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
options
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
survey_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
main.survey_models.
SurveyValueSetOption
(id, code, display_name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
code
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
display_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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>¶
-
surveyvalueset_set
¶ 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
main.tests module¶
Contains unit tests for verifying correct functionality of functions used in the application.
main.urls module¶
main.views module¶
View functions for top-level locations. All views, except auth views and the index view, should be considered to check for a valid and authenticated user. If one is not found, they will direct to the appropriate error page.
-
main.views.
forgot_username
(request)¶
-
main.views.
healthcheck
(request)¶ Returns a success message.
-
main.views.
help_messages_off
(request)¶
-
main.views.
home
(request)¶ The landing page for the authenticated administrative user.
- Parameters
request – Django Request object.
- Returns
An HttpResponse, rendering the home page.
-
main.views.
index
(request)¶ Initial landing view.
- Parameters
request – A Django request object.
- Returns
A template rendered as an HTTPResponse.
-
main.views.
library
(request)¶ The root of the main library page, where clinical users of the application can view and manage the data models contained in the fEMR On-Chain database.
- Parameters
request – Django Request object.
- Returns
An HttpResponse, rendering the library page.
-
main.views.
set_timezone
(request)¶
Module contents¶
This package provides EMR functionality, patient management, and tie-ins with other packages used by the app.