﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/EnrollUser.xsd"
    xmlns:mstns="http://tempuri.org/EnrollUser.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="request">
    <xs:complexType>
      <xs:all>
        <xs:element name="user" minOccurs="1"  maxOccurs="1" >
          <xs:annotation>
            <xs:documentation>The following: clientextid &amp; clientpasskey are required</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:all>
              <xs:element name="clientextid" type="xs:int" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>External client identifier (originated by Insignia Health)</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="clientpasskey" minOccurs="1" maxOccurs="1" >
                <xs:annotation>
                  <xs:documentation>client passkey (originated by Insignia Health)</xs:documentation>
                </xs:annotation>
                <xs:simpleType >
                  <xs:restriction base="xs:string">
                    <xs:minLength value="1"></xs:minLength>
                    <xs:maxLength value="100"></xs:maxLength>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="thirdpartyidentifier">
                <xs:annotation>
                  <xs:documentation>Identifies a user in our system (originated by client)</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:minLength value="1"></xs:minLength>
                    <xs:maxLength value="50"></xs:maxLength>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="nationalpatientidentifier">
                <xs:annotation>
                  <xs:documentation>National Patient Identifier (originated by National Health Service or Insurer)</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:minLength value="1"></xs:minLength>
                    <xs:maxLength value="50"></xs:maxLength>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="firstname"  minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:minLength value="1" />
                    <xs:maxLength value="35" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="lastname"     minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:minLength value="1" />
                    <xs:maxLength value="60" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="dob"  minOccurs="0" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>The user's date of birth</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:attribute name="day" >
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:minInclusive value="1" />
                        <xs:maxInclusive value="31" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="month" >
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:minInclusive value="1" />
                        <xs:maxInclusive value="12" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="year" >
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:minInclusive value="1900" />
                        <xs:maxInclusive value="3000" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="gender" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Undefined"/>
                    <xs:enumeration value="Male"/>
                    <xs:enumeration value="Female"/>
                    <xs:enumeration value="Undetermined" />
                    <xs:enumeration value="PreferNotToAnswer" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="primaryemail" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[^@]+@[^\.]+\..+"/>
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="localization" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>determines Flourish consumer site experience</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:enumeration value="0">
                      <xs:annotation>
                        <xs:documentation>Undefined</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="1">
                      <xs:annotation>
                        <xs:documentation>English</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="2">
                      <xs:annotation>
                        <xs:documentation>Spanish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="3">
                      <xs:annotation>
                        <xs:documentation>Polish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="4">
                      <xs:annotation>
                        <xs:documentation>English - UK</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="preferredlanguage" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>The user's preferred spoken language.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="ara">
                      <xs:annotation>
                        <xs:documentation>Arabic</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="ben">
                      <xs:annotation>
                        <xs:documentation>Bengali</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="bul">
                      <xs:annotation>
                        <xs:documentation>Bulgarian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="cmn">
                      <xs:annotation>
                        <xs:documentation>Chinese (Mainland)</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="sng">
                      <xs:annotation>
                        <xs:documentation>Chinese (Singapore)</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="chk">
                      <xs:annotation>
                        <xs:documentation>Chuukese</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="hat">
                      <xs:annotation>
                        <xs:documentation>Creole (Haitian)</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="ces">
                      <xs:annotation>
                        <xs:documentation>Czech</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="dan">
                      <xs:annotation>
                        <xs:documentation>Danish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="nid">
                      <xs:annotation>
                        <xs:documentation>Dutch</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="eng">
                      <xs:annotation>
                        <xs:documentation>English</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="fil">
                      <xs:annotation>
                        <xs:documentation>Filipino</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="fin">
                      <xs:annotation>
                        <xs:documentation>Finnish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="fra">
                      <xs:annotation>
                        <xs:documentation>French</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="frc">
                      <xs:annotation>
                        <xs:documentation>French Canadian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="deu">
                      <xs:annotation>
                        <xs:documentation>German</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="grk">
                      <xs:annotation>
                        <xs:documentation>Greek</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="guj">
                      <xs:annotation>
                        <xs:documentation>Gujarati</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="heb">
                      <xs:annotation>
                        <xs:documentation>Hebrew</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="hin">
                      <xs:annotation>
                        <xs:documentation>Hindi</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="hun">
                      <xs:annotation>
                        <xs:documentation>Hungarian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="ita">
                      <xs:annotation>
                        <xs:documentation>Italian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="jpn">
                      <xs:annotation>
                        <xs:documentation>Japanese</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="kor">
                      <xs:annotation>
                        <xs:documentation>Korean</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="msa">
                      <xs:annotation>
                        <xs:documentation>Malay</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="mah">
                      <xs:annotation>
                        <xs:documentation>Marshallese</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="nor">
                      <xs:annotation>
                        <xs:documentation>Norwegian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="pol">
                      <xs:annotation>
                        <xs:documentation>Polish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="por">
                      <xs:annotation>
                        <xs:documentation>Portuguese - Portugal</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="pan">
                      <xs:annotation>
                        <xs:documentation>Punjabi</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="rom">
                      <xs:annotation>
                        <xs:documentation>Romanian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="rus">
                      <xs:annotation>
                        <xs:documentation>Russian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="smo">
                      <xs:annotation>
                        <xs:documentation>Samoan</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="slk">
                      <xs:annotation>
                        <xs:documentation>Slovak</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="som">
                      <xs:annotation>
                        <xs:documentation>Somali</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="enu">
                      <xs:annotation>
                        <xs:documentation>English - UK</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="esp">
                      <xs:annotation>
                        <xs:documentation>Spanish - Puerto Rico</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="spa">
                      <xs:annotation>
                        <xs:documentation>Spanish - Spain</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="esm">
                      <xs:annotation>
                        <xs:documentation>Spanish - Mexico</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="swe">
                      <xs:annotation>
                        <xs:documentation>Swedish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="tgl">
                      <xs:annotation>
                        <xs:documentation>Tagalog</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="tam">
                      <xs:annotation>
                        <xs:documentation>Tamil</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="tur">
                      <xs:annotation>
                        <xs:documentation>Turkish</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="ukr">
                      <xs:annotation>
                        <xs:documentation>Ukrainian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="urd">
                      <xs:annotation>
                        <xs:documentation>Urdu</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="vit">
                      <xs:annotation>
                        <xs:documentation>Vietnamese</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="oth">
                      <xs:annotation>
                        <xs:documentation>Other</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="ptb">
                      <xs:annotation>
                        <xs:documentation>Portuguese - Brazil</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="alb">
                      <xs:annotation>
                        <xs:documentation>Albanian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="bur">
                      <xs:annotation>
                        <xs:documentation>Burmese</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="hmn">
                      <xs:annotation>
                        <xs:documentation>Hmong</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="kar">
                      <xs:annotation>
                        <xs:documentation>Karen</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="nep">
                      <xs:annotation>
                        <xs:documentation>Nepali</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
					<xs:enumeration value="lao">
                      <xs:annotation>
                        <xs:documentation>Lao</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="khm">
                      <xs:annotation>
                        <xs:documentation>Khmer</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="slv">
                      <xs:annotation>
                        <xs:documentation>Slovenian</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="Arabic" />
                    <xs:enumeration value="Bengali" />
                    <xs:enumeration value="Bulgarian" />
                    <xs:enumeration value="Chinese (Mainland)" />
                    <xs:enumeration value="Chinese (Singapore)" />
                    <xs:enumeration value="Chuukese" />
                    <xs:enumeration value="Creole (Haitian)" />
                    <xs:enumeration value="Czech" />
                    <xs:enumeration value="Danish" />
                    <xs:enumeration value="Dutch" />
                    <xs:enumeration value="English" />
                    <xs:enumeration value="English - UK" />
                    <xs:enumeration value="Filipino" />
                    <xs:enumeration value="Finnish" />
                    <xs:enumeration value="French" />
                    <xs:enumeration value="French Canadian" />
                    <xs:enumeration value="German" />
                    <xs:enumeration value="Greek" />
                    <xs:enumeration value="Gujarati" />
                    <xs:enumeration value="Hebrew" />
                    <xs:enumeration value="Hindi" />
                    <xs:enumeration value="Hungarian" />
                    <xs:enumeration value="Italian" />
                    <xs:enumeration value="Japanese" />
					<xs:enumeration value="Khmer" />
                    <xs:enumeration value="Korean" />
					<xs:enumeration value="Lao" />
                    <xs:enumeration value="Malay" />
                    <xs:enumeration value="Marshallese" />
                    <xs:enumeration value="Norwegian" />
                    <xs:enumeration value="Other" />
                    <xs:enumeration value="Polish" />
                    <xs:enumeration value="Portuguese - Brazil" />
                    <xs:enumeration value="Portuguese - Portugal" />
                    <xs:enumeration value="Punjabi" />
                    <xs:enumeration value="Romanian" />
                    <xs:enumeration value="Russian" />
                    <xs:enumeration value="Samoan" />
                    <xs:enumeration value="Slovak" />
					<xs:enumeration value="Slovenian" />
                    <xs:enumeration value="Somali" />
                    <xs:enumeration value="Spanish - Mexico" />
                    <xs:enumeration value="Spanish - Puerto Rico" />
                    <xs:enumeration value="Spanish - Spain" />
                    <xs:enumeration value="Swedish" />
                    <xs:enumeration value="Tagalog" />
                    <xs:enumeration value="Tamil" />
                    <xs:enumeration value="Turkish" />
                    <xs:enumeration value="Ukrainian" />
                    <xs:enumeration value="Urdu" />
                    <xs:enumeration value="Vietnamese" />
                    <xs:enumeration value="Albanian" />
                    <xs:enumeration value="Burmese" />
                    <xs:enumeration value="Hmong" />
                    <xs:enumeration value="Karen" />
                    <xs:enumeration value="Nepali" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="surveyparticipationstatus" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>Exclusion/Refusal status indicates if an individual does not qualify to take a survey or if the individual refused to take a survey.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Included" />
                    <xs:enumeration value="Excluded" />
                    <xs:enumeration value="Refused" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="insurancestatus" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>The user's insurance status</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Dual Eligible" />
                    <xs:enumeration value="HMO" />
                    <xs:enumeration value="HSA: HDHP" />
                    <xs:enumeration value="Medicaid" />
                    <xs:enumeration value="Medicaid: Low Utilizer" />
                    <xs:enumeration value="Medicaid: Non Utilizer" />
                    <xs:enumeration value="Medicare" />
                    <xs:enumeration value="No Insurance" />
                    <xs:enumeration value="POS" />
                    <xs:enumeration value="PPO" />
                    <xs:enumeration value="Unknown" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="subgroupextid"  minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                  <xs:documentation>The user's subgroup</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:minInclusive value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="primaryphonenumber" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="postalcode" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="countrycode" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>ISO2 OR ISO3 compliant Country Code</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="3" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="state" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="city" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="addressline1" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="80" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="addressline2" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="80" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:all>
    </xs:complexType>
  </xs:element>
</xs:schema>

