<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.irs.gov/efile" targetNamespace="http://www.irs.gov/efile" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<xsd:annotation>
		<xsd:documentation>
			<Description>IRS e-file Schema - Form 8820</Description>
			<TaxYear>2015</TaxYear>
			<MaturityLevel>Final Release</MaturityLevel>
			<ReleaseDate>September 8, 2015</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>

	<xsd:include schemaLocation="../../../Common/efileTypes.xsd"/>

	<!-- =================================================================== -->
	<!-- =======================  IRS Form 8820 ============================ -->
	<!-- =================================================================== -->

	<xsd:element name="IRS8820">
		<xsd:annotation>
			<xsd:documentation>IRS Form 8820</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="IRS8820Type">
					<xsd:attributeGroup ref="DocumentAttributes">
						<xsd:annotation>
							<xsd:documentation>Common return document attributes</xsd:documentation>
						</xsd:annotation>
					</xsd:attributeGroup>
					<xsd:attribute name="documentName" type="xsd:string" fixed="IRS8820">
						<xsd:annotation>
							<xsd:documentation>IRS internal use only. To avoid error in the return, do not include the attribute name or value.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="IRS8820Type">
		<xsd:annotation>
			<xsd:documentation>Content model for IRS Form 8820</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>

			<!-- Part I -->
			
			<!-- Qualified Clinical Testing Expenses Paid or Incurred During the Tax Year-->
			<xsd:element name="QlfyClinicalTestExpnssPdAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Qualified clinical testing expenses paid or incurred during the tax year</Description>
							<LineNumber>Part I, Line 1</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Current Year Credit. Multiply Line 1 by 50% -->
			<xsd:element name="CurrentYearCreditAmt" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Current year credit. Multiply line 1 by 50%</Description>
							<LineNumber>Part I, Line 2a</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="USAmountType">
							<xsd:attribute name="referenceDocumentId" type="IdListType"/>
							<xsd:attribute name="referenceDocumentName" type="StringType" fixed="ControlledGroupMembersStatement"/>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>

			<!-- Employer Diff Wage Credit Amount -->
			<xsd:element name="EmployerDifferentialWageCrAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Employer diff wage credit amount</Description>
							<LineNumber>Part I, Line 2b</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Subtract Employer Differential Wage Credit From Current Year Credit-->
			<xsd:element name="CYCLessEmployerDiffWageCrAmt" type="USAmountNNType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Subtract Employer differential wage credit from current year credit</Description>
							<LineNumber>Part I, Line 2c</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>


			<!-- Orphan Drug Credit(s) from an S Corporation, Partnership, Estate, or Trust-->
			<xsd:element name="OrphanDrugCreditAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Orphan drug credit(s) from an S corporation, partnership, estate, or trust</Description>
							<LineNumber>Part I, Line 3</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Current Year Credit and Orphan Drug Credit -->
			<xsd:element name="SumCurrYrCrandOrphnDrugCrAmt" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Add lines 2c and 3</Description>
							<LineNumber>Part I, Line 4</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="USAmountNNType">
							<xsd:attribute name="form1041PortionCd">
								<xsd:simpleType>
									<xsd:restriction base="StringType">
										<xsd:enumeration value="1041 Portion"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:attribute>
							<xsd:attribute name="form1041PortionAmt" type="USAmountType"/>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>

			<!-- Amount Allocated to Beneficiaries -->
			<xsd:element name="AllocatedtoBeneficiariesAmt" type="USAmountNNType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Amount allocated to beneficiaries</Description>
							<LineNumber>Part I, Line 5</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!--  Estates and Trusts Credit    -->
			<xsd:element name="EstatesAndTrustsCreditAmt" type="USAmountNNType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Estates and trusts credit</Description>
							<LineNumber>Part I, Line 6</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			
			<!-- Part II: Orphan Drug Information -->
			
			<!-- Orphan Drug Information Group -->
			<xsd:element name="OrphanDrugInfoGrp" type="OrphanDrugInfoGrpType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Orphan Drug Information Group</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			
		</xsd:sequence>
	</xsd:complexType>
			
			
			<!-- ===== Orphan Drug Information Group ===== -->
			
			<xsd:complexType name="OrphanDrugInfoGrpType">
				<xsd:sequence>

					<!-- Orphan Drug Name -->
					<xsd:element name="OrphanDrugNm" type="LineExplanationType">
						<xsd:annotation>
							<xsd:documentation>
								<Description>Orphan drug name</Description>
									<LineNumber>Part II, Line 7b</LineNumber>
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>

					<!-- Orphan Drug Designation Number -->
					<xsd:element name="OrphanDrugDesignationNum" type="LineExplanationType">
						<xsd:annotation>
							<xsd:documentation>
								<Description>Orphan drug designation number</Description>
									<LineNumber>Part II, Line 7c</LineNumber>
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>

					<!-- Orphan Drug Designation Num -->
					<xsd:element name="OrphanDrugDesignationDt" type="DateType">
						<xsd:annotation>
							<xsd:documentation>
								<Description>Orphan drug designation num</Description>
									<LineNumber>Part II, Line 7d</LineNumber>
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:complexType>				
				
</xsd:schema>
