def patient_start_ivr(request, patient_id): """Start interactive voice interaction with patient.""" patient = get_object_or_404(patients.Patient, pk=patient_id) survey = PatientSurvey(patient=patient, query_type=QUERY_TYPE_IVR, is_test=True) survey.start() return redirect('patient-list')
def patient_start_adherence_tree(request, patient_id): """Start adherence tree interaction with patient.""" patient = get_object_or_404(patients.Patient, pk=patient_id) survey = PatientSurvey(patient=patient, query_type=QUERY_TYPE_SMS, is_test=True) survey.start() return redirect('patient-list')