<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!--
********************************************************************************
	XML Schema for the results portion of clinical trial data to be uploaded 
	into the Protocol Registration System (PRS).

	ClinicalTrials.gov
	National Library of Medicine, National Institutes of Health
	Schema Version: 2017.04.18

	This schema is subject to change without notice.

	In general, the tag names and comments within this document relate 
	to fields on the data entry screens and those have links into the
	data element definitions document for full definitions.

	One good way of understanding the XML format is to create a record
	interactively in the PRS and then download the XML for inspection.
	You can then step through the screens while also examining the XML.

	NOTES:
	1. Most elements are noted as type string, although business rules  
	   require many of them to be numbers. In some cases, the string has 
	   to be one of the enumerated set of strings (listed at the bottom).

	2. Relationship by reference (ID and IDREF)
	   These are "pointers" between related row and column information.
	   * ID values must be unique within the scope of a single document
	   * Each IDREF value must match some ID value in the same document

   See Results Pick-list Normalization for valid values in each picklist.
   Comments in this document reference relevant picklist in comments near applicable elements.
   Use the Records section of the PRS Main Menu to navigate to the 
   Upload Record (XML) page where there is a link to the Results Pick-list Normalization content.
   The Pick-list Normalization report shows a display value and 
   zero or more raw values (i.e., synonyms) for each valid value.


	CHANGES:
	04/18/2017:  Improved cross-reference between schema comments and Results Pick-list Normalization report.
	01/19/2017:  Corrected comments for Baseline Region of Enrollment row title
	01/18/2017:
       * Renamed  OutcomeMeasureAnalysis.testedNonInferiority  into statisticalTestType
	   * Added    InterventionGroup.numDeaths,        InterventionGroup.partAtRiskAllCauseMort,
	   			  ReportedEvents.allCauseMortComment, OutcomeMeasureAnalysis.otherAnalysis
	   * Removed  OutcomeMeasure.safetyIssue
       * Added    "RaceEthNotCollected" to list(4) Baseline Measure type 
       * Adjusted list (11) Outcome measure dispersion type.
       * Adjusted list (12) Measure parameter type:  
                  Added option "Count of Participants", "Geometric Least Squares Mean", "Count of Units".
                  Removed "Log Mean".
       * Added    list(19) Type of Statistical Test  and changed valid values for OutcomeMeasureAnalysis.testedNonInferiority
    10/27/2016:
       * Adjusted comment for Baseline Measure with  measure type Number
       * Added    "Product" to list (13) MedDRA system/organ class
	10/22/2016:
	   * Split    ReportedValue into  ReportedValue  and ReportedEntry
	   
	   * Added    Baseline.typeUnitsAnalyzed,        ReportedValue.subjectsAnalyzed,
	              ReportedValue.numUnitsAnalyzed,    Measure.calculatePct,
	   		      Measure.selectedUnitOfAnalysis,    ParticipantFlow.typeUnitsAnalyzed,
	   		      MilestoneAchievement.unitsAchieve, Milestone.comment, 
	   		      MilestoneAchievement.subjectsNaComment
	   		     
	   * Moved    numUnitsAnalyzed from OutcomeReportingGroup to MeasureReportingGroup,
	              populationAnalysisDescription from OutcomeMeasure to Measure
	   
	   * Renamed  Measure.measureCategory, Measure.measureCategories, and MeasureCategory (type)
	        into  Measure.measureRow,      Measure.measureRows,       and MeasureRow
	04/17/2015:
	   Added ciPctLevel to Measure.
	09/17/2014:
	   Made OutcomeMeasure.reportingStatus an obsolete element but kept it
	   in the schema to support the upload of previously generated XML.
	01/06/2014:
	   Measure.parameterType is no longer a schema-required element (no semantic change).
	01/24/2013:
	   Added populationAnalysisDescription to Baseline.
	10/18/2012:
	   Removed "NotRequired" Delay Type option (comment change only).
	08/18/2011:
	   Added ciUpperLimitNaComment to OutcomeMeasureAnalysis.
	05/09/2011:
	   Added "Geometric Coefficient of Variation" as option for Outcome Measure 
	   Dispersion Type (comment change only).
	09/01/2010:
	   Added data elements to OutcomeMeasure, OutcomeReportingGroup, and
	   ReportedValue (no compatibility impact).
	07/15/2010:
       * Correct Baseline Measure Region of Enrollment valid value comment.
       * Correct Outcome Measure dispersion type comment.  Confidence interval
	     is valid dispersion for Outcome Measure with Number parameter type.
	06/04/2010:
	   Listed valid enumerated entries as comments.		
	12/02/2009:
	   Added ciNumSides to OutcomeMeasureAnalysis.	
	08/30/2009:
	   Incorporated additional data elements for adverse events.
	06/30/2009:
	   Modified PointOfContact type hierarchy (no compatibility impact).
	   Added results disposition schema.	
	03/27/2009:
	   Added support for partial uploads (see below for details).
	03/03/2009:
	   Modified optionality of the Result elements and moved time frame
	   to match the format of PRS-generated download XML. These changes
	   will not affect your ability to upload previously generated XML.
