-
Notifications
You must be signed in to change notification settings - Fork 9
/
ecvi2.xsd
2033 lines (1944 loc) · 104 KB
/
ecvi2.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://www.usaha.org/xmlns/ecvi2"
version="3.0.1"
xmlns="http://www.usaha.org/xmlns/ecvi2">
<xs:annotation>
<xs:documentation>Version 3.0.1 </xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation> Change Log
08/30/2017: Initial draft of version 2.0 attempts to clone version 1 (labeled version 6.0?) with only minor tweaks.
09/01/2017: Added regular expressions to AnimalTags choices.
09/01/2017: Added option for ID/IDREF to Attachment for BrandImage ID Type.
11/16/2017: Collapsed animal tag choices into known structure and not.
12/14/2017: Added Equine description and photos as AnimalTag choices.
01/16/2018: Removed string length restrictions not part of regular expressions.
01/16/2018: Spelled out latitude and longitude in geo point.
01/16/2018: Rearranged TagType to put Type as first attribute.
02/08/2018: Restructured Species to SpeciesCode vs. SpeciesOther.
02/08/2018: Restructured All Binary data into ID/IDREF to eliminate duplication
02/28/2018: Converted comments to annotation elements except where simply labeling code sections, etc. Works with an XSLT to generate skeleton documentation.
03/08/2018: Additional annotations added. Ongoing.
04/04/2018: Added Carrier and Transport mode optional elements. Added email in addition to Phone on person. Added miscellaneous attributes element. Changed Breed element to basic string.
04/25/2018: Fixed apostrophe character in Johne's Disease enumeration value.
05/20/2018: Added CVINumberIssuedBy as optional attribute.
05/29/2018: Converted GeoPoint from attributes for Latitude and Longitude to single coordinates element in KML format.
06/06/2018: Simplified Name and Address Block for contacts.
06/25/2018: Clean up documentation.
07/06/2018: Yet another version of AnimalTags defining just the most common.
07/06/2018: Minor edits based on committee input. Further documentation clean up.
07/10/2018: Further edits to Species, AnimalTags, Coordinates, and Statuses.
07/12/2018: Additional tweaks to statuses.
07/20/2018: Added swine PIN plus management tag (called PINPLUS for now).
08/28/2018: Edited documentation of Accession element
09/10/2018: Fixed typos in Address/State and missing type definitions in Latitude and Longitude
09/19/2018: Removed limit of 6 on animal tags. This had been discussed earlier and not implemented.
12/11/2018: Corrected typographical error in MovementPurpose "Medical Treatment"
01/23/2019: Corrected email type to allow top-level domains up to 24 characters.
03/13/2019: Replaced AddressBlock with Address whereever it occurs.
08/07/2019: Allowed GroupLotID to repeat effective Sept 1, 2019 as version 2.2
01/23/2020: Changed required attributes of type string to type nonNullString
01/23/2020: Added 124 and 484 to AIN in addition to MfrRFID
01/23/2020: Added InspectionDate attribute to GroupLot, optional for now.
01/24/2020: Added MiscAttribute element to Animal and GroupLot. Optional and may repeat.
01/24/2020: Added Statements element to Animal and GroupLot. Optional.
03/06/2020: Changed AgeType RegEx to allow decimals.
07/09/2020: Added ReplacesCviNumber attribute. #52
07/09/2020: Added Voided attribute. #51
07/09/2020: Added Product and supporting CommodityType enumeration. #50
07/09/2020: Added TestName attribute. #44
08/13/2020: Added choice element requiring one or more Animal, GroupLot or Product. #54
08/13/2020: Updated annotations in several places. #51, #52, #53
08/13/2020: Added TransportModeOtherDescription
01/02/2021: Documentation element updates #8, #61
3/17/2021: Converted Veterinarian to Natural Person. First and last names required. #63
5/13/2021: Relax Address element for all but Origin, Destination and Field (accession) #69
8/31/2021: Added optional BusinessName to Veterinarian. #63
8/18/2022: Added all state abbreviations to NUES9 regular expression. #74
02/05/2023: Updated copyright statement
02/06/2023: Update MfrRFID documentation to read correctly. #78
02/06/2023: Added InternationalAIN Type #79, Removed 124 and 484 prefixes from AIN and MfrRFID.
02/07/2023: Added international phone number type. #73
02/08/2023: Added ApprovalType to allow approval of generic traceability element.
02/10/2023: Created generic traceability sighting element.
02/10/2023: Created generic traceability movement element.
02/11/2023: Added approval element to generic movement element.
02/08/2023: Remove depricated BOX species code. #80
07/05/2023: Expand CommodityType enumerated list to include SFS commodities. #81
07/05/2023: Make phone type optional. #82
07/05/2023: Add enumerated DiseaseType list, DiseaseCode, and DiseaseOther elements. Changed test and vaccination to require either DiseaseCode or DiseaseOther with optional testtype or vaccinetype strings.
10/10/2023: Add XMLSchemaVersion attribute to eCVI, Movement, and Sighting elements.
10/10/2023: Make InternationalPhone Type attribute optional.
05/29/2024: Fix RegEx for InternationalPhone
05/29/2024: Add InternationaAIN to TagType
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>Copyright © 2017-24 AAVLD/USAHA it is free for use. Submit suggested changes to the maintainers at https://github.com/AAVLD-USAHA-ITStandards/eCVI</xs:documentation>
</xs:annotation>
<!-- BEGIN eCVI Document Elements -->
<xs:element name="eCVI">
<xs:annotation>
<xs:documentation> The eCVI xml document contains an extract of data from an interstate certificate of veterinary inspection (normally electronic) used to communicate the information to another computer system. It does not constitute the legal document; that remains the job of the originating application. This schema tries to capture those data elements and the level of detail needed for regulatory decision support, disease traceability, and business interoperability. A large majority of use-cases can be met using the fully-structured (close standard) data. Inevitably, edge cases--even very important ones--have had to be left to open standard features such as "other" choices and free-text entry elements.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Veterinarian" minOccurs="1" maxOccurs="1"/>
<xs:element ref="MovementPurposes" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Origin" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Destination" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Consignor" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Consignee" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Carrier" minOccurs="0" maxOccurs="1"/>
<xs:element ref="TransportMode" minOccurs="0" maxOccurs="1"/>
<xs:element ref="TransportModeOtherDescription" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Accessions" minOccurs="0" maxOccurs="1"/>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element ref="Animal"/>
<xs:element ref="GroupLot"/>
<xs:element ref="Product"/>
</xs:choice>
<xs:element ref="Statements" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Attachment" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="MiscAttribute" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Binary" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="XMLSchemaVersion" type="nonNullString" use="required">
<xs:annotation>
<xs:documentation>The eCVI XML Schema version that the eCVI should be validated against</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CviNumber" type="nonNullString" use="required"/>
<xs:attribute name="CviNumberIssuedBy" type="xs:string" use="optional"/>
<xs:attribute name="IssueDate" type="xs:date" use="required">
<xs:annotation>
<xs:documentation>The date this eCVI was issued. For revision or void, it is the date of the revision or revocation.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExpirationDate" type="xs:date" use="required"/>
<xs:attribute name="ShipmentDate" type="xs:date" use="optional"/>
<xs:attribute name="EntryPermitNumber" type="xs:string" use="optional"/>
<xs:attribute name="ReplacesCviNumber" type="nonNullString" use="optional"/>
<xs:attribute name="Voided" type="xs:boolean" default="false" use="optional">
<xs:annotation>
<xs:documentation>True indicates that the CVI named in ReplacesCviNumber has been revoked. Voided certificates must include a copy of the human-readable--PDF, etc-- version of the certificate clearly marked as void.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<!-- END eCVI Document Element -->
<!-- BEGIN Generic Movement Record Elements -->
<xs:element name="Movement">
<xs:annotation>
<xs:documentation> The Movement xml document contains data for use as a generic movment used to communicate the movement information to another computer system. It does not constitute the legal document; that remains the job of the originating application. This schema tries to capture those data elements and the level of detail needed for regulatory decision support, disease traceability, and business interoperability. A large majority of use-cases can be met using the fully-structured (close standard) data. Inevitably, edge cases--even very important ones--have had to be left to open standard features such as "other" choices and free-text entry elements.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Veterinarian" minOccurs="0" maxOccurs="1"/>
<xs:element ref="MovementPurposes" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Origin" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Destination" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Consignor" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Consignee" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Carrier" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Approval" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="TransportMode" minOccurs="0" maxOccurs="1"/>
<xs:element ref="TransportModeOtherDescription" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Accessions" minOccurs="0" maxOccurs="1"/>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element ref="Animal"/>
<xs:element ref="GroupLot"/>
<xs:element ref="Product"/>
</xs:choice>
<xs:element ref="Statements" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Attachment" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="MiscAttribute" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Binary" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="XMLSchemaVersion" type="nonNullString" use="required">
<xs:annotation>
<xs:documentation>The eCVI XML Schema version that the movement should be validated against</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MovementId" type="nonNullString" use="required"/>
<xs:attribute name="MovementIdIssuedBy" type="xs:string" use="optional"/>
<xs:attribute name="MovementDate" type="xs:date" use="optional"/>
<xs:attribute name="PermitNumber" type="xs:string" use="optional"/>
<xs:attribute name="ReplacesMovementNumber" type="nonNullString" use="optional"/>
<xs:attribute name="Voided" type="xs:boolean" default="false" use="optional">
<xs:annotation>
<xs:documentation>True indicates that the movement record named in ReplacesCviNumber has been revoked. </xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<!-- END Generic Movement Record Element -->
<!-- BEGIN Proposed Sighting Location Element-->
<xs:element name="Sighting">
<xs:annotation>
<xs:documentation>
The Sighting xml document contains an basic traceability sighting element used to document the sighting of an individual or group of animals with individual identification. This schema tries to capture those data elements and the level of detail needed for regulatory decision support, disease traceability, and business interoperability.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Location" type="PremType" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Accessions" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Animal" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="Statements" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Attachment" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="MiscAttribute" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Binary" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="XMLSchemaVersion" type="nonNullString" use="required">
<xs:annotation>
<xs:documentation>The eCVI XML Schema version that the sighting should be validated against</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SightingType" type="xs:string" use="required"/>
<xs:attribute name="SightingDate" type="xs:date" use="optional"/>
<xs:attribute name="SourceSystem" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<!-- END Proposed Sighting Location Element-->
<!-- BEGIN Top Level Elements -->
<xs:element name="Veterinarian">
<xs:annotation>
<xs:documentation>
Veterinarian is a required element for iCVIs. When available deterministic identifier such as license number and state or national accreditation number should be provided.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Person" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>
NOTE: Person as defined in Veterinarian can only be a natural person. That is, it cannot be a business, must include first and last name. If the single string element Name is used instead, it must include first and last name although that requirement is not schema enforceable.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element name="NameParts">
<xs:complexType>
<xs:sequence>
<xs:element name="BusinessName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="FirstName" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="MiddleName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="LastName" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="OtherName" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1" />
</xs:choice>
<xs:element ref="Phone" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="InternationalPhone" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Email" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Address" type="InternationalAddress" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="LicenseState" type="xs:string" use="optional"/>
<xs:attribute name="LicenseNumber" type="xs:string" use="optional"/>
<xs:attribute name="NationalAccreditationNumber" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="MovementPurposes">
<xs:annotation>
<xs:documentation>
Movement Purposes is required, however, it may be an empty list. This is a challenging element to populate because there are some many factors that become important in regulatory decision making. This list encompasses many different aspects of the animal's use, reason for movement, etc. As with many elements, the goal has been to enumerate those most often used in regulatory and other decision making but leave "Other" available. If "Other" is selected a reason should be supplied as text in the "OtherReason" element.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="MovementPurpose" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Racing"/>
<xs:enumeration value="Sale"/>
<xs:enumeration value="Grazing"/>
<xs:enumeration value="Training"/>
<xs:enumeration value="Slaughter"/>
<xs:enumeration value="Medical Treatment"/>
<xs:enumeration value="Exhibition/Show/Rodeo"/>
<xs:enumeration value="Breeding"/>
<xs:enumeration value="Competition"/>
<xs:enumeration value="Feeding to condition"/>
<xs:enumeration value="Feeding to slaughter"/>
<xs:enumeration value="Laying Hens"/>
<xs:enumeration value="Hunting for harvest"/>
<xs:enumeration value="Companion Animal"/>
<xs:enumeration value="Personal Travel/Transit"/>
<xs:enumeration value="Owner relocating"/>
<xs:enumeration value="Evacuation from Natural Disaster"/>
<xs:enumeration value="Other"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OtherReason" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TransportModeOtherDescription" type="nonNullString"/>
<!-- These are defined here as elements simply to make it easier to navigate via Element list in some editors -->
<xs:element name="Origin" type="PremType">
<xs:annotation>
<xs:documentation>
The physical location of the animal(s) prior to movement is required. Must be a physical (911) address.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Destination" type="PremType">
<xs:annotation>
<xs:documentation>
The intended physical location of the animal(s) after movement is required. Must be a physical (911) address.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Consignor" type="ContactType">
<xs:annotation>
<xs:documentation>
The contact information for the person or business responsible for the animal(s) prior to movement. Only required if different from Origin.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Consignee" type="ContactType">
<xs:annotation>
<xs:documentation>
The contact information for the person or business responsible for the animal(s) after to movement. Only required if different from Destination.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Carrier" type="ContactType">
<xs:annotation>
<xs:documentation>
The contact information for the person or business responsible for moving the animals from origin to destination.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TransportMode">
<xs:annotation>
<xs:documentation
>If important for certification of ability to travel the mode, air, car, rail, truck or boat (ship).
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="air"/>
<xs:enumeration value="boat"/>
<xs:enumeration value="car"/>
<xs:enumeration value="rail"/>
<xs:enumeration value="truck"/>
<xs:enumeration value="land"/>
<xs:enumeration value="other"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Approval" type="ApprovalType">
<xs:annotation>
<xs:documentation>
Regulatory approval(s) of the movement record.
</xs:documentation>
</xs:annotation>
</xs:element>
<!-- Do these list wrappers add value? -->
<xs:element name="Accessions">
<xs:annotation>
<xs:documentation>
Because many herd movements have testing performed in one accession, the accession(s) is(are) listed here and referenced by each test rather than duplicating all the accession information for each test on each animal.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Accession" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Animal">
<xs:annotation>
<xs:documentation>
The Animal element is used for all individually identifiable animals in a shipment even when those may have been entered in an electronic source document using shorthand tools such as identifier ranges. Animal species may be designated by code (see SpeciesCode) or other (see SpeciesOther). At least one animal tag (see AnimalTags) is required. Test (see TestType) is optional, and there is no limit on additional Tests. Age is optional (although often required by regulatory policy) and may be specified as either: a number of days, weeks, months or years plus the standard code for units (d|wk|mo|a) (example: 3wk), age definitions adhere to UCUM - http://unitsofmeasure.org/ucum.html), or as a specific date of birth as a four-digit year, two-digit month, and two-digit date, separated by dashes (example: 2001-05-31). Breed is optional and specified by a two or three uppercase letter code or by a string description such as "black". The code list is not specified in the standard but most are available at: https://www.naab-css.org/uniform-breed-codes, and https://www.aphis.usda.gov/animal_health/vs_ocio/downloads/date_standards/icvi_data_concepts.pdf. Sex (see SexType) reflects the most common variations needed for regulatory. If other configurations are needed they are provided as a string in SexDetail. "Mixed" is not an allowable value for a single Animal (provided for use with Group). InspectionDate is a required date, and is the date the animals were inspected by the vet. If the inspection took place over multiple days, use the first date.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="SpeciesCode" minOccurs="1" maxOccurs="1"/>
<xs:element ref="SpeciesOther" minOccurs="1" maxOccurs="1"/>
</xs:choice>
<xs:element ref="AnimalTags" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Test" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Vaccination" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Statements" minOccurs="0" maxOccurs="1"/>
<xs:element ref="MiscAttribute" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Age" type="AgeType" use="optional"/>
<xs:attribute name="Breed" type="xs:string" use="optional"/>
<xs:attribute name="Sex" type="SexType" use="optional"/>
<xs:attribute name="SexDetail" type="xs:string" use="optional"/>
<xs:attribute name="InspectionDate" type="xs:date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="GroupLot">
<xs:annotation>
<xs:documentation>
GroupLot is used for any grouping of similar animals that do not require individual identification. Rules for what constitute legal groups are defined in the federal ADT rule and various other legal sources. In general groups contain only animals of the same species and general age. All attributes apply to all members of the group. If significant variation exists, multiple GroupLot elements may be needed. Description is the phrase recorded on the iCVI that defines the group and justifies the absence of individual animal IDs. Because this phrase is not easily computer interpretable, various structured elements are included that may overlap the contents of the description. Species may be designated by code (see SpeciesCodeType) or other (see SpeciesOtherType). A single GroupLotID is allowed as a single string, not further defined in order to be species neutral. Quantity is a optional number. Unit by default is "Number", as in a count. A different unit can be specified as an optional string (guidelines on standardized units?). Edge cases might require number to be a total weight of things like fish or shellfish. In those cases "number" may be a decimal. Age is optional and may be specified as either: a number of days, weeks, months or years plus the standard code for units (d|wk|mo|a) (example: 3wk), age definitions adhere to UCUM - http://unitsofmeasure.org/ucum.html), or as a specific date of birth as a four-digit year, two-digit month, and two-digit date, separated by dashes (example: 2001-05-31). It is understood that groups consist of individuals varying in age so that the Age element here represents a rough mid-point. In practice, Age is often omitted and included in the Description such as "Feeder steers under 18 months." Breed is optional and specified by two or three uppercase letters. The list is not specified in the standard but most are available at: https://www.naab-css.org/uniform-breed-codes, and https://www.aphis.usda.gov/animal_health/vs_ocio/downloads/date_standards/icvi_data_concepts.pdf. Sex (see SexType) is optional. SexDetail is an optional string. .
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="SpeciesCode"/>
<xs:element ref="SpeciesOther"/>
</xs:choice>
<xs:element name="GroupLotID" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Test" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Vaccination" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Statements" minOccurs="0" maxOccurs="1"/>
<xs:element ref="MiscAttribute" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Quantity" type="xs:float" use="optional"/>
<xs:attribute name="Unit" type="xs:string" use="optional" default="Number"/>
<xs:attribute name="Age" type="AgeType" use="optional"/>
<xs:attribute name="Breed" type="xs:string" use="optional"/>
<xs:attribute name="Sex" type="GroupSexType" use="optional"/>
<xs:attribute name="SexDetail" type="xs:string" use="optional"/>
<xs:attribute name="Description" type="nonNullString" use="required"/>
<xs:attribute name="InspectionDate" type="xs:date" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="Product">
<xs:annotation>
<xs:documentation>
Product is used to specify living animal products other than live animals. Examples include eggs and semen. Test and Vaccination may apply to the product itself or the "parent" animal(s).
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="SpeciesCode"/>
<xs:element ref="SpeciesOther"/>
</xs:choice>
<xs:element name="ProductID" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Test" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Vaccination" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Statements" minOccurs="0" maxOccurs="1"/>
<xs:element ref="MiscAttribute" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="ProductType" type="CommodityType" use="required"/>
<xs:attribute name="Quantity" type="xs:float" use="optional"/>
<xs:attribute name="Unit" type="xs:string" use="optional" default="Number"/>
<xs:attribute name="Breed" type="xs:string" use="optional"/>
<xs:attribute name="Description" type="nonNullString" use="required"/>
<xs:attribute name="InspectionDate" type="xs:date" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="Statements" type="xs:string">
<xs:annotation>
<xs:documentation>
Additional statements that may be required by various jurisdictions may be included here. These statements must not take the place of or modify the structured content found elsewhere in the standard.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Attachment">
<xs:annotation>
<xs:documentation>
Attachments can be used for text or binary additional information not specifically carried in one of the other Binary elements. Assumed to be from a file so Filename is required along with a reference to the Binary content. Be aware that receiving applications may ignore unknown or unexpected attachments. The Binary fields. DocType is a required string. (put enumeration values in table somehow? Is this list adequate?). Filename is a required string. (Why require a file name? many may never have actually resided in a named file.) Comment is an optional string. (For what purpose?)
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="AttachmentRef" type="xs:IDREF" use="required"/>
<xs:attribute name="DocType" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Scanned Paper CVI">
<xs:annotation>
<xs:documentation>
For sending an image of original paper CVI along with the extracted data. These may be image PDF or other image format.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Scanned Test Chart">
<xs:annotation>
<xs:documentation>
For sending scanned test charts along with electronic CVI or extracted data. These may be image PDF or other image format.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PDF CVI">
<xs:annotation>
<xs:documentation>
For sending data form PDF CVI along with extracted data. These would be Adobe PDF forms, or XFA forms.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PDF Test Chart">
<xs:annotation>
<xs:documentation>
For sending data form PDF Test Chart along with electronic CVI or extracted data. These would be Adobe PDF forms, or XFA forms.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Other">
<xs:annotation>
<xs:documentation>All other uses.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Filename" type="nonNullString" use="required"/>
<xs:attribute name="Comment" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="Binary">
<xs:annotation>
<xs:documentation>
All binary content is included as Binary and referenced in specific elements by ID/IDREF.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Payload" type="xs:base64Binary" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="ID" type="xs:ID" use="required"/>
<xs:attribute name="MimeType" type="MimeType" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="MiscAttribute">
<xs:annotation>
<xs:documentation>
Any additional information needed by specific implementations can be provided as name/value pairs represented as strings. These data must not be essential to proper understanding of the structured content of the standard data but only extend it.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Name" type="nonNullString" use="required"/>
<xs:attribute name="Value" type="nonNullString" use="required"/>
</xs:complexType>
</xs:element>
<!-- END Top Level Elements -->
<!-- BEGIN Second Level Element Definitions -->
<xs:element name="Person">
<xs:annotation>
<xs:documentation> Person is defined as a Name string and an optional Phone Number (see Phone). Because of a lack of industry consensus on hanling names, Name can be provided as either a single string (Name) or individual name components (NameParts).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="NameParts" minOccurs="1" maxOccurs="1"/>
<xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
</xs:choice>
<xs:element ref="Phone" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="InternationalPhone" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Email" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NameParts">
<xs:annotation>
<xs:documentation>
NameParts defines a structured name for a business or person. BusinessName, FirstName, Middle Name, LastName, OtherName are all optional for applications to use one or more (NameParts with on individual components would validate, the schema language to force "one or more of one or more of these parts" would be more complex than necessary.)
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="BusinessName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="FirstName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="MiddleName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="LastName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="OtherName" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Phone">
<xs:annotation>
<xs:documentation>
The Phone Number specifies type (list enumeration values?) and a ten-digit number, and can include a comment.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Number" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{10}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Comment" type="xs:string" use="optional"/>
<xs:attribute name="Type" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Unknown">
<xs:annotation>
<xs:documentation>Probably the most common.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Landline">
<xs:annotation>
<xs:documentation>If known to be fixed location.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Cellphone">
<xs:annotation>
<xs:documentation>If known to be a mobile phone.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Fax">
<xs:annotation>
<xs:documentation>Fax line.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="InternationalPhone">
<xs:annotation>
<xs:documentation> The International Phone Number specifies type (list enumeration values?), a
phone number including international country code, and can include a comment. </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Number" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{1,14}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Comment" type="xs:string" use="optional"/>
<xs:attribute name="Type" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Unknown">
<xs:annotation>
<xs:documentation>Probably the most common.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Landline">
<xs:annotation>
<xs:documentation>If known to be fixed location.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Cellphone">
<xs:annotation>
<xs:documentation>If known to be a mobile phone.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Fax">
<xs:annotation>
<xs:documentation>Fax line.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="Email">
<xs:complexType>
<xs:attribute name="Address" type="EmailType" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Accession">
<xs:annotation>
<xs:documentation>
Accessions are listed for the CVI as a whole and referenced by each test. An accession is defined as the encounter in which testing was performed. This may be either laboratory testing or in field testing. A single Laboratory or Field element must be specified, indicating where tests for this accession were performed. InfieldTest is an optional boolean (true/false value) indicating if a test was performed in the field. This redundancy is retained from version 1 that did not have a distinct Field test element. ID is required, and is the reference number that associates an animal's individual tests performed as part of this accession. ID is not the lab accession number but rather a distinct identifier used for linking within the XML document.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="Laboratory" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Field" minOccurs="1" maxOccurs="1"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="InfieldTest" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Laboratory">
<xs:annotation>
<xs:documentation>
For testing done in or by a named laboratory, the Laboratory element contains the relevant information. LabName is a required string. PremId (see PremIdType) is optional only if unavailable. Address is optional only if unavailable and should contain the lab physical address. AccessionDate is a required date. AccessionNumber is a required string. Accession number is a distinct identifier assigned by the Laboratory. NOTE: Only if the laboratory does not provide an accession number, this value may be set to "Not Provided". This usage is not applicable to equine Coggins test accessions.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="LabName" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="PremId" type="PremIdType" minOccurs="0" maxOccurs="1"/>
<xs:element name="Address" type="InternationalAddress" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="AccessionDate" type="xs:date" use="required"/>
<xs:attribute name="AccessionNumber" type="nonNullString" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Field">
<xs:annotation>
<xs:documentation>
For testing performed outside of a laboratory, the Field element contains the relevant information. PremId (see PremIdType) is optional only if unavailable. Address (see AddressType) is optional only if unavailable and should contain the physical address of the test location. AccessionDate is a required date.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="PremId" type="PremIdType" minOccurs="0" maxOccurs="1"/>
<xs:element name="Address" type="USAddress" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="AccessionDate" type="xs:date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="StateZoneOrAreaStatus">
<xs:annotation>
<xs:documentation>
Statuses are explicitly enumerated for bovine Brucellosis and TB, and left as simple name/value for others.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="BrucellosisStateOrAreaStatus" minOccurs="1" maxOccurs="1"/>
<xs:element ref="TuberculosisStateOrZoneStatus" minOccurs="1" maxOccurs="1"/>
<xs:element ref="OtherStateOrZoneStatus" minOccurs="1" maxOccurs="1"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BrucellosisStateOrAreaStatus">
<xs:annotation>
<xs:documentation>Bovine Brucellosis status.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Status">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Free"/>
<xs:enumeration value="Class A"/>
<xs:enumeration value="Class B"/>
<xs:enumeration value="Class C"/>
<xs:enumeration value="GYA, DSA (Class A)"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="TuberculosisStateOrZoneStatus">
<xs:annotation>
<xs:documentation>Bovine TB status.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Status">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Free"/>
<xs:enumeration value="Modified Accredited Advanced State or Zone (MAA)"/>
<xs:enumeration value="Modified Accredited State or Zone (MA)"/>
<xs:enumeration value="Non Accredited State or Zone (NA)"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="OtherStateOrZoneStatus">
<xs:annotation>
<xs:documentation>Other Disease Status</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Disease" type="nonNullString" use="required"/>
<xs:attribute name="Status" type="nonNullString" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="HerdOrFlockStatus">
<xs:annotation>
<xs:documentation>
Herd or flock status vary enough that enumerating all the variations was impractical. These statuses are represented as a name, value pair with an optional herd or flock ID
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Disease" type="nonNullString" use="required">
<xs:annotation>
<xs:documentation>
For other status types the value such as Brucellosis stage, NPIP clean, may opionally be included in this attribute.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="HerdOrFlockID" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
If the status is identified via herd or flock ID, include that here.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Status" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
If the status has a specific level that can do here.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:complexType name="USAddress">
<xs:annotation>
<xs:documentation>
Origin and destination require a structured address. Because of variation in policy between jurisdictions this schema leaves each element optional. However for a CVI to be valid in any jurisdiction, this element must contain enough information for authorities to uniquely identify the location.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Line1" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Line2" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Town" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="County" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="State" type="StateCodeType" minOccurs="1" maxOccurs="1"/>
<xs:element name="ZIP" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{5}"/>
<xs:pattern value="\d{5}-\d{4}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Country" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Country is restricted to USA by project scope. Derivative schemas may expand this list.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="USA"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GeoPoint" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Simple Latitude and Longitude in decimal degrees
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Latitude" type="LatitudeType" use="required"/>
<xs:attribute name="Longitude" type="LongitudeType" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InternationalAddress">
<xs:annotation>
<xs:documentation>
Consignor, consignee, carrier, etc. may have US or international addresses. Because these are more complicated and not as essential for machine processing constraints such as state and zipcode are removed. "State or Provence" uses element State and "Postal code" uses element ZIP simply to keep the structure constent with common US usage.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Line1" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Line2" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Town" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="County" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="State" type="xs:string" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>
US states and territories should use the 2 character USPS abbreviation. Foreign states and territoties should use the full text name.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ZIP" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Country" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
All countries have three character codes.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GeoPoint" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Simple Latitude and Longitude in decimal degrees
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Latitude" type="LatitudeType" use="required"/>
<xs:attribute name="Longitude" type="LongitudeType" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="Test">
<xs:annotation>
<xs:documentation>
Individual test results are included with each animal and reference via ID/IDREF an accession. For herd testing this allows one accession with many tests. For tests such as Equine Coggins tests that are one per accession it results in slight extra overhead.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Result" minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Result may be integer, float or string
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<xs:element name="ResultInteger" type="xs:integer" minOccurs="0" maxOccurs="1"/>
<xs:element name="ResultString" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="ResultFloat" type="xs:float" minOccurs="0" maxOccurs="1"/>
</xs:choice>
<xs:attribute name="ResultName" use="required">
<xs:annotation>
<xs:documentation>
Results may either be result or comment
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="RESULT"/>
<xs:enumeration value="COMMENT"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element ref="DiseaseCode"/>
<xs:element ref="DiseaseOther"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="AccessionRef" type="xs:IDREF" use="required">
<xs:annotation>
<xs:documentation>
Points to ID in Accession element
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TestType" type="nonNullString" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="SpeciesCode">
<xs:annotation>
<xs:documentation>
For animals with official species codes, the code is required with optional text to add detail if necessary.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Code" type="SpeciesCodes" use="required"/>
<xs:attribute name="Text" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="SpeciesOther">
<xs:annotation>
<xs:documentation>
The species coded in the standard include only those commonly needed for regulatory action related to the movement. Many other official species codes can be found at http://???? Because not all systems may understand these other codes, human readable Text is required in addition to the code. For animals without an official species code, the code may be omitted the default value is OTH and text used to define the actual taxonomy is required.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Code" default="OTH" use="optional"/>
<xs:attribute name="Text" type="nonNullString" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="DiseaseCode">
<xs:annotation>
<xs:documentation> For diseases with official disease codes, the code is required with
optional text to add detail if necessary. </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Code" type="DiseaseType" use="required"/>
<xs:attribute name="Text" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>