コード例 #1
0
ファイル: views.py プロジェクト: dnacreative/medobs
def patient_reservations(request):
	response_data = {"patient": None}

	if request.method == 'POST':
		form = Patient_detail_form(request.POST)
		if form.is_valid():
			hexdigest = get_hexdigest(form.cleaned_data["ident_hash"])
			try:
				response_data["patient"] = Patient.objects.get(ident_hash=hexdigest)
			except Patient.DoesNotExist:
				pass

	return render_to_response("patient_reservations.html", response_data,
		context_instance=RequestContext(request))
コード例 #2
0
ファイル: views.py プロジェクト: mmincikova/medobs
def patient_reservations(request):
    response_data = {"patient": None}

    if request.method == 'POST':
        form = Patient_detail_form(request.POST)
        if form.is_valid():
            hexdigest = get_hexdigest(form.cleaned_data["ident_hash"])
            try:
                response_data["patient"] = Patient.objects.get(
                    ident_hash=hexdigest)
            except Patient.DoesNotExist:
                pass

    return render_to_response("patient_reservations.html",
                              response_data,
                              context_instance=RequestContext(request))
コード例 #3
0
ファイル: views.py プロジェクト: dnacreative/medobs
def patient_details(request):
	response_data = {
		"first_name": "",
		"last_name": "",
		"phone_number": "",
		"email": "",
	}

	if request.method == 'POST':
		form = Patient_detail_form(request.POST)
		if form.is_valid():
			hexdigest = get_hexdigest(form.cleaned_data["ident_hash"])
			try:
				patient = Patient.objects.get(ident_hash=hexdigest)
				response_data = {
					"first_name": patient.first_name,
					"last_name": patient.last_name,
					"phone_number": patient.phone_number,
					"email": patient.email,
				}
			except Patient.DoesNotExist:
				pass
	return HttpResponse(json.dumps(response_data), "application/json")
コード例 #4
0
ファイル: views.py プロジェクト: mmincikova/medobs
def patient_details(request):
    response_data = {
        "first_name": "",
        "last_name": "",
        "phone_number": "",
        "email": "",
    }

    if request.method == 'POST':
        form = Patient_detail_form(request.POST)
        if form.is_valid():
            hexdigest = get_hexdigest(form.cleaned_data["ident_hash"])
            try:
                patient = Patient.objects.get(ident_hash=hexdigest)
                response_data = {
                    "first_name": patient.first_name,
                    "last_name": patient.last_name,
                    "phone_number": patient.phone_number,
                    "email": patient.email,
                }
            except Patient.DoesNotExist:
                pass
    return HttpResponse(json.dumps(response_data), "application/json")