********************************************************************************
-->

<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" 
	targetNamespace="http://clinicaltrials.gov/rrs" 
	xmlns:tns="http://clinicaltrials.gov/rrs" 
	xmlns:xs="http://www.w3.org/2001/XMLSchema">
	
<!--
						***************
						    RESULTS
						***************
-->
	
  <xs:element name="result" type="tns:Result"/>

  <!--
      While an upload without baseline, certain agreement, participant flow, or
      point of contact is acceptable, that data will have to be entered (via a
      subsequent upload or interactively) into PRS before the record is released
  -->
  <xs:complexType name="Result">
    <xs:sequence>
      <xs:element name="baseline" type="tns:Baseline" minOccurs="0"/>
      <xs:element name="certainAgreement" type="tns:CertainAgreement" minOccurs="0"/>
      <xs:element name="limitationsAndCaveats" type="tns:LimitationsAndCaveats" minOccurs="0"/>
      <xs:element name="outcomeMeasures">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="outcomeMeasure" type="tns:OutcomeMeasure" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="participantFlow" type="tns:ParticipantFlow" minOccurs="0"/>
      <xs:element name="pointOfContact" type="tns:ResultPointOfContact" minOccurs="0"/>
      <xs:element name="reportedEvents" type="tns:ReportedEvents" minOccurs="0"/>
    </xs:sequence>

    <!--
        FULL UPLOAD (partialUpload="false" or missing attribute)
          will replace all previously saved results information with the data from your XML.
        PARTIAL UPLOAD (partialUpload="true")
          will replace only those data subsets that are included in the XML and keep the others
          (previously saved, omitted from this upload) intact. The data subsets to be replaced or
          retained as a unit are: Baseline, Certain Agreement, Limitations And Caveats, Outcome
          Measure, Participant Flow, Point Of Contact, Reported Events. A subset is deemed to be
          included in (omitted from) the XML if that subset's root element is included (omitted)

        ***** WARNING: Failure to specify partialUpload="true" for an incomplete upload will
                       result in a permanent loss of all missing (omitted) data subsets!
    -->
	<xs:attribute name="partialUpload" type="xs:boolean" default="false"/>
  </xs:complexType>

  <xs:complexType name="Baseline">
    <xs:sequence>
      <xs:element name="baselineMeasures">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="baselineMeasure" type="tns:BaselineMeasure" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="baselineReportingGroups">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="baselineReportingGroup" type="tns:BaselineReportingGroup" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="populationAnalysisDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="totalBaselineReportingGroup" type="tns:TotalBaselineReportingGroup" minOccurs="0"/>
      <xs:element name="typeUnitsAnalyzed" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BaselineMeasure">
    <xs:complexContent>
      <xs:extension base="tns:Measure">
        <xs:sequence>
          <xs:element name="otherTitle" type="xs:string" minOccurs="0"/>        <!-- for study specific characteristic -->
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="Measure" abstract="true">
    <xs:sequence>
      <xs:element name="calculatePct" type="xs:string" minOccurs="0"/>			<!-- see picklist (YesNoTypeUtil) -->
	  <xs:element name="ciPctLevel" type="xs:string" minOccurs="0"/>
      <!-- measure of dispersion, see picklist (BaseMeasureDispersTypeUtil) for baseline measures and picklist (MeasureDispersTypeUtil) for outcome measures -->
      <xs:element name="dispersionType" type="xs:string" minOccurs="0"/>
      <xs:element name="measureRows">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="measureRow" type="tns:MeasureRow" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="measureDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="parameterType" type="xs:string" minOccurs="0"/>         <!-- measure type, see picklist (MeasureParamTypeUtil) -->
      <xs:element name="populationAnalysisDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="selectedUnitOfAnalysis" type="xs:string" minOccurs="0"/>			 <!-- value is either Participants or Units -->
      <!-- time frame is presently supported only for outcome measures (ignored by baseline measures) -->
	  <xs:element name="timeFrame" type="xs:string" minOccurs="0"/>
      <xs:element name="title" type="xs:string" minOccurs="0"/>                 <!-- for baseline measures, see picklist (BaselineMeasureTypeUtil) -->
      <xs:element name="unitOfMeasure" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MeasureRow">
    <xs:sequence>
      <xs:element name="reportedValues">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="reportedValue" type="tns:ReportedValue" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <!-- for title in Region of Enrollment Baseline measure, use preferred Region or Country name listed in PRS Region and Country Name Report -->
      <xs:element name="title" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!--
      Baseline Characteristic Data, Outcome Data (per Data Elements Definitions)

      When Measure parameter type is Number:
         * parameterValue is a single number that describes the observation
         * for Baseline Characteristic Data, dispersion elements are not applicable
         * for Outcome Data, dispersion elements are either:
           - not applicable (No Dispersion values are needed.) 
           - a confidence interval (The dispersionLowerLimit and dispersionUpperLimit should be provided.)
      Otherwise,
         * choice of Measure parameter type (Mean, Median, etc.) determines the semantics of parameterValue
         * if Measure dispersion type is StandardDeviation then dispersionSpread is to be specified;
           otherwise, dispersionLowerLimit and dispersionUpperLimit should be provided

      ATTENTION: Until the Final Rule Effective Date, January 18, 2017,
                 if the Measure parameter type for a Baseline Measure is Number
                 and a ReportedValue in the Total Baseline Reporting Group is not provided,
                 the PRS will calculate the total value.  After January 18, 2017, counts should be
                 reported as "Count of participants" or "Count of units".
  -->
  <xs:complexType name="ReportedValue">
    <xs:sequence>
      <xs:element name="reportingGroupId" type="xs:IDREF"/>
      <xs:element name="numUnitsAnalyzed" type="xs:string" minOccurs="0"/>		<!-- number -->
      <xs:element name="reportedEntries">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="reportedEntry" type="tns:ReportedEntry" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="subjectsAnalyzed" type="xs:string" minOccurs="0"/>		<!-- number -->
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReportedEntry">
    <xs:sequence>
     <!-- Some NIH/NLM baseline measure types, defined in BaselineMeasureTypeUtil, have pre-defined category names.
         For AgeCategoricalNLM, see picklist (AgeCategoricalNLM_CAT).
         For GenderNIH, see picklist (GenderNIH_CAT).
         For EthnicityNIH, see picklist (EthnicityNIH_CAT).
         For RaceNIH, see picklist (RaceNIH_CAT).
     -->
      <xs:element name="catName" type="xs:string" minOccurs="0"/>				<!-- category name -->     
      <xs:element name="dispersionLowerLimit" type="xs:string" minOccurs="0"/>
      <xs:element name="dispersionSpread" type="xs:string" minOccurs="0"/>
      <xs:element name="dispersionUpperLimit" type="xs:string" minOccurs="0"/>
      <xs:element name="naComment" type="xs:string" minOccurs="0"/>
      <xs:element name="parameterValue" type="xs:string" minOccurs="0"/> 
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BaselineReportingGroup">
    <xs:complexContent>
      <xs:extension base="tns:MeasureReportingGroup">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MeasureReportingGroup" abstract="true">
    <xs:sequence>
      <xs:element name="description" type="xs:string" minOccurs="0"/>
      <xs:element name="numUnitsAnalyzed" type="xs:string" minOccurs="0"/>
      <!-- number of baseline participants, number of participants analyzed (outcome) -->
      <xs:element name="subjectsAnalyzed" type="xs:string" minOccurs="0"/>
      <xs:element name="title" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:ID" use="required"/>
  </xs:complexType>

  <xs:complexType name="TotalBaselineReportingGroup">
    <xs:complexContent>
      <xs:extension base="tns:BaselineReportingGroup">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="CertainAgreement">
    <xs:sequence>
      <xs:element name="otherDetails" type="xs:string" minOccurs="0"/>
      <xs:element name="piSponsorEmployee" type="xs:string" minOccurs="0"/>     <!-- see picklist (YesNoTypeUtil) -->
      <xs:element name="restrictionType" type="xs:string" minOccurs="0"/>       <!-- see picklist (CertAgreeRestrictTypeUtil) -->
      <xs:element name="restrictiveAgreement" type="xs:string" minOccurs="0"/>  <!-- results disclosure restriction, see picklist (YesNoTypeUtil) -->
    </xs:sequence>
  </xs:complexType>
	
  <xs:complexType name="LimitationsAndCaveats">
    <xs:sequence>
      <xs:element name="description" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OutcomeMeasure">
    <xs:complexContent>
      <xs:extension base="tns:Measure">
        <xs:sequence>
          <xs:element name="anticipatedResultPostingDate" type="tns:Date" minOccurs="0"/>
          <xs:element name="measureType" type="xs:string"/>                     <!-- outcome measure type, see picklist (OutcomeMeasureTypeUtil) -->
          <xs:element name="outcomeMeasureAnalyses">
            <xs:complexType>
              <xs:sequence>
                <!-- statistical analysis -->
                <xs:element name="measureAnalysis" type="tns:OutcomeMeasureAnalysis" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="outcomeReportingGroups">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="outcomeReportingGroup" type="tns:OutcomeReportingGroup" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="reportingStatus" type="xs:string" minOccurs="0"/>   <!-- obsolete element -->
          <xs:element name="typeUnitsAnalyzed" type="xs:string" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="Date">
    <xs:sequence>
      <xs:element name="month" type="xs:string" minOccurs="0"/>
      <xs:element name="year" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OutcomeMeasureAnalysis">
    <xs:sequence>
      <xs:element name="outcomeReportingGroups">                                   <!-- comparison group selection -->
		<xs:complexType>
          <xs:sequence>
            <xs:element name="outcomeReportingGroupId" type="xs:IDREF" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ciLowerLimit" type="xs:string" minOccurs="0"/>
      <xs:element name="ciNumSides" type="xs:string" minOccurs="0"/>               <!-- confidence interval's number of sides, see picklist (StatisticalDistSidesUtil) -->
      <xs:element name="ciPctValue" type="xs:string" minOccurs="0"/>               <!-- % confidence interval -->
      <xs:element name="ciUpperLimit" type="xs:string" minOccurs="0"/>
      <xs:element name="ciUpperLimitNaComment" type="xs:string" minOccurs="0"/>
      <xs:element name="dispersionType" type="xs:string" minOccurs="0"/>           <!-- see picklist (EstimateDispersTypeUtil) -->
      <xs:element name="dispersionValue" type="xs:string" minOccurs="0"/>
      <xs:element name="estimateComment" type="xs:string" minOccurs="0"/>          <!-- comment for parameter dispersion       -->
      <xs:element name="groupDescription" type="xs:string" minOccurs="0"/>         <!-- comment for comparison group selection -->
      <xs:element name="nonInferiorityTestComment" type="xs:string" minOccurs="0"/>
      <xs:element name="otherAnalysis" type="xs:string" minOccurs="0"/>
      <xs:element name="otherMethodName" type="xs:string" minOccurs="0"/>
      <xs:element name="otherTypeName" type="xs:string" minOccurs="0"/>            <!-- if parameter estimated is Other    -->
      <xs:element name="parameterType" type="xs:string"/>                          <!-- parameter estimated, see picklist (EstimateParamTypeUtil) -->
      <xs:element name="parameterValue" type="xs:string" minOccurs="0"/>           <!-- estimated value                    -->
      <xs:element name="pValue" type="xs:string" minOccurs="0"/>
      <xs:element name="pValueComment" type="xs:string" minOccurs="0"/>
      <xs:element name="statisticalMethod" type="xs:string" minOccurs="0"/>        <!-- see picklist (StatisticalMethodTypeUtil) -->
      <xs:element name="statisticalTestComment" type="xs:string" minOccurs="0"/>   <!-- comment for statistical method  -->
      <xs:element name="statisticalTestType" type="xs:string" minOccurs="0"/>      <!-- see picklist (StatisticalTestTypeUtil)  Final Rule label "Type of Statistical Test" -->
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OutcomeReportingGroup">
    <xs:complexContent>
      <xs:extension base="tns:MeasureReportingGroup">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ParticipantFlow">
    <xs:sequence>
      <xs:element name="participantFlowGroups">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="flowGroup" type="tns:ParticipantFlowGroup" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="periods">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="period" type="tns:Period" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="preAssignmentDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="recruitmentDetails" type="xs:string" minOccurs="0"/>
      <xs:element name="typeUnitsAnalyzed" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ParticipantFlowGroup">
    <xs:sequence>
      <xs:element name="description" type="xs:string" minOccurs="0"/>
      <xs:element name="title" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:ID" use="required"/>
  </xs:complexType>

  <xs:complexType name="Period">
    <xs:sequence>
      <xs:element name="completedMilestone" type="tns:CompletedMilestone"/>
      <xs:element name="dropWithdrawReasons">
        <xs:complexType>
          <xs:sequence>
            <!-- reason not completed -->
            <xs:element name="dropWithdrawReason" type="tns:DropWithdrawReason" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="milestones">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="milestone" type="tns:MiscMilestone" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="startedMilestone" type="tns:StartedMilestone"/>
      <xs:element name="title" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CompletedMilestone">
    <xs:complexContent>
      <xs:extension base="tns:Milestone">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="Milestone" abstract="true">
    <xs:sequence>
      <xs:element name="comment" type="xs:string" minOccurs="0"/>
      <xs:element name="milestoneAchievements">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="milestoneAchievement" type="tns:MilestoneAchievement" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MilestoneAchievement">
    <xs:sequence>
      <xs:element name="reportingGroupId" type="xs:IDREF"/>
      <xs:element name="comment" type="xs:string" minOccurs="0"/>
      <xs:element name="subjectsAchieve" type="xs:string" minOccurs="0"/>       <!-- number -->
      <xs:element name="subjectsNaComment" type="xs:string" minOccurs="0"/>
      <xs:element name="unitsAchieve" type="xs:string" minOccurs="0"/>          <!-- number -->
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StartedMilestone">
    <xs:complexContent>
      <xs:extension base="tns:Milestone">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MiscMilestone">
    <xs:complexContent>
      <xs:extension base="tns:Milestone">
        <xs:sequence>
          <xs:element name="titleOther" type="xs:string" minOccurs="0"/>        <!-- milestone title -->
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- reason not completed -->
  <xs:complexType name="DropWithdrawReason">
    <xs:sequence>
      <xs:element name="dropWithdrawReasonDetails">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="reasonDetail" type="tns:DropWithdrawReasonDetail" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="otherReasonName" type="xs:string" minOccurs="0"/>
      <xs:element name="reasonType" type="xs:string"/>                          <!-- see picklist (DropWithdrawReasonTypeUtil) -->
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DropWithdrawReasonDetail">
    <xs:sequence>
      <xs:element name="reportingGroupId" type="xs:IDREF"/>
      <xs:element name="subjectsAffected" type="xs:string" minOccurs="0"/>      <!-- untitled (per reason and arm) -->
    </xs:sequence>
  </xs:complexType>
	
  <xs:complexType name="ResultPointOfContact">
    <xs:complexContent>
      <xs:extension base="tns:PointOfContact">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="PointOfContact" abstract="true">
    <xs:sequence>
      <xs:element name="email" type="xs:string" minOccurs="0"/>
      <xs:element name="organizationName" type="xs:string" minOccurs="0"/>
      <xs:element name="phoneExtension" type="xs:string" minOccurs="0"/>
      <xs:element name="phoneNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="title" type="xs:string" minOccurs="0"/>                 <!-- name or official title -->
    </xs:sequence>
  </xs:complexType>

  <!-- adverse events -->
  <xs:complexType name="ReportedEvents">
    <xs:sequence>
      <xs:element name="allCauseMortComment" type="xs:string" minOccurs="0"/>
      <xs:element name="assessmentType" type="xs:string" minOccurs="0"/>        <!-- see picklist (AdverseEventAssessTypeUtil)  -->
      <xs:element name="frequencyReportingThreshold" type="xs:string" minOccurs="0"/>
      <xs:element name="frequentAdverseEvents">                                 <!-- other adverse events -->
        <xs:complexType>
          <xs:sequence>
            <xs:element name="frequentEvent" type="tns:FrequentAdverseEvent" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="interventionGroups">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="interventionGroup" type="tns:InterventionGroup" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="notes" type="xs:string" minOccurs="0"/>
      <xs:element name="seriousAdverseEvents">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="seriousEvent" type="tns:SeriousAdverseEvent" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="sourceVocabulary" type="xs:string" minOccurs="0"/>
      <xs:element name="timeFrame" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- other adverse event -->
  <xs:complexType name="FrequentAdverseEvent">
    <xs:complexContent>
      <xs:extension base="tns:AdverseEvent">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AdverseEvent" abstract="true">
    <xs:sequence>
      <xs:element name="adverseEventStats">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="eventStats" type="tns:AdverseEventStats" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="assessmentType" type="xs:string" minOccurs="0"/>        <!-- see picklist (AdverseEventAssessTypeUtil) -->
      <xs:element name="notes" type="xs:string" minOccurs="0"/>
      <xs:element name="organSystemName" type="xs:string" minOccurs="0"/>       <!-- see picklist (MeDRASOCTypeUtil) -->
      <xs:element name="sourceVocabulary" type="xs:string" minOccurs="0"/>
      <xs:element name="term" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- Adverse Event Data (per Data Elements Definitions) -->
  <xs:complexType name="AdverseEventStats">
    <xs:sequence>
      <xs:element name="reportingGroupId" type="xs:IDREF"/>
      <xs:element name="numEvents" type="xs:string" minOccurs="0"/>
      <xs:element name="numSubjectsAffected" type="xs:string" minOccurs="0"/>
      <xs:element name="numSubjects" type="xs:string" minOccurs="0"/>           <!-- # participants at risk -->
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SeriousAdverseEvent">
    <xs:complexContent>
      <xs:extension base="tns:AdverseEvent">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="InterventionGroup">
    <xs:sequence>
      <xs:element name="description" type="xs:string" minOccurs="0"/>
      <xs:element name="numDeaths" type="xs:string" minOccurs="0"/>
      <xs:element name="numSubjectsFrequentEvents" type="xs:string" minOccurs="0"/>  <!-- total # affected by other AE   -->
      <xs:element name="numSubjectsSeriousEvents" type="xs:string" minOccurs="0"/>   <!-- total # affected by serious AE -->
      <xs:element name="partAtRiskAllCauseMort" type="xs:string" minOccurs="0"/>
      <xs:element name="partAtRiskFrequentEvents" type="xs:string" minOccurs="0"/>   <!-- total # at risk for other AE   -->
      <xs:element name="partAtRiskSeriousEvents" type="xs:string" minOccurs="0"/>    <!-- total # at risk for serious AE -->		
      <xs:element name="title" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:ID" use="required"/>
  </xs:complexType>
	
