Patients
This package contains views related to patients
Assign View
- class ycms.cms.views.patients.assign_view.AssignPatientView(**kwargs)
Bases:
TemplateViewView allowing to assign the bed assignment visually
- context_object_name = 'bed_assignment'
- dispatch(request, *args, **kwargs)
- get_context_data(**kwargs)
- model
alias of
BedAssignment
- post(request, *args, **kwargs)
This function assigns a patient to a room
- template_name = 'bed_assignment/assign_bed_assignment.html'
Discharge View
Intake Form View
- class ycms.cms.views.patients.intake_form_view.IntakeFormView(**kwargs)
Bases:
TemplateViewView to perform intake on new or existing patients
- dispatch(request, *args, **kwargs)
- get_context_data(**kwargs)
This function returns a list of all patients, as well as a form for creating a new one
- Parameters:
kwargs (dict) – The supplied keyword arguments
- Returns:
Response for filtered offers
- Return type:
- post(request, *args, **kwargs)
Submit
PatientForm- Parameters:
request (HttpRequest) – The current request
*args (list) – The supplied arguments
**kwargs (dict) – The supplied keyword arguments
- Returns:
Redirect to list of patients
- Return type:
- template_name = 'patients/patient_intake_form.html'
Patient Details View
- class ycms.cms.views.patients.patient_details_view.IntakeUpdateView(**kwargs)
Bases:
UpdateViewView to update a hospital stay
- dispatch(request, *args, **kwargs)
- form_class
alias of
RecordForm
- form_invalid(form)
If the form is invalid, render the invalid form.
- form_valid(form)
If the form is valid, save the associated model.
- model
alias of
MedicalRecord
- class ycms.cms.views.patients.patient_details_view.PatientDetailsView(**kwargs)
Bases:
TemplateViewView to see all information about a single patient and their medical history
- dispatch(request, *args, **kwargs)
- get_context_data(**kwargs)
This function returns all data about a patient.
- Parameters:
kwargs (dict) – The supplied keyword arguments
- Returns:
Response for filtered offers
- Return type:
- template_name = 'patients/patient_details.html'
- class ycms.cms.views.patients.patient_details_view.PlannedStayCancelView(*args, **kwargs)
Bases:
DeleteViewView to cancel (delete) a planned hospital stay
- dispatch(request, *args, **kwargs)
- form_invalid(form)
If the form is invalid, render the invalid form.
- form_valid(_form)
If the form is valid, redirect to the supplied URL.
- model
alias of
BedAssignment
- class ycms.cms.views.patients.patient_details_view.RecordCreateView(**kwargs)
Bases:
CreateViewView to create a record
- dispatch(request, *args, **kwargs)
- form_class
alias of
RecordForm
- form_invalid(form)
If the form is invalid, render the invalid form.
- form_valid(form)
If the form is valid, save the associated model.
- model
alias of
MedicalRecord
Patients List View
- class ycms.cms.views.patients.patients_list_view.PatientCreateView(**kwargs)
Bases:
CreateViewView to create a patient
- dispatch(request, *args, **kwargs)
- form_class
alias of
PatientForm
- form_invalid(form)
If the form is invalid, render the invalid form.
- form_valid(form)
If the form is valid, save the associated model.
- success_url = '/patients/'
- class ycms.cms.views.patients.patients_list_view.PatientDeleteView(*args, **kwargs)
Bases:
DeleteViewView to delete a patient
- dispatch(request, *args, **kwargs)
- form_invalid(form)
If the form is invalid, render the invalid form.
- form_valid(form)
If the form is valid, redirect to the supplied URL.
- success_url = '/patients/'
- class ycms.cms.views.patients.patients_list_view.PatientUpdateView(**kwargs)
Bases:
UpdateViewView to update a patient
- dispatch(request, *args, **kwargs)
- form_class
alias of
PatientForm
- form_invalid(form)
If the form is invalid, render the invalid form.
- form_valid(form)
If the form is valid, save the associated model.
- get_form_kwargs()
Return the keyword arguments for instantiating the form.
- class ycms.cms.views.patients.patients_list_view.PatientsListView(**kwargs)
Bases:
TemplateViewView to see all patients and add a new one
- dispatch(request, *args, **kwargs)
- get_context_data(**kwargs)
This function returns a list of all patients.
- Parameters:
kwargs (dict) – The supplied keyword arguments
- Returns:
Response for filtered offers
- Return type:
- template_name = 'patients/patients_list.html'
Update Patient Stay View
- class ycms.cms.views.patients.update_patient_stay_view.UpdatePatientStayView(**kwargs)
Bases:
TemplateViewView to update a patient’s detail and their most recent hospital stay
- dispatch(request, *args, **kwargs)
- get(request, *args, **kwargs)
This function returns forms for updating a patient and their current bed assignment
- Parameters:
request (HttpRequest) – The current request
args (list) – The supplied arguments
kwargs (dict) – The supplied keyword arguments
- Returns:
Response for filtered offers
- Return type:
- post(request, *args, **kwargs)
- Submit
PatientForm and
IntakeBedAssignmentForm
- Parameters:
request (HttpRequest) – The current request
*args (list) – The supplied arguments
**kwargs (dict) – The supplied keyword arguments
- Returns:
Redirect to list of patients
- Return type:
- Submit
- template_name = 'patients/patient_card_wrapper.html'