<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://schema.integration.caaers.cabig.nci.nih.gov/study"
           xmlns="http://schema.integration.caaers.cabig.nci.nih.gov/study"
    xmlns:cct="http://schema.integration.caaers.cabig.nci.nih.gov/common"
    elementFormDefault="unqualified">

    <xs:import namespace="http://schema.integration.caaers.cabig.nci.nih.gov/common" schemaLocation="caAERSCommonTypes.xsd"/>

    <xs:element name="studies">
        <xs:annotation>
            <xs:documentation> The top level (typically root) element. Allows the definition of
                default values for all nested bean definitions. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" ref="study" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="study" type="study"/>
    <xs:complexType name="study">
        <xs:complexContent>
            <xs:extension base="cct:MutableDomainObjectType">

                <xs:sequence>
                    <xs:element name="shortTitle" type="cct:CustomStringType" />
                    <xs:element name="longTitle" type="cct:CustomStringType" minOccurs="0"/>
                    <xs:element name="precis" type="cct:CustomStringType" minOccurs="0"/>
                    <xs:element name="description" type="cct:CustomStringType" minOccurs="0"/>
                    <xs:element name="phaseCode" type="StudyPhaseType" />
                    <xs:element name="status" type="StatusType" minOccurs="0"/>
                    <xs:element name="multiInstitutionIndicator" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="adeersReporting" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="otherMeddra" type="xs:string" minOccurs="0"/>
                    <xs:element name="studyPurpose" type="xs:string" minOccurs="0"/>
                    <xs:element name="aeTermUnique" type="xs:boolean" minOccurs="0"/>
                    <xs:element ref="aeTerminology"/>

                    <xs:element ref="diseaseTerminology"/>
                    <xs:element name="design" type="DesignCodeType" minOccurs="0"/>
                    
                    <xs:element name="drugAdministrationTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="deviceTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="radiationTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="surgeryTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="behavioralTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="biologicalTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="geneticTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="dietarySupplementTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="otherTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>

                    <xs:element name="reportTypeCaaersXML" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeAdeersPDF" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeMedwatchPDF" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeDCPSAEForm" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeCIOMSForm" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeCIOMSAEForm" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>

                    <xs:element name="fundingSponsor" type="FundingSponsorType" />
                    <xs:element name="coordinatingCenter" type="CoordinatingCenterType"/>
                    
                    <xs:element name="studyOrganizations" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="studySite" minOccurs="0" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    <xs:element name="identifiers" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="organizationAssignedIdentifier" minOccurs="0" maxOccurs="unbounded"/>
                                <xs:element ref="systemAssignedIdentifier" minOccurs="0" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    
                    <xs:element name="treatmentAssignments" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="treatmentAssignment" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                    
                    <xs:element name="studyAgents" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="studyAgent" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    <xs:choice minOccurs="0">
	                    <xs:element name="ctepStudyDiseases">
	                        <xs:complexType>
	                            <xs:sequence>
	                                <xs:element ref="ctepStudyDisease"  maxOccurs="unbounded"/>
	                            </xs:sequence>
	                        </xs:complexType>
	                    </xs:element>
	                    
	                    <xs:element name="meddraStudyDiseases"><commit_msg>StudyAgents - accept empty list<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://schema.integration.caaers.cabig.nci.nih.gov/study"
           xmlns="http://schema.integration.caaers.cabig.nci.nih.gov/study"
    xmlns:cct="http://schema.integration.caaers.cabig.nci.nih.gov/common"
    elementFormDefault="unqualified">

    <xs:import namespace="http://schema.integration.caaers.cabig.nci.nih.gov/common" schemaLocation="caAERSCommonTypes.xsd"/>

    <xs:element name="studies">
        <xs:annotation>
            <xs:documentation> The top level (typically root) element. Allows the definition of
                default values for all nested bean definitions. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" ref="study" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="study" type="study"/>
    <xs:complexType name="study">
        <xs:complexContent>
            <xs:extension base="cct:MutableDomainObjectType">

                <xs:sequence>
                    <xs:element name="shortTitle" type="cct:CustomStringType" />
                    <xs:element name="longTitle" type="cct:CustomStringType" minOccurs="0"/>
                    <xs:element name="precis" type="cct:CustomStringType" minOccurs="0"/>
                    <xs:element name="description" type="cct:CustomStringType" minOccurs="0"/>
                    <xs:element name="phaseCode" type="StudyPhaseType" />
                    <xs:element name="status" type="StatusType" minOccurs="0"/>
                    <xs:element name="multiInstitutionIndicator" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="adeersReporting" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="otherMeddra" type="xs:string" minOccurs="0"/>
                    <xs:element name="studyPurpose" type="xs:string" minOccurs="0"/>
                    <xs:element name="aeTermUnique" type="xs:boolean" minOccurs="0"/>
                    <xs:element ref="aeTerminology"/>

                    <xs:element ref="diseaseTerminology"/>
                    <xs:element name="design" type="DesignCodeType" minOccurs="0"/>
                    
                    <xs:element name="drugAdministrationTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="deviceTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="radiationTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="surgeryTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="behavioralTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="biologicalTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="geneticTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="dietarySupplementTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="otherTherapyType" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>

                    <xs:element name="reportTypeCaaersXML" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeAdeersPDF" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeMedwatchPDF" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeDCPSAEForm" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeCIOMSForm" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>
                    <xs:element name="reportTypeCIOMSAEForm" type="xs:boolean"  minOccurs="0" maxOccurs="1"/>

                    <xs:element name="fundingSponsor" type="FundingSponsorType" />
                    <xs:element name="coordinatingCenter" type="CoordinatingCenterType"/>
                    
                    <xs:element name="studyOrganizations" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="studySite" minOccurs="0" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    <xs:element name="identifiers" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="organizationAssignedIdentifier" minOccurs="0" maxOccurs="unbounded"/>
                                <xs:element ref="systemAssignedIdentifier" minOccurs="0" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    
                    <xs:element name="treatmentAssignments" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="treatmentAssignment" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                    
                    <xs:element name="studyAgents" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element ref="studyAgent" minOccurs="0" maxOccurs="unbounded"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    <xs:choice minOccurs="0">
	                    <xs:element name="ctepStudyDiseases">
	                        <xs:complexType>
	                            <xs:sequence>
	                                <xs:element ref="ctepStudyDisease"  maxOccurs="unbounded"/>
	                            </xs:sequence>
	                        </xs:complexType>
	                    </xs:element>
	                    
	                    <xs:element name="meddraStudyDiseases">
{'fraction_non_alphanumeric': 0.13224838047084847, 'fraction_numerical': 0.0089271606888924, 'mean_word_length': 1.802523798981625, 'pattern_counts': {'":': 0, '<': 179, '<?xml version=': 2, '>': 179, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '141341', 'n_tokens_mistral': 3639, 'n_tokens_neox': 3345, 'n_words': 497}