<!--
						*********************
						     DISPOSITION
						*********************
-->
	
  <xs:element name="resultDisposition" type="tns:ResultDisposition"/>

  <xs:complexType name="ResultDisposition">
    <xs:sequence>
      <xs:element name="disposition" type="tns:Disposition" minOccurs="0"/>
    </xs:sequence>
	<!-- 
	    See Result/partialUpload comments for a comparison between semantics of full and partial uploads;
	    Intended for future use when Result Disposition may expand beyond one subset of data, Disposition
	-->
    <xs:attribute name="partialUpload" type="xs:boolean"/>
  </xs:complexType>

  <xs:complexType name="Disposition">
    <xs:sequence>
      <xs:element name="anticipatedPostingDate" type="tns:Date" minOccurs="0"/>
      <xs:element name="applicationApprovalDetails">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="appApprovalDetail" type="tns:ApplicationApprovalDetail" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="delayReason" type="xs:string" minOccurs="0"/>
      <xs:element name="delayType" type="xs:string" minOccurs="0"/>             <!-- see picklist (DelayTypeUtil) -->
      <xs:element name="interventionName" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ApplicationApprovalDetail">
    <xs:sequence>
      <xs:element name="approvalNumber" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>

<!--
********************************************************************************
   See Results Pick-list Normalization for valid values in each picklist.
   Use the Records section of the PRS Main Menu to navigate to the Upload Record (XML) page where there is a link to the Results Pick-list Normalization content.
   The Pick-list Normalization report shows a display value and zero or more raw values (i.e., synonyms) for each valid value.
********************************************************************************
-->
