def make_appointment(intent_request):
appointment_type = intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']<EOL>date = intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']<EOL>time = intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']<EOL>source = intent_request['<STR_LIT>']<EOL>output_session_attributes = intent_request['<STR_LIT>']<EOL>booking_map = json.loads(try_ex(lambda: output_session_attributes['<STR_LIT>']) or '<STR_LIT:{}>')<EOL>if source == '<STR_LIT>':<EOL><INDENT>slots = intent_request['<STR_LIT>']['<STR_LIT>']<EOL>validation_result = validate_book_appointment(appointment_type, date, time)<EOL>if not validation_result['<STR_LIT>']:<EOL><INDENT>slots[validation_result['<STR_LIT>']] = None<EOL>return elicit_slot(<EOL>output_session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>slots,<EOL>validation_result['<STR_LIT>'],<EOL>validation_result['<STR_LIT:message>'],<EOL>build_response_card(<EOL>'<STR_LIT>'.format(validation_result['<STR_LIT>']),<EOL>validation_result['<STR_LIT:message>']['<STR_LIT:content>'],<EOL>build_options(validation_result['<STR_LIT>'], appointment_type, date, booking_map)<EOL>)<EOL>)<EOL><DEDENT>if not appointment_type:<EOL><INDENT>return elicit_slot(<EOL>output_session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>intent_request['<STR_LIT>']['<STR_LIT>'],<EOL>'<STR_LIT>',<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT:content>': '<STR_LIT>'},<EOL>build_response_card(<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>build_options('<STR_LIT>', appointment_type, date, None)<EOL>)<EOL>)<EOL><DEDENT>if appointment_type and not date:<EOL><INDENT>return elicit_slot(<EOL>output_session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>intent_request['<STR_LIT>']['<STR_LIT>'],<EOL>'<STR_LIT>',<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT:content>': '<STR_LIT>'.format(appointment_type)},<EOL>build_response_card(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(appointment_type),<EOL>build_options('<STR_LIT>', appointment_type, date, None)<EOL>)<EOL>)<EOL><DEDENT>if appointment_type and date:<EOL><INDENT>booking_availabilities = try_ex(lambda: booking_map[date])<EOL>if booking_availabilities is None:<EOL><INDENT>booking_availabilities = get_availabilities(date)<EOL>booking_map[date] = booking_availabilities<EOL>output_session_attributes['<STR_LIT>'] = json.dumps(booking_map)<EOL><DEDENT>appointment_type_availabilities = get_availabilities_for_duration(get_duration(appointment_type), booking_availabilities)<EOL>if len(appointment_type_availabilities) == <NUM_LIT:0>:<EOL><INDENT>slots['<STR_LIT>'] = None<EOL>slots['<STR_LIT>'] = None<EOL>return elicit_slot(<EOL>output_session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>slots,<EOL>'<STR_LIT>',<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT:content>': '<STR_LIT>'},<EOL>build_response_card(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>build_options('<STR_LIT>', appointment_type, date, booking_map)<EOL>)<EOL>)<EOL><DEDENT>message_content = '<STR_LIT>'.format(date)<EOL>if time:<EOL><INDENT>output_session_attributes['<STR_LIT>'] = build_time_output_string(time)<EOL>if is_available(time, get_duration(appointment_type), booking_availabilities):<EOL><INDENT>return delegate(output_session_attributes, slots)<EOL><DEDENT>message_content = '<STR_LIT>'<EOL><DEDENT>if len(appointment_type_availabilities) == <NUM_LIT:1>:<EOL><INDENT>slots['<STR_LIT>'] = appointment_type_availabilities[<NUM_LIT:0>]<EOL>return confirm_intent(<EOL>output_session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>slots,<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:content>': '<STR_LIT>'.format<EOL>(message_content, build_time_output_string(appointment_type_availabilities[<NUM_LIT:0>]))<EOL>},<EOL>build_response_card(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(build_time_output_string(appointment_type_availabilities[<NUM_LIT:0>]), date),<EOL>[{'<STR_LIT:text>': '<STR_LIT:yes>', '<STR_LIT:value>': '<STR_LIT:yes>'}, {'<STR_LIT:text>': '<STR_LIT>', '<STR_LIT:value>': '<STR_LIT>'}]<EOL>)<EOL>)<EOL><DEDENT>available_time_string = build_available_time_string(appointment_type_availabilities)<EOL>return elicit_slot(<EOL>output_session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>slots,<EOL>'<STR_LIT>',<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT:content>': '<STR_LIT>'.format(message_content, available_time_string)},<EOL>build_response_card(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>build_options('<STR_LIT>', appointment_type, date, booking_map)<EOL>)<EOL>)<EOL><DEDENT>return delegate(output_session_attributes, slots)<EOL><DEDENT>duration = get_duration(appointment_type)<EOL>booking_availabilities = booking_map[date]<EOL>if booking_availabilities:<EOL><INDENT>booking_availabilities.remove(time)<EOL>if duration == <NUM_LIT>:<EOL><INDENT>second_half_hour_time = increment_time_by_thirty_mins(time)<EOL>booking_availabilities.remove(second_half_hour_time)<EOL><DEDENT>booking_map[date] = booking_availabilities<EOL>output_session_attributes['<STR_LIT>'] = json.dumps(booking_map)<EOL><DEDENT>else:<EOL><INDENT>logger.debug('<STR_LIT>'<EOL>'<STR_LIT>'.format(date))<EOL><DEDENT>return close(<EOL>output_session_attributes,<EOL>'<STR_LIT>',<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:content>': '<STR_LIT>'.format(build_time_output_string(time), date)<EOL>}<EOL>)<EOL>
Performs dialog management and fulfillment for booking a dentists appointment.

Beyond fulfillment, the implementation for this intent demonstrates the following:
1) Use of elicitSlot in slot validation and re-prompting
2) Use of confirmIntent to support the confirmation of inferred slot values, when confirmation is required
on the bot model and the inferred slot values fully specify the intent.