-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathSDCFormDesign.xsd
2113 lines (2106 loc) · 97.8 KB
/
SDCFormDesign.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 elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:ihe:qrph:sdc:2016" xmlns="urn:ihe:qrph:sdc:2016" version="3.0">
<!-- rlm:8/23/2017 Changes to support SDC rules -->
<xs:include schemaLocation="SDCExpressions.xsd"/>
<xs:element name="FormDesign" type="FormDesignType">
<xs:annotation>
<xs:documentation>Root element of this Schema</xs:documentation>
</xs:annotation>
<xs:unique name="uniqueID" xmlns="urn:ihe:qrph:sdc:2016">
<xs:selector xpath=".//*"/>
<xs:field xpath="@ID"/>
</xs:unique>
</xs:element>
<xs:element name="DemogFormDesign" type="FormDesignType">
<xs:annotation>
<xs:documentation>Root element of this Schema for a demographic form</xs:documentation>
</xs:annotation>
<xs:unique name="uniqueID_Demog" xmlns="urn:ihe:qrph:sdc:2016">
<xs:selector xpath=".//*"/>
<xs:field xpath="@ID"/>
</xs:unique>
</xs:element>
<xs:element name="DataElement" type="DataElementType">
<xs:annotation>
<xs:documentation>Root element of this Schema for a Data Element</xs:documentation>
</xs:annotation>
<xs:unique name="uniqueID_DE" xmlns="urn:ihe:qrph:sdc:2016">
<xs:selector xpath=".//*"/>
<xs:field xpath="@ID"/>
</xs:unique>
</xs:element>
<xs:group name="ChildElementsGroup">
<xs:choice>
<xs:annotation>
<xs:documentation>IdentifiedExtensionType choices</xs:documentation>
</xs:annotation>
<xs:element minOccurs="0" name="Section" type="SectionItemType">
<xs:annotation>
<xs:documentation>A Section is a grouper for other types of
objects.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Question" type="QuestionItemType">
<xs:annotation>
<xs:documentation>A Question may take 3 basic forms: QS: single-select answer
response QM: multi-select - more than one answer may be selected QF: fill-in
response; no answer choices are present for selection QS and QM are
associated with a ListField of answer choices. The ListField may contain a
List with ListItems (expicitly stated answer choices), or it may contain a
LookupEndpoint field that populates the list from a web service. See
@maxSelections on ListField for information on distinguishing QS from QM. QF
is identified by the presence of a ResponseField child, which describes how
the fill-in response should be recorded. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="DisplayedItem" type="DisplayedType">
<xs:annotation>
<xs:documentation>The DisplayedItem contains title, Blob (Binary Large Object),
and/or Link content, and may also include Contacts and CodedValues that
relate to the Note/Blob/Link objects. DisplayedItems may be interspersed
with other MainItems or ListItem nodes. The parent items may be Section,
Question, and ListItem. However, DisplayedItems are not "attached" to any
specific item Section, Question, or ListItem. Instead they are free-floating
items that can appear anywhere on a form, such as between ListItem
nodes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="ButtonAction" type="ButtonItemType">
<xs:annotation>
<xs:documentation>A Button is a visible area that can be selected ("clicked") to
trigger event code to perform an action. It is ordinarily implemented with
an image that looks like a rectangular button object, but a button can look
like anything.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="InjectForm" type="InjectFormType">
<xs:annotation>
<xs:documentation>InjectForm is a link to a form (or portion of a form) that is
imported into the current form at specific sites.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:group>
<xs:complexType name="DataElementType">
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<xs:group maxOccurs="unbounded" ref="ChildElementsGroup"/>
<xs:attribute name="lineage" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>NEW: A text identifier that is used to group multiple
versions of a single DE. The lineage is constant for all versions of a
single kind of DE. When appended to @baseURI, it can be used to retrieve
all versions of one particular DE.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="version" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>NEW: @version contains the version text for the current
DE. It is designed to be used in conjuction with @baseURI and
@lineage.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="versionPrev" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>NEW: Identify the immediate previous version of the
current DE. The format is the same as version. The primary role of this
optional attribute is to allow automated comparisons between a current
DE and the immediate previous DE version. This is often helpful when
deciding whether to adopt a newer version of a DE. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fullURI" type="URI_Atype" use="required">
<xs:annotation>
<xs:documentation>NEW: The full URI that uniquely identifies the current
DE.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="basedOnURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: URI used to identify the DE that that this DE is
based upon. In most cases, this should be a standard form that is
modified and/or extended by the current DE. The current template reuses
the basedOn IDs whenever the question/answer/semantic context is
identical to the original.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="filename" type="xs:string">
<xs:annotation>
<xs:documentation>NEW: filename to use when the current FormDesign instance
is saved as a file. For forms containing responses, the filename may
include the formInstanceVersionURI, but the naming convention may be
use-case-specific.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="FormDesignType">
<xs:annotation>
<xs:documentation>Start here. This is the top level of the SDCFormDesign object model.
It represents the definition for the information content of a single data-entry
form. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<xs:sequence minOccurs="0">
<xs:element minOccurs="0" name="BeforeLoadForm" type="EventType">
<xs:annotation>
<xs:documentation>NEW: This event is fired before the page is loaded
into memory, and before stored form data is loaded. It may be used,
e.g., for authentication, to retrieve/prepare stored data, and/or to
control form rendering according to user
preferences.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="BeforeLoadData" type="EventType">
<xs:annotation>
<xs:documentation>NEW: This event is fired after the page is loaded into
memory, before stored form data is loaded, and before the form is
visible. For example, It may be used to determine the data to be
loaded and to perform the data loading.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="BeforeShowForm" type="EventType">
<xs:annotation>
<xs:documentation>NEW: This event is fired after the page is loaded is
memory, after the data is loaded into the form, but before the form
is displayed. It may be used to perform form activities that are
controlled by the loaded data.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="BeforeDataSubmit" type="EventType"/>
<xs:element minOccurs="0" name="BeforeCloseForm" type="EventType"/>
<xs:element minOccurs="0" name="OnEvent" maxOccurs="unbounded" type="OnEventType">
<xs:annotation>
<xs:documentation>Generic event handler - eventName must be
specified.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Header" type="SectionItemType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Optional Section that stays at the top of a
form.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Body" type="SectionItemType" maxOccurs="1">
<xs:annotation>
<xs:documentation>Main Section of form</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Footer" type="SectionItemType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Optional Section that stays at the bottom of a
form.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Rules" type="RulesType"> </xs:element>
</xs:sequence>
<xs:attribute name="lineage" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>A string identifier that is used to group multiple
versions of a single form. The lineage is constant for all versions of a
single kind of form. When appended to baseURI, it can be used to
retrieve all versions of one particular form. Example:
@lineage="Lung.Bmk.227"</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="version" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>@version contains the version text for the current form.
It is designed to be used in conjunction with @baseURI and @lineage.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="versionPrev" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>@versionPrev identifies the immediate previous version of
the current FDF. The format is the same as version. The primary role of
this optional attribute is to allow automated comparisons between a
current FDF and the immediate previous FDF version. This is often
helpful when deciding whether to adopt a newer version of an FDF.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fullURI" type="URI_Atype" use="required">
<xs:annotation>
<xs:documentation>The full URI that uniquely identifies the current form. It
is created by concatenating @baseURI + lineage + version. Each of the
components is separated by a single forward slash.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="filename" type="xs:string">
<xs:annotation>
<xs:documentation>@filename is the filename of the FDF when is saved to a
file storage device (e.g., a disk or USB drive). The filename appears
inside the FDF XML to help ensure the identity of the FDF content in
case the saved filename (on a disk drive, etc.) has been changed for any
reason. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="formTitle" type="xs:string">
<xs:annotation>
<xs:documentation>@formTitle is a human readable title for display when
choosing forms. Added 4/27/16</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="basedOnURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>@basedOnURI is a URI that identifies the SDC form that
that the current FDF is based upon. In most cases, this should be a
standard SDC form that is modified and/or extended by the current FDF.
It’s best to avoid using prefixes like "http://" or "https://" because
these can occasionally cause XML validation errors when used in a
URI-typed field. The URI format should be the same format used in
fullURI, which is patterned after the SDC web service API.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="instanceID" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>@instanceID is unique string (e.g., a GUID) used to
identify a unique instance of a form, such as a form used during a
single patient encounter. The @instanceID is used to track saved form
responses across time and across multiple episodes of editing by
end-users. This string does not change for each edit session of a form
or package instance. The @instanceID is required in an FDF-R; It is not
allowed in an FDF. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="instanceVersion" type="xs:dateTime" use="optional">
<xs:annotation>
<xs:documentation>@instanceVersion Timestamp is used to identify a unique instance of a form.
Used for tracking form responses across time and across multiple
episodes of editing by end-users. This field must change for each edit
session of a form instance. The instanceVersion is required in an FDF-R;
It is not allowed in an FDF. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="instanceVersionURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: Globally-unique URI used to identify a unique
instance of a form's saved responses. It is used for tracking form
responses across time and across multiple episodes of editing by
end-users. The instanceVersionURI must change for each edit/save session
of a form instance (defined by instanceVersion). The instanceVersionURI
should be formatted similarly to the fullURI but must include values for
instanceID and instanceVersion. The instanceVersion value is the release
date/time for the new version, in W3C datetime format. An example
instanceVersionURI is:
instanceVersionURI="_baseURI=cap.org&_lineage=Lung.Bmk.227&_version=1.001.011.RC1
&_instanceID=Abc1dee2fg987&_instanceVersion=2019-07-16T19:20:30+01:00&_docType=sdcFDFR
" It is possible to create a shorter URI without the _baseURI, _lineage
and _version parameters, as long as the URI is able to globally and
uniquely identify and retrieve the instance and version of the FDF-R
that was transmitted:
instanceVersionURI="_instanceID=Abc1dee2fg987&_instanceVersion=2019-07-16T19:20:30+01:00&_docType=sdcFDFR"
Note that the FR webservice endpoint URI is not provided in the
instanceVersionURI. The FR endpoint and its security settings may be
found in the SDC Package that contains the FDF-R, at
SDCPackage/SubmissionRule. An FR may also be provided in a custom FDF
Property if desired. The docType for instanceVersionURI is sdcFDFR. The
specific order of components shown in the URI examples is not required,
but the component order shown above is suggested for consistency and
readability. The instanceVersionURI is not required, and is not allowed
in an FDF. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="instanceVersionPrev" type="xs:dateTime" use="optional">
<xs:annotation>
<xs:documentation>NEW: Unique dateTime used to identify the immediate
previous instance of an form instance. Used for tracking form responses
across time and across multiple episodes of editing by end-users. This
field must change for each edit session of a form instance.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="approvalStatus">
<xs:annotation>
<xs:documentation>Describes report fitness for clinical or other action
inProcess: currently being edited, users should not rely on results
preliminary: report is awaiting final review and approval approved:
report is fit for clinical or other action; often synonymous with final
cancelled: report/procedure has been aborted before issued retracted:
report has been deemed unfit for clinical or other action
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="inProcess"/>
<xs:enumeration value="preliminary"/>
<xs:enumeration value="approved"/>
<xs:enumeration value="cancelled"/>
<xs:enumeration value="retracted"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="completionStatus">
<xs:annotation>
<xs:documentation>The extent to which a report contains all of the requested
information pending: no information is yet available incomplete: some
requested information is not yet available complete: all information is
available in the requested report</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="pending"/>
<xs:enumeration value="incomplete"/>
<xs:enumeration value="complete"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="ResponseAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ChildItemsType">
<xs:annotation>
<xs:documentation>ChildItems have descendants that are of type DisplayedType. They may
include primary items of type SectionType, QuestionType, InjectFormType,
DisplayedType and ButtonType, in any order. The ChildItem separates new child
primary items from elements and attributes that are sub-parts of the parent primary
item.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:group maxOccurs="unbounded" ref="ChildElementsGroup"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="InjectFormType">
<xs:annotation>
<xs:documentation>CHANGED: This type represents a form or portion of a form that is
imported into the current form at a specific location. It allows the composition of
forms from other forms or parts of other forms. In practice, using an injected
section will requiresome or all of the injected FormDesignXML to be injected under
this the InjectForm element. For that reason, the schema supports those elements to
appear inline. However, in a "raw" form (not yet filled out), the FormDesign element
would generally be empty; only the top-level InjectFormType attributes would be used
to point to the parts to be later injected. Form parts to be injected are specified
by packageID, not FormID. This allows an injected form to be assocaited with helper
files, or to return previosuly completed form parts containing responses.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<!--Feb 03, 222: Changed minOccurs from 1 to 0 to allow SDC templates to reference an injectable part, but are not yet populated with an instantiated injection.-->
<xs:choice minOccurs="0">
<xs:element name="Section" type="SectionItemType"/>
<xs:element name="Question" type="QuestionItemType"/>
<xs:element name="FormDesign" type="FormDesignType"/>
</xs:choice>
<xs:attribute name="InjectionSourceURI" type="URI_Atype" use="required">
<xs:annotation>
<xs:documentation>NEW (2/24/2022): The source of the SDC FormDesign, Section or Question to inject
The suggested form of the URI is:
serverURI + \fullURI for the FDF (as described in the SDC Technical Reference Guide [TRG])
Retrieves the latest package version with FDF responses (contains the latest FDF-R content)
-OR-
serverURI +\instanceVersionURI for the FDF-R (as described in the TRG)
Retrieves a specific package version with FDF responses (contains the FDF-R content from a specific point in time)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="rootItemID" type="URI_Atype" use="required">
<xs:annotation>
<xs:documentation>The rootItemID is the ID of the form or form part that
will be injected. It must point to a valid FormDesign, Section or
Question element. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="serverURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>The server from which the injected package will be
retrieved. Former name "pkgManagerURI"</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseReportingAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="LookupEndPointType">
<xs:annotation>
<xs:documentation>LookupEndPointType represents list items that are derived from a web
service call of some type, instead of an explicit set of ListItem nodes specified in
the FormDesign XML. The endpoint must return a list separated into individual list
items by the @colTextDelimiter value specified in the parent
ListFieldType.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="CallFuncActionType">
<xs:sequence maxOccurs="1">
<xs:element maxOccurs="unbounded" minOccurs="0" name="ResponseValue" type="CodingType">
<xs:annotation>
<xs:documentation>The user's response to the lookup list. The response
is recorded as a coding, terminology, classification, keyword, or
local value. Multiple selections from the lookup list may be
allowed.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="includesHeaderRow" type="xs:boolean" default="false"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListItemType">
<xs:annotation>
<xs:documentation>ListItem elements represent answer choices that may appear under a
Question.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ListItemBaseType">
<xs:choice minOccurs="0">
<xs:element name="ChildItems" type="ChildItemsType" minOccurs="0"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListItemBaseType" block="" abstract="true">
<xs:annotation>
<xs:documentation>This base element is the foundation for ListItems, but does not
include the MainItems sub-group under each ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DisplayedType">
<xs:sequence>
<xs:element name="ListItemResponseField" minOccurs="0" maxOccurs="1"
type="ListItemResponseFieldType">
<xs:annotation>
<xs:documentation>A place to enter values (of any data type) that are
directly associated with, and attached to, a selected answer
choice.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OnSelect" maxOccurs="unbounded" minOccurs="0" type="EventType"> </xs:element>
<xs:element name="OnDeselect" maxOccurs="unbounded" minOccurs="0" type="EventType"> </xs:element>
<xs:element name="SelectIf" minOccurs="0" type="PredGuardType"> </xs:element>
<xs:element name="DeselectIf" minOccurs="0" type="PredGuardType"> </xs:element>
</xs:sequence>
<xs:attribute default="false" name="selected" type="xs:boolean">
<xs:annotation>
<xs:documentation>Represents the default value of the ListItem in the
FormDesign template, or the user's response in selecting one or more
ListItems. If @multiSelect='false' on ListField then only one item may
be selected.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="false" name="selectionDisablesChildren" type="xs:boolean">
<xs:annotation>
<xs:documentation>If set to true, then selecting this ListItem must
deactivate all descendant parts of the form, and ignore any user-entered
values in the deactivated part. Deselecting the ListItem should
reactivate the descendant items in their state at the time the items
were deactivated. If items are disabled, then any data stored in the
disabled questions should be removed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selectionActivatesItems" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>NEW Selecting the current ListItem will enable the named
items in this attribute's content. Prefixing any named with a hyphen (-)
will reverse the above behaviour (i.e., the named items will be
disabled). Unselecting the ListItem will reverse this behaviour.
Prefixing the name with a tilde (~) will supress this reversal behavior.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selectionSelectsListItems" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>NEW Selecting the current ListItem will select the named
ListItems in this attribute's content. Prefixing any named with a hyphen
(-) will reverse the above behaviour. Unselecting the ListItem will
reverse this behaviour. Prefixing the name with a tilde (~) will
suppress this reversal behavior. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="false" name="selectionDeselectsSiblings" type="xs:boolean">
<xs:annotation>
<xs:documentation>If the ancestor ListField has @multiselect = 'true', then
selecting this ListItem should de-select all other ListItem (sibling)
nodes except the current one.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="false" name="omitWhenSelected" type="xs:boolean">
<xs:annotation>
<xs:documentation>If @omitWhenSelected is set to true, then the question and
its response(s) should not be present in a typical report derived from
this template. This attribute is usually set to true when the answer
choice is used to control form behavior (e.g., skip logic), or when the
question provides unhelpful "negative" information about actions that
did not occur or were not performed, or things that were not observed or
could not be assessed. If @omitWhenSelectedset is false (default) then
the question and its response(s) should appear in the report. Added
11/29/15 to replace @reportAction</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseReportingAttributes"/>
<xs:attribute name="associatedValue" type="xs:string">
<xs:annotation>
<xs:documentation>A typed value (e.g., an integer) that is uniquely
associated with a ListItem. An example is the integer 10 for a ListItem
with title that reads "10 o'clock". Typically these values are set to be
used in calculations or other algorithms. In general, they can be
treated something like a user-entered response on a the
ListItemResponseField of a selected ListItem. This field should not be
used for terminologies or local codes. The CodedValue type should be
used for these kinds of metadata. This field should also not be used
other properties such as translations, usage, etc. The data type shoudl
be specified in @AssociatedValueType </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="associatedValueType" type="DataTypeAll_StypeEnum">
<xs:annotation>
<xs:documentation>The data type of @AssociatedValue. Default is
string.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListType">
<xs:annotation>
<xs:documentation>This type represents a list of specified answer choices. CHANGED
9/20/2016: Fix for serialization error which aggregated all DisplayedItems at the
top of the ListItems. A Schematron (or similar validation tool) will be required to
ensure that at least 2 ListItems are present for single-select questions, and one
ListItem for multi-select questions. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:choice maxOccurs="unbounded">
<xs:element name="DisplayedItem" type="DisplayedType"/>
<xs:element name="ListItem" type="ListItemType" minOccurs="1" maxOccurs="1"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListFieldType">
<xs:annotation>
<xs:documentation>ListField is a grouper for list-like answer choices, which may be
derived from either a set of answer choice lists (a List composed of ListItems) or
or a list obtained from a LookupEndpoint URI.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:element minOccurs="0" name="ListHeaderText" type="RichTextType">
<xs:annotation>
<xs:documentation>The header row for a set of list items. If the list
has more than one column, the column text is separated by the
colTextDelimiter.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="DefaultCodeSystem" type="CodeSystemType">
<xs:annotation>
<xs:documentation>If coded values are used for items in a List
(including ListItem and LookupEndPoint lists), then the default
coding system should be specified here. For ListItem nodes, any
exceptions to the coding system may be specified on the individual
ListItem nodes. For LookupEndPoints, the endpoint data can
optionally specify any exceptions in a dedicated CodeSystem column
in the returned list data.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element name="List" type="ListType">
<xs:annotation>
<xs:documentation>List refers to a set of possible answer choices
for the user to select. Child DisplayedItems may be interspersed
with Child ListItems. At least one ListItem must be present for
a multi-select question, and at least two ListItems must pre
present for single-select questions.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LookupEndPoint" minOccurs="1" maxOccurs="1" type="LookupEndPointType">
<xs:annotation>
<xs:documentation>LookupEndPoint is used when the list items are
derived from a web service call of some type, instead of an
explicit set of ListItem nodes specified in the FormDesign XML.
The endpoint must return a list separated into individual list
items by the @colTextDelimiter value specified in the parent
ListFieldType.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element maxOccurs="unbounded" minOccurs="0" name="IllegalListItemPairings"
type="PredSelectionTestType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="IllegalCoSelectedListItems"
type="PredSingleSelectionSetsType"/>
<xs:element minOccurs="0" name="AfterChange" maxOccurs="unbounded" type="EventType">
<xs:annotation>
<xs:documentation>Event that occurs after List Field selections are
changed.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="OnEvent" type="OnEventType"/>
</xs:sequence>
<xs:attribute default="|" name="colTextDelimiter">
<xs:annotation>
<xs:documentation>Character in the DisplayText that separates the columns
and rows in a single or multi-column list.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute default="1" name="numCols" type="xs:unsignedByte">
<xs:annotation>
<xs:documentation>Number of columns in the list</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="1" name="storedCol" type="xs:unsignedByte">
<xs:annotation>
<xs:documentation>Determines which column of the list is stored in a
database. This list is one-based.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="1" name="minSelections">
<xs:annotation>
<xs:documentation>Minimum number of answer choices (list items) that must be
selected by the user. Default value is 1. NEW: changed minimum value to
1. Removed: If set to 0, then this question need not be answered by the
user.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:unsignedShort">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute default="1" name="maxSelections" type="xs:unsignedShort">
<xs:annotation>
<xs:documentation>Maximum number of answer choices (list items) that can be
selected by the user. Must be greater than or equal to minSelections,
and no larger than the total number of list items. A value of 0
indicates no limit to the number of selected list items (answers). This
effectively means that the question is multi-select. (Abbreviated as QM)
A value of 1 (the default) indicates that the question list is
single-select. (Abbreviated as QS)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="true" name="ordered" type="xs:boolean">
<xs:annotation>
<xs:documentation>If false, then the form implementation may change the
order of items in the list.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="defaultListItemDataType" type="DataTypeAll_StypeEnum">
<xs:annotation>
<xs:documentation>This attribute contains an SDC datatype enumeration. The
selected value is the datatype of the content for all
ListItem/@associatedValue content in the current List. It is used
instead of associatedValueType. This element is used only if the
ListItems are all associated with coded values from a single coding
system. If associatedValueType on a ListItem has a datatype assigned,
then the latter datatype overrides the content in
defaultListItemDataType.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ResponseFieldType">
<xs:annotation>
<xs:documentation>This type is a template for a data entry field that accepts entries
(responses or answers) of any data type, including text, numbers, dates, and Base 64
- encoded blobs (images, sounds, video, other binary formats, etc.). This type
cannot contain ListItems, but it may be a child of a Question or a
ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:sequence>
<xs:element name="Response" type="DataTypes_DEType" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>W3C Schema data type details</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="CallSetValue" type="CallFuncActionType">
<xs:annotation>
<xs:documentation>NEW</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SetValue" type="ScriptCodeAnyType">
<xs:annotation>
<xs:documentation>NEW</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:sequence>
<xs:element name="TextAfterResponse" type="RichTextType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>TextAfterResponse is fixed text that appears after (to
the right of) the user's response on the data entry form. This may
be text for units such as "mm", "cm", etc.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ResponseUnits" minOccurs="0" maxOccurs="1" type="UnitsType">
<xs:annotation>
<xs:documentation/>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" name="AfterChange" type="EventType" minOccurs="0">
<xs:annotation>
<xs:documentation>Event that occurs after the Response value is changed,
usually fired after a user leaves the Response
field.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="OnEvent" type="OnEventType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:attributeGroup name="ResponseAttributes">
<xs:attribute name="changedData" type="xs:boolean">
<xs:annotation>
<xs:documentation>Identifies existence of data that has been changed in the current
instance of package/form/section/question compared to the previous instance of
the package/form/section/question</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="newData" type="xs:boolean">
<xs:annotation>
<xs:documentation>Identifies existence of data that is new to the current instance
of package, form, section, or question compared to the previous instance of the
package, form, section, or question</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="ResponseReportingAttributes">
<xs:annotation>
<xs:documentation>Used to extend identified items (Section, Question, ListItem) for
nested/repeating responses in reports and data transmissions.</xs:documentation>
</xs:annotation>
<xs:attribute default="0" name="repeat" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>For repeating questions and sections, @repeat represents the
repeat ordinality, starting with 0. 0 indicates the original Question or
Section, not a repeated one. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="instanceGUID" type="xs:string">
<xs:annotation>
<xs:documentation>A globally unique string assigned to a repeating Question or
Section, Injected Form, or any selected answer ListItem. This attribute's value
is assigned at the time that answers are entered into a form, to unambiguously
identify a single instance among sections or questions, including those that are
allowed to repeat and nest deeply. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="parentGUID" type="xs:string">
<xs:annotation>
<xs:documentation>A globally unique string assigned from a Section, Question,
ListItem or InjectedForm to the ID of its parent node (S, Q, LI or IF). This
attribute's value is assigned at the time that answers are entered into a form,
to unambiguously identify a single instance among the above objects, including
those that are allowed to repeat and nest deeply. </xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="ListItemResponseFieldType">
<xs:annotation>
<xs:documentation>This type represents a place to store a fill-in response associated
directly with a selected ListItem. The response may be optional or
required.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ResponseFieldType">
<xs:attribute name="responseRequired" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>If @responseRequired is set to true, then the appropriate
text or Blob must be entered in the data-entry field associated with
this list item.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ButtonItemType">
<xs:annotation>
<xs:documentation>The ButtonItem type represents a visual area for a user to click, and
the click triggers a piece of "Action" code to run inside the form. The ButtonAction
object may be represented with a visible button object, or some other type of visual
paradigm. Other types of actions (e.g. key presses in a text field) may be handled
with the form framework's event model.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DisplayedType">
<xs:choice>
<xs:element minOccurs="0" name="OnClick" type="EventType" maxOccurs="unbounded"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SectionItemType">
<xs:annotation>
<xs:documentation>The Section is a grouper for all other types of objects. It may have a
distinctive visual display (e.g. a box containing other displayed objects), and it
may be used to treat Section descendants as a unit for special handling, such as
hiding and showing. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="SectionBaseType">
<xs:choice minOccurs="0">
<xs:annotation>
<xs:documentation>MainNodes choices</xs:documentation>
</xs:annotation>
<xs:element name="ChildItems" type="ChildItemsType" minOccurs="0">
<xs:annotation>
<xs:documentation>Child items are of type DisplayedType. They may
include items of type SectionType, QuestionType, InjectFormType,
DisplayedType and ButtonType, in any order.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SectionBaseType" abstract="true">
<xs:annotation>
<xs:documentation>This base item is the same as the SectionItemType, except it lacks the
recursion created by the inclusion of MainItems sub-group.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="RepeatingType">
<xs:attribute default="true" name="ordered" type="xs:boolean">
<xs:annotation>
<xs:documentation>If false, then the form implementation may change the
order of items in the section.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="QuestionItemType">
<xs:annotation>
<xs:documentation>Represents questions. Parent items may be Section, Question, and
ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="QuestionItemBaseType">
<xs:choice minOccurs="0">
<xs:element name="ChildItems" type="ChildItemsType" minOccurs="0"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="QuestionItemBaseType" abstract="true">
<xs:annotation>
<xs:documentation>Represents questions. Parent items may be Section, Question, and
ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="RepeatingType">
<xs:choice maxOccurs="1">
<xs:annotation>
<xs:documentation>Choice (ResponseField, ListField)</xs:documentation>
</xs:annotation>
<xs:element name="ResponseField" type="ResponseFieldType" minOccurs="1" maxOccurs="1"/>
<xs:element name="ListField" minOccurs="1" maxOccurs="1" type="ListFieldType"> </xs:element>
</xs:choice>
<xs:attribute default="false" name="readOnly" type="xs:boolean">
<xs:annotation>
<xs:documentation>If @readOnly is set to true, the this field may not be
edited by the user, and any default values set by template should be
considered part of the stored data set responses, and transmitted by the
SubmitForm transaction.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RepeatingType" abstract="true">
<xs:annotation>
<xs:documentation>This type presents any display objects that may be repeated based upon
on the user's interaction with the form objects. Items derived from this type
include Sections and Questions.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DisplayedType">
<xs:attribute name="minCard" type="xs:unsignedShort" default="1">
<xs:annotation>
<xs:documentation>@minCard is the minimum number of repetitions allowed for
a section or question. The default value is 1, indicating that the user
must answer any question(s) that has this attribute set. If @minCard is
set to 0, then the item and all descendent questions are optional to
answer.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="maxCard" default="1" type="xs:unsignedShort">
<xs:annotation>
<xs:documentation>@maxCard is the maximum number of repetitions allowed for
a section or question. The default value is 1, indicating that the
section or question cannot be repeated on the data entry form. A value
of 0 indicates that the number of repeats is unlimited. If @maxCard is
not 0, then Must be greater than or equal to minCard.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseReportingAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DisplayedType">
<xs:annotation>
<xs:documentation>This type represents any object that is designed to have a visual
presence on a form, e.g., Sections, Questions, ListItems, Notes and Blobs. (Other
items not inheriting this type may use an optional styleClass
attribute.)</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Link" type="LinkType">
<xs:annotation>
<xs:documentation>Link to external information.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BlobContent" type="BlobType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Blob information associated with the current
DisplayedType. The blob may contain any type of special media, but
must be base 64 encoded.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" name="Contact" type="ContactType" minOccurs="0">
<xs:annotation>
<xs:documentation>Any desired contact information regarding, e.g., the
form item, authoring process, certifications, code or coding
processs.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="CodedValue" type="CodingType">
<xs:annotation>
<xs:documentation>Coding, terminology, classification, keyword, or local
values</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="OnEnter" type="EventType" maxOccurs="unbounded"/>
<xs:element minOccurs="0" name="OnExit" type="EventType" maxOccurs="unbounded"/>
<xs:element minOccurs="0" name="OnEvent" maxOccurs="unbounded" type="OnEventType">
<xs:annotation>
<xs:documentation>Generic event handler - eventName must be
specified.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="ActivateIf" type="PredGuardType">