text: const {
  	GraphQLNonNull,
  	GraphQLEnumType,
  	GraphQLList,
  	GraphQLUnionType,
  	GraphQLString,
  	GraphQLObjectType,
  } = require('graphql');
  const IdScalar = require('../scalars/id.scalar.js');
  const UriScalar = require('../scalars/uri.scalar.js');
  const CodeScalar = require('../scalars/code.scalar.js');
  const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js');
  const InstantScalar = require('../scalars/instant.scalar.js');
  const PositiveIntScalar = require('../scalars/positiveint.scalar.js');
  
  /**
   * @name exports
   * @summary Appointment Schema
   */
  module.exports = new GraphQLObjectType({
  	name: 'Appointment',
  	description: 'Base StructureDefinition for Appointment Resource',
  	fields: () => ({
  		resourceType: {
  			type: new GraphQLNonNull(
  				new GraphQLEnumType({
  					name: 'Appointment_Enum_schema',
  					values: { Appointment: { value: 'Appointment' } },
  				}),
  			),
  			description: 'Type of resource',
  		},
  		_id: {
  			type: require('./element.schema.js'),
  			description:
  				'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.',
  		},
  		id: {
  			type: IdScalar,
  			description:
  				'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.',
  		},
  		meta: {
  			type: require('./meta.schema.js'),
  			description:
  				'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.',
  		},
  		_implicitRules: {
  			type: require('./element.schema.js'),
  			description:
  				'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.',
  		},
  		implicitRules: {
  			type: UriScalar,
  			description:
  				'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.',
  		},
  		_language: {
  			type: require('./element.schema.js'),
  			description: 'The base language in which the resource is written.',
  		},
  		language: {
  			type: CodeScalar,
  			description: 'The base language in which the resource is written.',
  		},
  		text: {
  			type: require('./narrative.schema.js'),
  			description:
  				"A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
  		},
  		contained: {
  			type: new GraphQLList(require('./resourcelist.schema')),
  			description:
  				'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.',
  		},
  		extension: {
  			type: new GraphQLList(require('./extension.schema.js')),
  			description:
  				'May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.',
  		},
  		modifierExtension: {
  			type: new GraphQLList(require('./extension.schema.js')),
  			description:
  				'May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.',
  		},
  		identifier: {
  			type: new GraphQLList(require('./identifier.schema.js')),
  			description:
  				'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).',
  		},
  		_status: {
  			type: require('./element.schema.js'),
  			description:
  				'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.',
  		},
  		// valueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus
  		status: {
  			type: new GraphQLNonNull(CodeScalar),
  			description:
  				'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.',
  		},
  		// valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes
  		type: {
  			type: require('./codeableconcept.schema.js'),
  			description:
  				'The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).',
  		},
  		// valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason
  		reason: {
  			type: require('./codeableconcept.schema.js'),
  			description:
  				'The reason that this appointment is being scheduled. This is more clinical than administrative.',
  		},
  		_priority: {
  			type: require('./element.schema.js'),
  			description:
  				'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).',
  		},
  		priority: {
  			type: UnsignedIntScalar,
  			description:
  				'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).',
  		},
  		_description: {
  			type: require('./element.schema.js'),
  			description:
  				'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.',
  		},
  		description: {
  			type: GraphQLString,
  			description:
  				'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.',
  		},
  		_start: {
  			type: require('./element.schema.js'),
  			description: 'Date/Time that the appointment is to take place.',
  		},
  		start: {
  			type: InstantScalar,
  			description: 'Date/Time that the appointment is to take place.',
  		},
  		_end: {
  			type: require('./element.schema.js'),
  			description: 'Date/Time that the appointment is to conclude.',
  		},
  		end: {
  			type: InstantScalar,
  			description: 'Date/Time that the appointment is to conclude.',
  		},
  		_minutesDuration: {
  			type: require('./element.schema.js'),
  			description:
  				'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).',
  		},
  		minutesDuration: {
  			type: PositiveIntScalar,
  			description:
  				'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).',
  		},
  		slot: {
  			type: new GraphQLList(
  				new GraphQLUnionType({
  					name: 'Appointmentslot_slot_Union',
  					description:
  						'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.',
  					types: () => [require('./slot.schema.js')],
  					resolveType(data) {
  						if (data && data.resourceType === 'Slot') {
  							return require('./slot.schema.js');
  						}
  					},
  				}),
  			),
  			description:
  				'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.',
  		},
  		_comment: {
  			type: require('./element.schema.js'),
  			description: 'Additional comments about the appointment.',
  		},
  		comment: {
  			type: GraphQLString,
  			description: 'Additional comments about the appointment.',
  		},
  		participant: {
  			type: new GraphQLList(
  				new GraphQLNonNull(require('./appointmentparticipant.schema.js')),
  			),
  			description: 'List of participants involved in the appointment.',
  		},
  	}),
  });
  