001package org.hl7.fhir.r5.formats;
002
003
004// generated
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, \
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this \
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, \
016     this list of conditions and the following disclaimer in the documentation \
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
031  POSSIBILITY OF SUCH DAMAGE.
032  */
033
034// Generated on Tue, Dec 21, 2021 05:44+1100 for FHIR v5.0.0-snapshot1
035
036
037
038import org.hl7.fhir.r5.model.*;
039import org.hl7.fhir.r5.model.StringType;
040import org.hl7.fhir.utilities.Utilities;
041import org.hl7.fhir.exceptions.FHIRFormatError;
042import org.hl7.fhir.exceptions.FHIRException;
043import org.hl7.fhir.utilities.turtle.Turtle.*;
044import java.io.IOException;
045
046public class RdfParser extends RdfParserBase {
047
048  public RdfParser() {
049    super();
050  }
051
052  public RdfParser(boolean allowUnknownContent) {
053    super();
054    setAllowUnknownContent(allowUnknownContent);
055  }
056
057  private void composeEnum(Complex parent, String parentType, String name, Enumeration<? extends Enum> value, int index) {
058    if (value == null)
059      return;
060    Complex t = parent.predicate("fhir:"+parentType+"."+name);
061    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
062    composeElement(t, parentType, name, value, index);
063    decorateCode(t, value);
064  }
065
066
067  protected void composeDate(Complex parent, String parentType, String name, DateType value, int index) {
068    if (value == null)
069      return;
070    Complex t = parent.predicate("fhir:"+parentType+"."+name);
071    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
072    composeElement(t, parentType, name, value, index);
073  }
074
075  protected void composeDateTime(Complex parent, String parentType, String name, DateTimeType value, int index) {
076    if (value == null)
077      return;
078    Complex t = parent.predicate("fhir:"+parentType+"."+name);
079    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
080    composeElement(t, parentType, name, value, index);
081  }
082
083  protected void composeCode(Complex parent, String parentType, String name, CodeType value, int index) {
084    if (value == null)
085      return;
086    Complex t = parent.predicate("fhir:"+parentType+"."+name);
087    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
088    composeElement(t, parentType, name, value, index);
089    decorateCode(t, value);
090  }
091
092  protected void composeString(Complex parent, String parentType, String name, StringType value, int index) {
093    if (value == null)
094      return;
095    Complex t = parent.predicate("fhir:"+parentType+"."+name);
096    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
097    composeElement(t, parentType, name, value, index);
098  }
099
100  protected void composeInteger(Complex parent, String parentType, String name, IntegerType value, int index) {
101    if (value == null)
102      return;
103    Complex t = parent.predicate("fhir:"+parentType+"."+name);
104    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
105    composeElement(t, parentType, name, value, index);
106  }
107
108  protected void composeInteger64(Complex parent, String parentType, String name, Integer64Type value, int index) {
109    if (value == null)
110      return;
111    Complex t = parent.predicate("fhir:"+parentType+"."+name);
112    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
113    composeElement(t, parentType, name, value, index);
114  }
115
116  protected void composeOid(Complex parent, String parentType, String name, OidType value, int index) {
117    if (value == null)
118      return;
119    Complex t = parent.predicate("fhir:"+parentType+"."+name);
120    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
121    composeElement(t, parentType, name, value, index);
122  }
123
124  protected void composeCanonical(Complex parent, String parentType, String name, CanonicalType value, int index) {
125    if (value == null)
126      return;
127    Complex t = parent.predicate("fhir:"+parentType+"."+name);
128    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
129    composeElement(t, parentType, name, value, index);
130  }
131
132  protected void composeUri(Complex parent, String parentType, String name, UriType value, int index) {
133    if (value == null)
134      return;
135    Complex t = parent.predicate("fhir:"+parentType+"."+name);
136    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
137    composeElement(t, parentType, name, value, index);
138  }
139
140  protected void composeUuid(Complex parent, String parentType, String name, UuidType value, int index) {
141    if (value == null)
142      return;
143    Complex t = parent.predicate("fhir:"+parentType+"."+name);
144    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
145    composeElement(t, parentType, name, value, index);
146  }
147
148  protected void composeUrl(Complex parent, String parentType, String name, UrlType value, int index) {
149    if (value == null)
150      return;
151    Complex t = parent.predicate("fhir:"+parentType+"."+name);
152    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
153    composeElement(t, parentType, name, value, index);
154  }
155
156  protected void composeInstant(Complex parent, String parentType, String name, InstantType value, int index) {
157    if (value == null)
158      return;
159    Complex t = parent.predicate("fhir:"+parentType+"."+name);
160    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
161    composeElement(t, parentType, name, value, index);
162  }
163
164  protected void composeBoolean(Complex parent, String parentType, String name, BooleanType value, int index) {
165    if (value == null)
166      return;
167    Complex t = parent.predicate("fhir:"+parentType+"."+name);
168    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
169    composeElement(t, parentType, name, value, index);
170  }
171
172  protected void composeBase64Binary(Complex parent, String parentType, String name, Base64BinaryType value, int index) {
173    if (value == null)
174      return;
175    Complex t = parent.predicate("fhir:"+parentType+"."+name);
176    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
177    composeElement(t, parentType, name, value, index);
178  }
179
180  protected void composeUnsignedInt(Complex parent, String parentType, String name, UnsignedIntType value, int index) {
181    if (value == null)
182      return;
183    Complex t = parent.predicate("fhir:"+parentType+"."+name);
184    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
185    composeElement(t, parentType, name, value, index);
186  }
187
188  protected void composeMarkdown(Complex parent, String parentType, String name, MarkdownType value, int index) {
189    if (value == null)
190      return;
191    Complex t = parent.predicate("fhir:"+parentType+"."+name);
192    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
193    composeElement(t, parentType, name, value, index);
194  }
195
196  protected void composeTime(Complex parent, String parentType, String name, TimeType value, int index) {
197    if (value == null)
198      return;
199    Complex t = parent.predicate("fhir:"+parentType+"."+name);
200    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
201    composeElement(t, parentType, name, value, index);
202  }
203
204  protected void composeId(Complex parent, String parentType, String name, IdType value, int index) {
205    if (value == null)
206      return;
207    Complex t = parent.predicate("fhir:"+parentType+"."+name);
208    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
209    composeElement(t, parentType, name, value, index);
210  }
211
212  protected void composePositiveInt(Complex parent, String parentType, String name, PositiveIntType value, int index) {
213    if (value == null)
214      return;
215    Complex t = parent.predicate("fhir:"+parentType+"."+name);
216    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
217    composeElement(t, parentType, name, value, index);
218  }
219
220  protected void composeDecimal(Complex parent, String parentType, String name, DecimalType value, int index) {
221    if (value == null)
222      return;
223    Complex t = parent.predicate("fhir:"+parentType+"."+name);
224    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
225    composeElement(t, parentType, name, value, index);
226  }
227
228  protected void composeBackboneElement(Complex t, String parentType, String name, BackboneElement element, int index) {
229    composeElement(t, parentType, name, element, index);
230    for (int i = 0; i < element.getModifierExtension().size(); i++) {
231      composeExtension(t, "BackboneElement", "modifierExtension", element.getModifierExtension().get(i), i);
232    }
233  }
234
235  protected void composeBackboneType(Complex t, String parentType, String name, BackboneType element, int index) {
236    composeDataType(t, parentType, name, element, index);
237    for (int i = 0; i < element.getModifierExtension().size(); i++) {
238      composeExtension(t, "BackboneType", "modifierExtension", element.getModifierExtension().get(i), i);
239    }
240  }
241
242  protected void composeDataType(Complex t, String parentType, String name, DataType element, int index) {
243    composeElement(t, parentType, name, element, index);
244  }
245
246  protected void composeElement(Complex t, String parentType, String name, Element element, int index) {
247    composeBase(t, parentType, name, element, index);
248    if (element.hasIdElement()) {
249      composeString(t, "Element", "id", element.getIdElement(), -1);
250    }
251    for (int i = 0; i < element.getExtension().size(); i++) {
252      composeExtension(t, "Element", "extension", element.getExtension().get(i), i);
253    }
254  }
255
256  protected void composeAddress(Complex parent, String parentType, String name, Address element, int index) {
257    if (element == null) 
258      return;
259    Complex t;
260    if (Utilities.noString(parentType))
261      t = parent;
262    else {
263      t = parent.predicate("fhir:"+parentType+'.'+name);
264    }
265    composeDataType(t, "Address", name, element, index);
266    if (element.hasUseElement()) {
267      composeEnum(t, "Address", "use", element.getUseElement(), -1);
268    }
269    if (element.hasTypeElement()) {
270      composeEnum(t, "Address", "type", element.getTypeElement(), -1);
271    }
272    if (element.hasTextElement()) {
273      composeString(t, "Address", "text", element.getTextElement(), -1);
274    }
275    for (int i = 0; i < element.getLine().size(); i++) {
276      composeString(t, "Address", "line", element.getLine().get(i), i);
277    }
278    if (element.hasCityElement()) {
279      composeString(t, "Address", "city", element.getCityElement(), -1);
280    }
281    if (element.hasDistrictElement()) {
282      composeString(t, "Address", "district", element.getDistrictElement(), -1);
283    }
284    if (element.hasStateElement()) {
285      composeString(t, "Address", "state", element.getStateElement(), -1);
286    }
287    if (element.hasPostalCodeElement()) {
288      composeString(t, "Address", "postalCode", element.getPostalCodeElement(), -1);
289    }
290    if (element.hasCountryElement()) {
291      composeString(t, "Address", "country", element.getCountryElement(), -1);
292    }
293    if (element.hasPeriod()) {
294      composePeriod(t, "Address", "period", element.getPeriod(), -1);
295    }
296  }
297
298  protected void composeAge(Complex parent, String parentType, String name, Age element, int index) {
299    if (element == null) 
300      return;
301    Complex t;
302    if (Utilities.noString(parentType))
303      t = parent;
304    else {
305      t = parent.predicate("fhir:"+parentType+'.'+name);
306    }
307    composeQuantity(t, "Age", name, element, index);
308  }
309
310  protected void composeAnnotation(Complex parent, String parentType, String name, Annotation element, int index) {
311    if (element == null) 
312      return;
313    Complex t;
314    if (Utilities.noString(parentType))
315      t = parent;
316    else {
317      t = parent.predicate("fhir:"+parentType+'.'+name);
318    }
319    composeDataType(t, "Annotation", name, element, index);
320    if (element.hasAuthor()) {
321      composeType(t, "Annotation", "author", element.getAuthor(), -1);
322    }
323    if (element.hasTimeElement()) {
324      composeDateTime(t, "Annotation", "time", element.getTimeElement(), -1);
325    }
326    if (element.hasTextElement()) {
327      composeMarkdown(t, "Annotation", "text", element.getTextElement(), -1);
328    }
329  }
330
331  protected void composeAttachment(Complex parent, String parentType, String name, Attachment element, int index) {
332    if (element == null) 
333      return;
334    Complex t;
335    if (Utilities.noString(parentType))
336      t = parent;
337    else {
338      t = parent.predicate("fhir:"+parentType+'.'+name);
339    }
340    composeDataType(t, "Attachment", name, element, index);
341    if (element.hasContentTypeElement()) {
342      composeCode(t, "Attachment", "contentType", element.getContentTypeElement(), -1);
343    }
344    if (element.hasLanguageElement()) {
345      composeCode(t, "Attachment", "language", element.getLanguageElement(), -1);
346    }
347    if (element.hasDataElement()) {
348      composeBase64Binary(t, "Attachment", "data", element.getDataElement(), -1);
349    }
350    if (element.hasUrlElement()) {
351      composeUrl(t, "Attachment", "url", element.getUrlElement(), -1);
352    }
353    if (element.hasSizeElement()) {
354      composeInteger64(t, "Attachment", "size", element.getSizeElement(), -1);
355    }
356    if (element.hasHashElement()) {
357      composeBase64Binary(t, "Attachment", "hash", element.getHashElement(), -1);
358    }
359    if (element.hasTitleElement()) {
360      composeString(t, "Attachment", "title", element.getTitleElement(), -1);
361    }
362    if (element.hasCreationElement()) {
363      composeDateTime(t, "Attachment", "creation", element.getCreationElement(), -1);
364    }
365    if (element.hasHeightElement()) {
366      composePositiveInt(t, "Attachment", "height", element.getHeightElement(), -1);
367    }
368    if (element.hasWidthElement()) {
369      composePositiveInt(t, "Attachment", "width", element.getWidthElement(), -1);
370    }
371    if (element.hasFramesElement()) {
372      composePositiveInt(t, "Attachment", "frames", element.getFramesElement(), -1);
373    }
374    if (element.hasDurationElement()) {
375      composeDecimal(t, "Attachment", "duration", element.getDurationElement(), -1);
376    }
377    if (element.hasPagesElement()) {
378      composePositiveInt(t, "Attachment", "pages", element.getPagesElement(), -1);
379    }
380  }
381
382  protected void composeCodeableConcept(Complex parent, String parentType, String name, CodeableConcept element, int index) {
383    if (element == null) 
384      return;
385    Complex t;
386    if (Utilities.noString(parentType))
387      t = parent;
388    else {
389      t = parent.predicate("fhir:"+parentType+'.'+name);
390    }
391    composeDataType(t, "CodeableConcept", name, element, index);
392    decorateCodeableConcept(t, element);
393    for (int i = 0; i < element.getCoding().size(); i++) {
394      composeCoding(t, "CodeableConcept", "coding", element.getCoding().get(i), i);
395    }
396    if (element.hasTextElement()) {
397      composeString(t, "CodeableConcept", "text", element.getTextElement(), -1);
398    }
399  }
400
401  protected void composeCodeableReference(Complex parent, String parentType, String name, CodeableReference element, int index) {
402    if (element == null) 
403      return;
404    Complex t;
405    if (Utilities.noString(parentType))
406      t = parent;
407    else {
408      t = parent.predicate("fhir:"+parentType+'.'+name);
409    }
410    composeDataType(t, "CodeableReference", name, element, index);
411    if (element.hasConcept()) {
412      composeCodeableConcept(t, "CodeableReference", "concept", element.getConcept(), -1);
413    }
414    if (element.hasReference()) {
415      composeReference(t, "CodeableReference", "reference", element.getReference(), -1);
416    }
417  }
418
419  protected void composeCoding(Complex parent, String parentType, String name, Coding element, int index) {
420    if (element == null) 
421      return;
422    Complex t;
423    if (Utilities.noString(parentType))
424      t = parent;
425    else {
426      t = parent.predicate("fhir:"+parentType+'.'+name);
427    }
428    composeDataType(t, "Coding", name, element, index);
429    decorateCoding(t, element);
430    if (element.hasSystemElement()) {
431      composeUri(t, "Coding", "system", element.getSystemElement(), -1);
432    }
433    if (element.hasVersionElement()) {
434      composeString(t, "Coding", "version", element.getVersionElement(), -1);
435    }
436    if (element.hasCodeElement()) {
437      composeCode(t, "Coding", "code", element.getCodeElement(), -1);
438    }
439    if (element.hasDisplayElement()) {
440      composeString(t, "Coding", "display", element.getDisplayElement(), -1);
441    }
442    if (element.hasUserSelectedElement()) {
443      composeBoolean(t, "Coding", "userSelected", element.getUserSelectedElement(), -1);
444    }
445  }
446
447  protected void composeContactDetail(Complex parent, String parentType, String name, ContactDetail element, int index) {
448    if (element == null) 
449      return;
450    Complex t;
451    if (Utilities.noString(parentType))
452      t = parent;
453    else {
454      t = parent.predicate("fhir:"+parentType+'.'+name);
455    }
456    composeDataType(t, "ContactDetail", name, element, index);
457    if (element.hasNameElement()) {
458      composeString(t, "ContactDetail", "name", element.getNameElement(), -1);
459    }
460    for (int i = 0; i < element.getTelecom().size(); i++) {
461      composeContactPoint(t, "ContactDetail", "telecom", element.getTelecom().get(i), i);
462    }
463  }
464
465  protected void composeContactPoint(Complex parent, String parentType, String name, ContactPoint element, int index) {
466    if (element == null) 
467      return;
468    Complex t;
469    if (Utilities.noString(parentType))
470      t = parent;
471    else {
472      t = parent.predicate("fhir:"+parentType+'.'+name);
473    }
474    composeDataType(t, "ContactPoint", name, element, index);
475    if (element.hasSystemElement()) {
476      composeEnum(t, "ContactPoint", "system", element.getSystemElement(), -1);
477    }
478    if (element.hasValueElement()) {
479      composeString(t, "ContactPoint", "value", element.getValueElement(), -1);
480    }
481    if (element.hasUseElement()) {
482      composeEnum(t, "ContactPoint", "use", element.getUseElement(), -1);
483    }
484    if (element.hasRankElement()) {
485      composePositiveInt(t, "ContactPoint", "rank", element.getRankElement(), -1);
486    }
487    if (element.hasPeriod()) {
488      composePeriod(t, "ContactPoint", "period", element.getPeriod(), -1);
489    }
490  }
491
492  protected void composeContributor(Complex parent, String parentType, String name, Contributor element, int index) {
493    if (element == null) 
494      return;
495    Complex t;
496    if (Utilities.noString(parentType))
497      t = parent;
498    else {
499      t = parent.predicate("fhir:"+parentType+'.'+name);
500    }
501    composeDataType(t, "Contributor", name, element, index);
502    if (element.hasTypeElement()) {
503      composeEnum(t, "Contributor", "type", element.getTypeElement(), -1);
504    }
505    if (element.hasNameElement()) {
506      composeString(t, "Contributor", "name", element.getNameElement(), -1);
507    }
508    for (int i = 0; i < element.getContact().size(); i++) {
509      composeContactDetail(t, "Contributor", "contact", element.getContact().get(i), i);
510    }
511  }
512
513  protected void composeCount(Complex parent, String parentType, String name, Count element, int index) {
514    if (element == null) 
515      return;
516    Complex t;
517    if (Utilities.noString(parentType))
518      t = parent;
519    else {
520      t = parent.predicate("fhir:"+parentType+'.'+name);
521    }
522    composeQuantity(t, "Count", name, element, index);
523  }
524
525  protected void composeDataRequirement(Complex parent, String parentType, String name, DataRequirement element, int index) {
526    if (element == null) 
527      return;
528    Complex t;
529    if (Utilities.noString(parentType))
530      t = parent;
531    else {
532      t = parent.predicate("fhir:"+parentType+'.'+name);
533    }
534    composeDataType(t, "DataRequirement", name, element, index);
535    if (element.hasTypeElement()) {
536      composeEnum(t, "DataRequirement", "type", element.getTypeElement(), -1);
537    }
538    for (int i = 0; i < element.getProfile().size(); i++) {
539      composeCanonical(t, "DataRequirement", "profile", element.getProfile().get(i), i);
540    }
541    if (element.hasSubject()) {
542      composeType(t, "DataRequirement", "subject", element.getSubject(), -1);
543    }
544    for (int i = 0; i < element.getMustSupport().size(); i++) {
545      composeString(t, "DataRequirement", "mustSupport", element.getMustSupport().get(i), i);
546    }
547    for (int i = 0; i < element.getCodeFilter().size(); i++) {
548      composeDataRequirementCodeFilterComponent(t, "DataRequirement", "codeFilter", element.getCodeFilter().get(i), i);
549    }
550    for (int i = 0; i < element.getDateFilter().size(); i++) {
551      composeDataRequirementDateFilterComponent(t, "DataRequirement", "dateFilter", element.getDateFilter().get(i), i);
552    }
553    if (element.hasLimitElement()) {
554      composePositiveInt(t, "DataRequirement", "limit", element.getLimitElement(), -1);
555    }
556    for (int i = 0; i < element.getSort().size(); i++) {
557      composeDataRequirementSortComponent(t, "DataRequirement", "sort", element.getSort().get(i), i);
558    }
559  }
560
561  protected void composeDataRequirementCodeFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementCodeFilterComponent element, int index) {
562    if (element == null) 
563      return;
564    Complex t;
565    if (Utilities.noString(parentType))
566      t = parent;
567    else {
568      t = parent.predicate("fhir:"+parentType+'.'+name);
569    }
570    composeElement(t, "codeFilter", name, element, index);
571    if (element.hasPathElement()) {
572      composeString(t, "DataRequirementCodeFilterComponent", "path", element.getPathElement(), -1);
573    }
574    if (element.hasSearchParamElement()) {
575      composeString(t, "DataRequirementCodeFilterComponent", "searchParam", element.getSearchParamElement(), -1);
576    }
577    if (element.hasValueSetElement()) {
578      composeCanonical(t, "DataRequirementCodeFilterComponent", "valueSet", element.getValueSetElement(), -1);
579    }
580    for (int i = 0; i < element.getCode().size(); i++) {
581      composeCoding(t, "DataRequirementCodeFilterComponent", "code", element.getCode().get(i), i);
582    }
583  }
584
585  protected void composeDataRequirementDateFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementDateFilterComponent element, int index) {
586    if (element == null) 
587      return;
588    Complex t;
589    if (Utilities.noString(parentType))
590      t = parent;
591    else {
592      t = parent.predicate("fhir:"+parentType+'.'+name);
593    }
594    composeElement(t, "dateFilter", name, element, index);
595    if (element.hasPathElement()) {
596      composeString(t, "DataRequirementDateFilterComponent", "path", element.getPathElement(), -1);
597    }
598    if (element.hasSearchParamElement()) {
599      composeString(t, "DataRequirementDateFilterComponent", "searchParam", element.getSearchParamElement(), -1);
600    }
601    if (element.hasValue()) {
602      composeType(t, "DataRequirementDateFilterComponent", "value", element.getValue(), -1);
603    }
604  }
605
606  protected void composeDataRequirementSortComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementSortComponent element, int index) {
607    if (element == null) 
608      return;
609    Complex t;
610    if (Utilities.noString(parentType))
611      t = parent;
612    else {
613      t = parent.predicate("fhir:"+parentType+'.'+name);
614    }
615    composeElement(t, "sort", name, element, index);
616    if (element.hasPathElement()) {
617      composeString(t, "DataRequirementSortComponent", "path", element.getPathElement(), -1);
618    }
619    if (element.hasDirectionElement()) {
620      composeEnum(t, "DataRequirementSortComponent", "direction", element.getDirectionElement(), -1);
621    }
622  }
623
624  protected void composeDistance(Complex parent, String parentType, String name, Distance element, int index) {
625    if (element == null) 
626      return;
627    Complex t;
628    if (Utilities.noString(parentType))
629      t = parent;
630    else {
631      t = parent.predicate("fhir:"+parentType+'.'+name);
632    }
633    composeQuantity(t, "Distance", name, element, index);
634  }
635
636  protected void composeDosage(Complex parent, String parentType, String name, Dosage element, int index) {
637    if (element == null) 
638      return;
639    Complex t;
640    if (Utilities.noString(parentType))
641      t = parent;
642    else {
643      t = parent.predicate("fhir:"+parentType+'.'+name);
644    }
645    composeBackboneType(t, "Dosage", name, element, index);
646    if (element.hasSequenceElement()) {
647      composeInteger(t, "Dosage", "sequence", element.getSequenceElement(), -1);
648    }
649    if (element.hasTextElement()) {
650      composeString(t, "Dosage", "text", element.getTextElement(), -1);
651    }
652    for (int i = 0; i < element.getAdditionalInstruction().size(); i++) {
653      composeCodeableConcept(t, "Dosage", "additionalInstruction", element.getAdditionalInstruction().get(i), i);
654    }
655    if (element.hasPatientInstructionElement()) {
656      composeString(t, "Dosage", "patientInstruction", element.getPatientInstructionElement(), -1);
657    }
658    if (element.hasTiming()) {
659      composeTiming(t, "Dosage", "timing", element.getTiming(), -1);
660    }
661    if (element.hasAsNeeded()) {
662      composeType(t, "Dosage", "asNeeded", element.getAsNeeded(), -1);
663    }
664    if (element.hasSite()) {
665      composeCodeableConcept(t, "Dosage", "site", element.getSite(), -1);
666    }
667    if (element.hasRoute()) {
668      composeCodeableConcept(t, "Dosage", "route", element.getRoute(), -1);
669    }
670    if (element.hasMethod()) {
671      composeCodeableConcept(t, "Dosage", "method", element.getMethod(), -1);
672    }
673    for (int i = 0; i < element.getDoseAndRate().size(); i++) {
674      composeDosageDoseAndRateComponent(t, "Dosage", "doseAndRate", element.getDoseAndRate().get(i), i);
675    }
676    if (element.hasMaxDosePerPeriod()) {
677      composeRatio(t, "Dosage", "maxDosePerPeriod", element.getMaxDosePerPeriod(), -1);
678    }
679    if (element.hasMaxDosePerAdministration()) {
680      composeQuantity(t, "Dosage", "maxDosePerAdministration", element.getMaxDosePerAdministration(), -1);
681    }
682    if (element.hasMaxDosePerLifetime()) {
683      composeQuantity(t, "Dosage", "maxDosePerLifetime", element.getMaxDosePerLifetime(), -1);
684    }
685  }
686
687  protected void composeDosageDoseAndRateComponent(Complex parent, String parentType, String name, Dosage.DosageDoseAndRateComponent element, int index) {
688    if (element == null) 
689      return;
690    Complex t;
691    if (Utilities.noString(parentType))
692      t = parent;
693    else {
694      t = parent.predicate("fhir:"+parentType+'.'+name);
695    }
696    composeElement(t, "doseAndRate", name, element, index);
697    if (element.hasType()) {
698      composeCodeableConcept(t, "DosageDoseAndRateComponent", "type", element.getType(), -1);
699    }
700    if (element.hasDose()) {
701      composeType(t, "DosageDoseAndRateComponent", "dose", element.getDose(), -1);
702    }
703    if (element.hasRate()) {
704      composeType(t, "DosageDoseAndRateComponent", "rate", element.getRate(), -1);
705    }
706  }
707
708  protected void composeDuration(Complex parent, String parentType, String name, Duration element, int index) {
709    if (element == null) 
710      return;
711    Complex t;
712    if (Utilities.noString(parentType))
713      t = parent;
714    else {
715      t = parent.predicate("fhir:"+parentType+'.'+name);
716    }
717    composeQuantity(t, "Duration", name, element, index);
718  }
719
720  protected void composeElementDefinition(Complex parent, String parentType, String name, ElementDefinition element, int index) {
721    if (element == null) 
722      return;
723    Complex t;
724    if (Utilities.noString(parentType))
725      t = parent;
726    else {
727      t = parent.predicate("fhir:"+parentType+'.'+name);
728    }
729    composeBackboneType(t, "ElementDefinition", name, element, index);
730    if (element.hasPathElement()) {
731      composeString(t, "ElementDefinition", "path", element.getPathElement(), -1);
732    }
733    for (int i = 0; i < element.getRepresentation().size(); i++) {
734      composeEnum(t, "ElementDefinition", "representation", element.getRepresentation().get(i), i);
735    }
736    if (element.hasSliceNameElement()) {
737      composeString(t, "ElementDefinition", "sliceName", element.getSliceNameElement(), -1);
738    }
739    if (element.hasSliceIsConstrainingElement()) {
740      composeBoolean(t, "ElementDefinition", "sliceIsConstraining", element.getSliceIsConstrainingElement(), -1);
741    }
742    if (element.hasLabelElement()) {
743      composeString(t, "ElementDefinition", "label", element.getLabelElement(), -1);
744    }
745    for (int i = 0; i < element.getCode().size(); i++) {
746      composeCoding(t, "ElementDefinition", "code", element.getCode().get(i), i);
747    }
748    if (element.hasSlicing()) {
749      composeElementDefinitionSlicingComponent(t, "ElementDefinition", "slicing", element.getSlicing(), -1);
750    }
751    if (element.hasShortElement()) {
752      composeString(t, "ElementDefinition", "short", element.getShortElement(), -1);
753    }
754    if (element.hasDefinitionElement()) {
755      composeMarkdown(t, "ElementDefinition", "definition", element.getDefinitionElement(), -1);
756    }
757    if (element.hasCommentElement()) {
758      composeMarkdown(t, "ElementDefinition", "comment", element.getCommentElement(), -1);
759    }
760    if (element.hasRequirementsElement()) {
761      composeMarkdown(t, "ElementDefinition", "requirements", element.getRequirementsElement(), -1);
762    }
763    for (int i = 0; i < element.getAlias().size(); i++) {
764      composeString(t, "ElementDefinition", "alias", element.getAlias().get(i), i);
765    }
766    if (element.hasMinElement()) {
767      composeUnsignedInt(t, "ElementDefinition", "min", element.getMinElement(), -1);
768    }
769    if (element.hasMaxElement()) {
770      composeString(t, "ElementDefinition", "max", element.getMaxElement(), -1);
771    }
772    if (element.hasBase()) {
773      composeElementDefinitionBaseComponent(t, "ElementDefinition", "base", element.getBase(), -1);
774    }
775    if (element.hasContentReferenceElement()) {
776      composeUri(t, "ElementDefinition", "contentReference", element.getContentReferenceElement(), -1);
777    }
778    for (int i = 0; i < element.getType().size(); i++) {
779      composeElementDefinitionTypeRefComponent(t, "ElementDefinition", "type", element.getType().get(i), i);
780    }
781    if (element.hasDefaultValue()) {
782      composeType(t, "ElementDefinition", "defaultValue", element.getDefaultValue(), -1);
783    }
784    if (element.hasMeaningWhenMissingElement()) {
785      composeMarkdown(t, "ElementDefinition", "meaningWhenMissing", element.getMeaningWhenMissingElement(), -1);
786    }
787    if (element.hasOrderMeaningElement()) {
788      composeString(t, "ElementDefinition", "orderMeaning", element.getOrderMeaningElement(), -1);
789    }
790    if (element.hasFixed()) {
791      composeType(t, "ElementDefinition", "fixed", element.getFixed(), -1);
792    }
793    if (element.hasPattern()) {
794      composeType(t, "ElementDefinition", "pattern", element.getPattern(), -1);
795    }
796    for (int i = 0; i < element.getExample().size(); i++) {
797      composeElementDefinitionExampleComponent(t, "ElementDefinition", "example", element.getExample().get(i), i);
798    }
799    if (element.hasMinValue()) {
800      composeType(t, "ElementDefinition", "minValue", element.getMinValue(), -1);
801    }
802    if (element.hasMaxValue()) {
803      composeType(t, "ElementDefinition", "maxValue", element.getMaxValue(), -1);
804    }
805    if (element.hasMaxLengthElement()) {
806      composeInteger(t, "ElementDefinition", "maxLength", element.getMaxLengthElement(), -1);
807    }
808    for (int i = 0; i < element.getCondition().size(); i++) {
809      composeId(t, "ElementDefinition", "condition", element.getCondition().get(i), i);
810    }
811    for (int i = 0; i < element.getConstraint().size(); i++) {
812      composeElementDefinitionConstraintComponent(t, "ElementDefinition", "constraint", element.getConstraint().get(i), i);
813    }
814    if (element.hasMustSupportElement()) {
815      composeBoolean(t, "ElementDefinition", "mustSupport", element.getMustSupportElement(), -1);
816    }
817    if (element.hasIsModifierElement()) {
818      composeBoolean(t, "ElementDefinition", "isModifier", element.getIsModifierElement(), -1);
819    }
820    if (element.hasIsModifierReasonElement()) {
821      composeString(t, "ElementDefinition", "isModifierReason", element.getIsModifierReasonElement(), -1);
822    }
823    if (element.hasIsSummaryElement()) {
824      composeBoolean(t, "ElementDefinition", "isSummary", element.getIsSummaryElement(), -1);
825    }
826    if (element.hasBinding()) {
827      composeElementDefinitionBindingComponent(t, "ElementDefinition", "binding", element.getBinding(), -1);
828    }
829    for (int i = 0; i < element.getMapping().size(); i++) {
830      composeElementDefinitionMappingComponent(t, "ElementDefinition", "mapping", element.getMapping().get(i), i);
831    }
832  }
833
834  protected void composeElementDefinitionSlicingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionSlicingComponent element, int index) {
835    if (element == null) 
836      return;
837    Complex t;
838    if (Utilities.noString(parentType))
839      t = parent;
840    else {
841      t = parent.predicate("fhir:"+parentType+'.'+name);
842    }
843    composeElement(t, "slicing", name, element, index);
844    for (int i = 0; i < element.getDiscriminator().size(); i++) {
845      composeElementDefinitionSlicingDiscriminatorComponent(t, "ElementDefinitionSlicingComponent", "discriminator", element.getDiscriminator().get(i), i);
846    }
847    if (element.hasDescriptionElement()) {
848      composeString(t, "ElementDefinitionSlicingComponent", "description", element.getDescriptionElement(), -1);
849    }
850    if (element.hasOrderedElement()) {
851      composeBoolean(t, "ElementDefinitionSlicingComponent", "ordered", element.getOrderedElement(), -1);
852    }
853    if (element.hasRulesElement()) {
854      composeEnum(t, "ElementDefinitionSlicingComponent", "rules", element.getRulesElement(), -1);
855    }
856  }
857
858  protected void composeElementDefinitionSlicingDiscriminatorComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element, int index) {
859    if (element == null) 
860      return;
861    Complex t;
862    if (Utilities.noString(parentType))
863      t = parent;
864    else {
865      t = parent.predicate("fhir:"+parentType+'.'+name);
866    }
867    composeElement(t, "discriminator", name, element, index);
868    if (element.hasTypeElement()) {
869      composeEnum(t, "ElementDefinitionSlicingDiscriminatorComponent", "type", element.getTypeElement(), -1);
870    }
871    if (element.hasPathElement()) {
872      composeString(t, "ElementDefinitionSlicingDiscriminatorComponent", "path", element.getPathElement(), -1);
873    }
874  }
875
876  protected void composeElementDefinitionBaseComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionBaseComponent element, int index) {
877    if (element == null) 
878      return;
879    Complex t;
880    if (Utilities.noString(parentType))
881      t = parent;
882    else {
883      t = parent.predicate("fhir:"+parentType+'.'+name);
884    }
885    composeElement(t, "base", name, element, index);
886    if (element.hasPathElement()) {
887      composeString(t, "ElementDefinitionBaseComponent", "path", element.getPathElement(), -1);
888    }
889    if (element.hasMinElement()) {
890      composeUnsignedInt(t, "ElementDefinitionBaseComponent", "min", element.getMinElement(), -1);
891    }
892    if (element.hasMaxElement()) {
893      composeString(t, "ElementDefinitionBaseComponent", "max", element.getMaxElement(), -1);
894    }
895  }
896
897  protected void composeElementDefinitionTypeRefComponent(Complex parent, String parentType, String name, ElementDefinition.TypeRefComponent element, int index) {
898    if (element == null) 
899      return;
900    Complex t;
901    if (Utilities.noString(parentType))
902      t = parent;
903    else {
904      t = parent.predicate("fhir:"+parentType+'.'+name);
905    }
906    composeElement(t, "type", name, element, index);
907    if (element.hasCodeElement()) {
908      composeUri(t, "TypeRefComponent", "code", element.getCodeElement(), -1);
909    }
910    for (int i = 0; i < element.getProfile().size(); i++) {
911      composeCanonical(t, "TypeRefComponent", "profile", element.getProfile().get(i), i);
912    }
913    for (int i = 0; i < element.getTargetProfile().size(); i++) {
914      composeCanonical(t, "TypeRefComponent", "targetProfile", element.getTargetProfile().get(i), i);
915    }
916    for (int i = 0; i < element.getAggregation().size(); i++) {
917      composeEnum(t, "TypeRefComponent", "aggregation", element.getAggregation().get(i), i);
918    }
919    if (element.hasVersioningElement()) {
920      composeEnum(t, "TypeRefComponent", "versioning", element.getVersioningElement(), -1);
921    }
922  }
923
924  protected void composeElementDefinitionExampleComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionExampleComponent element, int index) {
925    if (element == null) 
926      return;
927    Complex t;
928    if (Utilities.noString(parentType))
929      t = parent;
930    else {
931      t = parent.predicate("fhir:"+parentType+'.'+name);
932    }
933    composeElement(t, "example", name, element, index);
934    if (element.hasLabelElement()) {
935      composeString(t, "ElementDefinitionExampleComponent", "label", element.getLabelElement(), -1);
936    }
937    if (element.hasValue()) {
938      composeType(t, "ElementDefinitionExampleComponent", "value", element.getValue(), -1);
939    }
940  }
941
942  protected void composeElementDefinitionConstraintComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionConstraintComponent element, int index) {
943    if (element == null) 
944      return;
945    Complex t;
946    if (Utilities.noString(parentType))
947      t = parent;
948    else {
949      t = parent.predicate("fhir:"+parentType+'.'+name);
950    }
951    composeElement(t, "constraint", name, element, index);
952    if (element.hasKeyElement()) {
953      composeId(t, "ElementDefinitionConstraintComponent", "key", element.getKeyElement(), -1);
954    }
955    if (element.hasRequirementsElement()) {
956      composeString(t, "ElementDefinitionConstraintComponent", "requirements", element.getRequirementsElement(), -1);
957    }
958    if (element.hasSeverityElement()) {
959      composeEnum(t, "ElementDefinitionConstraintComponent", "severity", element.getSeverityElement(), -1);
960    }
961    if (element.hasHumanElement()) {
962      composeString(t, "ElementDefinitionConstraintComponent", "human", element.getHumanElement(), -1);
963    }
964    if (element.hasExpressionElement()) {
965      composeString(t, "ElementDefinitionConstraintComponent", "expression", element.getExpressionElement(), -1);
966    }
967    if (element.hasXpathElement()) {
968      composeString(t, "ElementDefinitionConstraintComponent", "xpath", element.getXpathElement(), -1);
969    }
970    if (element.hasSourceElement()) {
971      composeCanonical(t, "ElementDefinitionConstraintComponent", "source", element.getSourceElement(), -1);
972    }
973  }
974
975  protected void composeElementDefinitionBindingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionBindingComponent element, int index) {
976    if (element == null) 
977      return;
978    Complex t;
979    if (Utilities.noString(parentType))
980      t = parent;
981    else {
982      t = parent.predicate("fhir:"+parentType+'.'+name);
983    }
984    composeElement(t, "binding", name, element, index);
985    if (element.hasStrengthElement()) {
986      composeEnum(t, "ElementDefinitionBindingComponent", "strength", element.getStrengthElement(), -1);
987    }
988    if (element.hasDescriptionElement()) {
989      composeString(t, "ElementDefinitionBindingComponent", "description", element.getDescriptionElement(), -1);
990    }
991    if (element.hasValueSetElement()) {
992      composeCanonical(t, "ElementDefinitionBindingComponent", "valueSet", element.getValueSetElement(), -1);
993    }
994  }
995
996  protected void composeElementDefinitionMappingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionMappingComponent element, int index) {
997    if (element == null) 
998      return;
999    Complex t;
1000    if (Utilities.noString(parentType))
1001      t = parent;
1002    else {
1003      t = parent.predicate("fhir:"+parentType+'.'+name);
1004    }
1005    composeElement(t, "mapping", name, element, index);
1006    if (element.hasIdentityElement()) {
1007      composeId(t, "ElementDefinitionMappingComponent", "identity", element.getIdentityElement(), -1);
1008    }
1009    if (element.hasLanguageElement()) {
1010      composeCode(t, "ElementDefinitionMappingComponent", "language", element.getLanguageElement(), -1);
1011    }
1012    if (element.hasMapElement()) {
1013      composeString(t, "ElementDefinitionMappingComponent", "map", element.getMapElement(), -1);
1014    }
1015    if (element.hasCommentElement()) {
1016      composeString(t, "ElementDefinitionMappingComponent", "comment", element.getCommentElement(), -1);
1017    }
1018  }
1019
1020  protected void composeExpression(Complex parent, String parentType, String name, Expression element, int index) {
1021    if (element == null) 
1022      return;
1023    Complex t;
1024    if (Utilities.noString(parentType))
1025      t = parent;
1026    else {
1027      t = parent.predicate("fhir:"+parentType+'.'+name);
1028    }
1029    composeDataType(t, "Expression", name, element, index);
1030    if (element.hasDescriptionElement()) {
1031      composeString(t, "Expression", "description", element.getDescriptionElement(), -1);
1032    }
1033    if (element.hasNameElement()) {
1034      composeId(t, "Expression", "name", element.getNameElement(), -1);
1035    }
1036    if (element.hasLanguageElement()) {
1037      composeCode(t, "Expression", "language", element.getLanguageElement(), -1);
1038    }
1039    if (element.hasExpressionElement()) {
1040      composeString(t, "Expression", "expression", element.getExpressionElement(), -1);
1041    }
1042    if (element.hasReferenceElement()) {
1043      composeUri(t, "Expression", "reference", element.getReferenceElement(), -1);
1044    }
1045  }
1046
1047  protected void composeExtension(Complex parent, String parentType, String name, Extension element, int index) {
1048    if (element == null) 
1049      return;
1050    Complex t;
1051    if (Utilities.noString(parentType))
1052      t = parent;
1053    else {
1054      t = parent.predicate("fhir:"+parentType+'.'+name);
1055    }
1056    composeDataType(t, "Extension", name, element, index);
1057    if (element.hasUrlElement()) {
1058      composeUri(t, "Extension", "url", element.getUrlElement(), -1);
1059    }
1060    if (element.hasValue()) {
1061      composeType(t, "Extension", "value", element.getValue(), -1);
1062    }
1063  }
1064
1065  protected void composeHumanName(Complex parent, String parentType, String name, HumanName element, int index) {
1066    if (element == null) 
1067      return;
1068    Complex t;
1069    if (Utilities.noString(parentType))
1070      t = parent;
1071    else {
1072      t = parent.predicate("fhir:"+parentType+'.'+name);
1073    }
1074    composeDataType(t, "HumanName", name, element, index);
1075    if (element.hasUseElement()) {
1076      composeEnum(t, "HumanName", "use", element.getUseElement(), -1);
1077    }
1078    if (element.hasTextElement()) {
1079      composeString(t, "HumanName", "text", element.getTextElement(), -1);
1080    }
1081    if (element.hasFamilyElement()) {
1082      composeString(t, "HumanName", "family", element.getFamilyElement(), -1);
1083    }
1084    for (int i = 0; i < element.getGiven().size(); i++) {
1085      composeString(t, "HumanName", "given", element.getGiven().get(i), i);
1086    }
1087    for (int i = 0; i < element.getPrefix().size(); i++) {
1088      composeString(t, "HumanName", "prefix", element.getPrefix().get(i), i);
1089    }
1090    for (int i = 0; i < element.getSuffix().size(); i++) {
1091      composeString(t, "HumanName", "suffix", element.getSuffix().get(i), i);
1092    }
1093    if (element.hasPeriod()) {
1094      composePeriod(t, "HumanName", "period", element.getPeriod(), -1);
1095    }
1096  }
1097
1098  protected void composeIdentifier(Complex parent, String parentType, String name, Identifier element, int index) {
1099    if (element == null) 
1100      return;
1101    Complex t;
1102    if (Utilities.noString(parentType))
1103      t = parent;
1104    else {
1105      t = parent.predicate("fhir:"+parentType+'.'+name);
1106    }
1107    composeDataType(t, "Identifier", name, element, index);
1108    if (element.hasUseElement()) {
1109      composeEnum(t, "Identifier", "use", element.getUseElement(), -1);
1110    }
1111    if (element.hasType()) {
1112      composeCodeableConcept(t, "Identifier", "type", element.getType(), -1);
1113    }
1114    if (element.hasSystemElement()) {
1115      composeUri(t, "Identifier", "system", element.getSystemElement(), -1);
1116    }
1117    if (element.hasValueElement()) {
1118      composeString(t, "Identifier", "value", element.getValueElement(), -1);
1119    }
1120    if (element.hasPeriod()) {
1121      composePeriod(t, "Identifier", "period", element.getPeriod(), -1);
1122    }
1123    if (element.hasAssigner()) {
1124      composeReference(t, "Identifier", "assigner", element.getAssigner(), -1);
1125    }
1126  }
1127
1128  protected void composeMarketingStatus(Complex parent, String parentType, String name, MarketingStatus element, int index) {
1129    if (element == null) 
1130      return;
1131    Complex t;
1132    if (Utilities.noString(parentType))
1133      t = parent;
1134    else {
1135      t = parent.predicate("fhir:"+parentType+'.'+name);
1136    }
1137    composeBackboneType(t, "MarketingStatus", name, element, index);
1138    if (element.hasCountry()) {
1139      composeCodeableConcept(t, "MarketingStatus", "country", element.getCountry(), -1);
1140    }
1141    if (element.hasJurisdiction()) {
1142      composeCodeableConcept(t, "MarketingStatus", "jurisdiction", element.getJurisdiction(), -1);
1143    }
1144    if (element.hasStatus()) {
1145      composeCodeableConcept(t, "MarketingStatus", "status", element.getStatus(), -1);
1146    }
1147    if (element.hasDateRange()) {
1148      composePeriod(t, "MarketingStatus", "dateRange", element.getDateRange(), -1);
1149    }
1150    if (element.hasRestoreDateElement()) {
1151      composeDateTime(t, "MarketingStatus", "restoreDate", element.getRestoreDateElement(), -1);
1152    }
1153  }
1154
1155  protected void composeMeta(Complex parent, String parentType, String name, Meta element, int index) {
1156    if (element == null) 
1157      return;
1158    Complex t;
1159    if (Utilities.noString(parentType))
1160      t = parent;
1161    else {
1162      t = parent.predicate("fhir:"+parentType+'.'+name);
1163    }
1164    composeDataType(t, "Meta", name, element, index);
1165    if (element.hasVersionIdElement()) {
1166      composeId(t, "Meta", "versionId", element.getVersionIdElement(), -1);
1167    }
1168    if (element.hasLastUpdatedElement()) {
1169      composeInstant(t, "Meta", "lastUpdated", element.getLastUpdatedElement(), -1);
1170    }
1171    if (element.hasSourceElement()) {
1172      composeUri(t, "Meta", "source", element.getSourceElement(), -1);
1173    }
1174    for (int i = 0; i < element.getProfile().size(); i++) {
1175      composeCanonical(t, "Meta", "profile", element.getProfile().get(i), i);
1176    }
1177    for (int i = 0; i < element.getSecurity().size(); i++) {
1178      composeCoding(t, "Meta", "security", element.getSecurity().get(i), i);
1179    }
1180    for (int i = 0; i < element.getTag().size(); i++) {
1181      composeCoding(t, "Meta", "tag", element.getTag().get(i), i);
1182    }
1183  }
1184
1185  protected void composeMoney(Complex parent, String parentType, String name, Money element, int index) {
1186    if (element == null) 
1187      return;
1188    Complex t;
1189    if (Utilities.noString(parentType))
1190      t = parent;
1191    else {
1192      t = parent.predicate("fhir:"+parentType+'.'+name);
1193    }
1194    composeDataType(t, "Money", name, element, index);
1195    if (element.hasValueElement()) {
1196      composeDecimal(t, "Money", "value", element.getValueElement(), -1);
1197    }
1198    if (element.hasCurrencyElement()) {
1199      composeCode(t, "Money", "currency", element.getCurrencyElement(), -1);
1200    }
1201  }
1202
1203  protected void composeNarrative(Complex parent, String parentType, String name, Narrative element, int index) {
1204    if (element == null) 
1205      return;
1206    Complex t;
1207    if (Utilities.noString(parentType))
1208      t = parent;
1209    else {
1210      t = parent.predicate("fhir:"+parentType+'.'+name);
1211    }
1212    composeDataType(t, "Narrative", name, element, index);
1213    if (element.hasStatusElement()) {
1214      composeEnum(t, "Narrative", "status", element.getStatusElement(), -1);
1215    }
1216    if (element.hasDiv()) {
1217      composeXhtmlNode(t, "Narrative", "div", element.getDiv(), -1);
1218    }
1219  }
1220
1221  protected void composeParameterDefinition(Complex parent, String parentType, String name, ParameterDefinition element, int index) {
1222    if (element == null) 
1223      return;
1224    Complex t;
1225    if (Utilities.noString(parentType))
1226      t = parent;
1227    else {
1228      t = parent.predicate("fhir:"+parentType+'.'+name);
1229    }
1230    composeDataType(t, "ParameterDefinition", name, element, index);
1231    if (element.hasNameElement()) {
1232      composeCode(t, "ParameterDefinition", "name", element.getNameElement(), -1);
1233    }
1234    if (element.hasUseElement()) {
1235      composeEnum(t, "ParameterDefinition", "use", element.getUseElement(), -1);
1236    }
1237    if (element.hasMinElement()) {
1238      composeInteger(t, "ParameterDefinition", "min", element.getMinElement(), -1);
1239    }
1240    if (element.hasMaxElement()) {
1241      composeString(t, "ParameterDefinition", "max", element.getMaxElement(), -1);
1242    }
1243    if (element.hasDocumentationElement()) {
1244      composeString(t, "ParameterDefinition", "documentation", element.getDocumentationElement(), -1);
1245    }
1246    if (element.hasTypeElement()) {
1247      composeEnum(t, "ParameterDefinition", "type", element.getTypeElement(), -1);
1248    }
1249    if (element.hasProfileElement()) {
1250      composeCanonical(t, "ParameterDefinition", "profile", element.getProfileElement(), -1);
1251    }
1252  }
1253
1254  protected void composePeriod(Complex parent, String parentType, String name, Period element, int index) {
1255    if (element == null) 
1256      return;
1257    Complex t;
1258    if (Utilities.noString(parentType))
1259      t = parent;
1260    else {
1261      t = parent.predicate("fhir:"+parentType+'.'+name);
1262    }
1263    composeDataType(t, "Period", name, element, index);
1264    if (element.hasStartElement()) {
1265      composeDateTime(t, "Period", "start", element.getStartElement(), -1);
1266    }
1267    if (element.hasEndElement()) {
1268      composeDateTime(t, "Period", "end", element.getEndElement(), -1);
1269    }
1270  }
1271
1272  protected void composePopulation(Complex parent, String parentType, String name, Population element, int index) {
1273    if (element == null) 
1274      return;
1275    Complex t;
1276    if (Utilities.noString(parentType))
1277      t = parent;
1278    else {
1279      t = parent.predicate("fhir:"+parentType+'.'+name);
1280    }
1281    composeBackboneType(t, "Population", name, element, index);
1282    if (element.hasAge()) {
1283      composeType(t, "Population", "age", element.getAge(), -1);
1284    }
1285    if (element.hasGender()) {
1286      composeCodeableConcept(t, "Population", "gender", element.getGender(), -1);
1287    }
1288    if (element.hasRace()) {
1289      composeCodeableConcept(t, "Population", "race", element.getRace(), -1);
1290    }
1291    if (element.hasPhysiologicalCondition()) {
1292      composeCodeableConcept(t, "Population", "physiologicalCondition", element.getPhysiologicalCondition(), -1);
1293    }
1294  }
1295
1296  protected void composeProdCharacteristic(Complex parent, String parentType, String name, ProdCharacteristic element, int index) {
1297    if (element == null) 
1298      return;
1299    Complex t;
1300    if (Utilities.noString(parentType))
1301      t = parent;
1302    else {
1303      t = parent.predicate("fhir:"+parentType+'.'+name);
1304    }
1305    composeBackboneType(t, "ProdCharacteristic", name, element, index);
1306    if (element.hasHeight()) {
1307      composeQuantity(t, "ProdCharacteristic", "height", element.getHeight(), -1);
1308    }
1309    if (element.hasWidth()) {
1310      composeQuantity(t, "ProdCharacteristic", "width", element.getWidth(), -1);
1311    }
1312    if (element.hasDepth()) {
1313      composeQuantity(t, "ProdCharacteristic", "depth", element.getDepth(), -1);
1314    }
1315    if (element.hasWeight()) {
1316      composeQuantity(t, "ProdCharacteristic", "weight", element.getWeight(), -1);
1317    }
1318    if (element.hasNominalVolume()) {
1319      composeQuantity(t, "ProdCharacteristic", "nominalVolume", element.getNominalVolume(), -1);
1320    }
1321    if (element.hasExternalDiameter()) {
1322      composeQuantity(t, "ProdCharacteristic", "externalDiameter", element.getExternalDiameter(), -1);
1323    }
1324    if (element.hasShapeElement()) {
1325      composeString(t, "ProdCharacteristic", "shape", element.getShapeElement(), -1);
1326    }
1327    for (int i = 0; i < element.getColor().size(); i++) {
1328      composeString(t, "ProdCharacteristic", "color", element.getColor().get(i), i);
1329    }
1330    for (int i = 0; i < element.getImprint().size(); i++) {
1331      composeString(t, "ProdCharacteristic", "imprint", element.getImprint().get(i), i);
1332    }
1333    for (int i = 0; i < element.getImage().size(); i++) {
1334      composeAttachment(t, "ProdCharacteristic", "image", element.getImage().get(i), i);
1335    }
1336    if (element.hasScoring()) {
1337      composeCodeableConcept(t, "ProdCharacteristic", "scoring", element.getScoring(), -1);
1338    }
1339  }
1340
1341  protected void composeProductShelfLife(Complex parent, String parentType, String name, ProductShelfLife element, int index) {
1342    if (element == null) 
1343      return;
1344    Complex t;
1345    if (Utilities.noString(parentType))
1346      t = parent;
1347    else {
1348      t = parent.predicate("fhir:"+parentType+'.'+name);
1349    }
1350    composeBackboneType(t, "ProductShelfLife", name, element, index);
1351    if (element.hasType()) {
1352      composeCodeableConcept(t, "ProductShelfLife", "type", element.getType(), -1);
1353    }
1354    if (element.hasPeriod()) {
1355      composeType(t, "ProductShelfLife", "period", element.getPeriod(), -1);
1356    }
1357    for (int i = 0; i < element.getSpecialPrecautionsForStorage().size(); i++) {
1358      composeCodeableConcept(t, "ProductShelfLife", "specialPrecautionsForStorage", element.getSpecialPrecautionsForStorage().get(i), i);
1359    }
1360  }
1361
1362  protected void composeQuantity(Complex parent, String parentType, String name, Quantity element, int index) {
1363    if (element == null) 
1364      return;
1365    Complex t;
1366    if (Utilities.noString(parentType))
1367      t = parent;
1368    else {
1369      t = parent.predicate("fhir:"+parentType+'.'+name);
1370    }
1371    composeDataType(t, "Quantity", name, element, index);
1372    if (element.hasValueElement()) {
1373      composeDecimal(t, "Quantity", "value", element.getValueElement(), -1);
1374    }
1375    if (element.hasComparatorElement()) {
1376      composeEnum(t, "Quantity", "comparator", element.getComparatorElement(), -1);
1377    }
1378    if (element.hasUnitElement()) {
1379      composeString(t, "Quantity", "unit", element.getUnitElement(), -1);
1380    }
1381    if (element.hasSystemElement()) {
1382      composeUri(t, "Quantity", "system", element.getSystemElement(), -1);
1383    }
1384    if (element.hasCodeElement()) {
1385      composeCode(t, "Quantity", "code", element.getCodeElement(), -1);
1386    }
1387  }
1388
1389  protected void composeRange(Complex parent, String parentType, String name, Range element, int index) {
1390    if (element == null) 
1391      return;
1392    Complex t;
1393    if (Utilities.noString(parentType))
1394      t = parent;
1395    else {
1396      t = parent.predicate("fhir:"+parentType+'.'+name);
1397    }
1398    composeDataType(t, "Range", name, element, index);
1399    if (element.hasLow()) {
1400      composeQuantity(t, "Range", "low", element.getLow(), -1);
1401    }
1402    if (element.hasHigh()) {
1403      composeQuantity(t, "Range", "high", element.getHigh(), -1);
1404    }
1405  }
1406
1407  protected void composeRatio(Complex parent, String parentType, String name, Ratio element, int index) {
1408    if (element == null) 
1409      return;
1410    Complex t;
1411    if (Utilities.noString(parentType))
1412      t = parent;
1413    else {
1414      t = parent.predicate("fhir:"+parentType+'.'+name);
1415    }
1416    composeDataType(t, "Ratio", name, element, index);
1417    if (element.hasNumerator()) {
1418      composeQuantity(t, "Ratio", "numerator", element.getNumerator(), -1);
1419    }
1420    if (element.hasDenominator()) {
1421      composeQuantity(t, "Ratio", "denominator", element.getDenominator(), -1);
1422    }
1423  }
1424
1425  protected void composeRatioRange(Complex parent, String parentType, String name, RatioRange element, int index) {
1426    if (element == null) 
1427      return;
1428    Complex t;
1429    if (Utilities.noString(parentType))
1430      t = parent;
1431    else {
1432      t = parent.predicate("fhir:"+parentType+'.'+name);
1433    }
1434    composeDataType(t, "RatioRange", name, element, index);
1435    if (element.hasLowNumerator()) {
1436      composeQuantity(t, "RatioRange", "lowNumerator", element.getLowNumerator(), -1);
1437    }
1438    if (element.hasHighNumerator()) {
1439      composeQuantity(t, "RatioRange", "highNumerator", element.getHighNumerator(), -1);
1440    }
1441    if (element.hasDenominator()) {
1442      composeQuantity(t, "RatioRange", "denominator", element.getDenominator(), -1);
1443    }
1444  }
1445
1446  protected void composeReference(Complex parent, String parentType, String name, Reference element, int index) {
1447    if (element == null) 
1448      return;
1449    Complex t;
1450    if (Utilities.noString(parentType))
1451      t = parent;
1452    else {
1453      t = parent.predicate("fhir:"+parentType+'.'+name);
1454    }
1455    composeDataType(t, "Reference", name, element, index);
1456    if (element.hasReferenceElement()) {
1457      composeString(t, "Reference", "reference", element.getReferenceElement_(), -1);
1458    }
1459    if (element.hasTypeElement()) {
1460      composeUri(t, "Reference", "type", element.getTypeElement(), -1);
1461    }
1462    if (element.hasIdentifier()) {
1463      composeIdentifier(t, "Reference", "identifier", element.getIdentifier(), -1);
1464    }
1465    if (element.hasDisplayElement()) {
1466      composeString(t, "Reference", "display", element.getDisplayElement(), -1);
1467    }
1468  }
1469
1470  protected void composeRelatedArtifact(Complex parent, String parentType, String name, RelatedArtifact element, int index) {
1471    if (element == null) 
1472      return;
1473    Complex t;
1474    if (Utilities.noString(parentType))
1475      t = parent;
1476    else {
1477      t = parent.predicate("fhir:"+parentType+'.'+name);
1478    }
1479    composeDataType(t, "RelatedArtifact", name, element, index);
1480    if (element.hasTypeElement()) {
1481      composeEnum(t, "RelatedArtifact", "type", element.getTypeElement(), -1);
1482    }
1483    for (int i = 0; i < element.getClassifier().size(); i++) {
1484      composeCodeableConcept(t, "RelatedArtifact", "classifier", element.getClassifier().get(i), i);
1485    }
1486    if (element.hasLabelElement()) {
1487      composeString(t, "RelatedArtifact", "label", element.getLabelElement(), -1);
1488    }
1489    if (element.hasDisplayElement()) {
1490      composeString(t, "RelatedArtifact", "display", element.getDisplayElement(), -1);
1491    }
1492    if (element.hasCitationElement()) {
1493      composeMarkdown(t, "RelatedArtifact", "citation", element.getCitationElement(), -1);
1494    }
1495    if (element.hasDocument()) {
1496      composeAttachment(t, "RelatedArtifact", "document", element.getDocument(), -1);
1497    }
1498    if (element.hasResourceElement()) {
1499      composeCanonical(t, "RelatedArtifact", "resource", element.getResourceElement(), -1);
1500    }
1501    if (element.hasResourceReference()) {
1502      composeReference(t, "RelatedArtifact", "resourceReference", element.getResourceReference(), -1);
1503    }
1504  }
1505
1506  protected void composeSampledData(Complex parent, String parentType, String name, SampledData element, int index) {
1507    if (element == null) 
1508      return;
1509    Complex t;
1510    if (Utilities.noString(parentType))
1511      t = parent;
1512    else {
1513      t = parent.predicate("fhir:"+parentType+'.'+name);
1514    }
1515    composeDataType(t, "SampledData", name, element, index);
1516    if (element.hasOrigin()) {
1517      composeQuantity(t, "SampledData", "origin", element.getOrigin(), -1);
1518    }
1519    if (element.hasPeriodElement()) {
1520      composeDecimal(t, "SampledData", "period", element.getPeriodElement(), -1);
1521    }
1522    if (element.hasFactorElement()) {
1523      composeDecimal(t, "SampledData", "factor", element.getFactorElement(), -1);
1524    }
1525    if (element.hasLowerLimitElement()) {
1526      composeDecimal(t, "SampledData", "lowerLimit", element.getLowerLimitElement(), -1);
1527    }
1528    if (element.hasUpperLimitElement()) {
1529      composeDecimal(t, "SampledData", "upperLimit", element.getUpperLimitElement(), -1);
1530    }
1531    if (element.hasDimensionsElement()) {
1532      composePositiveInt(t, "SampledData", "dimensions", element.getDimensionsElement(), -1);
1533    }
1534    if (element.hasDataElement()) {
1535      composeString(t, "SampledData", "data", element.getDataElement(), -1);
1536    }
1537  }
1538
1539  protected void composeSignature(Complex parent, String parentType, String name, Signature element, int index) {
1540    if (element == null) 
1541      return;
1542    Complex t;
1543    if (Utilities.noString(parentType))
1544      t = parent;
1545    else {
1546      t = parent.predicate("fhir:"+parentType+'.'+name);
1547    }
1548    composeDataType(t, "Signature", name, element, index);
1549    for (int i = 0; i < element.getType().size(); i++) {
1550      composeCoding(t, "Signature", "type", element.getType().get(i), i);
1551    }
1552    if (element.hasWhenElement()) {
1553      composeInstant(t, "Signature", "when", element.getWhenElement(), -1);
1554    }
1555    if (element.hasWho()) {
1556      composeReference(t, "Signature", "who", element.getWho(), -1);
1557    }
1558    if (element.hasOnBehalfOf()) {
1559      composeReference(t, "Signature", "onBehalfOf", element.getOnBehalfOf(), -1);
1560    }
1561    if (element.hasTargetFormatElement()) {
1562      composeCode(t, "Signature", "targetFormat", element.getTargetFormatElement(), -1);
1563    }
1564    if (element.hasSigFormatElement()) {
1565      composeCode(t, "Signature", "sigFormat", element.getSigFormatElement(), -1);
1566    }
1567    if (element.hasDataElement()) {
1568      composeBase64Binary(t, "Signature", "data", element.getDataElement(), -1);
1569    }
1570  }
1571
1572  protected void composeTiming(Complex parent, String parentType, String name, Timing element, int index) {
1573    if (element == null) 
1574      return;
1575    Complex t;
1576    if (Utilities.noString(parentType))
1577      t = parent;
1578    else {
1579      t = parent.predicate("fhir:"+parentType+'.'+name);
1580    }
1581    composeBackboneType(t, "Timing", name, element, index);
1582    for (int i = 0; i < element.getEvent().size(); i++) {
1583      composeDateTime(t, "Timing", "event", element.getEvent().get(i), i);
1584    }
1585    if (element.hasRepeat()) {
1586      composeTimingRepeatComponent(t, "Timing", "repeat", element.getRepeat(), -1);
1587    }
1588    if (element.hasCode()) {
1589      composeCodeableConcept(t, "Timing", "code", element.getCode(), -1);
1590    }
1591  }
1592
1593  protected void composeTimingRepeatComponent(Complex parent, String parentType, String name, Timing.TimingRepeatComponent element, int index) {
1594    if (element == null) 
1595      return;
1596    Complex t;
1597    if (Utilities.noString(parentType))
1598      t = parent;
1599    else {
1600      t = parent.predicate("fhir:"+parentType+'.'+name);
1601    }
1602    composeElement(t, "repeat", name, element, index);
1603    if (element.hasBounds()) {
1604      composeType(t, "TimingRepeatComponent", "bounds", element.getBounds(), -1);
1605    }
1606    if (element.hasCountElement()) {
1607      composePositiveInt(t, "TimingRepeatComponent", "count", element.getCountElement(), -1);
1608    }
1609    if (element.hasCountMaxElement()) {
1610      composePositiveInt(t, "TimingRepeatComponent", "countMax", element.getCountMaxElement(), -1);
1611    }
1612    if (element.hasDurationElement()) {
1613      composeDecimal(t, "TimingRepeatComponent", "duration", element.getDurationElement(), -1);
1614    }
1615    if (element.hasDurationMaxElement()) {
1616      composeDecimal(t, "TimingRepeatComponent", "durationMax", element.getDurationMaxElement(), -1);
1617    }
1618    if (element.hasDurationUnitElement()) {
1619      composeEnum(t, "TimingRepeatComponent", "durationUnit", element.getDurationUnitElement(), -1);
1620    }
1621    if (element.hasFrequencyElement()) {
1622      composePositiveInt(t, "TimingRepeatComponent", "frequency", element.getFrequencyElement(), -1);
1623    }
1624    if (element.hasFrequencyMaxElement()) {
1625      composePositiveInt(t, "TimingRepeatComponent", "frequencyMax", element.getFrequencyMaxElement(), -1);
1626    }
1627    if (element.hasPeriodElement()) {
1628      composeDecimal(t, "TimingRepeatComponent", "period", element.getPeriodElement(), -1);
1629    }
1630    if (element.hasPeriodMaxElement()) {
1631      composeDecimal(t, "TimingRepeatComponent", "periodMax", element.getPeriodMaxElement(), -1);
1632    }
1633    if (element.hasPeriodUnitElement()) {
1634      composeEnum(t, "TimingRepeatComponent", "periodUnit", element.getPeriodUnitElement(), -1);
1635    }
1636    for (int i = 0; i < element.getDayOfWeek().size(); i++) {
1637      composeEnum(t, "TimingRepeatComponent", "dayOfWeek", element.getDayOfWeek().get(i), i);
1638    }
1639    for (int i = 0; i < element.getTimeOfDay().size(); i++) {
1640      composeTime(t, "TimingRepeatComponent", "timeOfDay", element.getTimeOfDay().get(i), i);
1641    }
1642    for (int i = 0; i < element.getWhen().size(); i++) {
1643      composeEnum(t, "TimingRepeatComponent", "when", element.getWhen().get(i), i);
1644    }
1645    if (element.hasOffsetElement()) {
1646      composeUnsignedInt(t, "TimingRepeatComponent", "offset", element.getOffsetElement(), -1);
1647    }
1648  }
1649
1650  protected void composeTriggerDefinition(Complex parent, String parentType, String name, TriggerDefinition element, int index) {
1651    if (element == null) 
1652      return;
1653    Complex t;
1654    if (Utilities.noString(parentType))
1655      t = parent;
1656    else {
1657      t = parent.predicate("fhir:"+parentType+'.'+name);
1658    }
1659    composeDataType(t, "TriggerDefinition", name, element, index);
1660    if (element.hasTypeElement()) {
1661      composeEnum(t, "TriggerDefinition", "type", element.getTypeElement(), -1);
1662    }
1663    if (element.hasNameElement()) {
1664      composeString(t, "TriggerDefinition", "name", element.getNameElement(), -1);
1665    }
1666    if (element.hasTiming()) {
1667      composeType(t, "TriggerDefinition", "timing", element.getTiming(), -1);
1668    }
1669    for (int i = 0; i < element.getData().size(); i++) {
1670      composeDataRequirement(t, "TriggerDefinition", "data", element.getData().get(i), i);
1671    }
1672    if (element.hasCondition()) {
1673      composeExpression(t, "TriggerDefinition", "condition", element.getCondition(), -1);
1674    }
1675  }
1676
1677  protected void composeUsageContext(Complex parent, String parentType, String name, UsageContext element, int index) {
1678    if (element == null) 
1679      return;
1680    Complex t;
1681    if (Utilities.noString(parentType))
1682      t = parent;
1683    else {
1684      t = parent.predicate("fhir:"+parentType+'.'+name);
1685    }
1686    composeDataType(t, "UsageContext", name, element, index);
1687    if (element.hasCode()) {
1688      composeCoding(t, "UsageContext", "code", element.getCode(), -1);
1689    }
1690    if (element.hasValue()) {
1691      composeType(t, "UsageContext", "value", element.getValue(), -1);
1692    }
1693  }
1694
1695  protected void composeCanonicalResource(Complex t, String parentType, String name, CanonicalResource element, int index) {
1696    composeDomainResource(t, parentType, name, element, index);
1697    if (element.hasUrlElement()) {
1698      composeUri(t, "CanonicalResource", "url", element.getUrlElement(), -1);
1699    }
1700    for (int i = 0; i < element.getIdentifier().size(); i++) {
1701      composeIdentifier(t, "CanonicalResource", "identifier", element.getIdentifier().get(i), i);
1702    }
1703    if (element.hasVersionElement()) {
1704      composeString(t, "CanonicalResource", "version", element.getVersionElement(), -1);
1705    }
1706    if (element.hasNameElement()) {
1707      composeString(t, "CanonicalResource", "name", element.getNameElement(), -1);
1708    }
1709    if (element.hasTitleElement()) {
1710      composeString(t, "CanonicalResource", "title", element.getTitleElement(), -1);
1711    }
1712    if (element.hasStatusElement()) {
1713      composeEnum(t, "CanonicalResource", "status", element.getStatusElement(), -1);
1714    }
1715    if (element.hasExperimentalElement()) {
1716      composeBoolean(t, "CanonicalResource", "experimental", element.getExperimentalElement(), -1);
1717    }
1718    if (element.hasDateElement()) {
1719      composeDateTime(t, "CanonicalResource", "date", element.getDateElement(), -1);
1720    }
1721    if (element.hasPublisherElement()) {
1722      composeString(t, "CanonicalResource", "publisher", element.getPublisherElement(), -1);
1723    }
1724    for (int i = 0; i < element.getContact().size(); i++) {
1725      composeContactDetail(t, "CanonicalResource", "contact", element.getContact().get(i), i);
1726    }
1727    if (element.hasDescriptionElement()) {
1728      composeMarkdown(t, "CanonicalResource", "description", element.getDescriptionElement(), -1);
1729    }
1730    for (int i = 0; i < element.getUseContext().size(); i++) {
1731      composeUsageContext(t, "CanonicalResource", "useContext", element.getUseContext().get(i), i);
1732    }
1733    for (int i = 0; i < element.getJurisdiction().size(); i++) {
1734      composeCodeableConcept(t, "CanonicalResource", "jurisdiction", element.getJurisdiction().get(i), i);
1735    }
1736    if (element.hasPurposeElement()) {
1737      composeMarkdown(t, "CanonicalResource", "purpose", element.getPurposeElement(), -1);
1738    }
1739    if (element.hasCopyrightElement()) {
1740      composeMarkdown(t, "CanonicalResource", "copyright", element.getCopyrightElement(), -1);
1741    }
1742  }
1743
1744  protected void composeDomainResource(Complex t, String parentType, String name, DomainResource element, int index) {
1745    composeResource(t, parentType, name, element, index);
1746    if (element.hasText()) {
1747      composeNarrative(t, "DomainResource", "text", element.getText(), -1);
1748    }
1749    for (int i = 0; i < element.getContained().size(); i++) {
1750      composeResource(t, "DomainResource", "contained", element.getContained().get(i), i);
1751    }
1752    for (int i = 0; i < element.getExtension().size(); i++) {
1753      composeExtension(t, "DomainResource", "extension", element.getExtension().get(i), i);
1754    }
1755    for (int i = 0; i < element.getModifierExtension().size(); i++) {
1756      composeExtension(t, "DomainResource", "modifierExtension", element.getModifierExtension().get(i), i);
1757    }
1758  }
1759
1760  protected void composeMetadataResource(Complex t, String parentType, String name, MetadataResource element, int index) {
1761    composeCanonicalResource(t, parentType, name, element, index);
1762    if (element.hasApprovalDateElement()) {
1763      composeDate(t, "MetadataResource", "approvalDate", element.getApprovalDateElement(), -1);
1764    }
1765    if (element.hasLastReviewDateElement()) {
1766      composeDate(t, "MetadataResource", "lastReviewDate", element.getLastReviewDateElement(), -1);
1767    }
1768    if (element.hasEffectivePeriod()) {
1769      composePeriod(t, "MetadataResource", "effectivePeriod", element.getEffectivePeriod(), -1);
1770    }
1771    for (int i = 0; i < element.getTopic().size(); i++) {
1772      composeCodeableConcept(t, "MetadataResource", "topic", element.getTopic().get(i), i);
1773    }
1774    for (int i = 0; i < element.getAuthor().size(); i++) {
1775      composeContactDetail(t, "MetadataResource", "author", element.getAuthor().get(i), i);
1776    }
1777    for (int i = 0; i < element.getEditor().size(); i++) {
1778      composeContactDetail(t, "MetadataResource", "editor", element.getEditor().get(i), i);
1779    }
1780    for (int i = 0; i < element.getReviewer().size(); i++) {
1781      composeContactDetail(t, "MetadataResource", "reviewer", element.getReviewer().get(i), i);
1782    }
1783    for (int i = 0; i < element.getEndorser().size(); i++) {
1784      composeContactDetail(t, "MetadataResource", "endorser", element.getEndorser().get(i), i);
1785    }
1786    for (int i = 0; i < element.getRelatedArtifact().size(); i++) {
1787      composeRelatedArtifact(t, "MetadataResource", "relatedArtifact", element.getRelatedArtifact().get(i), i);
1788    }
1789  }
1790
1791  protected void composeResource(Complex t, String parentType, String name, Resource element, int index) {
1792    composeBase(t, parentType, name, element, index);
1793    if (element.hasIdElement()) {
1794      composeId(t, "Resource", "id", element.getIdElement(), -1);
1795    }
1796    if (element.hasMeta()) {
1797      composeMeta(t, "Resource", "meta", element.getMeta(), -1);
1798    }
1799    if (element.hasImplicitRulesElement()) {
1800      composeUri(t, "Resource", "implicitRules", element.getImplicitRulesElement(), -1);
1801    }
1802    if (element.hasLanguageElement()) {
1803      composeCode(t, "Resource", "language", element.getLanguageElement(), -1);
1804    }
1805  }
1806
1807  protected void composeAccount(Complex parent, String parentType, String name, Account element, int index) {
1808    if (element == null) 
1809      return;
1810    Complex t;
1811    if (Utilities.noString(parentType))
1812      t = parent;
1813    else {
1814      t = parent.predicate("fhir:"+parentType+'.'+name);
1815    }
1816    composeDomainResource(t, "Account", name, element, index);
1817    for (int i = 0; i < element.getIdentifier().size(); i++) {
1818      composeIdentifier(t, "Account", "identifier", element.getIdentifier().get(i), i);
1819    }
1820    if (element.hasStatusElement()) {
1821      composeEnum(t, "Account", "status", element.getStatusElement(), -1);
1822    }
1823    if (element.hasBillingStatus()) {
1824      composeCodeableConcept(t, "Account", "billingStatus", element.getBillingStatus(), -1);
1825    }
1826    if (element.hasType()) {
1827      composeCodeableConcept(t, "Account", "type", element.getType(), -1);
1828    }
1829    if (element.hasNameElement()) {
1830      composeString(t, "Account", "name", element.getNameElement(), -1);
1831    }
1832    for (int i = 0; i < element.getSubject().size(); i++) {
1833      composeReference(t, "Account", "subject", element.getSubject().get(i), i);
1834    }
1835    if (element.hasServicePeriod()) {
1836      composePeriod(t, "Account", "servicePeriod", element.getServicePeriod(), -1);
1837    }
1838    for (int i = 0; i < element.getCoverage().size(); i++) {
1839      composeAccountCoverageComponent(t, "Account", "coverage", element.getCoverage().get(i), i);
1840    }
1841    if (element.hasOwner()) {
1842      composeReference(t, "Account", "owner", element.getOwner(), -1);
1843    }
1844    if (element.hasDescriptionElement()) {
1845      composeString(t, "Account", "description", element.getDescriptionElement(), -1);
1846    }
1847    for (int i = 0; i < element.getGuarantor().size(); i++) {
1848      composeAccountGuarantorComponent(t, "Account", "guarantor", element.getGuarantor().get(i), i);
1849    }
1850    if (element.hasPartOf()) {
1851      composeReference(t, "Account", "partOf", element.getPartOf(), -1);
1852    }
1853  }
1854
1855  protected void composeAccountCoverageComponent(Complex parent, String parentType, String name, Account.CoverageComponent element, int index) {
1856    if (element == null) 
1857      return;
1858    Complex t;
1859    if (Utilities.noString(parentType))
1860      t = parent;
1861    else {
1862      t = parent.predicate("fhir:"+parentType+'.'+name);
1863    }
1864    composeBackboneElement(t, "coverage", name, element, index);
1865    if (element.hasCoverage()) {
1866      composeReference(t, "CoverageComponent", "coverage", element.getCoverage(), -1);
1867    }
1868    if (element.hasPriorityElement()) {
1869      composePositiveInt(t, "CoverageComponent", "priority", element.getPriorityElement(), -1);
1870    }
1871  }
1872
1873  protected void composeAccountGuarantorComponent(Complex parent, String parentType, String name, Account.GuarantorComponent element, int index) {
1874    if (element == null) 
1875      return;
1876    Complex t;
1877    if (Utilities.noString(parentType))
1878      t = parent;
1879    else {
1880      t = parent.predicate("fhir:"+parentType+'.'+name);
1881    }
1882    composeBackboneElement(t, "guarantor", name, element, index);
1883    if (element.hasParty()) {
1884      composeReference(t, "GuarantorComponent", "party", element.getParty(), -1);
1885    }
1886    if (element.hasOnHoldElement()) {
1887      composeBoolean(t, "GuarantorComponent", "onHold", element.getOnHoldElement(), -1);
1888    }
1889    if (element.hasPeriod()) {
1890      composePeriod(t, "GuarantorComponent", "period", element.getPeriod(), -1);
1891    }
1892  }
1893
1894  protected void composeActivityDefinition(Complex parent, String parentType, String name, ActivityDefinition element, int index) {
1895    if (element == null) 
1896      return;
1897    Complex t;
1898    if (Utilities.noString(parentType))
1899      t = parent;
1900    else {
1901      t = parent.predicate("fhir:"+parentType+'.'+name);
1902    }
1903    composeMetadataResource(t, "ActivityDefinition", name, element, index);
1904    if (element.hasUrlElement()) {
1905      composeUri(t, "ActivityDefinition", "url", element.getUrlElement(), -1);
1906    }
1907    for (int i = 0; i < element.getIdentifier().size(); i++) {
1908      composeIdentifier(t, "ActivityDefinition", "identifier", element.getIdentifier().get(i), i);
1909    }
1910    if (element.hasVersionElement()) {
1911      composeString(t, "ActivityDefinition", "version", element.getVersionElement(), -1);
1912    }
1913    if (element.hasNameElement()) {
1914      composeString(t, "ActivityDefinition", "name", element.getNameElement(), -1);
1915    }
1916    if (element.hasTitleElement()) {
1917      composeString(t, "ActivityDefinition", "title", element.getTitleElement(), -1);
1918    }
1919    if (element.hasSubtitleElement()) {
1920      composeString(t, "ActivityDefinition", "subtitle", element.getSubtitleElement(), -1);
1921    }
1922    if (element.hasStatusElement()) {
1923      composeEnum(t, "ActivityDefinition", "status", element.getStatusElement(), -1);
1924    }
1925    if (element.hasExperimentalElement()) {
1926      composeBoolean(t, "ActivityDefinition", "experimental", element.getExperimentalElement(), -1);
1927    }
1928    if (element.hasSubject()) {
1929      composeType(t, "ActivityDefinition", "subject", element.getSubject(), -1);
1930    }
1931    if (element.hasDateElement()) {
1932      composeDateTime(t, "ActivityDefinition", "date", element.getDateElement(), -1);
1933    }
1934    if (element.hasPublisherElement()) {
1935      composeString(t, "ActivityDefinition", "publisher", element.getPublisherElement(), -1);
1936    }
1937    for (int i = 0; i < element.getContact().size(); i++) {
1938      composeContactDetail(t, "ActivityDefinition", "contact", element.getContact().get(i), i);
1939    }
1940    if (element.hasDescriptionElement()) {
1941      composeMarkdown(t, "ActivityDefinition", "description", element.getDescriptionElement(), -1);
1942    }
1943    for (int i = 0; i < element.getUseContext().size(); i++) {
1944      composeUsageContext(t, "ActivityDefinition", "useContext", element.getUseContext().get(i), i);
1945    }
1946    for (int i = 0; i < element.getJurisdiction().size(); i++) {
1947      composeCodeableConcept(t, "ActivityDefinition", "jurisdiction", element.getJurisdiction().get(i), i);
1948    }
1949    if (element.hasPurposeElement()) {
1950      composeMarkdown(t, "ActivityDefinition", "purpose", element.getPurposeElement(), -1);
1951    }
1952    if (element.hasUsageElement()) {
1953      composeString(t, "ActivityDefinition", "usage", element.getUsageElement(), -1);
1954    }
1955    if (element.hasCopyrightElement()) {
1956      composeMarkdown(t, "ActivityDefinition", "copyright", element.getCopyrightElement(), -1);
1957    }
1958    if (element.hasApprovalDateElement()) {
1959      composeDate(t, "ActivityDefinition", "approvalDate", element.getApprovalDateElement(), -1);
1960    }
1961    if (element.hasLastReviewDateElement()) {
1962      composeDate(t, "ActivityDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1);
1963    }
1964    if (element.hasEffectivePeriod()) {
1965      composePeriod(t, "ActivityDefinition", "effectivePeriod", element.getEffectivePeriod(), -1);
1966    }
1967    for (int i = 0; i < element.getTopic().size(); i++) {
1968      composeCodeableConcept(t, "ActivityDefinition", "topic", element.getTopic().get(i), i);
1969    }
1970    for (int i = 0; i < element.getAuthor().size(); i++) {
1971      composeContactDetail(t, "ActivityDefinition", "author", element.getAuthor().get(i), i);
1972    }
1973    for (int i = 0; i < element.getEditor().size(); i++) {
1974      composeContactDetail(t, "ActivityDefinition", "editor", element.getEditor().get(i), i);
1975    }
1976    for (int i = 0; i < element.getReviewer().size(); i++) {
1977      composeContactDetail(t, "ActivityDefinition", "reviewer", element.getReviewer().get(i), i);
1978    }
1979    for (int i = 0; i < element.getEndorser().size(); i++) {
1980      composeContactDetail(t, "ActivityDefinition", "endorser", element.getEndorser().get(i), i);
1981    }
1982    for (int i = 0; i < element.getRelatedArtifact().size(); i++) {
1983      composeRelatedArtifact(t, "ActivityDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i);
1984    }
1985    for (int i = 0; i < element.getLibrary().size(); i++) {
1986      composeCanonical(t, "ActivityDefinition", "library", element.getLibrary().get(i), i);
1987    }
1988    if (element.hasKindElement()) {
1989      composeEnum(t, "ActivityDefinition", "kind", element.getKindElement(), -1);
1990    }
1991    if (element.hasProfileElement()) {
1992      composeCanonical(t, "ActivityDefinition", "profile", element.getProfileElement(), -1);
1993    }
1994    if (element.hasCode()) {
1995      composeCodeableConcept(t, "ActivityDefinition", "code", element.getCode(), -1);
1996    }
1997    if (element.hasIntentElement()) {
1998      composeEnum(t, "ActivityDefinition", "intent", element.getIntentElement(), -1);
1999    }
2000    if (element.hasPriorityElement()) {
2001      composeEnum(t, "ActivityDefinition", "priority", element.getPriorityElement(), -1);
2002    }
2003    if (element.hasDoNotPerformElement()) {
2004      composeBoolean(t, "ActivityDefinition", "doNotPerform", element.getDoNotPerformElement(), -1);
2005    }
2006    if (element.hasTiming()) {
2007      composeType(t, "ActivityDefinition", "timing", element.getTiming(), -1);
2008    }
2009    if (element.hasLocation()) {
2010      composeCodeableReference(t, "ActivityDefinition", "location", element.getLocation(), -1);
2011    }
2012    for (int i = 0; i < element.getParticipant().size(); i++) {
2013      composeActivityDefinitionParticipantComponent(t, "ActivityDefinition", "participant", element.getParticipant().get(i), i);
2014    }
2015    if (element.hasProduct()) {
2016      composeType(t, "ActivityDefinition", "product", element.getProduct(), -1);
2017    }
2018    if (element.hasQuantity()) {
2019      composeQuantity(t, "ActivityDefinition", "quantity", element.getQuantity(), -1);
2020    }
2021    for (int i = 0; i < element.getDosage().size(); i++) {
2022      composeDosage(t, "ActivityDefinition", "dosage", element.getDosage().get(i), i);
2023    }
2024    for (int i = 0; i < element.getBodySite().size(); i++) {
2025      composeCodeableConcept(t, "ActivityDefinition", "bodySite", element.getBodySite().get(i), i);
2026    }
2027    for (int i = 0; i < element.getSpecimenRequirement().size(); i++) {
2028      composeReference(t, "ActivityDefinition", "specimenRequirement", element.getSpecimenRequirement().get(i), i);
2029    }
2030    for (int i = 0; i < element.getObservationRequirement().size(); i++) {
2031      composeReference(t, "ActivityDefinition", "observationRequirement", element.getObservationRequirement().get(i), i);
2032    }
2033    for (int i = 0; i < element.getObservationResultRequirement().size(); i++) {
2034      composeReference(t, "ActivityDefinition", "observationResultRequirement", element.getObservationResultRequirement().get(i), i);
2035    }
2036    if (element.hasTransformElement()) {
2037      composeCanonical(t, "ActivityDefinition", "transform", element.getTransformElement(), -1);
2038    }
2039    for (int i = 0; i < element.getDynamicValue().size(); i++) {
2040      composeActivityDefinitionDynamicValueComponent(t, "ActivityDefinition", "dynamicValue", element.getDynamicValue().get(i), i);
2041    }
2042  }
2043
2044  protected void composeActivityDefinitionParticipantComponent(Complex parent, String parentType, String name, ActivityDefinition.ActivityDefinitionParticipantComponent element, int index) {
2045    if (element == null) 
2046      return;
2047    Complex t;
2048    if (Utilities.noString(parentType))
2049      t = parent;
2050    else {
2051      t = parent.predicate("fhir:"+parentType+'.'+name);
2052    }
2053    composeBackboneElement(t, "participant", name, element, index);
2054    if (element.hasTypeElement()) {
2055      composeEnum(t, "ActivityDefinitionParticipantComponent", "type", element.getTypeElement(), -1);
2056    }
2057    if (element.hasTypeReference()) {
2058      composeReference(t, "ActivityDefinitionParticipantComponent", "typeReference", element.getTypeReference(), -1);
2059    }
2060    if (element.hasRole()) {
2061      composeCodeableConcept(t, "ActivityDefinitionParticipantComponent", "role", element.getRole(), -1);
2062    }
2063    if (element.hasFunction()) {
2064      composeCodeableConcept(t, "ActivityDefinitionParticipantComponent", "function", element.getFunction(), -1);
2065    }
2066  }
2067
2068  protected void composeActivityDefinitionDynamicValueComponent(Complex parent, String parentType, String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element, int index) {
2069    if (element == null) 
2070      return;
2071    Complex t;
2072    if (Utilities.noString(parentType))
2073      t = parent;
2074    else {
2075      t = parent.predicate("fhir:"+parentType+'.'+name);
2076    }
2077    composeBackboneElement(t, "dynamicValue", name, element, index);
2078    if (element.hasPathElement()) {
2079      composeString(t, "ActivityDefinitionDynamicValueComponent", "path", element.getPathElement(), -1);
2080    }
2081    if (element.hasExpression()) {
2082      composeExpression(t, "ActivityDefinitionDynamicValueComponent", "expression", element.getExpression(), -1);
2083    }
2084  }
2085
2086  protected void composeAdministrableProductDefinition(Complex parent, String parentType, String name, AdministrableProductDefinition element, int index) {
2087    if (element == null) 
2088      return;
2089    Complex t;
2090    if (Utilities.noString(parentType))
2091      t = parent;
2092    else {
2093      t = parent.predicate("fhir:"+parentType+'.'+name);
2094    }
2095    composeDomainResource(t, "AdministrableProductDefinition", name, element, index);
2096    for (int i = 0; i < element.getIdentifier().size(); i++) {
2097      composeIdentifier(t, "AdministrableProductDefinition", "identifier", element.getIdentifier().get(i), i);
2098    }
2099    if (element.hasStatusElement()) {
2100      composeEnum(t, "AdministrableProductDefinition", "status", element.getStatusElement(), -1);
2101    }
2102    for (int i = 0; i < element.getFormOf().size(); i++) {
2103      composeReference(t, "AdministrableProductDefinition", "formOf", element.getFormOf().get(i), i);
2104    }
2105    if (element.hasAdministrableDoseForm()) {
2106      composeCodeableConcept(t, "AdministrableProductDefinition", "administrableDoseForm", element.getAdministrableDoseForm(), -1);
2107    }
2108    if (element.hasUnitOfPresentation()) {
2109      composeCodeableConcept(t, "AdministrableProductDefinition", "unitOfPresentation", element.getUnitOfPresentation(), -1);
2110    }
2111    for (int i = 0; i < element.getProducedFrom().size(); i++) {
2112      composeReference(t, "AdministrableProductDefinition", "producedFrom", element.getProducedFrom().get(i), i);
2113    }
2114    for (int i = 0; i < element.getIngredient().size(); i++) {
2115      composeCodeableConcept(t, "AdministrableProductDefinition", "ingredient", element.getIngredient().get(i), i);
2116    }
2117    if (element.hasDevice()) {
2118      composeReference(t, "AdministrableProductDefinition", "device", element.getDevice(), -1);
2119    }
2120    for (int i = 0; i < element.getProperty().size(); i++) {
2121      composeAdministrableProductDefinitionPropertyComponent(t, "AdministrableProductDefinition", "property", element.getProperty().get(i), i);
2122    }
2123    for (int i = 0; i < element.getRouteOfAdministration().size(); i++) {
2124      composeAdministrableProductDefinitionRouteOfAdministrationComponent(t, "AdministrableProductDefinition", "routeOfAdministration", element.getRouteOfAdministration().get(i), i);
2125    }
2126  }
2127
2128  protected void composeAdministrableProductDefinitionPropertyComponent(Complex parent, String parentType, String name, AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent element, int index) {
2129    if (element == null) 
2130      return;
2131    Complex t;
2132    if (Utilities.noString(parentType))
2133      t = parent;
2134    else {
2135      t = parent.predicate("fhir:"+parentType+'.'+name);
2136    }
2137    composeBackboneElement(t, "property", name, element, index);
2138    if (element.hasType()) {
2139      composeCodeableConcept(t, "AdministrableProductDefinitionPropertyComponent", "type", element.getType(), -1);
2140    }
2141    if (element.hasValue()) {
2142      composeType(t, "AdministrableProductDefinitionPropertyComponent", "value", element.getValue(), -1);
2143    }
2144    if (element.hasStatus()) {
2145      composeCodeableConcept(t, "AdministrableProductDefinitionPropertyComponent", "status", element.getStatus(), -1);
2146    }
2147  }
2148
2149  protected void composeAdministrableProductDefinitionRouteOfAdministrationComponent(Complex parent, String parentType, String name, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent element, int index) {
2150    if (element == null) 
2151      return;
2152    Complex t;
2153    if (Utilities.noString(parentType))
2154      t = parent;
2155    else {
2156      t = parent.predicate("fhir:"+parentType+'.'+name);
2157    }
2158    composeBackboneElement(t, "routeOfAdministration", name, element, index);
2159    if (element.hasCode()) {
2160      composeCodeableConcept(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "code", element.getCode(), -1);
2161    }
2162    if (element.hasFirstDose()) {
2163      composeQuantity(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "firstDose", element.getFirstDose(), -1);
2164    }
2165    if (element.hasMaxSingleDose()) {
2166      composeQuantity(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "maxSingleDose", element.getMaxSingleDose(), -1);
2167    }
2168    if (element.hasMaxDosePerDay()) {
2169      composeQuantity(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "maxDosePerDay", element.getMaxDosePerDay(), -1);
2170    }
2171    if (element.hasMaxDosePerTreatmentPeriod()) {
2172      composeRatio(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "maxDosePerTreatmentPeriod", element.getMaxDosePerTreatmentPeriod(), -1);
2173    }
2174    if (element.hasMaxTreatmentPeriod()) {
2175      composeDuration(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "maxTreatmentPeriod", element.getMaxTreatmentPeriod(), -1);
2176    }
2177    for (int i = 0; i < element.getTargetSpecies().size(); i++) {
2178      composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent(t, "AdministrableProductDefinitionRouteOfAdministrationComponent", "targetSpecies", element.getTargetSpecies().get(i), i);
2179    }
2180  }
2181
2182  protected void composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent(Complex parent, String parentType, String name, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent element, int index) {
2183    if (element == null) 
2184      return;
2185    Complex t;
2186    if (Utilities.noString(parentType))
2187      t = parent;
2188    else {
2189      t = parent.predicate("fhir:"+parentType+'.'+name);
2190    }
2191    composeBackboneElement(t, "targetSpecies", name, element, index);
2192    if (element.hasCode()) {
2193      composeCodeableConcept(t, "AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent", "code", element.getCode(), -1);
2194    }
2195    for (int i = 0; i < element.getWithdrawalPeriod().size(); i++) {
2196      composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(t, "AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent", "withdrawalPeriod", element.getWithdrawalPeriod().get(i), i);
2197    }
2198  }
2199
2200  protected void composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(Complex parent, String parentType, String name, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element, int index) {
2201    if (element == null) 
2202      return;
2203    Complex t;
2204    if (Utilities.noString(parentType))
2205      t = parent;
2206    else {
2207      t = parent.predicate("fhir:"+parentType+'.'+name);
2208    }
2209    composeBackboneElement(t, "withdrawalPeriod", name, element, index);
2210    if (element.hasTissue()) {
2211      composeCodeableConcept(t, "AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent", "tissue", element.getTissue(), -1);
2212    }
2213    if (element.hasValue()) {
2214      composeQuantity(t, "AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent", "value", element.getValue(), -1);
2215    }
2216    if (element.hasSupportingInformationElement()) {
2217      composeString(t, "AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent", "supportingInformation", element.getSupportingInformationElement(), -1);
2218    }
2219  }
2220
2221  protected void composeAdverseEvent(Complex parent, String parentType, String name, AdverseEvent element, int index) {
2222    if (element == null) 
2223      return;
2224    Complex t;
2225    if (Utilities.noString(parentType))
2226      t = parent;
2227    else {
2228      t = parent.predicate("fhir:"+parentType+'.'+name);
2229    }
2230    composeDomainResource(t, "AdverseEvent", name, element, index);
2231    for (int i = 0; i < element.getIdentifier().size(); i++) {
2232      composeIdentifier(t, "AdverseEvent", "identifier", element.getIdentifier().get(i), i);
2233    }
2234    if (element.hasStatusElement()) {
2235      composeEnum(t, "AdverseEvent", "status", element.getStatusElement(), -1);
2236    }
2237    if (element.hasActualityElement()) {
2238      composeEnum(t, "AdverseEvent", "actuality", element.getActualityElement(), -1);
2239    }
2240    for (int i = 0; i < element.getCategory().size(); i++) {
2241      composeCodeableConcept(t, "AdverseEvent", "category", element.getCategory().get(i), i);
2242    }
2243    if (element.hasCode()) {
2244      composeCodeableConcept(t, "AdverseEvent", "code", element.getCode(), -1);
2245    }
2246    if (element.hasSubject()) {
2247      composeReference(t, "AdverseEvent", "subject", element.getSubject(), -1);
2248    }
2249    if (element.hasEncounter()) {
2250      composeReference(t, "AdverseEvent", "encounter", element.getEncounter(), -1);
2251    }
2252    if (element.hasOccurrence()) {
2253      composeType(t, "AdverseEvent", "occurrence", element.getOccurrence(), -1);
2254    }
2255    if (element.hasDetectedElement()) {
2256      composeDateTime(t, "AdverseEvent", "detected", element.getDetectedElement(), -1);
2257    }
2258    if (element.hasRecordedDateElement()) {
2259      composeDateTime(t, "AdverseEvent", "recordedDate", element.getRecordedDateElement(), -1);
2260    }
2261    for (int i = 0; i < element.getResultingCondition().size(); i++) {
2262      composeReference(t, "AdverseEvent", "resultingCondition", element.getResultingCondition().get(i), i);
2263    }
2264    if (element.hasLocation()) {
2265      composeReference(t, "AdverseEvent", "location", element.getLocation(), -1);
2266    }
2267    if (element.hasSeriousness()) {
2268      composeCodeableConcept(t, "AdverseEvent", "seriousness", element.getSeriousness(), -1);
2269    }
2270    for (int i = 0; i < element.getOutcome().size(); i++) {
2271      composeCodeableConcept(t, "AdverseEvent", "outcome", element.getOutcome().get(i), i);
2272    }
2273    if (element.hasRecorder()) {
2274      composeReference(t, "AdverseEvent", "recorder", element.getRecorder(), -1);
2275    }
2276    for (int i = 0; i < element.getParticipant().size(); i++) {
2277      composeAdverseEventParticipantComponent(t, "AdverseEvent", "participant", element.getParticipant().get(i), i);
2278    }
2279    for (int i = 0; i < element.getSuspectEntity().size(); i++) {
2280      composeAdverseEventSuspectEntityComponent(t, "AdverseEvent", "suspectEntity", element.getSuspectEntity().get(i), i);
2281    }
2282    for (int i = 0; i < element.getContributingFactor().size(); i++) {
2283      composeAdverseEventContributingFactorComponent(t, "AdverseEvent", "contributingFactor", element.getContributingFactor().get(i), i);
2284    }
2285    for (int i = 0; i < element.getPreventiveAction().size(); i++) {
2286      composeAdverseEventPreventiveActionComponent(t, "AdverseEvent", "preventiveAction", element.getPreventiveAction().get(i), i);
2287    }
2288    for (int i = 0; i < element.getMitigatingAction().size(); i++) {
2289      composeAdverseEventMitigatingActionComponent(t, "AdverseEvent", "mitigatingAction", element.getMitigatingAction().get(i), i);
2290    }
2291    for (int i = 0; i < element.getSupportingInfo().size(); i++) {
2292      composeAdverseEventSupportingInfoComponent(t, "AdverseEvent", "supportingInfo", element.getSupportingInfo().get(i), i);
2293    }
2294    for (int i = 0; i < element.getStudy().size(); i++) {
2295      composeReference(t, "AdverseEvent", "study", element.getStudy().get(i), i);
2296    }
2297  }
2298
2299  protected void composeAdverseEventParticipantComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventParticipantComponent element, int index) {
2300    if (element == null) 
2301      return;
2302    Complex t;
2303    if (Utilities.noString(parentType))
2304      t = parent;
2305    else {
2306      t = parent.predicate("fhir:"+parentType+'.'+name);
2307    }
2308    composeBackboneElement(t, "participant", name, element, index);
2309    if (element.hasFunction()) {
2310      composeCodeableConcept(t, "AdverseEventParticipantComponent", "function", element.getFunction(), -1);
2311    }
2312    if (element.hasActor()) {
2313      composeReference(t, "AdverseEventParticipantComponent", "actor", element.getActor(), -1);
2314    }
2315  }
2316
2317  protected void composeAdverseEventSuspectEntityComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSuspectEntityComponent element, int index) {
2318    if (element == null) 
2319      return;
2320    Complex t;
2321    if (Utilities.noString(parentType))
2322      t = parent;
2323    else {
2324      t = parent.predicate("fhir:"+parentType+'.'+name);
2325    }
2326    composeBackboneElement(t, "suspectEntity", name, element, index);
2327    if (element.hasInstance()) {
2328      composeType(t, "AdverseEventSuspectEntityComponent", "instance", element.getInstance(), -1);
2329    }
2330    if (element.hasCausality()) {
2331      composeAdverseEventSuspectEntityCausalityComponent(t, "AdverseEventSuspectEntityComponent", "causality", element.getCausality(), -1);
2332    }
2333  }
2334
2335  protected void composeAdverseEventSuspectEntityCausalityComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element, int index) {
2336    if (element == null) 
2337      return;
2338    Complex t;
2339    if (Utilities.noString(parentType))
2340      t = parent;
2341    else {
2342      t = parent.predicate("fhir:"+parentType+'.'+name);
2343    }
2344    composeBackboneElement(t, "causality", name, element, index);
2345    if (element.hasAssessmentMethod()) {
2346      composeCodeableConcept(t, "AdverseEventSuspectEntityCausalityComponent", "assessmentMethod", element.getAssessmentMethod(), -1);
2347    }
2348    if (element.hasEntityRelatedness()) {
2349      composeCodeableConcept(t, "AdverseEventSuspectEntityCausalityComponent", "entityRelatedness", element.getEntityRelatedness(), -1);
2350    }
2351    if (element.hasAuthor()) {
2352      composeReference(t, "AdverseEventSuspectEntityCausalityComponent", "author", element.getAuthor(), -1);
2353    }
2354  }
2355
2356  protected void composeAdverseEventContributingFactorComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventContributingFactorComponent element, int index) {
2357    if (element == null) 
2358      return;
2359    Complex t;
2360    if (Utilities.noString(parentType))
2361      t = parent;
2362    else {
2363      t = parent.predicate("fhir:"+parentType+'.'+name);
2364    }
2365    composeBackboneElement(t, "contributingFactor", name, element, index);
2366    if (element.hasItem()) {
2367      composeType(t, "AdverseEventContributingFactorComponent", "item", element.getItem(), -1);
2368    }
2369  }
2370
2371  protected void composeAdverseEventPreventiveActionComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventPreventiveActionComponent element, int index) {
2372    if (element == null) 
2373      return;
2374    Complex t;
2375    if (Utilities.noString(parentType))
2376      t = parent;
2377    else {
2378      t = parent.predicate("fhir:"+parentType+'.'+name);
2379    }
2380    composeBackboneElement(t, "preventiveAction", name, element, index);
2381    if (element.hasItem()) {
2382      composeType(t, "AdverseEventPreventiveActionComponent", "item", element.getItem(), -1);
2383    }
2384  }
2385
2386  protected void composeAdverseEventMitigatingActionComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventMitigatingActionComponent element, int index) {
2387    if (element == null) 
2388      return;
2389    Complex t;
2390    if (Utilities.noString(parentType))
2391      t = parent;
2392    else {
2393      t = parent.predicate("fhir:"+parentType+'.'+name);
2394    }
2395    composeBackboneElement(t, "mitigatingAction", name, element, index);
2396    if (element.hasItem()) {
2397      composeType(t, "AdverseEventMitigatingActionComponent", "item", element.getItem(), -1);
2398    }
2399  }
2400
2401  protected void composeAdverseEventSupportingInfoComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSupportingInfoComponent element, int index) {
2402    if (element == null) 
2403      return;
2404    Complex t;
2405    if (Utilities.noString(parentType))
2406      t = parent;
2407    else {
2408      t = parent.predicate("fhir:"+parentType+'.'+name);
2409    }
2410    composeBackboneElement(t, "supportingInfo", name, element, index);
2411    if (element.hasItem()) {
2412      composeType(t, "AdverseEventSupportingInfoComponent", "item", element.getItem(), -1);
2413    }
2414  }
2415
2416  protected void composeAllergyIntolerance(Complex parent, String parentType, String name, AllergyIntolerance element, int index) {
2417    if (element == null) 
2418      return;
2419    Complex t;
2420    if (Utilities.noString(parentType))
2421      t = parent;
2422    else {
2423      t = parent.predicate("fhir:"+parentType+'.'+name);
2424    }
2425    composeDomainResource(t, "AllergyIntolerance", name, element, index);
2426    for (int i = 0; i < element.getIdentifier().size(); i++) {
2427      composeIdentifier(t, "AllergyIntolerance", "identifier", element.getIdentifier().get(i), i);
2428    }
2429    if (element.hasClinicalStatus()) {
2430      composeCodeableConcept(t, "AllergyIntolerance", "clinicalStatus", element.getClinicalStatus(), -1);
2431    }
2432    if (element.hasVerificationStatus()) {
2433      composeCodeableConcept(t, "AllergyIntolerance", "verificationStatus", element.getVerificationStatus(), -1);
2434    }
2435    if (element.hasTypeElement()) {
2436      composeEnum(t, "AllergyIntolerance", "type", element.getTypeElement(), -1);
2437    }
2438    for (int i = 0; i < element.getCategory().size(); i++) {
2439      composeEnum(t, "AllergyIntolerance", "category", element.getCategory().get(i), i);
2440    }
2441    if (element.hasCriticalityElement()) {
2442      composeEnum(t, "AllergyIntolerance", "criticality", element.getCriticalityElement(), -1);
2443    }
2444    if (element.hasCode()) {
2445      composeCodeableConcept(t, "AllergyIntolerance", "code", element.getCode(), -1);
2446    }
2447    if (element.hasPatient()) {
2448      composeReference(t, "AllergyIntolerance", "patient", element.getPatient(), -1);
2449    }
2450    if (element.hasEncounter()) {
2451      composeReference(t, "AllergyIntolerance", "encounter", element.getEncounter(), -1);
2452    }
2453    if (element.hasOnset()) {
2454      composeType(t, "AllergyIntolerance", "onset", element.getOnset(), -1);
2455    }
2456    if (element.hasRecordedDateElement()) {
2457      composeDateTime(t, "AllergyIntolerance", "recordedDate", element.getRecordedDateElement(), -1);
2458    }
2459    if (element.hasRecorder()) {
2460      composeReference(t, "AllergyIntolerance", "recorder", element.getRecorder(), -1);
2461    }
2462    if (element.hasAsserter()) {
2463      composeReference(t, "AllergyIntolerance", "asserter", element.getAsserter(), -1);
2464    }
2465    if (element.hasLastOccurrenceElement()) {
2466      composeDateTime(t, "AllergyIntolerance", "lastOccurrence", element.getLastOccurrenceElement(), -1);
2467    }
2468    for (int i = 0; i < element.getNote().size(); i++) {
2469      composeAnnotation(t, "AllergyIntolerance", "note", element.getNote().get(i), i);
2470    }
2471    for (int i = 0; i < element.getReaction().size(); i++) {
2472      composeAllergyIntoleranceReactionComponent(t, "AllergyIntolerance", "reaction", element.getReaction().get(i), i);
2473    }
2474  }
2475
2476  protected void composeAllergyIntoleranceReactionComponent(Complex parent, String parentType, String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element, int index) {
2477    if (element == null) 
2478      return;
2479    Complex t;
2480    if (Utilities.noString(parentType))
2481      t = parent;
2482    else {
2483      t = parent.predicate("fhir:"+parentType+'.'+name);
2484    }
2485    composeBackboneElement(t, "reaction", name, element, index);
2486    if (element.hasSubstance()) {
2487      composeCodeableConcept(t, "AllergyIntoleranceReactionComponent", "substance", element.getSubstance(), -1);
2488    }
2489    for (int i = 0; i < element.getManifestation().size(); i++) {
2490      composeCodeableReference(t, "AllergyIntoleranceReactionComponent", "manifestation", element.getManifestation().get(i), i);
2491    }
2492    if (element.hasDescriptionElement()) {
2493      composeString(t, "AllergyIntoleranceReactionComponent", "description", element.getDescriptionElement(), -1);
2494    }
2495    if (element.hasOnsetElement()) {
2496      composeDateTime(t, "AllergyIntoleranceReactionComponent", "onset", element.getOnsetElement(), -1);
2497    }
2498    if (element.hasSeverityElement()) {
2499      composeEnum(t, "AllergyIntoleranceReactionComponent", "severity", element.getSeverityElement(), -1);
2500    }
2501    if (element.hasExposureRoute()) {
2502      composeCodeableConcept(t, "AllergyIntoleranceReactionComponent", "exposureRoute", element.getExposureRoute(), -1);
2503    }
2504    for (int i = 0; i < element.getNote().size(); i++) {
2505      composeAnnotation(t, "AllergyIntoleranceReactionComponent", "note", element.getNote().get(i), i);
2506    }
2507  }
2508
2509  protected void composeAppointment(Complex parent, String parentType, String name, Appointment element, int index) {
2510    if (element == null) 
2511      return;
2512    Complex t;
2513    if (Utilities.noString(parentType))
2514      t = parent;
2515    else {
2516      t = parent.predicate("fhir:"+parentType+'.'+name);
2517    }
2518    composeDomainResource(t, "Appointment", name, element, index);
2519    for (int i = 0; i < element.getIdentifier().size(); i++) {
2520      composeIdentifier(t, "Appointment", "identifier", element.getIdentifier().get(i), i);
2521    }
2522    if (element.hasStatusElement()) {
2523      composeEnum(t, "Appointment", "status", element.getStatusElement(), -1);
2524    }
2525    if (element.hasCancellationReason()) {
2526      composeCodeableConcept(t, "Appointment", "cancellationReason", element.getCancellationReason(), -1);
2527    }
2528    for (int i = 0; i < element.getServiceCategory().size(); i++) {
2529      composeCodeableConcept(t, "Appointment", "serviceCategory", element.getServiceCategory().get(i), i);
2530    }
2531    for (int i = 0; i < element.getServiceType().size(); i++) {
2532      composeCodeableConcept(t, "Appointment", "serviceType", element.getServiceType().get(i), i);
2533    }
2534    for (int i = 0; i < element.getSpecialty().size(); i++) {
2535      composeCodeableConcept(t, "Appointment", "specialty", element.getSpecialty().get(i), i);
2536    }
2537    if (element.hasAppointmentType()) {
2538      composeCodeableConcept(t, "Appointment", "appointmentType", element.getAppointmentType(), -1);
2539    }
2540    for (int i = 0; i < element.getReason().size(); i++) {
2541      composeCodeableReference(t, "Appointment", "reason", element.getReason().get(i), i);
2542    }
2543    if (element.hasPriority()) {
2544      composeCodeableConcept(t, "Appointment", "priority", element.getPriority(), -1);
2545    }
2546    if (element.hasDescriptionElement()) {
2547      composeString(t, "Appointment", "description", element.getDescriptionElement(), -1);
2548    }
2549    for (int i = 0; i < element.getReplaces().size(); i++) {
2550      composeReference(t, "Appointment", "replaces", element.getReplaces().get(i), i);
2551    }
2552    for (int i = 0; i < element.getSupportingInformation().size(); i++) {
2553      composeReference(t, "Appointment", "supportingInformation", element.getSupportingInformation().get(i), i);
2554    }
2555    if (element.hasStartElement()) {
2556      composeInstant(t, "Appointment", "start", element.getStartElement(), -1);
2557    }
2558    if (element.hasEndElement()) {
2559      composeInstant(t, "Appointment", "end", element.getEndElement(), -1);
2560    }
2561    if (element.hasMinutesDurationElement()) {
2562      composePositiveInt(t, "Appointment", "minutesDuration", element.getMinutesDurationElement(), -1);
2563    }
2564    for (int i = 0; i < element.getSlot().size(); i++) {
2565      composeReference(t, "Appointment", "slot", element.getSlot().get(i), i);
2566    }
2567    for (int i = 0; i < element.getAccount().size(); i++) {
2568      composeReference(t, "Appointment", "account", element.getAccount().get(i), i);
2569    }
2570    if (element.hasCreatedElement()) {
2571      composeDateTime(t, "Appointment", "created", element.getCreatedElement(), -1);
2572    }
2573    for (int i = 0; i < element.getNote().size(); i++) {
2574      composeAnnotation(t, "Appointment", "note", element.getNote().get(i), i);
2575    }
2576    for (int i = 0; i < element.getPatientInstruction().size(); i++) {
2577      composeCodeableReference(t, "Appointment", "patientInstruction", element.getPatientInstruction().get(i), i);
2578    }
2579    for (int i = 0; i < element.getBasedOn().size(); i++) {
2580      composeReference(t, "Appointment", "basedOn", element.getBasedOn().get(i), i);
2581    }
2582    if (element.hasSubject()) {
2583      composeReference(t, "Appointment", "subject", element.getSubject(), -1);
2584    }
2585    for (int i = 0; i < element.getParticipant().size(); i++) {
2586      composeAppointmentParticipantComponent(t, "Appointment", "participant", element.getParticipant().get(i), i);
2587    }
2588    for (int i = 0; i < element.getRequestedPeriod().size(); i++) {
2589      composePeriod(t, "Appointment", "requestedPeriod", element.getRequestedPeriod().get(i), i);
2590    }
2591  }
2592
2593  protected void composeAppointmentParticipantComponent(Complex parent, String parentType, String name, Appointment.AppointmentParticipantComponent element, int index) {
2594    if (element == null) 
2595      return;
2596    Complex t;
2597    if (Utilities.noString(parentType))
2598      t = parent;
2599    else {
2600      t = parent.predicate("fhir:"+parentType+'.'+name);
2601    }
2602    composeBackboneElement(t, "participant", name, element, index);
2603    for (int i = 0; i < element.getType().size(); i++) {
2604      composeCodeableConcept(t, "AppointmentParticipantComponent", "type", element.getType().get(i), i);
2605    }
2606    if (element.hasPeriod()) {
2607      composePeriod(t, "AppointmentParticipantComponent", "period", element.getPeriod(), -1);
2608    }
2609    if (element.hasActor()) {
2610      composeReference(t, "AppointmentParticipantComponent", "actor", element.getActor(), -1);
2611    }
2612    if (element.hasRequiredElement()) {
2613      composeBoolean(t, "AppointmentParticipantComponent", "required", element.getRequiredElement(), -1);
2614    }
2615    if (element.hasStatusElement()) {
2616      composeEnum(t, "AppointmentParticipantComponent", "status", element.getStatusElement(), -1);
2617    }
2618  }
2619
2620  protected void composeAppointmentResponse(Complex parent, String parentType, String name, AppointmentResponse element, int index) {
2621    if (element == null) 
2622      return;
2623    Complex t;
2624    if (Utilities.noString(parentType))
2625      t = parent;
2626    else {
2627      t = parent.predicate("fhir:"+parentType+'.'+name);
2628    }
2629    composeDomainResource(t, "AppointmentResponse", name, element, index);
2630    for (int i = 0; i < element.getIdentifier().size(); i++) {
2631      composeIdentifier(t, "AppointmentResponse", "identifier", element.getIdentifier().get(i), i);
2632    }
2633    if (element.hasAppointment()) {
2634      composeReference(t, "AppointmentResponse", "appointment", element.getAppointment(), -1);
2635    }
2636    if (element.hasStartElement()) {
2637      composeInstant(t, "AppointmentResponse", "start", element.getStartElement(), -1);
2638    }
2639    if (element.hasEndElement()) {
2640      composeInstant(t, "AppointmentResponse", "end", element.getEndElement(), -1);
2641    }
2642    for (int i = 0; i < element.getParticipantType().size(); i++) {
2643      composeCodeableConcept(t, "AppointmentResponse", "participantType", element.getParticipantType().get(i), i);
2644    }
2645    if (element.hasActor()) {
2646      composeReference(t, "AppointmentResponse", "actor", element.getActor(), -1);
2647    }
2648    if (element.hasParticipantStatusElement()) {
2649      composeEnum(t, "AppointmentResponse", "participantStatus", element.getParticipantStatusElement(), -1);
2650    }
2651    if (element.hasCommentElement()) {
2652      composeString(t, "AppointmentResponse", "comment", element.getCommentElement(), -1);
2653    }
2654  }
2655
2656  protected void composeArtifactAssessment(Complex parent, String parentType, String name, ArtifactAssessment element, int index) {
2657    if (element == null) 
2658      return;
2659    Complex t;
2660    if (Utilities.noString(parentType))
2661      t = parent;
2662    else {
2663      t = parent.predicate("fhir:"+parentType+'.'+name);
2664    }
2665    composeMetadataResource(t, "ArtifactAssessment", name, element, index);
2666    for (int i = 0; i < element.getIdentifier().size(); i++) {
2667      composeIdentifier(t, "ArtifactAssessment", "identifier", element.getIdentifier().get(i), i);
2668    }
2669    if (element.hasCiteAs()) {
2670      composeType(t, "ArtifactAssessment", "citeAs", element.getCiteAs(), -1);
2671    }
2672    if (element.hasDateElement()) {
2673      composeDateTime(t, "ArtifactAssessment", "date", element.getDateElement(), -1);
2674    }
2675    if (element.hasCopyrightElement()) {
2676      composeMarkdown(t, "ArtifactAssessment", "copyright", element.getCopyrightElement(), -1);
2677    }
2678    if (element.hasApprovalDateElement()) {
2679      composeDate(t, "ArtifactAssessment", "approvalDate", element.getApprovalDateElement(), -1);
2680    }
2681    if (element.hasLastReviewDateElement()) {
2682      composeDate(t, "ArtifactAssessment", "lastReviewDate", element.getLastReviewDateElement(), -1);
2683    }
2684    if (element.hasArtifact()) {
2685      composeType(t, "ArtifactAssessment", "artifact", element.getArtifact(), -1);
2686    }
2687    for (int i = 0; i < element.getContent().size(); i++) {
2688      composeArtifactAssessmentContentComponent(t, "ArtifactAssessment", "content", element.getContent().get(i), i);
2689    }
2690    if (element.hasWorkflowStatusElement()) {
2691      composeEnum(t, "ArtifactAssessment", "workflowStatus", element.getWorkflowStatusElement(), -1);
2692    }
2693    if (element.hasDispositionElement()) {
2694      composeEnum(t, "ArtifactAssessment", "disposition", element.getDispositionElement(), -1);
2695    }
2696  }
2697
2698  protected void composeArtifactAssessmentContentComponent(Complex parent, String parentType, String name, ArtifactAssessment.ArtifactAssessmentContentComponent element, int index) {
2699    if (element == null) 
2700      return;
2701    Complex t;
2702    if (Utilities.noString(parentType))
2703      t = parent;
2704    else {
2705      t = parent.predicate("fhir:"+parentType+'.'+name);
2706    }
2707    composeBackboneElement(t, "content", name, element, index);
2708    if (element.hasInformationTypeElement()) {
2709      composeEnum(t, "ArtifactAssessmentContentComponent", "informationType", element.getInformationTypeElement(), -1);
2710    }
2711    if (element.hasSummaryElement()) {
2712      composeMarkdown(t, "ArtifactAssessmentContentComponent", "summary", element.getSummaryElement(), -1);
2713    }
2714    if (element.hasType()) {
2715      composeCodeableConcept(t, "ArtifactAssessmentContentComponent", "type", element.getType(), -1);
2716    }
2717    for (int i = 0; i < element.getClassifier().size(); i++) {
2718      composeCodeableConcept(t, "ArtifactAssessmentContentComponent", "classifier", element.getClassifier().get(i), i);
2719    }
2720    if (element.hasAuthor()) {
2721      composeReference(t, "ArtifactAssessmentContentComponent", "author", element.getAuthor(), -1);
2722    }
2723    for (int i = 0; i < element.getPath().size(); i++) {
2724      composeUri(t, "ArtifactAssessmentContentComponent", "path", element.getPath().get(i), i);
2725    }
2726    for (int i = 0; i < element.getRelatedArtifact().size(); i++) {
2727      composeRelatedArtifact(t, "ArtifactAssessmentContentComponent", "relatedArtifact", element.getRelatedArtifact().get(i), i);
2728    }
2729    if (element.hasFreeToShareElement()) {
2730      composeBoolean(t, "ArtifactAssessmentContentComponent", "freeToShare", element.getFreeToShareElement(), -1);
2731    }
2732    for (int i = 0; i < element.getComponent().size(); i++) {
2733      composeArtifactAssessmentContentComponent(t, "ArtifactAssessmentContentComponent", "component", element.getComponent().get(i), i);
2734    }
2735  }
2736
2737  protected void composeAuditEvent(Complex parent, String parentType, String name, AuditEvent element, int index) {
2738    if (element == null) 
2739      return;
2740    Complex t;
2741    if (Utilities.noString(parentType))
2742      t = parent;
2743    else {
2744      t = parent.predicate("fhir:"+parentType+'.'+name);
2745    }
2746    composeDomainResource(t, "AuditEvent", name, element, index);
2747    for (int i = 0; i < element.getCategory().size(); i++) {
2748      composeCodeableConcept(t, "AuditEvent", "category", element.getCategory().get(i), i);
2749    }
2750    if (element.hasCode()) {
2751      composeCodeableConcept(t, "AuditEvent", "code", element.getCode(), -1);
2752    }
2753    if (element.hasActionElement()) {
2754      composeEnum(t, "AuditEvent", "action", element.getActionElement(), -1);
2755    }
2756    if (element.hasSeverityElement()) {
2757      composeEnum(t, "AuditEvent", "severity", element.getSeverityElement(), -1);
2758    }
2759    if (element.hasOccurred()) {
2760      composeType(t, "AuditEvent", "occurred", element.getOccurred(), -1);
2761    }
2762    if (element.hasRecordedElement()) {
2763      composeInstant(t, "AuditEvent", "recorded", element.getRecordedElement(), -1);
2764    }
2765    if (element.hasOutcome()) {
2766      composeAuditEventOutcomeComponent(t, "AuditEvent", "outcome", element.getOutcome(), -1);
2767    }
2768    for (int i = 0; i < element.getAuthorization().size(); i++) {
2769      composeCodeableConcept(t, "AuditEvent", "authorization", element.getAuthorization().get(i), i);
2770    }
2771    for (int i = 0; i < element.getBasedOn().size(); i++) {
2772      composeReference(t, "AuditEvent", "basedOn", element.getBasedOn().get(i), i);
2773    }
2774    if (element.hasEncounter()) {
2775      composeReference(t, "AuditEvent", "encounter", element.getEncounter(), -1);
2776    }
2777    for (int i = 0; i < element.getAgent().size(); i++) {
2778      composeAuditEventAgentComponent(t, "AuditEvent", "agent", element.getAgent().get(i), i);
2779    }
2780    if (element.hasSource()) {
2781      composeAuditEventSourceComponent(t, "AuditEvent", "source", element.getSource(), -1);
2782    }
2783    for (int i = 0; i < element.getEntity().size(); i++) {
2784      composeAuditEventEntityComponent(t, "AuditEvent", "entity", element.getEntity().get(i), i);
2785    }
2786  }
2787
2788  protected void composeAuditEventOutcomeComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventOutcomeComponent element, int index) {
2789    if (element == null) 
2790      return;
2791    Complex t;
2792    if (Utilities.noString(parentType))
2793      t = parent;
2794    else {
2795      t = parent.predicate("fhir:"+parentType+'.'+name);
2796    }
2797    composeBackboneElement(t, "outcome", name, element, index);
2798    if (element.hasCode()) {
2799      composeCoding(t, "AuditEventOutcomeComponent", "code", element.getCode(), -1);
2800    }
2801    for (int i = 0; i < element.getDetail().size(); i++) {
2802      composeCodeableConcept(t, "AuditEventOutcomeComponent", "detail", element.getDetail().get(i), i);
2803    }
2804  }
2805
2806  protected void composeAuditEventAgentComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentComponent element, int index) {
2807    if (element == null) 
2808      return;
2809    Complex t;
2810    if (Utilities.noString(parentType))
2811      t = parent;
2812    else {
2813      t = parent.predicate("fhir:"+parentType+'.'+name);
2814    }
2815    composeBackboneElement(t, "agent", name, element, index);
2816    if (element.hasType()) {
2817      composeCodeableConcept(t, "AuditEventAgentComponent", "type", element.getType(), -1);
2818    }
2819    for (int i = 0; i < element.getRole().size(); i++) {
2820      composeCodeableConcept(t, "AuditEventAgentComponent", "role", element.getRole().get(i), i);
2821    }
2822    if (element.hasWho()) {
2823      composeReference(t, "AuditEventAgentComponent", "who", element.getWho(), -1);
2824    }
2825    if (element.hasRequestorElement()) {
2826      composeBoolean(t, "AuditEventAgentComponent", "requestor", element.getRequestorElement(), -1);
2827    }
2828    if (element.hasLocation()) {
2829      composeReference(t, "AuditEventAgentComponent", "location", element.getLocation(), -1);
2830    }
2831    for (int i = 0; i < element.getPolicy().size(); i++) {
2832      composeUri(t, "AuditEventAgentComponent", "policy", element.getPolicy().get(i), i);
2833    }
2834    if (element.hasNetwork()) {
2835      composeType(t, "AuditEventAgentComponent", "network", element.getNetwork(), -1);
2836    }
2837    for (int i = 0; i < element.getAuthorization().size(); i++) {
2838      composeCodeableConcept(t, "AuditEventAgentComponent", "authorization", element.getAuthorization().get(i), i);
2839    }
2840  }
2841
2842  protected void composeAuditEventSourceComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventSourceComponent element, int index) {
2843    if (element == null) 
2844      return;
2845    Complex t;
2846    if (Utilities.noString(parentType))
2847      t = parent;
2848    else {
2849      t = parent.predicate("fhir:"+parentType+'.'+name);
2850    }
2851    composeBackboneElement(t, "source", name, element, index);
2852    if (element.hasSite()) {
2853      composeReference(t, "AuditEventSourceComponent", "site", element.getSite(), -1);
2854    }
2855    if (element.hasObserver()) {
2856      composeReference(t, "AuditEventSourceComponent", "observer", element.getObserver(), -1);
2857    }
2858    for (int i = 0; i < element.getType().size(); i++) {
2859      composeCodeableConcept(t, "AuditEventSourceComponent", "type", element.getType().get(i), i);
2860    }
2861  }
2862
2863  protected void composeAuditEventEntityComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityComponent element, int index) {
2864    if (element == null) 
2865      return;
2866    Complex t;
2867    if (Utilities.noString(parentType))
2868      t = parent;
2869    else {
2870      t = parent.predicate("fhir:"+parentType+'.'+name);
2871    }
2872    composeBackboneElement(t, "entity", name, element, index);
2873    if (element.hasWhat()) {
2874      composeReference(t, "AuditEventEntityComponent", "what", element.getWhat(), -1);
2875    }
2876    if (element.hasRole()) {
2877      composeCodeableConcept(t, "AuditEventEntityComponent", "role", element.getRole(), -1);
2878    }
2879    for (int i = 0; i < element.getSecurityLabel().size(); i++) {
2880      composeCodeableConcept(t, "AuditEventEntityComponent", "securityLabel", element.getSecurityLabel().get(i), i);
2881    }
2882    if (element.hasQueryElement()) {
2883      composeBase64Binary(t, "AuditEventEntityComponent", "query", element.getQueryElement(), -1);
2884    }
2885    for (int i = 0; i < element.getDetail().size(); i++) {
2886      composeAuditEventEntityDetailComponent(t, "AuditEventEntityComponent", "detail", element.getDetail().get(i), i);
2887    }
2888    for (int i = 0; i < element.getAgent().size(); i++) {
2889      composeAuditEventAgentComponent(t, "AuditEventEntityComponent", "agent", element.getAgent().get(i), i);
2890    }
2891  }
2892
2893  protected void composeAuditEventEntityDetailComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityDetailComponent element, int index) {
2894    if (element == null) 
2895      return;
2896    Complex t;
2897    if (Utilities.noString(parentType))
2898      t = parent;
2899    else {
2900      t = parent.predicate("fhir:"+parentType+'.'+name);
2901    }
2902    composeBackboneElement(t, "detail", name, element, index);
2903    if (element.hasType()) {
2904      composeCodeableConcept(t, "AuditEventEntityDetailComponent", "type", element.getType(), -1);
2905    }
2906    if (element.hasValue()) {
2907      composeType(t, "AuditEventEntityDetailComponent", "value", element.getValue(), -1);
2908    }
2909  }
2910
2911  protected void composeBasic(Complex parent, String parentType, String name, Basic element, int index) {
2912    if (element == null) 
2913      return;
2914    Complex t;
2915    if (Utilities.noString(parentType))
2916      t = parent;
2917    else {
2918      t = parent.predicate("fhir:"+parentType+'.'+name);
2919    }
2920    composeDomainResource(t, "Basic", name, element, index);
2921    for (int i = 0; i < element.getIdentifier().size(); i++) {
2922      composeIdentifier(t, "Basic", "identifier", element.getIdentifier().get(i), i);
2923    }
2924    if (element.hasCode()) {
2925      composeCodeableConcept(t, "Basic", "code", element.getCode(), -1);
2926    }
2927    if (element.hasSubject()) {
2928      composeReference(t, "Basic", "subject", element.getSubject(), -1);
2929    }
2930    if (element.hasCreatedElement()) {
2931      composeDate(t, "Basic", "created", element.getCreatedElement(), -1);
2932    }
2933    if (element.hasAuthor()) {
2934      composeReference(t, "Basic", "author", element.getAuthor(), -1);
2935    }
2936  }
2937
2938  protected void composeBinary(Complex parent, String parentType, String name, Binary element, int index) {
2939    if (element == null) 
2940      return;
2941    Complex t;
2942    if (Utilities.noString(parentType))
2943      t = parent;
2944    else {
2945      t = parent.predicate("fhir:"+parentType+'.'+name);
2946    }
2947    composeResource(t, "Binary", name, element, index);
2948    if (element.hasContentTypeElement()) {
2949      composeCode(t, "Binary", "contentType", element.getContentTypeElement(), -1);
2950    }
2951    if (element.hasSecurityContext()) {
2952      composeReference(t, "Binary", "securityContext", element.getSecurityContext(), -1);
2953    }
2954    if (element.hasDataElement()) {
2955      composeBase64Binary(t, "Binary", "data", element.getDataElement(), -1);
2956    }
2957  }
2958
2959  protected void composeBiologicallyDerivedProduct(Complex parent, String parentType, String name, BiologicallyDerivedProduct element, int index) {
2960    if (element == null) 
2961      return;
2962    Complex t;
2963    if (Utilities.noString(parentType))
2964      t = parent;
2965    else {
2966      t = parent.predicate("fhir:"+parentType+'.'+name);
2967    }
2968    composeDomainResource(t, "BiologicallyDerivedProduct", name, element, index);
2969    if (element.hasProductCategoryElement()) {
2970      composeEnum(t, "BiologicallyDerivedProduct", "productCategory", element.getProductCategoryElement(), -1);
2971    }
2972    if (element.hasProductCode()) {
2973      composeCodeableConcept(t, "BiologicallyDerivedProduct", "productCode", element.getProductCode(), -1);
2974    }
2975    for (int i = 0; i < element.getParent().size(); i++) {
2976      composeReference(t, "BiologicallyDerivedProduct", "parent", element.getParent().get(i), i);
2977    }
2978    for (int i = 0; i < element.getRequest().size(); i++) {
2979      composeReference(t, "BiologicallyDerivedProduct", "request", element.getRequest().get(i), i);
2980    }
2981    for (int i = 0; i < element.getIdentifier().size(); i++) {
2982      composeIdentifier(t, "BiologicallyDerivedProduct", "identifier", element.getIdentifier().get(i), i);
2983    }
2984    if (element.hasBiologicalSource()) {
2985      composeIdentifier(t, "BiologicallyDerivedProduct", "biologicalSource", element.getBiologicalSource(), -1);
2986    }
2987    for (int i = 0; i < element.getProcessingFacility().size(); i++) {
2988      composeReference(t, "BiologicallyDerivedProduct", "processingFacility", element.getProcessingFacility().get(i), i);
2989    }
2990    if (element.hasDivisionElement()) {
2991      composeString(t, "BiologicallyDerivedProduct", "division", element.getDivisionElement(), -1);
2992    }
2993    if (element.hasStatusElement()) {
2994      composeEnum(t, "BiologicallyDerivedProduct", "status", element.getStatusElement(), -1);
2995    }
2996    if (element.hasExpirationDateElement()) {
2997      composeDateTime(t, "BiologicallyDerivedProduct", "expirationDate", element.getExpirationDateElement(), -1);
2998    }
2999    if (element.hasCollection()) {
3000      composeBiologicallyDerivedProductCollectionComponent(t, "BiologicallyDerivedProduct", "collection", element.getCollection(), -1);
3001    }
3002    if (element.hasStorageTempRequirements()) {
3003      composeRange(t, "BiologicallyDerivedProduct", "storageTempRequirements", element.getStorageTempRequirements(), -1);
3004    }
3005    for (int i = 0; i < element.getProperty().size(); i++) {
3006      composeBiologicallyDerivedProductPropertyComponent(t, "BiologicallyDerivedProduct", "property", element.getProperty().get(i), i);
3007    }
3008  }
3009
3010  protected void composeBiologicallyDerivedProductCollectionComponent(Complex parent, String parentType, String name, BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element, int index) {
3011    if (element == null) 
3012      return;
3013    Complex t;
3014    if (Utilities.noString(parentType))
3015      t = parent;
3016    else {
3017      t = parent.predicate("fhir:"+parentType+'.'+name);
3018    }
3019    composeBackboneElement(t, "collection", name, element, index);
3020    if (element.hasCollector()) {
3021      composeReference(t, "BiologicallyDerivedProductCollectionComponent", "collector", element.getCollector(), -1);
3022    }
3023    if (element.hasSource()) {
3024      composeReference(t, "BiologicallyDerivedProductCollectionComponent", "source", element.getSource(), -1);
3025    }
3026    if (element.hasCollected()) {
3027      composeType(t, "BiologicallyDerivedProductCollectionComponent", "collected", element.getCollected(), -1);
3028    }
3029  }
3030
3031  protected void composeBiologicallyDerivedProductPropertyComponent(Complex parent, String parentType, String name, BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent element, int index) {
3032    if (element == null) 
3033      return;
3034    Complex t;
3035    if (Utilities.noString(parentType))
3036      t = parent;
3037    else {
3038      t = parent.predicate("fhir:"+parentType+'.'+name);
3039    }
3040    composeBackboneElement(t, "property", name, element, index);
3041    if (element.hasType()) {
3042      composeCodeableConcept(t, "BiologicallyDerivedProductPropertyComponent", "type", element.getType(), -1);
3043    }
3044    if (element.hasValue()) {
3045      composeType(t, "BiologicallyDerivedProductPropertyComponent", "value", element.getValue(), -1);
3046    }
3047  }
3048
3049  protected void composeBodyStructure(Complex parent, String parentType, String name, BodyStructure element, int index) {
3050    if (element == null) 
3051      return;
3052    Complex t;
3053    if (Utilities.noString(parentType))
3054      t = parent;
3055    else {
3056      t = parent.predicate("fhir:"+parentType+'.'+name);
3057    }
3058    composeDomainResource(t, "BodyStructure", name, element, index);
3059    for (int i = 0; i < element.getIdentifier().size(); i++) {
3060      composeIdentifier(t, "BodyStructure", "identifier", element.getIdentifier().get(i), i);
3061    }
3062    if (element.hasActiveElement()) {
3063      composeBoolean(t, "BodyStructure", "active", element.getActiveElement(), -1);
3064    }
3065    if (element.hasMorphology()) {
3066      composeCodeableConcept(t, "BodyStructure", "morphology", element.getMorphology(), -1);
3067    }
3068    if (element.hasLocation()) {
3069      composeCodeableConcept(t, "BodyStructure", "location", element.getLocation(), -1);
3070    }
3071    for (int i = 0; i < element.getIncludedStructure().size(); i++) {
3072      composeBodyStructureIncludedStructureComponent(t, "BodyStructure", "includedStructure", element.getIncludedStructure().get(i), i);
3073    }
3074    for (int i = 0; i < element.getExcludedStructure().size(); i++) {
3075      composeBodyStructureExcludedStructureComponent(t, "BodyStructure", "excludedStructure", element.getExcludedStructure().get(i), i);
3076    }
3077    if (element.hasDescriptionElement()) {
3078      composeString(t, "BodyStructure", "description", element.getDescriptionElement(), -1);
3079    }
3080    for (int i = 0; i < element.getImage().size(); i++) {
3081      composeAttachment(t, "BodyStructure", "image", element.getImage().get(i), i);
3082    }
3083    if (element.hasPatient()) {
3084      composeReference(t, "BodyStructure", "patient", element.getPatient(), -1);
3085    }
3086  }
3087
3088  protected void composeBodyStructureIncludedStructureComponent(Complex parent, String parentType, String name, BodyStructure.BodyStructureIncludedStructureComponent element, int index) {
3089    if (element == null) 
3090      return;
3091    Complex t;
3092    if (Utilities.noString(parentType))
3093      t = parent;
3094    else {
3095      t = parent.predicate("fhir:"+parentType+'.'+name);
3096    }
3097    composeBackboneElement(t, "includedStructure", name, element, index);
3098    if (element.hasStructure()) {
3099      composeCodeableConcept(t, "BodyStructureIncludedStructureComponent", "structure", element.getStructure(), -1);
3100    }
3101    if (element.hasLaterality()) {
3102      composeCodeableConcept(t, "BodyStructureIncludedStructureComponent", "laterality", element.getLaterality(), -1);
3103    }
3104    for (int i = 0; i < element.getQualifier().size(); i++) {
3105      composeCodeableConcept(t, "BodyStructureIncludedStructureComponent", "qualifier", element.getQualifier().get(i), i);
3106    }
3107  }
3108
3109  protected void composeBodyStructureExcludedStructureComponent(Complex parent, String parentType, String name, BodyStructure.BodyStructureExcludedStructureComponent element, int index) {
3110    if (element == null) 
3111      return;
3112    Complex t;
3113    if (Utilities.noString(parentType))
3114      t = parent;
3115    else {
3116      t = parent.predicate("fhir:"+parentType+'.'+name);
3117    }
3118    composeBackboneElement(t, "excludedStructure", name, element, index);
3119    if (element.hasStructure()) {
3120      composeCodeableConcept(t, "BodyStructureExcludedStructureComponent", "structure", element.getStructure(), -1);
3121    }
3122    if (element.hasLaterality()) {
3123      composeCodeableConcept(t, "BodyStructureExcludedStructureComponent", "laterality", element.getLaterality(), -1);
3124    }
3125    for (int i = 0; i < element.getQualifier().size(); i++) {
3126      composeCodeableConcept(t, "BodyStructureExcludedStructureComponent", "qualifier", element.getQualifier().get(i), i);
3127    }
3128  }
3129
3130  protected void composeBundle(Complex parent, String parentType, String name, Bundle element, int index) {
3131    if (element == null) 
3132      return;
3133    Complex t;
3134    if (Utilities.noString(parentType))
3135      t = parent;
3136    else {
3137      t = parent.predicate("fhir:"+parentType+'.'+name);
3138    }
3139    composeResource(t, "Bundle", name, element, index);
3140    if (element.hasIdentifier()) {
3141      composeIdentifier(t, "Bundle", "identifier", element.getIdentifier(), -1);
3142    }
3143    if (element.hasTypeElement()) {
3144      composeEnum(t, "Bundle", "type", element.getTypeElement(), -1);
3145    }
3146    if (element.hasTimestampElement()) {
3147      composeInstant(t, "Bundle", "timestamp", element.getTimestampElement(), -1);
3148    }
3149    if (element.hasTotalElement()) {
3150      composeUnsignedInt(t, "Bundle", "total", element.getTotalElement(), -1);
3151    }
3152    for (int i = 0; i < element.getLink().size(); i++) {
3153      composeBundleLinkComponent(t, "Bundle", "link", element.getLink().get(i), i);
3154    }
3155    for (int i = 0; i < element.getEntry().size(); i++) {
3156      composeBundleEntryComponent(t, "Bundle", "entry", element.getEntry().get(i), i);
3157    }
3158    if (element.hasSignature()) {
3159      composeSignature(t, "Bundle", "signature", element.getSignature(), -1);
3160    }
3161  }
3162
3163  protected void composeBundleLinkComponent(Complex parent, String parentType, String name, Bundle.BundleLinkComponent element, int index) {
3164    if (element == null) 
3165      return;
3166    Complex t;
3167    if (Utilities.noString(parentType))
3168      t = parent;
3169    else {
3170      t = parent.predicate("fhir:"+parentType+'.'+name);
3171    }
3172    composeBackboneElement(t, "link", name, element, index);
3173    if (element.hasRelationElement()) {
3174      composeString(t, "BundleLinkComponent", "relation", element.getRelationElement(), -1);
3175    }
3176    if (element.hasUrlElement()) {
3177      composeUri(t, "BundleLinkComponent", "url", element.getUrlElement(), -1);
3178    }
3179  }
3180
3181  protected void composeBundleEntryComponent(Complex parent, String parentType, String name, Bundle.BundleEntryComponent element, int index) {
3182    if (element == null) 
3183      return;
3184    Complex t;
3185    if (Utilities.noString(parentType))
3186      t = parent;
3187    else {
3188      t = parent.predicate("fhir:"+parentType+'.'+name);
3189    }
3190    composeBackboneElement(t, "entry", name, element, index);
3191    for (int i = 0; i < element.getLink().size(); i++) {
3192      composeBundleLinkComponent(t, "BundleEntryComponent", "link", element.getLink().get(i), i);
3193    }
3194    if (element.hasFullUrlElement()) {
3195      composeUri(t, "BundleEntryComponent", "fullUrl", element.getFullUrlElement(), -1);
3196    }
3197    if (element.hasResource()) {
3198      composeResource(t, "BundleEntryComponent", "resource", element.getResource(), -1);
3199    }
3200    if (element.hasSearch()) {
3201      composeBundleEntrySearchComponent(t, "BundleEntryComponent", "search", element.getSearch(), -1);
3202    }
3203    if (element.hasRequest()) {
3204      composeBundleEntryRequestComponent(t, "BundleEntryComponent", "request", element.getRequest(), -1);
3205    }
3206    if (element.hasResponse()) {
3207      composeBundleEntryResponseComponent(t, "BundleEntryComponent", "response", element.getResponse(), -1);
3208    }
3209  }
3210
3211  protected void composeBundleEntrySearchComponent(Complex parent, String parentType, String name, Bundle.BundleEntrySearchComponent element, int index) {
3212    if (element == null) 
3213      return;
3214    Complex t;
3215    if (Utilities.noString(parentType))
3216      t = parent;
3217    else {
3218      t = parent.predicate("fhir:"+parentType+'.'+name);
3219    }
3220    composeBackboneElement(t, "search", name, element, index);
3221    if (element.hasModeElement()) {
3222      composeEnum(t, "BundleEntrySearchComponent", "mode", element.getModeElement(), -1);
3223    }
3224    if (element.hasScoreElement()) {
3225      composeDecimal(t, "BundleEntrySearchComponent", "score", element.getScoreElement(), -1);
3226    }
3227  }
3228
3229  protected void composeBundleEntryRequestComponent(Complex parent, String parentType, String name, Bundle.BundleEntryRequestComponent element, int index) {
3230    if (element == null) 
3231      return;
3232    Complex t;
3233    if (Utilities.noString(parentType))
3234      t = parent;
3235    else {
3236      t = parent.predicate("fhir:"+parentType+'.'+name);
3237    }
3238    composeBackboneElement(t, "request", name, element, index);
3239    if (element.hasMethodElement()) {
3240      composeEnum(t, "BundleEntryRequestComponent", "method", element.getMethodElement(), -1);
3241    }
3242    if (element.hasUrlElement()) {
3243      composeUri(t, "BundleEntryRequestComponent", "url", element.getUrlElement(), -1);
3244    }
3245    if (element.hasIfNoneMatchElement()) {
3246      composeString(t, "BundleEntryRequestComponent", "ifNoneMatch", element.getIfNoneMatchElement(), -1);
3247    }
3248    if (element.hasIfModifiedSinceElement()) {
3249      composeInstant(t, "BundleEntryRequestComponent", "ifModifiedSince", element.getIfModifiedSinceElement(), -1);
3250    }
3251    if (element.hasIfMatchElement()) {
3252      composeString(t, "BundleEntryRequestComponent", "ifMatch", element.getIfMatchElement(), -1);
3253    }
3254    if (element.hasIfNoneExistElement()) {
3255      composeString(t, "BundleEntryRequestComponent", "ifNoneExist", element.getIfNoneExistElement(), -1);
3256    }
3257  }
3258
3259  protected void composeBundleEntryResponseComponent(Complex parent, String parentType, String name, Bundle.BundleEntryResponseComponent element, int index) {
3260    if (element == null) 
3261      return;
3262    Complex t;
3263    if (Utilities.noString(parentType))
3264      t = parent;
3265    else {
3266      t = parent.predicate("fhir:"+parentType+'.'+name);
3267    }
3268    composeBackboneElement(t, "response", name, element, index);
3269    if (element.hasStatusElement()) {
3270      composeString(t, "BundleEntryResponseComponent", "status", element.getStatusElement(), -1);
3271    }
3272    if (element.hasLocationElement()) {
3273      composeUri(t, "BundleEntryResponseComponent", "location", element.getLocationElement(), -1);
3274    }
3275    if (element.hasEtagElement()) {
3276      composeString(t, "BundleEntryResponseComponent", "etag", element.getEtagElement(), -1);
3277    }
3278    if (element.hasLastModifiedElement()) {
3279      composeInstant(t, "BundleEntryResponseComponent", "lastModified", element.getLastModifiedElement(), -1);
3280    }
3281    if (element.hasOutcome()) {
3282      composeResource(t, "BundleEntryResponseComponent", "outcome", element.getOutcome(), -1);
3283    }
3284  }
3285
3286  protected void composeCapabilityStatement(Complex parent, String parentType, String name, CapabilityStatement element, int index) {
3287    if (element == null) 
3288      return;
3289    Complex t;
3290    if (Utilities.noString(parentType))
3291      t = parent;
3292    else {
3293      t = parent.predicate("fhir:"+parentType+'.'+name);
3294    }
3295    composeCanonicalResource(t, "CapabilityStatement", name, element, index);
3296    if (element.hasUrlElement()) {
3297      composeUri(t, "CapabilityStatement", "url", element.getUrlElement(), -1);
3298    }
3299    if (element.hasVersionElement()) {
3300      composeString(t, "CapabilityStatement", "version", element.getVersionElement(), -1);
3301    }
3302    if (element.hasNameElement()) {
3303      composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1);
3304    }
3305    if (element.hasTitleElement()) {
3306      composeString(t, "CapabilityStatement", "title", element.getTitleElement(), -1);
3307    }
3308    if (element.hasStatusElement()) {
3309      composeEnum(t, "CapabilityStatement", "status", element.getStatusElement(), -1);
3310    }
3311    if (element.hasExperimentalElement()) {
3312      composeBoolean(t, "CapabilityStatement", "experimental", element.getExperimentalElement(), -1);
3313    }
3314    if (element.hasDateElement()) {
3315      composeDateTime(t, "CapabilityStatement", "date", element.getDateElement(), -1);
3316    }
3317    if (element.hasPublisherElement()) {
3318      composeString(t, "CapabilityStatement", "publisher", element.getPublisherElement(), -1);
3319    }
3320    for (int i = 0; i < element.getContact().size(); i++) {
3321      composeContactDetail(t, "CapabilityStatement", "contact", element.getContact().get(i), i);
3322    }
3323    if (element.hasDescriptionElement()) {
3324      composeMarkdown(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1);
3325    }
3326    for (int i = 0; i < element.getUseContext().size(); i++) {
3327      composeUsageContext(t, "CapabilityStatement", "useContext", element.getUseContext().get(i), i);
3328    }
3329    for (int i = 0; i < element.getJurisdiction().size(); i++) {
3330      composeCodeableConcept(t, "CapabilityStatement", "jurisdiction", element.getJurisdiction().get(i), i);
3331    }
3332    if (element.hasPurposeElement()) {
3333      composeMarkdown(t, "CapabilityStatement", "purpose", element.getPurposeElement(), -1);
3334    }
3335    if (element.hasCopyrightElement()) {
3336      composeMarkdown(t, "CapabilityStatement", "copyright", element.getCopyrightElement(), -1);
3337    }
3338    if (element.hasKindElement()) {
3339      composeEnum(t, "CapabilityStatement", "kind", element.getKindElement(), -1);
3340    }
3341    for (int i = 0; i < element.getInstantiates().size(); i++) {
3342      composeCanonical(t, "CapabilityStatement", "instantiates", element.getInstantiates().get(i), i);
3343    }
3344    for (int i = 0; i < element.getImports().size(); i++) {
3345      composeCanonical(t, "CapabilityStatement", "imports", element.getImports().get(i), i);
3346    }
3347    if (element.hasSoftware()) {
3348      composeCapabilityStatementSoftwareComponent(t, "CapabilityStatement", "software", element.getSoftware(), -1);
3349    }
3350    if (element.hasImplementation()) {
3351      composeCapabilityStatementImplementationComponent(t, "CapabilityStatement", "implementation", element.getImplementation(), -1);
3352    }
3353    if (element.hasFhirVersionElement()) {
3354      composeEnum(t, "CapabilityStatement", "fhirVersion", element.getFhirVersionElement(), -1);
3355    }
3356    for (int i = 0; i < element.getFormat().size(); i++) {
3357      composeCode(t, "CapabilityStatement", "format", element.getFormat().get(i), i);
3358    }
3359    for (int i = 0; i < element.getPatchFormat().size(); i++) {
3360      composeCode(t, "CapabilityStatement", "patchFormat", element.getPatchFormat().get(i), i);
3361    }
3362    for (int i = 0; i < element.getImplementationGuide().size(); i++) {
3363      composeCanonical(t, "CapabilityStatement", "implementationGuide", element.getImplementationGuide().get(i), i);
3364    }
3365    for (int i = 0; i < element.getRest().size(); i++) {
3366      composeCapabilityStatementRestComponent(t, "CapabilityStatement", "rest", element.getRest().get(i), i);
3367    }
3368    for (int i = 0; i < element.getMessaging().size(); i++) {
3369      composeCapabilityStatementMessagingComponent(t, "CapabilityStatement", "messaging", element.getMessaging().get(i), i);
3370    }
3371    for (int i = 0; i < element.getDocument().size(); i++) {
3372      composeCapabilityStatementDocumentComponent(t, "CapabilityStatement", "document", element.getDocument().get(i), i);
3373    }
3374  }
3375
3376  protected void composeCapabilityStatementSoftwareComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementSoftwareComponent element, int index) {
3377    if (element == null) 
3378      return;
3379    Complex t;
3380    if (Utilities.noString(parentType))
3381      t = parent;
3382    else {
3383      t = parent.predicate("fhir:"+parentType+'.'+name);
3384    }
3385    composeBackboneElement(t, "software", name, element, index);
3386    if (element.hasNameElement()) {
3387      composeString(t, "CapabilityStatementSoftwareComponent", "name", element.getNameElement(), -1);
3388    }
3389    if (element.hasVersionElement()) {
3390      composeString(t, "CapabilityStatementSoftwareComponent", "version", element.getVersionElement(), -1);
3391    }
3392    if (element.hasReleaseDateElement()) {
3393      composeDateTime(t, "CapabilityStatementSoftwareComponent", "releaseDate", element.getReleaseDateElement(), -1);
3394    }
3395  }
3396
3397  protected void composeCapabilityStatementImplementationComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementImplementationComponent element, int index) {
3398    if (element == null) 
3399      return;
3400    Complex t;
3401    if (Utilities.noString(parentType))
3402      t = parent;
3403    else {
3404      t = parent.predicate("fhir:"+parentType+'.'+name);
3405    }
3406    composeBackboneElement(t, "implementation", name, element, index);
3407    if (element.hasDescriptionElement()) {
3408      composeString(t, "CapabilityStatementImplementationComponent", "description", element.getDescriptionElement(), -1);
3409    }
3410    if (element.hasUrlElement()) {
3411      composeUrl(t, "CapabilityStatementImplementationComponent", "url", element.getUrlElement(), -1);
3412    }
3413    if (element.hasCustodian()) {
3414      composeReference(t, "CapabilityStatementImplementationComponent", "custodian", element.getCustodian(), -1);
3415    }
3416  }
3417
3418  protected void composeCapabilityStatementRestComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestComponent element, int index) {
3419    if (element == null) 
3420      return;
3421    Complex t;
3422    if (Utilities.noString(parentType))
3423      t = parent;
3424    else {
3425      t = parent.predicate("fhir:"+parentType+'.'+name);
3426    }
3427    composeBackboneElement(t, "rest", name, element, index);
3428    if (element.hasModeElement()) {
3429      composeEnum(t, "CapabilityStatementRestComponent", "mode", element.getModeElement(), -1);
3430    }
3431    if (element.hasDocumentationElement()) {
3432      composeMarkdown(t, "CapabilityStatementRestComponent", "documentation", element.getDocumentationElement(), -1);
3433    }
3434    if (element.hasSecurity()) {
3435      composeCapabilityStatementRestSecurityComponent(t, "CapabilityStatementRestComponent", "security", element.getSecurity(), -1);
3436    }
3437    for (int i = 0; i < element.getResource().size(); i++) {
3438      composeCapabilityStatementRestResourceComponent(t, "CapabilityStatementRestComponent", "resource", element.getResource().get(i), i);
3439    }
3440    for (int i = 0; i < element.getInteraction().size(); i++) {
3441      composeCapabilityStatementSystemInteractionComponent(t, "CapabilityStatementRestComponent", "interaction", element.getInteraction().get(i), i);
3442    }
3443    for (int i = 0; i < element.getSearchParam().size(); i++) {
3444      composeCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatementRestComponent", "searchParam", element.getSearchParam().get(i), i);
3445    }
3446    for (int i = 0; i < element.getOperation().size(); i++) {
3447      composeCapabilityStatementRestResourceOperationComponent(t, "CapabilityStatementRestComponent", "operation", element.getOperation().get(i), i);
3448    }
3449    for (int i = 0; i < element.getCompartment().size(); i++) {
3450      composeCanonical(t, "CapabilityStatementRestComponent", "compartment", element.getCompartment().get(i), i);
3451    }
3452  }
3453
3454  protected void composeCapabilityStatementRestSecurityComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element, int index) {
3455    if (element == null) 
3456      return;
3457    Complex t;
3458    if (Utilities.noString(parentType))
3459      t = parent;
3460    else {
3461      t = parent.predicate("fhir:"+parentType+'.'+name);
3462    }
3463    composeBackboneElement(t, "security", name, element, index);
3464    if (element.hasCorsElement()) {
3465      composeBoolean(t, "CapabilityStatementRestSecurityComponent", "cors", element.getCorsElement(), -1);
3466    }
3467    for (int i = 0; i < element.getService().size(); i++) {
3468      composeCodeableConcept(t, "CapabilityStatementRestSecurityComponent", "service", element.getService().get(i), i);
3469    }
3470    if (element.hasDescriptionElement()) {
3471      composeMarkdown(t, "CapabilityStatementRestSecurityComponent", "description", element.getDescriptionElement(), -1);
3472    }
3473  }
3474
3475  protected void composeCapabilityStatementRestResourceComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceComponent element, int index) {
3476    if (element == null) 
3477      return;
3478    Complex t;
3479    if (Utilities.noString(parentType))
3480      t = parent;
3481    else {
3482      t = parent.predicate("fhir:"+parentType+'.'+name);
3483    }
3484    composeBackboneElement(t, "resource", name, element, index);
3485    if (element.hasTypeElement()) {
3486      composeCode(t, "CapabilityStatementRestResourceComponent", "type", element.getTypeElement(), -1);
3487    }
3488    if (element.hasProfileElement()) {
3489      composeCanonical(t, "CapabilityStatementRestResourceComponent", "profile", element.getProfileElement(), -1);
3490    }
3491    for (int i = 0; i < element.getSupportedProfile().size(); i++) {
3492      composeCanonical(t, "CapabilityStatementRestResourceComponent", "supportedProfile", element.getSupportedProfile().get(i), i);
3493    }
3494    if (element.hasDocumentationElement()) {
3495      composeMarkdown(t, "CapabilityStatementRestResourceComponent", "documentation", element.getDocumentationElement(), -1);
3496    }
3497    for (int i = 0; i < element.getInteraction().size(); i++) {
3498      composeCapabilityStatementResourceInteractionComponent(t, "CapabilityStatementRestResourceComponent", "interaction", element.getInteraction().get(i), i);
3499    }
3500    if (element.hasVersioningElement()) {
3501      composeEnum(t, "CapabilityStatementRestResourceComponent", "versioning", element.getVersioningElement(), -1);
3502    }
3503    if (element.hasReadHistoryElement()) {
3504      composeBoolean(t, "CapabilityStatementRestResourceComponent", "readHistory", element.getReadHistoryElement(), -1);
3505    }
3506    if (element.hasUpdateCreateElement()) {
3507      composeBoolean(t, "CapabilityStatementRestResourceComponent", "updateCreate", element.getUpdateCreateElement(), -1);
3508    }
3509    if (element.hasConditionalCreateElement()) {
3510      composeBoolean(t, "CapabilityStatementRestResourceComponent", "conditionalCreate", element.getConditionalCreateElement(), -1);
3511    }
3512    if (element.hasConditionalReadElement()) {
3513      composeEnum(t, "CapabilityStatementRestResourceComponent", "conditionalRead", element.getConditionalReadElement(), -1);
3514    }
3515    if (element.hasConditionalUpdateElement()) {
3516      composeBoolean(t, "CapabilityStatementRestResourceComponent", "conditionalUpdate", element.getConditionalUpdateElement(), -1);
3517    }
3518    if (element.hasConditionalDeleteElement()) {
3519      composeEnum(t, "CapabilityStatementRestResourceComponent", "conditionalDelete", element.getConditionalDeleteElement(), -1);
3520    }
3521    for (int i = 0; i < element.getReferencePolicy().size(); i++) {
3522      composeEnum(t, "CapabilityStatementRestResourceComponent", "referencePolicy", element.getReferencePolicy().get(i), i);
3523    }
3524    for (int i = 0; i < element.getSearchInclude().size(); i++) {
3525      composeString(t, "CapabilityStatementRestResourceComponent", "searchInclude", element.getSearchInclude().get(i), i);
3526    }
3527    for (int i = 0; i < element.getSearchRevInclude().size(); i++) {
3528      composeString(t, "CapabilityStatementRestResourceComponent", "searchRevInclude", element.getSearchRevInclude().get(i), i);
3529    }
3530    for (int i = 0; i < element.getSearchParam().size(); i++) {
3531      composeCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatementRestResourceComponent", "searchParam", element.getSearchParam().get(i), i);
3532    }
3533    for (int i = 0; i < element.getOperation().size(); i++) {
3534      composeCapabilityStatementRestResourceOperationComponent(t, "CapabilityStatementRestResourceComponent", "operation", element.getOperation().get(i), i);
3535    }
3536  }
3537
3538  protected void composeCapabilityStatementResourceInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement.ResourceInteractionComponent element, int index) {
3539    if (element == null) 
3540      return;
3541    Complex t;
3542    if (Utilities.noString(parentType))
3543      t = parent;
3544    else {
3545      t = parent.predicate("fhir:"+parentType+'.'+name);
3546    }
3547    composeBackboneElement(t, "interaction", name, element, index);
3548    if (element.hasCodeElement()) {
3549      composeEnum(t, "ResourceInteractionComponent", "code", element.getCodeElement(), -1);
3550    }
3551    if (element.hasDocumentationElement()) {
3552      composeMarkdown(t, "ResourceInteractionComponent", "documentation", element.getDocumentationElement(), -1);
3553    }
3554  }
3555
3556  protected void composeCapabilityStatementRestResourceSearchParamComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element, int index) {
3557    if (element == null) 
3558      return;
3559    Complex t;
3560    if (Utilities.noString(parentType))
3561      t = parent;
3562    else {
3563      t = parent.predicate("fhir:"+parentType+'.'+name);
3564    }
3565    composeBackboneElement(t, "searchParam", name, element, index);
3566    if (element.hasNameElement()) {
3567      composeString(t, "CapabilityStatementRestResourceSearchParamComponent", "name", element.getNameElement(), -1);
3568    }
3569    if (element.hasDefinitionElement()) {
3570      composeCanonical(t, "CapabilityStatementRestResourceSearchParamComponent", "definition", element.getDefinitionElement(), -1);
3571    }
3572    if (element.hasTypeElement()) {
3573      composeEnum(t, "CapabilityStatementRestResourceSearchParamComponent", "type", element.getTypeElement(), -1);
3574    }
3575    if (element.hasDocumentationElement()) {
3576      composeMarkdown(t, "CapabilityStatementRestResourceSearchParamComponent", "documentation", element.getDocumentationElement(), -1);
3577    }
3578  }
3579
3580  protected void composeCapabilityStatementRestResourceOperationComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceOperationComponent element, int index) {
3581    if (element == null) 
3582      return;
3583    Complex t;
3584    if (Utilities.noString(parentType))
3585      t = parent;
3586    else {
3587      t = parent.predicate("fhir:"+parentType+'.'+name);
3588    }
3589    composeBackboneElement(t, "operation", name, element, index);
3590    if (element.hasNameElement()) {
3591      composeString(t, "CapabilityStatementRestResourceOperationComponent", "name", element.getNameElement(), -1);
3592    }
3593    if (element.hasDefinitionElement()) {
3594      composeCanonical(t, "CapabilityStatementRestResourceOperationComponent", "definition", element.getDefinitionElement(), -1);
3595    }
3596    if (element.hasDocumentationElement()) {
3597      composeMarkdown(t, "CapabilityStatementRestResourceOperationComponent", "documentation", element.getDocumentationElement(), -1);
3598    }
3599  }
3600
3601  protected void composeCapabilityStatementSystemInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement.SystemInteractionComponent element, int index) {
3602    if (element == null) 
3603      return;
3604    Complex t;
3605    if (Utilities.noString(parentType))
3606      t = parent;
3607    else {
3608      t = parent.predicate("fhir:"+parentType+'.'+name);
3609    }
3610    composeBackboneElement(t, "interaction", name, element, index);
3611    if (element.hasCodeElement()) {
3612      composeEnum(t, "SystemInteractionComponent", "code", element.getCodeElement(), -1);
3613    }
3614    if (element.hasDocumentationElement()) {
3615      composeMarkdown(t, "SystemInteractionComponent", "documentation", element.getDocumentationElement(), -1);
3616    }
3617  }
3618
3619  protected void composeCapabilityStatementMessagingComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingComponent element, int index) {
3620    if (element == null) 
3621      return;
3622    Complex t;
3623    if (Utilities.noString(parentType))
3624      t = parent;
3625    else {
3626      t = parent.predicate("fhir:"+parentType+'.'+name);
3627    }
3628    composeBackboneElement(t, "messaging", name, element, index);
3629    for (int i = 0; i < element.getEndpoint().size(); i++) {
3630      composeCapabilityStatementMessagingEndpointComponent(t, "CapabilityStatementMessagingComponent", "endpoint", element.getEndpoint().get(i), i);
3631    }
3632    if (element.hasReliableCacheElement()) {
3633      composeUnsignedInt(t, "CapabilityStatementMessagingComponent", "reliableCache", element.getReliableCacheElement(), -1);
3634    }
3635    if (element.hasDocumentationElement()) {
3636      composeMarkdown(t, "CapabilityStatementMessagingComponent", "documentation", element.getDocumentationElement(), -1);
3637    }
3638    for (int i = 0; i < element.getSupportedMessage().size(); i++) {
3639      composeCapabilityStatementMessagingSupportedMessageComponent(t, "CapabilityStatementMessagingComponent", "supportedMessage", element.getSupportedMessage().get(i), i);
3640    }
3641  }
3642
3643  protected void composeCapabilityStatementMessagingEndpointComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element, int index) {
3644    if (element == null) 
3645      return;
3646    Complex t;
3647    if (Utilities.noString(parentType))
3648      t = parent;
3649    else {
3650      t = parent.predicate("fhir:"+parentType+'.'+name);
3651    }
3652    composeBackboneElement(t, "endpoint", name, element, index);
3653    if (element.hasProtocol()) {
3654      composeCoding(t, "CapabilityStatementMessagingEndpointComponent", "protocol", element.getProtocol(), -1);
3655    }
3656    if (element.hasAddressElement()) {
3657      composeUrl(t, "CapabilityStatementMessagingEndpointComponent", "address", element.getAddressElement(), -1);
3658    }
3659  }
3660
3661  protected void composeCapabilityStatementMessagingSupportedMessageComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element, int index) {
3662    if (element == null) 
3663      return;
3664    Complex t;
3665    if (Utilities.noString(parentType))
3666      t = parent;
3667    else {
3668      t = parent.predicate("fhir:"+parentType+'.'+name);
3669    }
3670    composeBackboneElement(t, "supportedMessage", name, element, index);
3671    if (element.hasModeElement()) {
3672      composeEnum(t, "CapabilityStatementMessagingSupportedMessageComponent", "mode", element.getModeElement(), -1);
3673    }
3674    if (element.hasDefinitionElement()) {
3675      composeCanonical(t, "CapabilityStatementMessagingSupportedMessageComponent", "definition", element.getDefinitionElement(), -1);
3676    }
3677  }
3678
3679  protected void composeCapabilityStatementDocumentComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementDocumentComponent element, int index) {
3680    if (element == null) 
3681      return;
3682    Complex t;
3683    if (Utilities.noString(parentType))
3684      t = parent;
3685    else {
3686      t = parent.predicate("fhir:"+parentType+'.'+name);
3687    }
3688    composeBackboneElement(t, "document", name, element, index);
3689    if (element.hasModeElement()) {
3690      composeEnum(t, "CapabilityStatementDocumentComponent", "mode", element.getModeElement(), -1);
3691    }
3692    if (element.hasDocumentationElement()) {
3693      composeMarkdown(t, "CapabilityStatementDocumentComponent", "documentation", element.getDocumentationElement(), -1);
3694    }
3695    if (element.hasProfileElement()) {
3696      composeCanonical(t, "CapabilityStatementDocumentComponent", "profile", element.getProfileElement(), -1);
3697    }
3698  }
3699
3700  protected void composeCapabilityStatement2(Complex parent, String parentType, String name, CapabilityStatement2 element, int index) {
3701    if (element == null) 
3702      return;
3703    Complex t;
3704    if (Utilities.noString(parentType))
3705      t = parent;
3706    else {
3707      t = parent.predicate("fhir:"+parentType+'.'+name);
3708    }
3709    composeCanonicalResource(t, "CapabilityStatement2", name, element, index);
3710    if (element.hasUrlElement()) {
3711      composeUri(t, "CapabilityStatement2", "url", element.getUrlElement(), -1);
3712    }
3713    if (element.hasVersionElement()) {
3714      composeString(t, "CapabilityStatement2", "version", element.getVersionElement(), -1);
3715    }
3716    if (element.hasNameElement()) {
3717      composeString(t, "CapabilityStatement2", "name", element.getNameElement(), -1);
3718    }
3719    if (element.hasTitleElement()) {
3720      composeString(t, "CapabilityStatement2", "title", element.getTitleElement(), -1);
3721    }
3722    if (element.hasStatusElement()) {
3723      composeEnum(t, "CapabilityStatement2", "status", element.getStatusElement(), -1);
3724    }
3725    if (element.hasExperimentalElement()) {
3726      composeBoolean(t, "CapabilityStatement2", "experimental", element.getExperimentalElement(), -1);
3727    }
3728    if (element.hasDateElement()) {
3729      composeDateTime(t, "CapabilityStatement2", "date", element.getDateElement(), -1);
3730    }
3731    if (element.hasPublisherElement()) {
3732      composeString(t, "CapabilityStatement2", "publisher", element.getPublisherElement(), -1);
3733    }
3734    for (int i = 0; i < element.getContact().size(); i++) {
3735      composeContactDetail(t, "CapabilityStatement2", "contact", element.getContact().get(i), i);
3736    }
3737    if (element.hasDescriptionElement()) {
3738      composeMarkdown(t, "CapabilityStatement2", "description", element.getDescriptionElement(), -1);
3739    }
3740    for (int i = 0; i < element.getUseContext().size(); i++) {
3741      composeUsageContext(t, "CapabilityStatement2", "useContext", element.getUseContext().get(i), i);
3742    }
3743    for (int i = 0; i < element.getJurisdiction().size(); i++) {
3744      composeCodeableConcept(t, "CapabilityStatement2", "jurisdiction", element.getJurisdiction().get(i), i);
3745    }
3746    if (element.hasPurposeElement()) {
3747      composeMarkdown(t, "CapabilityStatement2", "purpose", element.getPurposeElement(), -1);
3748    }
3749    if (element.hasCopyrightElement()) {
3750      composeMarkdown(t, "CapabilityStatement2", "copyright", element.getCopyrightElement(), -1);
3751    }
3752    if (element.hasKindElement()) {
3753      composeEnum(t, "CapabilityStatement2", "kind", element.getKindElement(), -1);
3754    }
3755    for (int i = 0; i < element.getInstantiates().size(); i++) {
3756      composeCanonical(t, "CapabilityStatement2", "instantiates", element.getInstantiates().get(i), i);
3757    }
3758    for (int i = 0; i < element.getImports().size(); i++) {
3759      composeCanonical(t, "CapabilityStatement2", "imports", element.getImports().get(i), i);
3760    }
3761    if (element.hasSoftware()) {
3762      composeCapabilityStatement2SoftwareComponent(t, "CapabilityStatement2", "software", element.getSoftware(), -1);
3763    }
3764    if (element.hasImplementation()) {
3765      composeCapabilityStatement2ImplementationComponent(t, "CapabilityStatement2", "implementation", element.getImplementation(), -1);
3766    }
3767    if (element.hasFhirVersionElement()) {
3768      composeEnum(t, "CapabilityStatement2", "fhirVersion", element.getFhirVersionElement(), -1);
3769    }
3770    for (int i = 0; i < element.getFormat().size(); i++) {
3771      composeCode(t, "CapabilityStatement2", "format", element.getFormat().get(i), i);
3772    }
3773    for (int i = 0; i < element.getPatchFormat().size(); i++) {
3774      composeCode(t, "CapabilityStatement2", "patchFormat", element.getPatchFormat().get(i), i);
3775    }
3776    for (int i = 0; i < element.getImplementationGuide().size(); i++) {
3777      composeCanonical(t, "CapabilityStatement2", "implementationGuide", element.getImplementationGuide().get(i), i);
3778    }
3779    for (int i = 0; i < element.getRest().size(); i++) {
3780      composeCapabilityStatement2RestComponent(t, "CapabilityStatement2", "rest", element.getRest().get(i), i);
3781    }
3782  }
3783
3784  protected void composeCapabilityStatement2SoftwareComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2SoftwareComponent element, int index) {
3785    if (element == null) 
3786      return;
3787    Complex t;
3788    if (Utilities.noString(parentType))
3789      t = parent;
3790    else {
3791      t = parent.predicate("fhir:"+parentType+'.'+name);
3792    }
3793    composeBackboneElement(t, "software", name, element, index);
3794    if (element.hasNameElement()) {
3795      composeString(t, "CapabilityStatement2SoftwareComponent", "name", element.getNameElement(), -1);
3796    }
3797    if (element.hasVersionElement()) {
3798      composeString(t, "CapabilityStatement2SoftwareComponent", "version", element.getVersionElement(), -1);
3799    }
3800    if (element.hasReleaseDateElement()) {
3801      composeDateTime(t, "CapabilityStatement2SoftwareComponent", "releaseDate", element.getReleaseDateElement(), -1);
3802    }
3803  }
3804
3805  protected void composeCapabilityStatement2ImplementationComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2ImplementationComponent element, int index) {
3806    if (element == null) 
3807      return;
3808    Complex t;
3809    if (Utilities.noString(parentType))
3810      t = parent;
3811    else {
3812      t = parent.predicate("fhir:"+parentType+'.'+name);
3813    }
3814    composeBackboneElement(t, "implementation", name, element, index);
3815    if (element.hasDescriptionElement()) {
3816      composeString(t, "CapabilityStatement2ImplementationComponent", "description", element.getDescriptionElement(), -1);
3817    }
3818    if (element.hasUrlElement()) {
3819      composeUrl(t, "CapabilityStatement2ImplementationComponent", "url", element.getUrlElement(), -1);
3820    }
3821    if (element.hasCustodian()) {
3822      composeReference(t, "CapabilityStatement2ImplementationComponent", "custodian", element.getCustodian(), -1);
3823    }
3824  }
3825
3826  protected void composeCapabilityStatement2RestComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2RestComponent element, int index) {
3827    if (element == null) 
3828      return;
3829    Complex t;
3830    if (Utilities.noString(parentType))
3831      t = parent;
3832    else {
3833      t = parent.predicate("fhir:"+parentType+'.'+name);
3834    }
3835    composeBackboneElement(t, "rest", name, element, index);
3836    if (element.hasModeElement()) {
3837      composeEnum(t, "CapabilityStatement2RestComponent", "mode", element.getModeElement(), -1);
3838    }
3839    if (element.hasDocumentationElement()) {
3840      composeMarkdown(t, "CapabilityStatement2RestComponent", "documentation", element.getDocumentationElement(), -1);
3841    }
3842    for (int i = 0; i < element.getFeature().size(); i++) {
3843      composeCapabilityStatement2RestFeatureComponent(t, "CapabilityStatement2RestComponent", "feature", element.getFeature().get(i), i);
3844    }
3845    for (int i = 0; i < element.getResource().size(); i++) {
3846      composeCapabilityStatement2RestResourceComponent(t, "CapabilityStatement2RestComponent", "resource", element.getResource().get(i), i);
3847    }
3848    for (int i = 0; i < element.getInteraction().size(); i++) {
3849      composeCapabilityStatement2SystemInteractionComponent(t, "CapabilityStatement2RestComponent", "interaction", element.getInteraction().get(i), i);
3850    }
3851    for (int i = 0; i < element.getSearchParam().size(); i++) {
3852      composeCapabilityStatement2RestResourceSearchParamComponent(t, "CapabilityStatement2RestComponent", "searchParam", element.getSearchParam().get(i), i);
3853    }
3854    for (int i = 0; i < element.getOperation().size(); i++) {
3855      composeCapabilityStatement2RestResourceOperationComponent(t, "CapabilityStatement2RestComponent", "operation", element.getOperation().get(i), i);
3856    }
3857    for (int i = 0; i < element.getCompartment().size(); i++) {
3858      composeCanonical(t, "CapabilityStatement2RestComponent", "compartment", element.getCompartment().get(i), i);
3859    }
3860  }
3861
3862  protected void composeCapabilityStatement2RestFeatureComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2RestFeatureComponent element, int index) {
3863    if (element == null) 
3864      return;
3865    Complex t;
3866    if (Utilities.noString(parentType))
3867      t = parent;
3868    else {
3869      t = parent.predicate("fhir:"+parentType+'.'+name);
3870    }
3871    composeBackboneElement(t, "feature", name, element, index);
3872    if (element.hasCodeElement()) {
3873      composeEnum(t, "CapabilityStatement2RestFeatureComponent", "code", element.getCodeElement(), -1);
3874    }
3875    if (element.hasValueElement()) {
3876      composeEnum(t, "CapabilityStatement2RestFeatureComponent", "value", element.getValueElement(), -1);
3877    }
3878  }
3879
3880  protected void composeCapabilityStatement2RestResourceComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2RestResourceComponent element, int index) {
3881    if (element == null) 
3882      return;
3883    Complex t;
3884    if (Utilities.noString(parentType))
3885      t = parent;
3886    else {
3887      t = parent.predicate("fhir:"+parentType+'.'+name);
3888    }
3889    composeBackboneElement(t, "resource", name, element, index);
3890    if (element.hasTypeElement()) {
3891      composeCode(t, "CapabilityStatement2RestResourceComponent", "type", element.getTypeElement(), -1);
3892    }
3893    if (element.hasProfileElement()) {
3894      composeCanonical(t, "CapabilityStatement2RestResourceComponent", "profile", element.getProfileElement(), -1);
3895    }
3896    for (int i = 0; i < element.getSupportedProfile().size(); i++) {
3897      composeCanonical(t, "CapabilityStatement2RestResourceComponent", "supportedProfile", element.getSupportedProfile().get(i), i);
3898    }
3899    if (element.hasDocumentationElement()) {
3900      composeMarkdown(t, "CapabilityStatement2RestResourceComponent", "documentation", element.getDocumentationElement(), -1);
3901    }
3902    for (int i = 0; i < element.getFeature().size(); i++) {
3903      composeCapabilityStatement2RestFeatureComponent(t, "CapabilityStatement2RestResourceComponent", "feature", element.getFeature().get(i), i);
3904    }
3905    for (int i = 0; i < element.getInteraction().size(); i++) {
3906      composeCapabilityStatement2ResourceInteractionComponent(t, "CapabilityStatement2RestResourceComponent", "interaction", element.getInteraction().get(i), i);
3907    }
3908    for (int i = 0; i < element.getSearchParam().size(); i++) {
3909      composeCapabilityStatement2RestResourceSearchParamComponent(t, "CapabilityStatement2RestResourceComponent", "searchParam", element.getSearchParam().get(i), i);
3910    }
3911    for (int i = 0; i < element.getOperation().size(); i++) {
3912      composeCapabilityStatement2RestResourceOperationComponent(t, "CapabilityStatement2RestResourceComponent", "operation", element.getOperation().get(i), i);
3913    }
3914  }
3915
3916  protected void composeCapabilityStatement2ResourceInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement2.ResourceInteractionComponent element, int index) {
3917    if (element == null) 
3918      return;
3919    Complex t;
3920    if (Utilities.noString(parentType))
3921      t = parent;
3922    else {
3923      t = parent.predicate("fhir:"+parentType+'.'+name);
3924    }
3925    composeBackboneElement(t, "interaction", name, element, index);
3926    if (element.hasCodeElement()) {
3927      composeEnum(t, "ResourceInteractionComponent", "code", element.getCodeElement(), -1);
3928    }
3929    if (element.hasDocumentationElement()) {
3930      composeMarkdown(t, "ResourceInteractionComponent", "documentation", element.getDocumentationElement(), -1);
3931    }
3932    for (int i = 0; i < element.getFeature().size(); i++) {
3933      composeCapabilityStatement2RestFeatureComponent(t, "ResourceInteractionComponent", "feature", element.getFeature().get(i), i);
3934    }
3935  }
3936
3937  protected void composeCapabilityStatement2RestResourceSearchParamComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2RestResourceSearchParamComponent element, int index) {
3938    if (element == null) 
3939      return;
3940    Complex t;
3941    if (Utilities.noString(parentType))
3942      t = parent;
3943    else {
3944      t = parent.predicate("fhir:"+parentType+'.'+name);
3945    }
3946    composeBackboneElement(t, "searchParam", name, element, index);
3947    if (element.hasNameElement()) {
3948      composeString(t, "CapabilityStatement2RestResourceSearchParamComponent", "name", element.getNameElement(), -1);
3949    }
3950    if (element.hasDefinitionElement()) {
3951      composeCanonical(t, "CapabilityStatement2RestResourceSearchParamComponent", "definition", element.getDefinitionElement(), -1);
3952    }
3953    if (element.hasTypeElement()) {
3954      composeEnum(t, "CapabilityStatement2RestResourceSearchParamComponent", "type", element.getTypeElement(), -1);
3955    }
3956    if (element.hasDocumentationElement()) {
3957      composeMarkdown(t, "CapabilityStatement2RestResourceSearchParamComponent", "documentation", element.getDocumentationElement(), -1);
3958    }
3959    for (int i = 0; i < element.getFeature().size(); i++) {
3960      composeCapabilityStatement2RestFeatureComponent(t, "CapabilityStatement2RestResourceSearchParamComponent", "feature", element.getFeature().get(i), i);
3961    }
3962  }
3963
3964  protected void composeCapabilityStatement2RestResourceOperationComponent(Complex parent, String parentType, String name, CapabilityStatement2.CapabilityStatement2RestResourceOperationComponent element, int index) {
3965    if (element == null) 
3966      return;
3967    Complex t;
3968    if (Utilities.noString(parentType))
3969      t = parent;
3970    else {
3971      t = parent.predicate("fhir:"+parentType+'.'+name);
3972    }
3973    composeBackboneElement(t, "operation", name, element, index);
3974    if (element.hasNameElement()) {
3975      composeString(t, "CapabilityStatement2RestResourceOperationComponent", "name", element.getNameElement(), -1);
3976    }
3977    if (element.hasDefinitionElement()) {
3978      composeCanonical(t, "CapabilityStatement2RestResourceOperationComponent", "definition", element.getDefinitionElement(), -1);
3979    }
3980    if (element.hasDocumentationElement()) {
3981      composeMarkdown(t, "CapabilityStatement2RestResourceOperationComponent", "documentation", element.getDocumentationElement(), -1);
3982    }
3983    for (int i = 0; i < element.getFeature().size(); i++) {
3984      composeCapabilityStatement2RestFeatureComponent(t, "CapabilityStatement2RestResourceOperationComponent", "feature", element.getFeature().get(i), i);
3985    }
3986  }
3987
3988  protected void composeCapabilityStatement2SystemInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement2.SystemInteractionComponent element, int index) {
3989    if (element == null) 
3990      return;
3991    Complex t;
3992    if (Utilities.noString(parentType))
3993      t = parent;
3994    else {
3995      t = parent.predicate("fhir:"+parentType+'.'+name);
3996    }
3997    composeBackboneElement(t, "interaction", name, element, index);
3998    if (element.hasCodeElement()) {
3999      composeEnum(t, "SystemInteractionComponent", "code", element.getCodeElement(), -1);
4000    }
4001    if (element.hasDocumentationElement()) {
4002      composeMarkdown(t, "SystemInteractionComponent", "documentation", element.getDocumentationElement(), -1);
4003    }
4004    for (int i = 0; i < element.getFeature().size(); i++) {
4005      composeCapabilityStatement2RestFeatureComponent(t, "SystemInteractionComponent", "feature", element.getFeature().get(i), i);
4006    }
4007  }
4008
4009  protected void composeCarePlan(Complex parent, String parentType, String name, CarePlan element, int index) {
4010    if (element == null) 
4011      return;
4012    Complex t;
4013    if (Utilities.noString(parentType))
4014      t = parent;
4015    else {
4016      t = parent.predicate("fhir:"+parentType+'.'+name);
4017    }
4018    composeDomainResource(t, "CarePlan", name, element, index);
4019    for (int i = 0; i < element.getIdentifier().size(); i++) {
4020      composeIdentifier(t, "CarePlan", "identifier", element.getIdentifier().get(i), i);
4021    }
4022    for (int i = 0; i < element.getInstantiatesCanonical().size(); i++) {
4023      composeCanonical(t, "CarePlan", "instantiatesCanonical", element.getInstantiatesCanonical().get(i), i);
4024    }
4025    for (int i = 0; i < element.getInstantiatesUri().size(); i++) {
4026      composeUri(t, "CarePlan", "instantiatesUri", element.getInstantiatesUri().get(i), i);
4027    }
4028    for (int i = 0; i < element.getBasedOn().size(); i++) {
4029      composeReference(t, "CarePlan", "basedOn", element.getBasedOn().get(i), i);
4030    }
4031    for (int i = 0; i < element.getReplaces().size(); i++) {
4032      composeReference(t, "CarePlan", "replaces", element.getReplaces().get(i), i);
4033    }
4034    for (int i = 0; i < element.getPartOf().size(); i++) {
4035      composeReference(t, "CarePlan", "partOf", element.getPartOf().get(i), i);
4036    }
4037    if (element.hasStatusElement()) {
4038      composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1);
4039    }
4040    if (element.hasIntentElement()) {
4041      composeEnum(t, "CarePlan", "intent", element.getIntentElement(), -1);
4042    }
4043    for (int i = 0; i < element.getCategory().size(); i++) {
4044      composeCodeableConcept(t, "CarePlan", "category", element.getCategory().get(i), i);
4045    }
4046    if (element.hasTitleElement()) {
4047      composeString(t, "CarePlan", "title", element.getTitleElement(), -1);
4048    }
4049    if (element.hasDescriptionElement()) {
4050      composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1);
4051    }
4052    if (element.hasSubject()) {
4053      composeReference(t, "CarePlan", "subject", element.getSubject(), -1);
4054    }
4055    if (element.hasEncounter()) {
4056      composeReference(t, "CarePlan", "encounter", element.getEncounter(), -1);
4057    }
4058    if (element.hasPeriod()) {
4059      composePeriod(t, "CarePlan", "period", element.getPeriod(), -1);
4060    }
4061    if (element.hasCreatedElement()) {
4062      composeDateTime(t, "CarePlan", "created", element.getCreatedElement(), -1);
4063    }
4064    if (element.hasAuthor()) {
4065      composeReference(t, "CarePlan", "author", element.getAuthor(), -1);
4066    }
4067    for (int i = 0; i < element.getContributor().size(); i++) {
4068      composeReference(t, "CarePlan", "contributor", element.getContributor().get(i), i);
4069    }
4070    for (int i = 0; i < element.getCareTeam().size(); i++) {
4071      composeReference(t, "CarePlan", "careTeam", element.getCareTeam().get(i), i);
4072    }
4073    for (int i = 0; i < element.getAddresses().size(); i++) {
4074      composeCodeableReference(t, "CarePlan", "addresses", element.getAddresses().get(i), i);
4075    }
4076    for (int i = 0; i < element.getSupportingInfo().size(); i++) {
4077      composeReference(t, "CarePlan", "supportingInfo", element.getSupportingInfo().get(i), i);
4078    }
4079    for (int i = 0; i < element.getGoal().size(); i++) {
4080      composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i);
4081    }
4082    for (int i = 0; i < element.getActivity().size(); i++) {
4083      composeCarePlanActivityComponent(t, "CarePlan", "activity", element.getActivity().get(i), i);
4084    }
4085    for (int i = 0; i < element.getNote().size(); i++) {
4086      composeAnnotation(t, "CarePlan", "note", element.getNote().get(i), i);
4087    }
4088  }
4089
4090  protected void composeCarePlanActivityComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityComponent element, int index) {
4091    if (element == null) 
4092      return;
4093    Complex t;
4094    if (Utilities.noString(parentType))
4095      t = parent;
4096    else {
4097      t = parent.predicate("fhir:"+parentType+'.'+name);
4098    }
4099    composeBackboneElement(t, "activity", name, element, index);
4100    for (int i = 0; i < element.getPerformedActivity().size(); i++) {
4101      composeCodeableReference(t, "CarePlanActivityComponent", "performedActivity", element.getPerformedActivity().get(i), i);
4102    }
4103    for (int i = 0; i < element.getProgress().size(); i++) {
4104      composeAnnotation(t, "CarePlanActivityComponent", "progress", element.getProgress().get(i), i);
4105    }
4106    if (element.hasPlannedActivityReference()) {
4107      composeReference(t, "CarePlanActivityComponent", "plannedActivityReference", element.getPlannedActivityReference(), -1);
4108    }
4109    if (element.hasPlannedActivityDetail()) {
4110      composeCarePlanActivityPlannedActivityDetailComponent(t, "CarePlanActivityComponent", "plannedActivityDetail", element.getPlannedActivityDetail(), -1);
4111    }
4112  }
4113
4114  protected void composeCarePlanActivityPlannedActivityDetailComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityPlannedActivityDetailComponent element, int index) {
4115    if (element == null) 
4116      return;
4117    Complex t;
4118    if (Utilities.noString(parentType))
4119      t = parent;
4120    else {
4121      t = parent.predicate("fhir:"+parentType+'.'+name);
4122    }
4123    composeBackboneElement(t, "plannedActivityDetail", name, element, index);
4124    if (element.hasKindElement()) {
4125      composeEnum(t, "CarePlanActivityPlannedActivityDetailComponent", "kind", element.getKindElement(), -1);
4126    }
4127    for (int i = 0; i < element.getInstantiatesCanonical().size(); i++) {
4128      composeCanonical(t, "CarePlanActivityPlannedActivityDetailComponent", "instantiatesCanonical", element.getInstantiatesCanonical().get(i), i);
4129    }
4130    for (int i = 0; i < element.getInstantiatesUri().size(); i++) {
4131      composeUri(t, "CarePlanActivityPlannedActivityDetailComponent", "instantiatesUri", element.getInstantiatesUri().get(i), i);
4132    }
4133    if (element.hasCode()) {
4134      composeCodeableConcept(t, "CarePlanActivityPlannedActivityDetailComponent", "code", element.getCode(), -1);
4135    }
4136    for (int i = 0; i < element.getReason().size(); i++) {
4137      composeCodeableReference(t, "CarePlanActivityPlannedActivityDetailComponent", "reason", element.getReason().get(i), i);
4138    }
4139    for (int i = 0; i < element.getGoal().size(); i++) {
4140      composeReference(t, "CarePlanActivityPlannedActivityDetailComponent", "goal", element.getGoal().get(i), i);
4141    }
4142    if (element.hasStatusElement()) {
4143      composeEnum(t, "CarePlanActivityPlannedActivityDetailComponent", "status", element.getStatusElement(), -1);
4144    }
4145    if (element.hasStatusReason()) {
4146      composeCodeableConcept(t, "CarePlanActivityPlannedActivityDetailComponent", "statusReason", element.getStatusReason(), -1);
4147    }
4148    if (element.hasDoNotPerformElement()) {
4149      composeBoolean(t, "CarePlanActivityPlannedActivityDetailComponent", "doNotPerform", element.getDoNotPerformElement(), -1);
4150    }
4151    if (element.hasScheduled()) {
4152      composeType(t, "CarePlanActivityPlannedActivityDetailComponent", "scheduled", element.getScheduled(), -1);
4153    }
4154    if (element.hasLocation()) {
4155      composeCodeableReference(t, "CarePlanActivityPlannedActivityDetailComponent", "location", element.getLocation(), -1);
4156    }
4157    if (element.hasReported()) {
4158      composeType(t, "CarePlanActivityPlannedActivityDetailComponent", "reported", element.getReported(), -1);
4159    }
4160    for (int i = 0; i < element.getPerformer().size(); i++) {
4161      composeReference(t, "CarePlanActivityPlannedActivityDetailComponent", "performer", element.getPerformer().get(i), i);
4162    }
4163    if (element.hasProduct()) {
4164      composeType(t, "CarePlanActivityPlannedActivityDetailComponent", "product", element.getProduct(), -1);
4165    }
4166    if (element.hasDailyAmount()) {
4167      composeQuantity(t, "CarePlanActivityPlannedActivityDetailComponent", "dailyAmount", element.getDailyAmount(), -1);
4168    }
4169    if (element.hasQuantity()) {
4170      composeQuantity(t, "CarePlanActivityPlannedActivityDetailComponent", "quantity", element.getQuantity(), -1);
4171    }
4172    if (element.hasDescriptionElement()) {
4173      composeString(t, "CarePlanActivityPlannedActivityDetailComponent", "description", element.getDescriptionElement(), -1);
4174    }
4175  }
4176
4177  protected void composeCareTeam(Complex parent, String parentType, String name, CareTeam element, int index) {
4178    if (element == null) 
4179      return;
4180    Complex t;
4181    if (Utilities.noString(parentType))
4182      t = parent;
4183    else {
4184      t = parent.predicate("fhir:"+parentType+'.'+name);
4185    }
4186    composeDomainResource(t, "CareTeam", name, element, index);
4187    for (int i = 0; i < element.getIdentifier().size(); i++) {
4188      composeIdentifier(t, "CareTeam", "identifier", element.getIdentifier().get(i), i);
4189    }
4190    if (element.hasStatusElement()) {
4191      composeEnum(t, "CareTeam", "status", element.getStatusElement(), -1);
4192    }
4193    for (int i = 0; i < element.getCategory().size(); i++) {
4194      composeCodeableConcept(t, "CareTeam", "category", element.getCategory().get(i), i);
4195    }
4196    if (element.hasNameElement()) {
4197      composeString(t, "CareTeam", "name", element.getNameElement(), -1);
4198    }
4199    if (element.hasSubject()) {
4200      composeReference(t, "CareTeam", "subject", element.getSubject(), -1);
4201    }
4202    if (element.hasPeriod()) {
4203      composePeriod(t, "CareTeam", "period", element.getPeriod(), -1);
4204    }
4205    for (int i = 0; i < element.getParticipant().size(); i++) {
4206      composeCareTeamParticipantComponent(t, "CareTeam", "participant", element.getParticipant().get(i), i);
4207    }
4208    for (int i = 0; i < element.getReason().size(); i++) {
4209      composeCodeableReference(t, "CareTeam", "reason", element.getReason().get(i), i);
4210    }
4211    for (int i = 0; i < element.getManagingOrganization().size(); i++) {
4212      composeReference(t, "CareTeam", "managingOrganization", element.getManagingOrganization().get(i), i);
4213    }
4214    for (int i = 0; i < element.getTelecom().size(); i++) {
4215      composeContactPoint(t, "CareTeam", "telecom", element.getTelecom().get(i), i);
4216    }
4217    for (int i = 0; i < element.getNote().size(); i++) {
4218      composeAnnotation(t, "CareTeam", "note", element.getNote().get(i), i);
4219    }
4220  }
4221
4222  protected void composeCareTeamParticipantComponent(Complex parent, String parentType, String name, CareTeam.CareTeamParticipantComponent element, int index) {
4223    if (element == null) 
4224      return;
4225    Complex t;
4226    if (Utilities.noString(parentType))
4227      t = parent;
4228    else {
4229      t = parent.predicate("fhir:"+parentType+'.'+name);
4230    }
4231    composeBackboneElement(t, "participant", name, element, index);
4232    if (element.hasRole()) {
4233      composeCodeableConcept(t, "CareTeamParticipantComponent", "role", element.getRole(), -1);
4234    }
4235    if (element.hasMember()) {
4236      composeReference(t, "CareTeamParticipantComponent", "member", element.getMember(), -1);
4237    }
4238    if (element.hasOnBehalfOf()) {
4239      composeReference(t, "CareTeamParticipantComponent", "onBehalfOf", element.getOnBehalfOf(), -1);
4240    }
4241    if (element.hasCoverage()) {
4242      composeType(t, "CareTeamParticipantComponent", "coverage", element.getCoverage(), -1);
4243    }
4244  }
4245
4246  protected void composeChargeItem(Complex parent, String parentType, String name, ChargeItem element, int index) {
4247    if (element == null) 
4248      return;
4249    Complex t;
4250    if (Utilities.noString(parentType))
4251      t = parent;
4252    else {
4253      t = parent.predicate("fhir:"+parentType+'.'+name);
4254    }
4255    composeDomainResource(t, "ChargeItem", name, element, index);
4256    for (int i = 0; i < element.getIdentifier().size(); i++) {
4257      composeIdentifier(t, "ChargeItem", "identifier", element.getIdentifier().get(i), i);
4258    }
4259    for (int i = 0; i < element.getDefinitionUri().size(); i++) {
4260      composeUri(t, "ChargeItem", "definitionUri", element.getDefinitionUri().get(i), i);
4261    }
4262    for (int i = 0; i < element.getDefinitionCanonical().size(); i++) {
4263      composeCanonical(t, "ChargeItem", "definitionCanonical", element.getDefinitionCanonical().get(i), i);
4264    }
4265    if (element.hasStatusElement()) {
4266      composeEnum(t, "ChargeItem", "status", element.getStatusElement(), -1);
4267    }
4268    for (int i = 0; i < element.getPartOf().size(); i++) {
4269      composeReference(t, "ChargeItem", "partOf", element.getPartOf().get(i), i);
4270    }
4271    if (element.hasCode()) {
4272      composeCodeableConcept(t, "ChargeItem", "code", element.getCode(), -1);
4273    }
4274    if (element.hasSubject()) {
4275      composeReference(t, "ChargeItem", "subject", element.getSubject(), -1);
4276    }
4277    if (element.hasContext()) {
4278      composeReference(t, "ChargeItem", "context", element.getContext(), -1);
4279    }
4280    if (element.hasOccurrence()) {
4281      composeType(t, "ChargeItem", "occurrence", element.getOccurrence(), -1);
4282    }
4283    for (int i = 0; i < element.getPerformer().size(); i++) {
4284      composeChargeItemPerformerComponent(t, "ChargeItem", "performer", element.getPerformer().get(i), i);
4285    }
4286    if (element.hasPerformingOrganization()) {
4287      composeReference(t, "ChargeItem", "performingOrganization", element.getPerformingOrganization(), -1);
4288    }
4289    if (element.hasRequestingOrganization()) {
4290      composeReference(t, "ChargeItem", "requestingOrganization", element.getRequestingOrganization(), -1);
4291    }
4292    if (element.hasCostCenter()) {
4293      composeReference(t, "ChargeItem", "costCenter", element.getCostCenter(), -1);
4294    }
4295    if (element.hasQuantity()) {
4296      composeQuantity(t, "ChargeItem", "quantity", element.getQuantity(), -1);
4297    }
4298    for (int i = 0; i < element.getBodysite().size(); i++) {
4299      composeCodeableConcept(t, "ChargeItem", "bodysite", element.getBodysite().get(i), i);
4300    }
4301    if (element.hasFactorOverrideElement()) {
4302      composeDecimal(t, "ChargeItem", "factorOverride", element.getFactorOverrideElement(), -1);
4303    }
4304    if (element.hasPriceOverride()) {
4305      composeMoney(t, "ChargeItem", "priceOverride", element.getPriceOverride(), -1);
4306    }
4307    if (element.hasOverrideReasonElement()) {
4308      composeString(t, "ChargeItem", "overrideReason", element.getOverrideReasonElement(), -1);
4309    }
4310    if (element.hasEnterer()) {
4311      composeReference(t, "ChargeItem", "enterer", element.getEnterer(), -1);
4312    }
4313    if (element.hasEnteredDateElement()) {
4314      composeDateTime(t, "ChargeItem", "enteredDate", element.getEnteredDateElement(), -1);
4315    }
4316    for (int i = 0; i < element.getReason().size(); i++) {
4317      composeCodeableConcept(t, "ChargeItem", "reason", element.getReason().get(i), i);
4318    }
4319    for (int i = 0; i < element.getService().size(); i++) {
4320      composeReference(t, "ChargeItem", "service", element.getService().get(i), i);
4321    }
4322    for (int i = 0; i < element.getProduct().size(); i++) {
4323      composeCodeableReference(t, "ChargeItem", "product", element.getProduct().get(i), i);
4324    }
4325    for (int i = 0; i < element.getAccount().size(); i++) {
4326      composeReference(t, "ChargeItem", "account", element.getAccount().get(i), i);
4327    }
4328    for (int i = 0; i < element.getNote().size(); i++) {
4329      composeAnnotation(t, "ChargeItem", "note", element.getNote().get(i), i);
4330    }
4331    for (int i = 0; i < element.getSupportingInformation().size(); i++) {
4332      composeReference(t, "ChargeItem", "supportingInformation", element.getSupportingInformation().get(i), i);
4333    }
4334  }
4335
4336  protected void composeChargeItemPerformerComponent(Complex parent, String parentType, String name, ChargeItem.ChargeItemPerformerComponent element, int index) {
4337    if (element == null) 
4338      return;
4339    Complex t;
4340    if (Utilities.noString(parentType))
4341      t = parent;
4342    else {
4343      t = parent.predicate("fhir:"+parentType+'.'+name);
4344    }
4345    composeBackboneElement(t, "performer", name, element, index);
4346    if (element.hasFunction()) {
4347      composeCodeableConcept(t, "ChargeItemPerformerComponent", "function", element.getFunction(), -1);
4348    }
4349    if (element.hasActor()) {
4350      composeReference(t, "ChargeItemPerformerComponent", "actor", element.getActor(), -1);
4351    }
4352  }
4353
4354  protected void composeChargeItemDefinition(Complex parent, String parentType, String name, ChargeItemDefinition element, int index) {
4355    if (element == null) 
4356      return;
4357    Complex t;
4358    if (Utilities.noString(parentType))
4359      t = parent;
4360    else {
4361      t = parent.predicate("fhir:"+parentType+'.'+name);
4362    }
4363    composeMetadataResource(t, "ChargeItemDefinition", name, element, index);
4364    if (element.hasUrlElement()) {
4365      composeUri(t, "ChargeItemDefinition", "url", element.getUrlElement(), -1);
4366    }
4367    for (int i = 0; i < element.getIdentifier().size(); i++) {
4368      composeIdentifier(t, "ChargeItemDefinition", "identifier", element.getIdentifier().get(i), i);
4369    }
4370    if (element.hasVersionElement()) {
4371      composeString(t, "ChargeItemDefinition", "version", element.getVersionElement(), -1);
4372    }
4373    if (element.hasTitleElement()) {
4374      composeString(t, "ChargeItemDefinition", "title", element.getTitleElement(), -1);
4375    }
4376    for (int i = 0; i < element.getDerivedFromUri().size(); i++) {
4377      composeUri(t, "ChargeItemDefinition", "derivedFromUri", element.getDerivedFromUri().get(i), i);
4378    }
4379    for (int i = 0; i < element.getPartOf().size(); i++) {
4380      composeCanonical(t, "ChargeItemDefinition", "partOf", element.getPartOf().get(i), i);
4381    }
4382    for (int i = 0; i < element.getReplaces().size(); i++) {
4383      composeCanonical(t, "ChargeItemDefinition", "replaces", element.getReplaces().get(i), i);
4384    }
4385    if (element.hasStatusElement()) {
4386      composeEnum(t, "ChargeItemDefinition", "status", element.getStatusElement(), -1);
4387    }
4388    if (element.hasExperimentalElement()) {
4389      composeBoolean(t, "ChargeItemDefinition", "experimental", element.getExperimentalElement(), -1);
4390    }
4391    if (element.hasDateElement()) {
4392      composeDateTime(t, "ChargeItemDefinition", "date", element.getDateElement(), -1);
4393    }
4394    if (element.hasPublisherElement()) {
4395      composeString(t, "ChargeItemDefinition", "publisher", element.getPublisherElement(), -1);
4396    }
4397    for (int i = 0; i < element.getContact().size(); i++) {
4398      composeContactDetail(t, "ChargeItemDefinition", "contact", element.getContact().get(i), i);
4399    }
4400    if (element.hasDescriptionElement()) {
4401      composeMarkdown(t, "ChargeItemDefinition", "description", element.getDescriptionElement(), -1);
4402    }
4403    for (int i = 0; i < element.getUseContext().size(); i++) {
4404      composeUsageContext(t, "ChargeItemDefinition", "useContext", element.getUseContext().get(i), i);
4405    }
4406    for (int i = 0; i < element.getJurisdiction().size(); i++) {
4407      composeCodeableConcept(t, "ChargeItemDefinition", "jurisdiction", element.getJurisdiction().get(i), i);
4408    }
4409    if (element.hasCopyrightElement()) {
4410      composeMarkdown(t, "ChargeItemDefinition", "copyright", element.getCopyrightElement(), -1);
4411    }
4412    if (element.hasApprovalDateElement()) {
4413      composeDate(t, "ChargeItemDefinition", "approvalDate", element.getApprovalDateElement(), -1);
4414    }
4415    if (element.hasLastReviewDateElement()) {
4416      composeDate(t, "ChargeItemDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1);
4417    }
4418    if (element.hasEffectivePeriod()) {
4419      composePeriod(t, "ChargeItemDefinition", "effectivePeriod", element.getEffectivePeriod(), -1);
4420    }
4421    if (element.hasCode()) {
4422      composeCodeableConcept(t, "ChargeItemDefinition", "code", element.getCode(), -1);
4423    }
4424    for (int i = 0; i < element.getInstance().size(); i++) {
4425      composeReference(t, "ChargeItemDefinition", "instance", element.getInstance().get(i), i);
4426    }
4427    for (int i = 0; i < element.getApplicability().size(); i++) {
4428      composeChargeItemDefinitionApplicabilityComponent(t, "ChargeItemDefinition", "applicability", element.getApplicability().get(i), i);
4429    }
4430    for (int i = 0; i < element.getPropertyGroup().size(); i++) {
4431      composeChargeItemDefinitionPropertyGroupComponent(t, "ChargeItemDefinition", "propertyGroup", element.getPropertyGroup().get(i), i);
4432    }
4433  }
4434
4435  protected void composeChargeItemDefinitionApplicabilityComponent(Complex parent, String parentType, String name, ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element, int index) {
4436    if (element == null) 
4437      return;
4438    Complex t;
4439    if (Utilities.noString(parentType))
4440      t = parent;
4441    else {
4442      t = parent.predicate("fhir:"+parentType+'.'+name);
4443    }
4444    composeBackboneElement(t, "applicability", name, element, index);
4445    if (element.hasDescriptionElement()) {
4446      composeString(t, "ChargeItemDefinitionApplicabilityComponent", "description", element.getDescriptionElement(), -1);
4447    }
4448    if (element.hasLanguageElement()) {
4449      composeString(t, "ChargeItemDefinitionApplicabilityComponent", "language", element.getLanguageElement(), -1);
4450    }
4451    if (element.hasExpressionElement()) {
4452      composeString(t, "ChargeItemDefinitionApplicabilityComponent", "expression", element.getExpressionElement(), -1);
4453    }
4454  }
4455
4456  protected void composeChargeItemDefinitionPropertyGroupComponent(Complex parent, String parentType, String name, ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element, int index) {
4457    if (element == null) 
4458      return;
4459    Complex t;
4460    if (Utilities.noString(parentType))
4461      t = parent;
4462    else {
4463      t = parent.predicate("fhir:"+parentType+'.'+name);
4464    }
4465    composeBackboneElement(t, "propertyGroup", name, element, index);
4466    for (int i = 0; i < element.getApplicability().size(); i++) {
4467      composeChargeItemDefinitionApplicabilityComponent(t, "ChargeItemDefinitionPropertyGroupComponent", "applicability", element.getApplicability().get(i), i);
4468    }
4469    for (int i = 0; i < element.getPriceComponent().size(); i++) {
4470      composeChargeItemDefinitionPropertyGroupPriceComponentComponent(t, "ChargeItemDefinitionPropertyGroupComponent", "priceComponent", element.getPriceComponent().get(i), i);
4471    }
4472  }
4473
4474  protected void composeChargeItemDefinitionPropertyGroupPriceComponentComponent(Complex parent, String parentType, String name, ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent element, int index) {
4475    if (element == null) 
4476      return;
4477    Complex t;
4478    if (Utilities.noString(parentType))
4479      t = parent;
4480    else {
4481      t = parent.predicate("fhir:"+parentType+'.'+name);
4482    }
4483    composeBackboneElement(t, "priceComponent", name, element, index);
4484    if (element.hasTypeElement()) {
4485      composeEnum(t, "ChargeItemDefinitionPropertyGroupPriceComponentComponent", "type", element.getTypeElement(), -1);
4486    }
4487    if (element.hasCode()) {
4488      composeCodeableConcept(t, "ChargeItemDefinitionPropertyGroupPriceComponentComponent", "code", element.getCode(), -1);
4489    }
4490    if (element.hasFactorElement()) {
4491      composeDecimal(t, "ChargeItemDefinitionPropertyGroupPriceComponentComponent", "factor", element.getFactorElement(), -1);
4492    }
4493    if (element.hasAmount()) {
4494      composeMoney(t, "ChargeItemDefinitionPropertyGroupPriceComponentComponent", "amount", element.getAmount(), -1);
4495    }
4496  }
4497
4498  protected void composeCitation(Complex parent, String parentType, String name, Citation element, int index) {
4499    if (element == null) 
4500      return;
4501    Complex t;
4502    if (Utilities.noString(parentType))
4503      t = parent;
4504    else {
4505      t = parent.predicate("fhir:"+parentType+'.'+name);
4506    }
4507    composeMetadataResource(t, "Citation", name, element, index);
4508    if (element.hasUrlElement()) {
4509      composeUri(t, "Citation", "url", element.getUrlElement(), -1);
4510    }
4511    for (int i = 0; i < element.getIdentifier().size(); i++) {
4512      composeIdentifier(t, "Citation", "identifier", element.getIdentifier().get(i), i);
4513    }
4514    if (element.hasVersionElement()) {
4515      composeString(t, "Citation", "version", element.getVersionElement(), -1);
4516    }
4517    if (element.hasNameElement()) {
4518      composeString(t, "Citation", "name", element.getNameElement(), -1);
4519    }
4520    if (element.hasTitleElement()) {
4521      composeString(t, "Citation", "title", element.getTitleElement(), -1);
4522    }
4523    if (element.hasStatusElement()) {
4524      composeEnum(t, "Citation", "status", element.getStatusElement(), -1);
4525    }
4526    if (element.hasExperimentalElement()) {
4527      composeBoolean(t, "Citation", "experimental", element.getExperimentalElement(), -1);
4528    }
4529    if (element.hasDateElement()) {
4530      composeDateTime(t, "Citation", "date", element.getDateElement(), -1);
4531    }
4532    if (element.hasPublisherElement()) {
4533      composeString(t, "Citation", "publisher", element.getPublisherElement(), -1);
4534    }
4535    for (int i = 0; i < element.getContact().size(); i++) {
4536      composeContactDetail(t, "Citation", "contact", element.getContact().get(i), i);
4537    }
4538    if (element.hasDescriptionElement()) {
4539      composeMarkdown(t, "Citation", "description", element.getDescriptionElement(), -1);
4540    }
4541    for (int i = 0; i < element.getUseContext().size(); i++) {
4542      composeUsageContext(t, "Citation", "useContext", element.getUseContext().get(i), i);
4543    }
4544    for (int i = 0; i < element.getJurisdiction().size(); i++) {
4545      composeCodeableConcept(t, "Citation", "jurisdiction", element.getJurisdiction().get(i), i);
4546    }
4547    if (element.hasPurposeElement()) {
4548      composeMarkdown(t, "Citation", "purpose", element.getPurposeElement(), -1);
4549    }
4550    if (element.hasCopyrightElement()) {
4551      composeMarkdown(t, "Citation", "copyright", element.getCopyrightElement(), -1);
4552    }
4553    if (element.hasApprovalDateElement()) {
4554      composeDate(t, "Citation", "approvalDate", element.getApprovalDateElement(), -1);
4555    }
4556    if (element.hasLastReviewDateElement()) {
4557      composeDate(t, "Citation", "lastReviewDate", element.getLastReviewDateElement(), -1);
4558    }
4559    if (element.hasEffectivePeriod()) {
4560      composePeriod(t, "Citation", "effectivePeriod", element.getEffectivePeriod(), -1);
4561    }
4562    for (int i = 0; i < element.getAuthor().size(); i++) {
4563      composeContactDetail(t, "Citation", "author", element.getAuthor().get(i), i);
4564    }
4565    for (int i = 0; i < element.getEditor().size(); i++) {
4566      composeContactDetail(t, "Citation", "editor", element.getEditor().get(i), i);
4567    }
4568    for (int i = 0; i < element.getReviewer().size(); i++) {
4569      composeContactDetail(t, "Citation", "reviewer", element.getReviewer().get(i), i);
4570    }
4571    for (int i = 0; i < element.getEndorser().size(); i++) {
4572      composeContactDetail(t, "Citation", "endorser", element.getEndorser().get(i), i);
4573    }
4574    for (int i = 0; i < element.getSummary().size(); i++) {
4575      composeCitationSummaryComponent(t, "Citation", "summary", element.getSummary().get(i), i);
4576    }
4577    for (int i = 0; i < element.getClassification().size(); i++) {
4578      composeCitationClassificationComponent(t, "Citation", "classification", element.getClassification().get(i), i);
4579    }
4580    for (int i = 0; i < element.getNote().size(); i++) {
4581      composeAnnotation(t, "Citation", "note", element.getNote().get(i), i);
4582    }
4583    for (int i = 0; i < element.getCurrentState().size(); i++) {
4584      composeCodeableConcept(t, "Citation", "currentState", element.getCurrentState().get(i), i);
4585    }
4586    for (int i = 0; i < element.getStatusDate().size(); i++) {
4587      composeCitationStatusDateComponent(t, "Citation", "statusDate", element.getStatusDate().get(i), i);
4588    }
4589    for (int i = 0; i < element.getRelatedArtifact().size(); i++) {
4590      composeRelatedArtifact(t, "Citation", "relatedArtifact", element.getRelatedArtifact().get(i), i);
4591    }
4592    if (element.hasCitedArtifact()) {
4593      composeCitationCitedArtifactComponent(t, "Citation", "citedArtifact", element.getCitedArtifact(), -1);
4594    }
4595  }
4596
4597  protected void composeCitationSummaryComponent(Complex parent, String parentType, String name, Citation.CitationSummaryComponent element, int index) {
4598    if (element == null) 
4599      return;
4600    Complex t;
4601    if (Utilities.noString(parentType))
4602      t = parent;
4603    else {
4604      t = parent.predicate("fhir:"+parentType+'.'+name);
4605    }
4606    composeBackboneElement(t, "summary", name, element, index);
4607    if (element.hasStyle()) {
4608      composeCodeableConcept(t, "CitationSummaryComponent", "style", element.getStyle(), -1);
4609    }
4610    if (element.hasTextElement()) {
4611      composeMarkdown(t, "CitationSummaryComponent", "text", element.getTextElement(), -1);
4612    }
4613  }
4614
4615  protected void composeCitationClassificationComponent(Complex parent, String parentType, String name, Citation.CitationClassificationComponent element, int index) {
4616    if (element == null) 
4617      return;
4618    Complex t;
4619    if (Utilities.noString(parentType))
4620      t = parent;
4621    else {
4622      t = parent.predicate("fhir:"+parentType+'.'+name);
4623    }
4624    composeBackboneElement(t, "classification", name, element, index);
4625    if (element.hasType()) {
4626      composeCodeableConcept(t, "CitationClassificationComponent", "type", element.getType(), -1);
4627    }
4628    for (int i = 0; i < element.getClassifier().size(); i++) {
4629      composeCodeableConcept(t, "CitationClassificationComponent", "classifier", element.getClassifier().get(i), i);
4630    }
4631  }
4632
4633  protected void composeCitationStatusDateComponent(Complex parent, String parentType, String name, Citation.CitationStatusDateComponent element, int index) {
4634    if (element == null) 
4635      return;
4636    Complex t;
4637    if (Utilities.noString(parentType))
4638      t = parent;
4639    else {
4640      t = parent.predicate("fhir:"+parentType+'.'+name);
4641    }
4642    composeBackboneElement(t, "statusDate", name, element, index);
4643    if (element.hasActivity()) {
4644      composeCodeableConcept(t, "CitationStatusDateComponent", "activity", element.getActivity(), -1);
4645    }
4646    if (element.hasActualElement()) {
4647      composeBoolean(t, "CitationStatusDateComponent", "actual", element.getActualElement(), -1);
4648    }
4649    if (element.hasPeriod()) {
4650      composePeriod(t, "CitationStatusDateComponent", "period", element.getPeriod(), -1);
4651    }
4652  }
4653
4654  protected void composeCitationCitedArtifactComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactComponent element, int index) {
4655    if (element == null) 
4656      return;
4657    Complex t;
4658    if (Utilities.noString(parentType))
4659      t = parent;
4660    else {
4661      t = parent.predicate("fhir:"+parentType+'.'+name);
4662    }
4663    composeBackboneElement(t, "citedArtifact", name, element, index);
4664    for (int i = 0; i < element.getIdentifier().size(); i++) {
4665      composeIdentifier(t, "CitationCitedArtifactComponent", "identifier", element.getIdentifier().get(i), i);
4666    }
4667    for (int i = 0; i < element.getRelatedIdentifier().size(); i++) {
4668      composeIdentifier(t, "CitationCitedArtifactComponent", "relatedIdentifier", element.getRelatedIdentifier().get(i), i);
4669    }
4670    if (element.hasDateAccessedElement()) {
4671      composeDateTime(t, "CitationCitedArtifactComponent", "dateAccessed", element.getDateAccessedElement(), -1);
4672    }
4673    if (element.hasVersion()) {
4674      composeCitationCitedArtifactVersionComponent(t, "CitationCitedArtifactComponent", "version", element.getVersion(), -1);
4675    }
4676    for (int i = 0; i < element.getCurrentState().size(); i++) {
4677      composeCodeableConcept(t, "CitationCitedArtifactComponent", "currentState", element.getCurrentState().get(i), i);
4678    }
4679    for (int i = 0; i < element.getStatusDate().size(); i++) {
4680      composeCitationCitedArtifactStatusDateComponent(t, "CitationCitedArtifactComponent", "statusDate", element.getStatusDate().get(i), i);
4681    }
4682    for (int i = 0; i < element.getTitle().size(); i++) {
4683      composeCitationCitedArtifactTitleComponent(t, "CitationCitedArtifactComponent", "title", element.getTitle().get(i), i);
4684    }
4685    for (int i = 0; i < element.getAbstract().size(); i++) {
4686      composeCitationCitedArtifactAbstractComponent(t, "CitationCitedArtifactComponent", "abstract", element.getAbstract().get(i), i);
4687    }
4688    if (element.hasPart()) {
4689      composeCitationCitedArtifactPartComponent(t, "CitationCitedArtifactComponent", "part", element.getPart(), -1);
4690    }
4691    for (int i = 0; i < element.getRelatesTo().size(); i++) {
4692      composeRelatedArtifact(t, "CitationCitedArtifactComponent", "relatesTo", element.getRelatesTo().get(i), i);
4693    }
4694    for (int i = 0; i < element.getPublicationForm().size(); i++) {
4695      composeCitationCitedArtifactPublicationFormComponent(t, "CitationCitedArtifactComponent", "publicationForm", element.getPublicationForm().get(i), i);
4696    }
4697    for (int i = 0; i < element.getWebLocation().size(); i++) {
4698      composeCitationCitedArtifactWebLocationComponent(t, "CitationCitedArtifactComponent", "webLocation", element.getWebLocation().get(i), i);
4699    }
4700    for (int i = 0; i < element.getClassification().size(); i++) {
4701      composeCitationCitedArtifactClassificationComponent(t, "CitationCitedArtifactComponent", "classification", element.getClassification().get(i), i);
4702    }
4703    if (element.hasContributorship()) {
4704      composeCitationCitedArtifactContributorshipComponent(t, "CitationCitedArtifactComponent", "contributorship", element.getContributorship(), -1);
4705    }
4706    for (int i = 0; i < element.getNote().size(); i++) {
4707      composeAnnotation(t, "CitationCitedArtifactComponent", "note", element.getNote().get(i), i);
4708    }
4709  }
4710
4711  protected void composeCitationCitedArtifactVersionComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactVersionComponent element, int index) {
4712    if (element == null) 
4713      return;
4714    Complex t;
4715    if (Utilities.noString(parentType))
4716      t = parent;
4717    else {
4718      t = parent.predicate("fhir:"+parentType+'.'+name);
4719    }
4720    composeBackboneElement(t, "version", name, element, index);
4721    if (element.hasValueElement()) {
4722      composeString(t, "CitationCitedArtifactVersionComponent", "value", element.getValueElement(), -1);
4723    }
4724    if (element.hasBaseCitation()) {
4725      composeReference(t, "CitationCitedArtifactVersionComponent", "baseCitation", element.getBaseCitation(), -1);
4726    }
4727  }
4728
4729  protected void composeCitationCitedArtifactStatusDateComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactStatusDateComponent element, int index) {
4730    if (element == null) 
4731      return;
4732    Complex t;
4733    if (Utilities.noString(parentType))
4734      t = parent;
4735    else {
4736      t = parent.predicate("fhir:"+parentType+'.'+name);
4737    }
4738    composeBackboneElement(t, "statusDate", name, element, index);
4739    if (element.hasActivity()) {
4740      composeCodeableConcept(t, "CitationCitedArtifactStatusDateComponent", "activity", element.getActivity(), -1);
4741    }
4742    if (element.hasActualElement()) {
4743      composeBoolean(t, "CitationCitedArtifactStatusDateComponent", "actual", element.getActualElement(), -1);
4744    }
4745    if (element.hasPeriod()) {
4746      composePeriod(t, "CitationCitedArtifactStatusDateComponent", "period", element.getPeriod(), -1);
4747    }
4748  }
4749
4750  protected void composeCitationCitedArtifactTitleComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactTitleComponent element, int index) {
4751    if (element == null) 
4752      return;
4753    Complex t;
4754    if (Utilities.noString(parentType))
4755      t = parent;
4756    else {
4757      t = parent.predicate("fhir:"+parentType+'.'+name);
4758    }
4759    composeBackboneElement(t, "title", name, element, index);
4760    for (int i = 0; i < element.getType().size(); i++) {
4761      composeCodeableConcept(t, "CitationCitedArtifactTitleComponent", "type", element.getType().get(i), i);
4762    }
4763    if (element.hasLanguage()) {
4764      composeCodeableConcept(t, "CitationCitedArtifactTitleComponent", "language", element.getLanguage(), -1);
4765    }
4766    if (element.hasTextElement()) {
4767      composeMarkdown(t, "CitationCitedArtifactTitleComponent", "text", element.getTextElement(), -1);
4768    }
4769  }
4770
4771  protected void composeCitationCitedArtifactAbstractComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactAbstractComponent element, int index) {
4772    if (element == null) 
4773      return;
4774    Complex t;
4775    if (Utilities.noString(parentType))
4776      t = parent;
4777    else {
4778      t = parent.predicate("fhir:"+parentType+'.'+name);
4779    }
4780    composeBackboneElement(t, "abstract", name, element, index);
4781    if (element.hasType()) {
4782      composeCodeableConcept(t, "CitationCitedArtifactAbstractComponent", "type", element.getType(), -1);
4783    }
4784    if (element.hasLanguage()) {
4785      composeCodeableConcept(t, "CitationCitedArtifactAbstractComponent", "language", element.getLanguage(), -1);
4786    }
4787    if (element.hasTextElement()) {
4788      composeMarkdown(t, "CitationCitedArtifactAbstractComponent", "text", element.getTextElement(), -1);
4789    }
4790    if (element.hasCopyrightElement()) {
4791      composeMarkdown(t, "CitationCitedArtifactAbstractComponent", "copyright", element.getCopyrightElement(), -1);
4792    }
4793  }
4794
4795  protected void composeCitationCitedArtifactPartComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactPartComponent element, int index) {
4796    if (element == null) 
4797      return;
4798    Complex t;
4799    if (Utilities.noString(parentType))
4800      t = parent;
4801    else {
4802      t = parent.predicate("fhir:"+parentType+'.'+name);
4803    }
4804    composeBackboneElement(t, "part", name, element, index);
4805    if (element.hasType()) {
4806      composeCodeableConcept(t, "CitationCitedArtifactPartComponent", "type", element.getType(), -1);
4807    }
4808    if (element.hasValueElement()) {
4809      composeString(t, "CitationCitedArtifactPartComponent", "value", element.getValueElement(), -1);
4810    }
4811    if (element.hasBaseCitation()) {
4812      composeReference(t, "CitationCitedArtifactPartComponent", "baseCitation", element.getBaseCitation(), -1);
4813    }
4814  }
4815
4816  protected void composeCitationCitedArtifactPublicationFormComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactPublicationFormComponent element, int index) {
4817    if (element == null) 
4818      return;
4819    Complex t;
4820    if (Utilities.noString(parentType))
4821      t = parent;
4822    else {
4823      t = parent.predicate("fhir:"+parentType+'.'+name);
4824    }
4825    composeBackboneElement(t, "publicationForm", name, element, index);
4826    if (element.hasPublishedIn()) {
4827      composeCitationCitedArtifactPublicationFormPublishedInComponent(t, "CitationCitedArtifactPublicationFormComponent", "publishedIn", element.getPublishedIn(), -1);
4828    }
4829    if (element.hasPeriodicRelease()) {
4830      composeCitationCitedArtifactPublicationFormPeriodicReleaseComponent(t, "CitationCitedArtifactPublicationFormComponent", "periodicRelease", element.getPeriodicRelease(), -1);
4831    }
4832    if (element.hasArticleDateElement()) {
4833      composeDateTime(t, "CitationCitedArtifactPublicationFormComponent", "articleDate", element.getArticleDateElement(), -1);
4834    }
4835    if (element.hasLastRevisionDateElement()) {
4836      composeDateTime(t, "CitationCitedArtifactPublicationFormComponent", "lastRevisionDate", element.getLastRevisionDateElement(), -1);
4837    }
4838    for (int i = 0; i < element.getLanguage().size(); i++) {
4839      composeCodeableConcept(t, "CitationCitedArtifactPublicationFormComponent", "language", element.getLanguage().get(i), i);
4840    }
4841    if (element.hasAccessionNumberElement()) {
4842      composeString(t, "CitationCitedArtifactPublicationFormComponent", "accessionNumber", element.getAccessionNumberElement(), -1);
4843    }
4844    if (element.hasPageStringElement()) {
4845      composeString(t, "CitationCitedArtifactPublicationFormComponent", "pageString", element.getPageStringElement(), -1);
4846    }
4847    if (element.hasFirstPageElement()) {
4848      composeString(t, "CitationCitedArtifactPublicationFormComponent", "firstPage", element.getFirstPageElement(), -1);
4849    }
4850    if (element.hasLastPageElement()) {
4851      composeString(t, "CitationCitedArtifactPublicationFormComponent", "lastPage", element.getLastPageElement(), -1);
4852    }
4853    if (element.hasPageCountElement()) {
4854      composeString(t, "CitationCitedArtifactPublicationFormComponent", "pageCount", element.getPageCountElement(), -1);
4855    }
4856    if (element.hasCopyrightElement()) {
4857      composeMarkdown(t, "CitationCitedArtifactPublicationFormComponent", "copyright", element.getCopyrightElement(), -1);
4858    }
4859  }
4860
4861  protected void composeCitationCitedArtifactPublicationFormPublishedInComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactPublicationFormPublishedInComponent element, int index) {
4862    if (element == null) 
4863      return;
4864    Complex t;
4865    if (Utilities.noString(parentType))
4866      t = parent;
4867    else {
4868      t = parent.predicate("fhir:"+parentType+'.'+name);
4869    }
4870    composeBackboneElement(t, "publishedIn", name, element, index);
4871    if (element.hasType()) {
4872      composeCodeableConcept(t, "CitationCitedArtifactPublicationFormPublishedInComponent", "type", element.getType(), -1);
4873    }
4874    for (int i = 0; i < element.getIdentifier().size(); i++) {
4875      composeIdentifier(t, "CitationCitedArtifactPublicationFormPublishedInComponent", "identifier", element.getIdentifier().get(i), i);
4876    }
4877    if (element.hasTitleElement()) {
4878      composeString(t, "CitationCitedArtifactPublicationFormPublishedInComponent", "title", element.getTitleElement(), -1);
4879    }
4880    if (element.hasPublisher()) {
4881      composeReference(t, "CitationCitedArtifactPublicationFormPublishedInComponent", "publisher", element.getPublisher(), -1);
4882    }
4883    if (element.hasPublisherLocationElement()) {
4884      composeString(t, "CitationCitedArtifactPublicationFormPublishedInComponent", "publisherLocation", element.getPublisherLocationElement(), -1);
4885    }
4886  }
4887
4888  protected void composeCitationCitedArtifactPublicationFormPeriodicReleaseComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactPublicationFormPeriodicReleaseComponent element, int index) {
4889    if (element == null) 
4890      return;
4891    Complex t;
4892    if (Utilities.noString(parentType))
4893      t = parent;
4894    else {
4895      t = parent.predicate("fhir:"+parentType+'.'+name);
4896    }
4897    composeBackboneElement(t, "periodicRelease", name, element, index);
4898    if (element.hasCitedMedium()) {
4899      composeCodeableConcept(t, "CitationCitedArtifactPublicationFormPeriodicReleaseComponent", "citedMedium", element.getCitedMedium(), -1);
4900    }
4901    if (element.hasVolumeElement()) {
4902      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseComponent", "volume", element.getVolumeElement(), -1);
4903    }
4904    if (element.hasIssueElement()) {
4905      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseComponent", "issue", element.getIssueElement(), -1);
4906    }
4907    if (element.hasDateOfPublication()) {
4908      composeCitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent(t, "CitationCitedArtifactPublicationFormPeriodicReleaseComponent", "dateOfPublication", element.getDateOfPublication(), -1);
4909    }
4910  }
4911
4912  protected void composeCitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent element, int index) {
4913    if (element == null) 
4914      return;
4915    Complex t;
4916    if (Utilities.noString(parentType))
4917      t = parent;
4918    else {
4919      t = parent.predicate("fhir:"+parentType+'.'+name);
4920    }
4921    composeBackboneElement(t, "dateOfPublication", name, element, index);
4922    if (element.hasDateElement()) {
4923      composeDate(t, "CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent", "date", element.getDateElement(), -1);
4924    }
4925    if (element.hasYearElement()) {
4926      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent", "year", element.getYearElement(), -1);
4927    }
4928    if (element.hasMonthElement()) {
4929      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent", "month", element.getMonthElement(), -1);
4930    }
4931    if (element.hasDayElement()) {
4932      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent", "day", element.getDayElement(), -1);
4933    }
4934    if (element.hasSeasonElement()) {
4935      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent", "season", element.getSeasonElement(), -1);
4936    }
4937    if (element.hasTextElement()) {
4938      composeString(t, "CitationCitedArtifactPublicationFormPeriodicReleaseDateOfPublicationComponent", "text", element.getTextElement(), -1);
4939    }
4940  }
4941
4942  protected void composeCitationCitedArtifactWebLocationComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactWebLocationComponent element, int index) {
4943    if (element == null) 
4944      return;
4945    Complex t;
4946    if (Utilities.noString(parentType))
4947      t = parent;
4948    else {
4949      t = parent.predicate("fhir:"+parentType+'.'+name);
4950    }
4951    composeBackboneElement(t, "webLocation", name, element, index);
4952    for (int i = 0; i < element.getClassifier().size(); i++) {
4953      composeCodeableConcept(t, "CitationCitedArtifactWebLocationComponent", "classifier", element.getClassifier().get(i), i);
4954    }
4955    if (element.hasUrlElement()) {
4956      composeUri(t, "CitationCitedArtifactWebLocationComponent", "url", element.getUrlElement(), -1);
4957    }
4958  }
4959
4960  protected void composeCitationCitedArtifactClassificationComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactClassificationComponent element, int index) {
4961    if (element == null) 
4962      return;
4963    Complex t;
4964    if (Utilities.noString(parentType))
4965      t = parent;
4966    else {
4967      t = parent.predicate("fhir:"+parentType+'.'+name);
4968    }
4969    composeBackboneElement(t, "classification", name, element, index);
4970    if (element.hasType()) {
4971      composeCodeableConcept(t, "CitationCitedArtifactClassificationComponent", "type", element.getType(), -1);
4972    }
4973    for (int i = 0; i < element.getClassifier().size(); i++) {
4974      composeCodeableConcept(t, "CitationCitedArtifactClassificationComponent", "classifier", element.getClassifier().get(i), i);
4975    }
4976    if (element.hasWhoClassified()) {
4977      composeCitationCitedArtifactClassificationWhoClassifiedComponent(t, "CitationCitedArtifactClassificationComponent", "whoClassified", element.getWhoClassified(), -1);
4978    }
4979  }
4980
4981  protected void composeCitationCitedArtifactClassificationWhoClassifiedComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactClassificationWhoClassifiedComponent element, int index) {
4982    if (element == null) 
4983      return;
4984    Complex t;
4985    if (Utilities.noString(parentType))
4986      t = parent;
4987    else {
4988      t = parent.predicate("fhir:"+parentType+'.'+name);
4989    }
4990    composeBackboneElement(t, "whoClassified", name, element, index);
4991    if (element.hasPerson()) {
4992      composeReference(t, "CitationCitedArtifactClassificationWhoClassifiedComponent", "person", element.getPerson(), -1);
4993    }
4994    if (element.hasOrganization()) {
4995      composeReference(t, "CitationCitedArtifactClassificationWhoClassifiedComponent", "organization", element.getOrganization(), -1);
4996    }
4997    if (element.hasPublisher()) {
4998      composeReference(t, "CitationCitedArtifactClassificationWhoClassifiedComponent", "publisher", element.getPublisher(), -1);
4999    }
5000    if (element.hasClassifierCopyrightElement()) {
5001      composeString(t, "CitationCitedArtifactClassificationWhoClassifiedComponent", "classifierCopyright", element.getClassifierCopyrightElement(), -1);
5002    }
5003    if (element.hasFreeToShareElement()) {
5004      composeBoolean(t, "CitationCitedArtifactClassificationWhoClassifiedComponent", "freeToShare", element.getFreeToShareElement(), -1);
5005    }
5006  }
5007
5008  protected void composeCitationCitedArtifactContributorshipComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactContributorshipComponent element, int index) {
5009    if (element == null) 
5010      return;
5011    Complex t;
5012    if (Utilities.noString(parentType))
5013      t = parent;
5014    else {
5015      t = parent.predicate("fhir:"+parentType+'.'+name);
5016    }
5017    composeBackboneElement(t, "contributorship", name, element, index);
5018    if (element.hasCompleteElement()) {
5019      composeBoolean(t, "CitationCitedArtifactContributorshipComponent", "complete", element.getCompleteElement(), -1);
5020    }
5021    for (int i = 0; i < element.getEntry().size(); i++) {
5022      composeCitationCitedArtifactContributorshipEntryComponent(t, "CitationCitedArtifactContributorshipComponent", "entry", element.getEntry().get(i), i);
5023    }
5024    for (int i = 0; i < element.getSummary().size(); i++) {
5025      composeCitationCitedArtifactContributorshipSummaryComponent(t, "CitationCitedArtifactContributorshipComponent", "summary", element.getSummary().get(i), i);
5026    }
5027  }
5028
5029  protected void composeCitationCitedArtifactContributorshipEntryComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactContributorshipEntryComponent element, int index) {
5030    if (element == null) 
5031      return;
5032    Complex t;
5033    if (Utilities.noString(parentType))
5034      t = parent;
5035    else {
5036      t = parent.predicate("fhir:"+parentType+'.'+name);
5037    }
5038    composeBackboneElement(t, "entry", name, element, index);
5039    if (element.hasName()) {
5040      composeHumanName(t, "CitationCitedArtifactContributorshipEntryComponent", "name", element.getName(), -1);
5041    }
5042    if (element.hasInitialsElement()) {
5043      composeString(t, "CitationCitedArtifactContributorshipEntryComponent", "initials", element.getInitialsElement(), -1);
5044    }
5045    if (element.hasCollectiveNameElement()) {
5046      composeString(t, "CitationCitedArtifactContributorshipEntryComponent", "collectiveName", element.getCollectiveNameElement(), -1);
5047    }
5048    for (int i = 0; i < element.getIdentifier().size(); i++) {
5049      composeIdentifier(t, "CitationCitedArtifactContributorshipEntryComponent", "identifier", element.getIdentifier().get(i), i);
5050    }
5051    for (int i = 0; i < element.getAffiliationInfo().size(); i++) {
5052      composeCitationCitedArtifactContributorshipEntryAffiliationInfoComponent(t, "CitationCitedArtifactContributorshipEntryComponent", "affiliationInfo", element.getAffiliationInfo().get(i), i);
5053    }
5054    for (int i = 0; i < element.getAddress().size(); i++) {
5055      composeAddress(t, "CitationCitedArtifactContributorshipEntryComponent", "address", element.getAddress().get(i), i);
5056    }
5057    for (int i = 0; i < element.getTelecom().size(); i++) {
5058      composeContactPoint(t, "CitationCitedArtifactContributorshipEntryComponent", "telecom", element.getTelecom().get(i), i);
5059    }
5060    for (int i = 0; i < element.getContributionType().size(); i++) {
5061      composeCodeableConcept(t, "CitationCitedArtifactContributorshipEntryComponent", "contributionType", element.getContributionType().get(i), i);
5062    }
5063    if (element.hasRole()) {
5064      composeCodeableConcept(t, "CitationCitedArtifactContributorshipEntryComponent", "role", element.getRole(), -1);
5065    }
5066    for (int i = 0; i < element.getContributionInstance().size(); i++) {
5067      composeCitationCitedArtifactContributorshipEntryContributionInstanceComponent(t, "CitationCitedArtifactContributorshipEntryComponent", "contributionInstance", element.getContributionInstance().get(i), i);
5068    }
5069    if (element.hasCorrespondingContactElement()) {
5070      composeBoolean(t, "CitationCitedArtifactContributorshipEntryComponent", "correspondingContact", element.getCorrespondingContactElement(), -1);
5071    }
5072    if (element.hasRankingOrderElement()) {
5073      composePositiveInt(t, "CitationCitedArtifactContributorshipEntryComponent", "rankingOrder", element.getRankingOrderElement(), -1);
5074    }
5075  }
5076
5077  protected void composeCitationCitedArtifactContributorshipEntryAffiliationInfoComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactContributorshipEntryAffiliationInfoComponent element, int index) {
5078    if (element == null) 
5079      return;
5080    Complex t;
5081    if (Utilities.noString(parentType))
5082      t = parent;
5083    else {
5084      t = parent.predicate("fhir:"+parentType+'.'+name);
5085    }
5086    composeBackboneElement(t, "affiliationInfo", name, element, index);
5087    if (element.hasAffiliationElement()) {
5088      composeString(t, "CitationCitedArtifactContributorshipEntryAffiliationInfoComponent", "affiliation", element.getAffiliationElement(), -1);
5089    }
5090    if (element.hasRoleElement()) {
5091      composeString(t, "CitationCitedArtifactContributorshipEntryAffiliationInfoComponent", "role", element.getRoleElement(), -1);
5092    }
5093    for (int i = 0; i < element.getIdentifier().size(); i++) {
5094      composeIdentifier(t, "CitationCitedArtifactContributorshipEntryAffiliationInfoComponent", "identifier", element.getIdentifier().get(i), i);
5095    }
5096  }
5097
5098  protected void composeCitationCitedArtifactContributorshipEntryContributionInstanceComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent element, int index) {
5099    if (element == null) 
5100      return;
5101    Complex t;
5102    if (Utilities.noString(parentType))
5103      t = parent;
5104    else {
5105      t = parent.predicate("fhir:"+parentType+'.'+name);
5106    }
5107    composeBackboneElement(t, "contributionInstance", name, element, index);
5108    if (element.hasType()) {
5109      composeCodeableConcept(t, "CitationCitedArtifactContributorshipEntryContributionInstanceComponent", "type", element.getType(), -1);
5110    }
5111    if (element.hasTimeElement()) {
5112      composeDateTime(t, "CitationCitedArtifactContributorshipEntryContributionInstanceComponent", "time", element.getTimeElement(), -1);
5113    }
5114  }
5115
5116  protected void composeCitationCitedArtifactContributorshipSummaryComponent(Complex parent, String parentType, String name, Citation.CitationCitedArtifactContributorshipSummaryComponent element, int index) {
5117    if (element == null) 
5118      return;
5119    Complex t;
5120    if (Utilities.noString(parentType))
5121      t = parent;
5122    else {
5123      t = parent.predicate("fhir:"+parentType+'.'+name);
5124    }
5125    composeBackboneElement(t, "summary", name, element, index);
5126    if (element.hasType()) {
5127      composeCodeableConcept(t, "CitationCitedArtifactContributorshipSummaryComponent", "type", element.getType(), -1);
5128    }
5129    if (element.hasStyle()) {
5130      composeCodeableConcept(t, "CitationCitedArtifactContributorshipSummaryComponent", "style", element.getStyle(), -1);
5131    }
5132    if (element.hasSource()) {
5133      composeCodeableConcept(t, "CitationCitedArtifactContributorshipSummaryComponent", "source", element.getSource(), -1);
5134    }
5135    if (element.hasValueElement()) {
5136      composeMarkdown(t, "CitationCitedArtifactContributorshipSummaryComponent", "value", element.getValueElement(), -1);
5137    }
5138  }
5139
5140  protected void composeClaim(Complex parent, String parentType, String name, Claim element, int index) {
5141    if (element == null) 
5142      return;
5143    Complex t;
5144    if (Utilities.noString(parentType))
5145      t = parent;
5146    else {
5147      t = parent.predicate("fhir:"+parentType+'.'+name);
5148    }
5149    composeDomainResource(t, "Claim", name, element, index);
5150    for (int i = 0; i < element.getIdentifier().size(); i++) {
5151      composeIdentifier(t, "Claim", "identifier", element.getIdentifier().get(i), i);
5152    }
5153    if (element.hasStatusElement()) {
5154      composeEnum(t, "Claim", "status", element.getStatusElement(), -1);
5155    }
5156    if (element.hasType()) {
5157      composeCodeableConcept(t, "Claim", "type", element.getType(), -1);
5158    }
5159    if (element.hasSubType()) {
5160      composeCodeableConcept(t, "Claim", "subType", element.getSubType(), -1);
5161    }
5162    if (element.hasUseElement()) {
5163      composeEnum(t, "Claim", "use", element.getUseElement(), -1);
5164    }
5165    if (element.hasPatient()) {
5166      composeReference(t, "Claim", "patient", element.getPatient(), -1);
5167    }
5168    if (element.hasBillablePeriod()) {
5169      composePeriod(t, "Claim", "billablePeriod", element.getBillablePeriod(), -1);
5170    }
5171    if (element.hasCreatedElement()) {
5172      composeDateTime(t, "Claim", "created", element.getCreatedElement(), -1);
5173    }
5174    if (element.hasEnterer()) {
5175      composeReference(t, "Claim", "enterer", element.getEnterer(), -1);
5176    }
5177    if (element.hasInsurer()) {
5178      composeReference(t, "Claim", "insurer", element.getInsurer(), -1);
5179    }
5180    if (element.hasProvider()) {
5181      composeReference(t, "Claim", "provider", element.getProvider(), -1);
5182    }
5183    if (element.hasPriority()) {
5184      composeCodeableConcept(t, "Claim", "priority", element.getPriority(), -1);
5185    }
5186    if (element.hasFundsReserve()) {
5187      composeCodeableConcept(t, "Claim", "fundsReserve", element.getFundsReserve(), -1);
5188    }
5189    for (int i = 0; i < element.getRelated().size(); i++) {
5190      composeClaimRelatedClaimComponent(t, "Claim", "related", element.getRelated().get(i), i);
5191    }
5192    if (element.hasPrescription()) {
5193      composeReference(t, "Claim", "prescription", element.getPrescription(), -1);
5194    }
5195    if (element.hasOriginalPrescription()) {
5196      composeReference(t, "Claim", "originalPrescription", element.getOriginalPrescription(), -1);
5197    }
5198    if (element.hasPayee()) {
5199      composeClaimPayeeComponent(t, "Claim", "payee", element.getPayee(), -1);
5200    }
5201    if (element.hasReferral()) {
5202      composeReference(t, "Claim", "referral", element.getReferral(), -1);
5203    }
5204    if (element.hasFacility()) {
5205      composeReference(t, "Claim", "facility", element.getFacility(), -1);
5206    }
5207    for (int i = 0; i < element.getCareTeam().size(); i++) {
5208      composeClaimCareTeamComponent(t, "Claim", "careTeam", element.getCareTeam().get(i), i);
5209    }
5210    for (int i = 0; i < element.getSupportingInfo().size(); i++) {
5211      composeClaimSupportingInformationComponent(t, "Claim", "supportingInfo", element.getSupportingInfo().get(i), i);
5212    }
5213    for (int i = 0; i < element.getDiagnosis().size(); i++) {
5214      composeClaimDiagnosisComponent(t, "Claim", "diagnosis", element.getDiagnosis().get(i), i);
5215    }
5216    for (int i = 0; i < element.getProcedure().size(); i++) {
5217      composeClaimProcedureComponent(t, "Claim", "procedure", element.getProcedure().get(i), i);
5218    }
5219    for (int i = 0; i < element.getInsurance().size(); i++) {
5220      composeClaimInsuranceComponent(t, "Claim", "insurance", element.getInsurance().get(i), i);
5221    }
5222    if (element.hasAccident()) {
5223      composeClaimAccidentComponent(t, "Claim", "accident", element.getAccident(), -1);
5224    }
5225    for (int i = 0; i < element.getItem().size(); i++) {
5226      composeClaimItemComponent(t, "Claim", "item", element.getItem().get(i), i);
5227    }
5228    if (element.hasTotal()) {
5229      composeMoney(t, "Claim", "total", element.getTotal(), -1);
5230    }
5231  }
5232
5233  protected void composeClaimRelatedClaimComponent(Complex parent, String parentType, String name, Claim.RelatedClaimComponent element, int index) {
5234    if (element == null) 
5235      return;
5236    Complex t;
5237    if (Utilities.noString(parentType))
5238      t = parent;
5239    else {
5240      t = parent.predicate("fhir:"+parentType+'.'+name);
5241    }
5242    composeBackboneElement(t, "related", name, element, index);
5243    if (element.hasClaim()) {
5244      composeReference(t, "RelatedClaimComponent", "claim", element.getClaim(), -1);
5245    }
5246    if (element.hasRelationship()) {
5247      composeCodeableConcept(t, "RelatedClaimComponent", "relationship", element.getRelationship(), -1);
5248    }
5249    if (element.hasReference()) {
5250      composeIdentifier(t, "RelatedClaimComponent", "reference", element.getReference(), -1);
5251    }
5252  }
5253
5254  protected void composeClaimPayeeComponent(Complex parent, String parentType, String name, Claim.PayeeComponent element, int index) {
5255    if (element == null) 
5256      return;
5257    Complex t;
5258    if (Utilities.noString(parentType))
5259      t = parent;
5260    else {
5261      t = parent.predicate("fhir:"+parentType+'.'+name);
5262    }
5263    composeBackboneElement(t, "payee", name, element, index);
5264    if (element.hasType()) {
5265      composeCodeableConcept(t, "PayeeComponent", "type", element.getType(), -1);
5266    }
5267    if (element.hasParty()) {
5268      composeReference(t, "PayeeComponent", "party", element.getParty(), -1);
5269    }
5270  }
5271
5272  protected void composeClaimCareTeamComponent(Complex parent, String parentType, String name, Claim.CareTeamComponent element, int index) {
5273    if (element == null) 
5274      return;
5275    Complex t;
5276    if (Utilities.noString(parentType))
5277      t = parent;
5278    else {
5279      t = parent.predicate("fhir:"+parentType+'.'+name);
5280    }
5281    composeBackboneElement(t, "careTeam", name, element, index);
5282    if (element.hasSequenceElement()) {
5283      composePositiveInt(t, "CareTeamComponent", "sequence", element.getSequenceElement(), -1);
5284    }
5285    if (element.hasProvider()) {
5286      composeReference(t, "CareTeamComponent", "provider", element.getProvider(), -1);
5287    }
5288    if (element.hasResponsibleElement()) {
5289      composeBoolean(t, "CareTeamComponent", "responsible", element.getResponsibleElement(), -1);
5290    }
5291    if (element.hasRole()) {
5292      composeCodeableConcept(t, "CareTeamComponent", "role", element.getRole(), -1);
5293    }
5294    if (element.hasQualification()) {
5295      composeCodeableConcept(t, "CareTeamComponent", "qualification", element.getQualification(), -1);
5296    }
5297  }
5298
5299  protected void composeClaimSupportingInformationComponent(Complex parent, String parentType, String name, Claim.SupportingInformationComponent element, int index) {
5300    if (element == null) 
5301      return;
5302    Complex t;
5303    if (Utilities.noString(parentType))
5304      t = parent;
5305    else {
5306      t = parent.predicate("fhir:"+parentType+'.'+name);
5307    }
5308    composeBackboneElement(t, "supportingInfo", name, element, index);
5309    if (element.hasSequenceElement()) {
5310      composePositiveInt(t, "SupportingInformationComponent", "sequence", element.getSequenceElement(), -1);
5311    }
5312    if (element.hasCategory()) {
5313      composeCodeableConcept(t, "SupportingInformationComponent", "category", element.getCategory(), -1);
5314    }
5315    if (element.hasCode()) {
5316      composeCodeableConcept(t, "SupportingInformationComponent", "code", element.getCode(), -1);
5317    }
5318    if (element.hasTiming()) {
5319      composeType(t, "SupportingInformationComponent", "timing", element.getTiming(), -1);
5320    }
5321    if (element.hasValue()) {
5322      composeType(t, "SupportingInformationComponent", "value", element.getValue(), -1);
5323    }
5324    if (element.hasReason()) {
5325      composeCodeableConcept(t, "SupportingInformationComponent", "reason", element.getReason(), -1);
5326    }
5327  }
5328
5329  protected void composeClaimDiagnosisComponent(Complex parent, String parentType, String name, Claim.DiagnosisComponent element, int index) {
5330    if (element == null) 
5331      return;
5332    Complex t;
5333    if (Utilities.noString(parentType))
5334      t = parent;
5335    else {
5336      t = parent.predicate("fhir:"+parentType+'.'+name);
5337    }
5338    composeBackboneElement(t, "diagnosis", name, element, index);
5339    if (element.hasSequenceElement()) {
5340      composePositiveInt(t, "DiagnosisComponent", "sequence", element.getSequenceElement(), -1);
5341    }
5342    if (element.hasDiagnosis()) {
5343      composeType(t, "DiagnosisComponent", "diagnosis", element.getDiagnosis(), -1);
5344    }
5345    for (int i = 0; i < element.getType().size(); i++) {
5346      composeCodeableConcept(t, "DiagnosisComponent", "type", element.getType().get(i), i);
5347    }
5348    if (element.hasOnAdmission()) {
5349      composeCodeableConcept(t, "DiagnosisComponent", "onAdmission", element.getOnAdmission(), -1);
5350    }
5351    if (element.hasPackageCode()) {
5352      composeCodeableConcept(t, "DiagnosisComponent", "packageCode", element.getPackageCode(), -1);
5353    }
5354  }
5355
5356  protected void composeClaimProcedureComponent(Complex parent, String parentType, String name, Claim.ProcedureComponent element, int index) {
5357    if (element == null) 
5358      return;
5359    Complex t;
5360    if (Utilities.noString(parentType))
5361      t = parent;
5362    else {
5363      t = parent.predicate("fhir:"+parentType+'.'+name);
5364    }
5365    composeBackboneElement(t, "procedure", name, element, index);
5366    if (element.hasSequenceElement()) {
5367      composePositiveInt(t, "ProcedureComponent", "sequence", element.getSequenceElement(), -1);
5368    }
5369    for (int i = 0; i < element.getType().size(); i++) {
5370      composeCodeableConcept(t, "ProcedureComponent", "type", element.getType().get(i), i);
5371    }
5372    if (element.hasDateElement()) {
5373      composeDateTime(t, "ProcedureComponent", "date", element.getDateElement(), -1);
5374    }
5375    if (element.hasProcedure()) {
5376      composeType(t, "ProcedureComponent", "procedure", element.getProcedure(), -1);
5377    }
5378    for (int i = 0; i < element.getUdi().size(); i++) {
5379      composeReference(t, "ProcedureComponent", "udi", element.getUdi().get(i), i);
5380    }
5381  }
5382
5383  protected void composeClaimInsuranceComponent(Complex parent, String parentType, String name, Claim.InsuranceComponent element, int index) {
5384    if (element == null) 
5385      return;
5386    Complex t;
5387    if (Utilities.noString(parentType))
5388      t = parent;
5389    else {
5390      t = parent.predicate("fhir:"+parentType+'.'+name);
5391    }
5392    composeBackboneElement(t, "insurance", name, element, index);
5393    if (element.hasSequenceElement()) {
5394      composePositiveInt(t, "InsuranceComponent", "sequence", element.getSequenceElement(), -1);
5395    }
5396    if (element.hasFocalElement()) {
5397      composeBoolean(t, "InsuranceComponent", "focal", element.getFocalElement(), -1);
5398    }
5399    if (element.hasIdentifier()) {
5400      composeIdentifier(t, "InsuranceComponent", "identifier", element.getIdentifier(), -1);
5401    }
5402    if (element.hasCoverage()) {
5403      composeReference(t, "InsuranceComponent", "coverage", element.getCoverage(), -1);
5404    }
5405    if (element.hasBusinessArrangementElement()) {
5406      composeString(t, "InsuranceComponent", "businessArrangement", element.getBusinessArrangementElement(), -1);
5407    }
5408    for (int i = 0; i < element.getPreAuthRef().size(); i++) {
5409      composeString(t, "InsuranceComponent", "preAuthRef", element.getPreAuthRef().get(i), i);
5410    }
5411    if (element.hasClaimResponse()) {
5412      composeReference(t, "InsuranceComponent", "claimResponse", element.getClaimResponse(), -1);
5413    }
5414  }
5415
5416  protected void composeClaimAccidentComponent(Complex parent, String parentType, String name, Claim.AccidentComponent element, int index) {
5417    if (element == null) 
5418      return;
5419    Complex t;
5420    if (Utilities.noString(parentType))
5421      t = parent;
5422    else {
5423      t = parent.predicate("fhir:"+parentType+'.'+name);
5424    }
5425    composeBackboneElement(t, "accident", name, element, index);
5426    if (element.hasDateElement()) {
5427      composeDate(t, "AccidentComponent", "date", element.getDateElement(), -1);
5428    }
5429    if (element.hasType()) {
5430      composeCodeableConcept(t, "AccidentComponent", "type", element.getType(), -1);
5431    }
5432    if (element.hasLocation()) {
5433      composeType(t, "AccidentComponent", "location", element.getLocation(), -1);
5434    }
5435  }
5436
5437  protected void composeClaimItemComponent(Complex parent, String parentType, String name, Claim.ItemComponent element, int index) {
5438    if (element == null) 
5439      return;
5440    Complex t;
5441    if (Utilities.noString(parentType))
5442      t = parent;
5443    else {
5444      t = parent.predicate("fhir:"+parentType+'.'+name);
5445    }
5446    composeBackboneElement(t, "item", name, element, index);
5447    if (element.hasSequenceElement()) {
5448      composePositiveInt(t, "ItemComponent", "sequence", element.getSequenceElement(), -1);
5449    }
5450    for (int i = 0; i < element.getCareTeamSequence().size(); i++) {
5451      composePositiveInt(t, "ItemComponent", "careTeamSequence", element.getCareTeamSequence().get(i), i);
5452    }
5453    for (int i = 0; i < element.getDiagnosisSequence().size(); i++) {
5454      composePositiveInt(t, "ItemComponent", "diagnosisSequence", element.getDiagnosisSequence().get(i), i);
5455    }
5456    for (int i = 0; i < element.getProcedureSequence().size(); i++) {
5457      composePositiveInt(t, "ItemComponent", "procedureSequence", element.getProcedureSequence().get(i), i);
5458    }
5459    for (int i = 0; i < element.getInformationSequence().size(); i++) {
5460      composePositiveInt(t, "ItemComponent", "informationSequence", element.getInformationSequence().get(i), i);
5461    }
5462    if (element.hasRevenue()) {
5463      composeCodeableConcept(t, "ItemComponent", "revenue", element.getRevenue(), -1);
5464    }
5465    if (element.hasCategory()) {
5466      composeCodeableConcept(t, "ItemComponent", "category", element.getCategory(), -1);
5467    }
5468    if (element.hasProductOrService()) {
5469      composeCodeableConcept(t, "ItemComponent", "productOrService", element.getProductOrService(), -1);
5470    }
5471    for (int i = 0; i < element.getModifier().size(); i++) {
5472      composeCodeableConcept(t, "ItemComponent", "modifier", element.getModifier().get(i), i);
5473    }
5474    for (int i = 0; i < element.getProgramCode().size(); i++) {
5475      composeCodeableConcept(t, "ItemComponent", "programCode", element.getProgramCode().get(i), i);
5476    }
5477    if (element.hasServiced()) {
5478      composeType(t, "ItemComponent", "serviced", element.getServiced(), -1);
5479    }
5480    if (element.hasLocation()) {
5481      composeType(t, "ItemComponent", "location", element.getLocation(), -1);
5482    }
5483    if (element.hasQuantity()) {
5484      composeQuantity(t, "ItemComponent", "quantity", element.getQuantity(), -1);
5485    }
5486    if (element.hasUnitPrice()) {
5487      composeMoney(t, "ItemComponent", "unitPrice", element.getUnitPrice(), -1);
5488    }
5489    if (element.hasFactorElement()) {
5490      composeDecimal(t, "ItemComponent", "factor", element.getFactorElement(), -1);
5491    }
5492    if (element.hasNet()) {
5493      composeMoney(t, "ItemComponent", "net", element.getNet(), -1);
5494    }
5495    for (int i = 0; i < element.getUdi().size(); i++) {
5496      composeReference(t, "ItemComponent", "udi", element.getUdi().get(i), i);
5497    }
5498    if (element.hasBodySite()) {
5499      composeCodeableConcept(t, "ItemComponent", "bodySite", element.getBodySite(), -1);
5500    }
5501    for (int i = 0; i < element.getSubSite().size(); i++) {
5502      composeCodeableConcept(t, "ItemComponent", "subSite", element.getSubSite().get(i), i);
5503    }
5504    for (int i = 0; i < element.getEncounter().size(); i++) {
5505      composeReference(t, "ItemComponent", "encounter", element.getEncounter().get(i), i);
5506    }
5507    for (int i = 0; i < element.getDetail().size(); i++) {
5508      composeClaimDetailComponent(t, "ItemComponent", "detail", element.getDetail().get(i), i);
5509    }
5510  }
5511
5512  protected void composeClaimDetailComponent(Complex parent, String parentType, String name, Claim.DetailComponent element, int index) {
5513    if (element == null) 
5514      return;
5515    Complex t;
5516    if (Utilities.noString(parentType))
5517      t = parent;
5518    else {
5519      t = parent.predicate("fhir:"+parentType+'.'+name);
5520    }
5521    composeBackboneElement(t, "detail", name, element, index);
5522    if (element.hasSequenceElement()) {
5523      composePositiveInt(t, "DetailComponent", "sequence", element.getSequenceElement(), -1);
5524    }
5525    if (element.hasRevenue()) {
5526      composeCodeableConcept(t, "DetailComponent", "revenue", element.getRevenue(), -1);
5527    }
5528    if (element.hasCategory()) {
5529      composeCodeableConcept(t, "DetailComponent", "category", element.getCategory(), -1);
5530    }
5531    if (element.hasProductOrService()) {
5532      composeCodeableConcept(t, "DetailComponent", "productOrService", element.getProductOrService(), -1);
5533    }
5534    for (int i = 0; i < element.getModifier().size(); i++) {
5535      composeCodeableConcept(t, "DetailComponent", "modifier", element.getModifier().get(i), i);
5536    }
5537    for (int i = 0; i < element.getProgramCode().size(); i++) {
5538      composeCodeableConcept(t, "DetailComponent", "programCode", element.getProgramCode().get(i), i);
5539    }
5540    if (element.hasQuantity()) {
5541      composeQuantity(t, "DetailComponent", "quantity", element.getQuantity(), -1);
5542    }
5543    if (element.hasUnitPrice()) {
5544      composeMoney(t, "DetailComponent", "unitPrice", element.getUnitPrice(), -1);
5545    }
5546    if (element.hasFactorElement()) {
5547      composeDecimal(t, "DetailComponent", "factor", element.getFactorElement(), -1);
5548    }
5549    if (element.hasNet()) {
5550      composeMoney(t, "DetailComponent", "net", element.getNet(), -1);
5551    }
5552    for (int i = 0; i < element.getUdi().size(); i++) {
5553      composeReference(t, "DetailComponent", "udi", element.getUdi().get(i), i);
5554    }
5555    for (int i = 0; i < element.getSubDetail().size(); i++) {
5556      composeClaimSubDetailComponent(t, "DetailComponent", "subDetail", element.getSubDetail().get(i), i);
5557    }
5558  }
5559
5560  protected void composeClaimSubDetailComponent(Complex parent, String parentType, String name, Claim.SubDetailComponent element, int index) {
5561    if (element == null) 
5562      return;
5563    Complex t;
5564    if (Utilities.noString(parentType))
5565      t = parent;
5566    else {
5567      t = parent.predicate("fhir:"+parentType+'.'+name);
5568    }
5569    composeBackboneElement(t, "subDetail", name, element, index);
5570    if (element.hasSequenceElement()) {
5571      composePositiveInt(t, "SubDetailComponent", "sequence", element.getSequenceElement(), -1);
5572    }
5573    if (element.hasRevenue()) {
5574      composeCodeableConcept(t, "SubDetailComponent", "revenue", element.getRevenue(), -1);
5575    }
5576    if (element.hasCategory()) {
5577      composeCodeableConcept(t, "SubDetailComponent", "category", element.getCategory(), -1);
5578    }
5579    if (element.hasProductOrService()) {
5580      composeCodeableConcept(t, "SubDetailComponent", "productOrService", element.getProductOrService(), -1);
5581    }
5582    for (int i = 0; i < element.getModifier().size(); i++) {
5583      composeCodeableConcept(t, "SubDetailComponent", "modifier", element.getModifier().get(i), i);
5584    }
5585    for (int i = 0; i < element.getProgramCode().size(); i++) {
5586      composeCodeableConcept(t, "SubDetailComponent", "programCode", element.getProgramCode().get(i), i);
5587    }
5588    if (element.hasQuantity()) {
5589      composeQuantity(t, "SubDetailComponent", "quantity", element.getQuantity(), -1);
5590    }
5591    if (element.hasUnitPrice()) {
5592      composeMoney(t, "SubDetailComponent", "unitPrice", element.getUnitPrice(), -1);
5593    }
5594    if (element.hasFactorElement()) {
5595      composeDecimal(t, "SubDetailComponent", "factor", element.getFactorElement(), -1);
5596    }
5597    if (element.hasNet()) {
5598      composeMoney(t, "SubDetailComponent", "net", element.getNet(), -1);
5599    }
5600    for (int i = 0; i < element.getUdi().size(); i++) {
5601      composeReference(t, "SubDetailComponent", "udi", element.getUdi().get(i), i);
5602    }
5603  }
5604
5605  protected void composeClaimResponse(Complex parent, String parentType, String name, ClaimResponse element, int index) {
5606    if (element == null) 
5607      return;
5608    Complex t;
5609    if (Utilities.noString(parentType))
5610      t = parent;
5611    else {
5612      t = parent.predicate("fhir:"+parentType+'.'+name);
5613    }
5614    composeDomainResource(t, "ClaimResponse", name, element, index);
5615    for (int i = 0; i < element.getIdentifier().size(); i++) {
5616      composeIdentifier(t, "ClaimResponse", "identifier", element.getIdentifier().get(i), i);
5617    }
5618    if (element.hasStatusElement()) {
5619      composeEnum(t, "ClaimResponse", "status", element.getStatusElement(), -1);
5620    }
5621    if (element.hasType()) {
5622      composeCodeableConcept(t, "ClaimResponse", "type", element.getType(), -1);
5623    }
5624    if (element.hasSubType()) {
5625      composeCodeableConcept(t, "ClaimResponse", "subType", element.getSubType(), -1);
5626    }
5627    if (element.hasUseElement()) {
5628      composeEnum(t, "ClaimResponse", "use", element.getUseElement(), -1);
5629    }
5630    if (element.hasPatient()) {
5631      composeReference(t, "ClaimResponse", "patient", element.getPatient(), -1);
5632    }
5633    if (element.hasCreatedElement()) {
5634      composeDateTime(t, "ClaimResponse", "created", element.getCreatedElement(), -1);
5635    }
5636    if (element.hasInsurer()) {
5637      composeReference(t, "ClaimResponse", "insurer", element.getInsurer(), -1);
5638    }
5639    if (element.hasRequestor()) {
5640      composeReference(t, "ClaimResponse", "requestor", element.getRequestor(), -1);
5641    }
5642    if (element.hasRequest()) {
5643      composeReference(t, "ClaimResponse", "request", element.getRequest(), -1);
5644    }
5645    if (element.hasOutcomeElement()) {
5646      composeEnum(t, "ClaimResponse", "outcome", element.getOutcomeElement(), -1);
5647    }
5648    if (element.hasDispositionElement()) {
5649      composeString(t, "ClaimResponse", "disposition", element.getDispositionElement(), -1);
5650    }
5651    if (element.hasPreAuthRefElement()) {
5652      composeString(t, "ClaimResponse", "preAuthRef", element.getPreAuthRefElement(), -1);
5653    }
5654    if (element.hasPreAuthPeriod()) {
5655      composePeriod(t, "ClaimResponse", "preAuthPeriod", element.getPreAuthPeriod(), -1);
5656    }
5657    if (element.hasPayeeType()) {
5658      composeCodeableConcept(t, "ClaimResponse", "payeeType", element.getPayeeType(), -1);
5659    }
5660    for (int i = 0; i < element.getItem().size(); i++) {
5661      composeClaimResponseItemComponent(t, "ClaimResponse", "item", element.getItem().get(i), i);
5662    }
5663    for (int i = 0; i < element.getAddItem().size(); i++) {
5664      composeClaimResponseAddedItemComponent(t, "ClaimResponse", "addItem", element.getAddItem().get(i), i);
5665    }
5666    for (int i = 0; i < element.getAdjudication().size(); i++) {
5667      composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i);
5668    }
5669    for (int i = 0; i < element.getTotal().size(); i++) {
5670      composeClaimResponseTotalComponent(t, "ClaimResponse", "total", element.getTotal().get(i), i);
5671    }
5672    if (element.hasPayment()) {
5673      composeClaimResponsePaymentComponent(t, "ClaimResponse", "payment", element.getPayment(), -1);
5674    }
5675    if (element.hasFundsReserve()) {
5676      composeCodeableConcept(t, "ClaimResponse", "fundsReserve", element.getFundsReserve(), -1);
5677    }
5678    if (element.hasFormCode()) {
5679      composeCodeableConcept(t, "ClaimResponse", "formCode", element.getFormCode(), -1);
5680    }
5681    if (element.hasForm()) {
5682      composeAttachment(t, "ClaimResponse", "form", element.getForm(), -1);
5683    }
5684    for (int i = 0; i < element.getProcessNote().size(); i++) {
5685      composeClaimResponseNoteComponent(t, "ClaimResponse", "processNote", element.getProcessNote().get(i), i);
5686    }
5687    for (int i = 0; i < element.getCommunicationRequest().size(); i++) {
5688      composeReference(t, "ClaimResponse", "communicationRequest", element.getCommunicationRequest().get(i), i);
5689    }
5690    for (int i = 0; i < element.getInsurance().size(); i++) {
5691      composeClaimResponseInsuranceComponent(t, "ClaimResponse", "insurance", element.getInsurance().get(i), i);
5692    }
5693    for (int i = 0; i < element.getError().size(); i++) {
5694      composeClaimResponseErrorComponent(t, "ClaimResponse", "error", element.getError().get(i), i);
5695    }
5696  }
5697
5698  protected void composeClaimResponseItemComponent(Complex parent, String parentType, String name, ClaimResponse.ItemComponent element, int index) {
5699    if (element == null) 
5700      return;
5701    Complex t;
5702    if (Utilities.noString(parentType))
5703      t = parent;
5704    else {
5705      t = parent.predicate("fhir:"+parentType+'.'+name);
5706    }
5707    composeBackboneElement(t, "item", name, element, index);
5708    if (element.hasItemSequenceElement()) {
5709      composePositiveInt(t, "ItemComponent", "itemSequence", element.getItemSequenceElement(), -1);
5710    }
5711    for (int i = 0; i < element.getNoteNumber().size(); i++) {
5712      composePositiveInt(t, "ItemComponent", "noteNumber", element.getNoteNumber().get(i), i);
5713    }
5714    for (int i = 0; i < element.getAdjudication().size(); i++) {
5715      composeClaimResponseAdjudicationComponent(t, "ItemComponent", "adjudication", element.getAdjudication().get(i), i);
5716    }
5717    for (int i = 0; i < element.getDetail().size(); i++) {
5718      composeClaimResponseItemDetailComponent(t, "ItemComponent", "detail", element.getDetail().get(i), i);
5719    }
5720  }
5721
5722  protected void composeClaimResponseAdjudicationComponent(Complex parent, String parentType, String name, ClaimResponse.AdjudicationComponent element, int index) {
5723    if (element == null) 
5724      return;
5725    Complex t;
5726    if (Utilities.noString(parentType))
5727      t = parent;
5728    else {
5729      t = parent.predicate("fhir:"+parentType+'.'+name);
5730    }
5731    composeBackboneElement(t, "adjudication", name, element, index);
5732    if (element.hasCategory()) {
5733      composeCodeableConcept(t, "AdjudicationComponent", "category", element.getCategory(), -1);
5734    }
5735    if (element.hasReason()) {
5736      composeCodeableConcept(t, "AdjudicationComponent", "reason", element.getReason(), -1);
5737    }
5738    if (element.hasAmount()) {
5739      composeMoney(t, "AdjudicationComponent", "amount", element.getAmount(), -1);
5740    }
5741    if (element.hasValueElement()) {
5742      composeDecimal(t, "AdjudicationComponent", "value", element.getValueElement(), -1);
5743    }
5744  }
5745
5746  protected void composeClaimResponseItemDetailComponent(Complex parent, String parentType, String name, ClaimResponse.ItemDetailComponent element, int index) {
5747    if (element == null) 
5748      return;
5749    Complex t;
5750    if (Utilities.noString(parentType))
5751      t = parent;
5752    else {
5753      t = parent.predicate("fhir:"+parentType+'.'+name);
5754    }
5755    composeBackboneElement(t, "detail", name, element, index);
5756    if (element.hasDetailSequenceElement()) {
5757      composePositiveInt(t, "ItemDetailComponent", "detailSequence", element.getDetailSequenceElement(), -1);
5758    }
5759    for (int i = 0; i < element.getNoteNumber().size(); i++) {
5760      composePositiveInt(t, "ItemDetailComponent", "noteNumber", element.getNoteNumber().get(i), i);
5761    }
5762    for (int i = 0; i < element.getAdjudication().size(); i++) {
5763      composeClaimResponseAdjudicationComponent(t, "ItemDetailComponent", "adjudication", element.getAdjudication().get(i), i);
5764    }
5765    for (int i = 0; i < element.getSubDetail().size(); i++) {
5766      composeClaimResponseSubDetailComponent(t, "ItemDetailComponent", "subDetail", element.getSubDetail().get(i), i);
5767    }
5768  }
5769
5770  protected void composeClaimResponseSubDetailComponent(Complex parent, String parentType, String name, ClaimResponse.SubDetailComponent element, int index) {
5771    if (element == null) 
5772      return;
5773    Complex t;
5774    if (Utilities.noString(parentType))
5775      t = parent;
5776    else {
5777      t = parent.predicate("fhir:"+parentType+'.'+name);
5778    }
5779    composeBackboneElement(t, "subDetail", name, element, index);
5780    if (element.hasSubDetailSequenceElement()) {
5781      composePositiveInt(t, "SubDetailComponent", "subDetailSequence", element.getSubDetailSequenceElement(), -1);
5782    }
5783    for (int i = 0; i < element.getNoteNumber().size(); i++) {
5784      composePositiveInt(t, "SubDetailComponent", "noteNumber", element.getNoteNumber().get(i), i);
5785    }
5786    for (int i = 0; i < element.getAdjudication().size(); i++) {
5787      composeClaimResponseAdjudicationComponent(t, "SubDetailComponent", "adjudication", element.getAdjudication().get(i), i);
5788    }
5789  }
5790
5791  protected void composeClaimResponseAddedItemComponent(Complex parent, String parentType, String name, ClaimResponse.AddedItemComponent element, int index) {
5792    if (element == null) 
5793      return;
5794    Complex t;
5795    if (Utilities.noString(parentType))
5796      t = parent;
5797    else {
5798      t = parent.predicate("fhir:"+parentType+'.'+name);
5799    }
5800    composeBackboneElement(t, "addItem", name, element, index);
5801    for (int i = 0; i < element.getItemSequence().size(); i++) {
5802      composePositiveInt(t, "AddedItemComponent", "itemSequence", element.getItemSequence().get(i), i);
5803    }
5804    for (int i = 0; i < element.getDetailSequence().size(); i++) {
5805      composePositiveInt(t, "AddedItemComponent", "detailSequence", element.getDetailSequence().get(i), i);
5806    }
5807    for (int i = 0; i < element.getSubdetailSequence().size(); i++) {
5808      composePositiveInt(t, "AddedItemComponent", "subdetailSequence", element.getSubdetailSequence().get(i), i);
5809    }
5810    for (int i = 0; i < element.getProvider().size(); i++) {
5811      composeReference(t, "AddedItemComponent", "provider", element.getProvider().get(i), i);
5812    }
5813    if (element.hasProductOrService()) {
5814      composeCodeableConcept(t, "AddedItemComponent", "productOrService", element.getProductOrService(), -1);
5815    }
5816    for (int i = 0; i < element.getModifier().size(); i++) {
5817      composeCodeableConcept(t, "AddedItemComponent", "modifier", element.getModifier().get(i), i);
5818    }
5819    for (int i = 0; i < element.getProgramCode().size(); i++) {
5820      composeCodeableConcept(t, "AddedItemComponent", "programCode", element.getProgramCode().get(i), i);
5821    }
5822    if (element.hasServiced()) {
5823      composeType(t, "AddedItemComponent", "serviced", element.getServiced(), -1);
5824    }
5825    if (element.hasLocation()) {
5826      composeType(t, "AddedItemComponent", "location", element.getLocation(), -1);
5827    }
5828    if (element.hasQuantity()) {
5829      composeQuantity(t, "AddedItemComponent", "quantity", element.getQuantity(), -1);
5830    }
5831    if (element.hasUnitPrice()) {
5832      composeMoney(t, "AddedItemComponent", "unitPrice", element.getUnitPrice(), -1);
5833    }
5834    if (element.hasFactorElement()) {
5835      composeDecimal(t, "AddedItemComponent", "factor", element.getFactorElement(), -1);
5836    }
5837    if (element.hasNet()) {
5838      composeMoney(t, "AddedItemComponent", "net", element.getNet(), -1);
5839    }
5840    if (element.hasBodySite()) {
5841      composeCodeableConcept(t, "AddedItemComponent", "bodySite", element.getBodySite(), -1);
5842    }
5843    for (int i = 0; i < element.getSubSite().size(); i++) {
5844      composeCodeableConcept(t, "AddedItemComponent", "subSite", element.getSubSite().get(i), i);
5845    }
5846    for (int i = 0; i < element.getNoteNumber().size(); i++) {
5847      composePositiveInt(t, "AddedItemComponent", "noteNumber", element.getNoteNumber().get(i), i);
5848    }
5849    for (int i = 0; i < element.getAdjudication().size(); i++) {
5850      composeClaimResponseAdjudicationComponent(t, "AddedItemComponent", "adjudication", element.getAdjudication().get(i), i);
5851    }
5852    for (int i = 0; i < element.getDetail().size(); i++) {
5853      composeClaimResponseAddedItemDetailComponent(t, "AddedItemComponent", "detail", element.getDetail().get(i), i);
5854    }
5855  }
5856
5857  protected void composeClaimResponseAddedItemDetailComponent(Complex parent, String parentType, String name, ClaimResponse.AddedItemDetailComponent element, int index) {
5858    if (element == null) 
5859      return;
5860    Complex t;
5861    if (Utilities.noString(parentType))
5862      t = parent;
5863    else {
5864      t = parent.predicate("fhir:"+parentType+'.'+name);
5865    }
5866    composeBackboneElement(t, "detail", name, element, index);
5867    if (element.hasProductOrService()) {
5868      composeCodeableConcept(t, "AddedItemDetailComponent", "productOrService", element.getProductOrService(), -1);
5869    }
5870    for (int i = 0; i < element.getModifier().size(); i++) {
5871      composeCodeableConcept(t, "AddedItemDetailComponent", "modifier", element.getModifier().get(i), i);
5872    }
5873    if (element.hasQuantity()) {
5874      composeQuantity(t, "AddedItemDetailComponent", "quantity", element.getQuantity(), -1);
5875    }
5876    if (element.hasUnitPrice()) {
5877      composeMoney(t, "AddedItemDetailComponent", "unitPrice", element.getUnitPrice(), -1);
5878    }
5879    if (element.hasFactorElement()) {
5880      composeDecimal(t, "AddedItemDetailComponent", "factor", element.getFactorElement(), -1);
5881    }
5882    if (element.hasNet()) {
5883      composeMoney(t, "AddedItemDetailComponent", "net", element.getNet(), -1);
5884    }
5885    for (int i = 0; i < element.getNoteNumber().size(); i++) {
5886      composePositiveInt(t, "AddedItemDetailComponent", "noteNumber", element.getNoteNumber().get(i), i);
5887    }
5888    for (int i = 0; i < element.getAdjudication().size(); i++) {
5889      composeClaimResponseAdjudicationComponent(t, "AddedItemDetailComponent", "adjudication", element.getAdjudication().get(i), i);
5890    }
5891    for (int i = 0; i < element.getSubDetail().size(); i++) {
5892      composeClaimResponseAddedItemSubDetailComponent(t, "AddedItemDetailComponent", "subDetail", element.getSubDetail().get(i), i);
5893    }
5894  }
5895
5896  protected void composeClaimResponseAddedItemSubDetailComponent(Complex parent, String parentType, String name, ClaimResponse.AddedItemSubDetailComponent element, int index) {
5897    if (element == null) 
5898      return;
5899    Complex t;
5900    if (Utilities.noString(parentType))
5901      t = parent;
5902    else {
5903      t = parent.predicate("fhir:"+parentType+'.'+name);
5904    }
5905    composeBackboneElement(t, "subDetail", name, element, index);
5906    if (element.hasProductOrService()) {
5907      composeCodeableConcept(t, "AddedItemSubDetailComponent", "productOrService", element.getProductOrService(), -1);
5908    }
5909    for (int i = 0; i < element.getModifier().size(); i++) {
5910      composeCodeableConcept(t, "AddedItemSubDetailComponent", "modifier", element.getModifier().get(i), i);
5911    }
5912    if (element.hasQuantity()) {
5913      composeQuantity(t, "AddedItemSubDetailComponent", "quantity", element.getQuantity(), -1);
5914    }
5915    if (element.hasUnitPrice()) {
5916      composeMoney(t, "AddedItemSubDetailComponent", "unitPrice", element.getUnitPrice(), -1);
5917    }
5918    if (element.hasFactorElement()) {
5919      composeDecimal(t, "AddedItemSubDetailComponent", "factor", element.getFactorElement(), -1);
5920    }
5921    if (element.hasNet()) {
5922      composeMoney(t, "AddedItemSubDetailComponent", "net", element.getNet(), -1);
5923    }
5924    for (int i = 0; i < element.getNoteNumber().size(); i++) {
5925      composePositiveInt(t, "AddedItemSubDetailComponent", "noteNumber", element.getNoteNumber().get(i), i);
5926    }
5927    for (int i = 0; i < element.getAdjudication().size(); i++) {
5928      composeClaimResponseAdjudicationComponent(t, "AddedItemSubDetailComponent", "adjudication", element.getAdjudication().get(i), i);
5929    }
5930  }
5931
5932  protected void composeClaimResponseTotalComponent(Complex parent, String parentType, String name, ClaimResponse.TotalComponent element, int index) {
5933    if (element == null) 
5934      return;
5935    Complex t;
5936    if (Utilities.noString(parentType))
5937      t = parent;
5938    else {
5939      t = parent.predicate("fhir:"+parentType+'.'+name);
5940    }
5941    composeBackboneElement(t, "total", name, element, index);
5942    if (element.hasCategory()) {
5943      composeCodeableConcept(t, "TotalComponent", "category", element.getCategory(), -1);
5944    }
5945    if (element.hasAmount()) {
5946      composeMoney(t, "TotalComponent", "amount", element.getAmount(), -1);
5947    }
5948  }
5949
5950  protected void composeClaimResponsePaymentComponent(Complex parent, String parentType, String name, ClaimResponse.PaymentComponent element, int index) {
5951    if (element == null) 
5952      return;
5953    Complex t;
5954    if (Utilities.noString(parentType))
5955      t = parent;
5956    else {
5957      t = parent.predicate("fhir:"+parentType+'.'+name);
5958    }
5959    composeBackboneElement(t, "payment", name, element, index);
5960    if (element.hasType()) {
5961      composeCodeableConcept(t, "PaymentComponent", "type", element.getType(), -1);
5962    }
5963    if (element.hasAdjustment()) {
5964      composeMoney(t, "PaymentComponent", "adjustment", element.getAdjustment(), -1);
5965    }
5966    if (element.hasAdjustmentReason()) {
5967      composeCodeableConcept(t, "PaymentComponent", "adjustmentReason", element.getAdjustmentReason(), -1);
5968    }
5969    if (element.hasDateElement()) {
5970      composeDate(t, "PaymentComponent", "date", element.getDateElement(), -1);
5971    }
5972    if (element.hasAmount()) {
5973      composeMoney(t, "PaymentComponent", "amount", element.getAmount(), -1);
5974    }
5975    if (element.hasIdentifier()) {
5976      composeIdentifier(t, "PaymentComponent", "identifier", element.getIdentifier(), -1);
5977    }
5978  }
5979
5980  protected void composeClaimResponseNoteComponent(Complex parent, String parentType, String name, ClaimResponse.NoteComponent element, int index) {
5981    if (element == null) 
5982      return;
5983    Complex t;
5984    if (Utilities.noString(parentType))
5985      t = parent;
5986    else {
5987      t = parent.predicate("fhir:"+parentType+'.'+name);
5988    }
5989    composeBackboneElement(t, "processNote", name, element, index);
5990    if (element.hasNumberElement()) {
5991      composePositiveInt(t, "NoteComponent", "number", element.getNumberElement(), -1);
5992    }
5993    if (element.hasTypeElement()) {
5994      composeEnum(t, "NoteComponent", "type", element.getTypeElement(), -1);
5995    }
5996    if (element.hasTextElement()) {
5997      composeString(t, "NoteComponent", "text", element.getTextElement(), -1);
5998    }
5999    if (element.hasLanguage()) {
6000      composeCodeableConcept(t, "NoteComponent", "language", element.getLanguage(), -1);
6001    }
6002  }
6003
6004  protected void composeClaimResponseInsuranceComponent(Complex parent, String parentType, String name, ClaimResponse.InsuranceComponent element, int index) {
6005    if (element == null) 
6006      return;
6007    Complex t;
6008    if (Utilities.noString(parentType))
6009      t = parent;
6010    else {
6011      t = parent.predicate("fhir:"+parentType+'.'+name);
6012    }
6013    composeBackboneElement(t, "insurance", name, element, index);
6014    if (element.hasSequenceElement()) {
6015      composePositiveInt(t, "InsuranceComponent", "sequence", element.getSequenceElement(), -1);
6016    }
6017    if (element.hasFocalElement()) {
6018      composeBoolean(t, "InsuranceComponent", "focal", element.getFocalElement(), -1);
6019    }
6020    if (element.hasCoverage()) {
6021      composeReference(t, "InsuranceComponent", "coverage", element.getCoverage(), -1);
6022    }
6023    if (element.hasBusinessArrangementElement()) {
6024      composeString(t, "InsuranceComponent", "businessArrangement", element.getBusinessArrangementElement(), -1);
6025    }
6026    if (element.hasClaimResponse()) {
6027      composeReference(t, "InsuranceComponent", "claimResponse", element.getClaimResponse(), -1);
6028    }
6029  }
6030
6031  protected void composeClaimResponseErrorComponent(Complex parent, String parentType, String name, ClaimResponse.ErrorComponent element, int index) {
6032    if (element == null) 
6033      return;
6034    Complex t;
6035    if (Utilities.noString(parentType))
6036      t = parent;
6037    else {
6038      t = parent.predicate("fhir:"+parentType+'.'+name);
6039    }
6040    composeBackboneElement(t, "error", name, element, index);
6041    if (element.hasItemSequenceElement()) {
6042      composePositiveInt(t, "ErrorComponent", "itemSequence", element.getItemSequenceElement(), -1);
6043    }
6044    if (element.hasDetailSequenceElement()) {
6045      composePositiveInt(t, "ErrorComponent", "detailSequence", element.getDetailSequenceElement(), -1);
6046    }
6047    if (element.hasSubDetailSequenceElement()) {
6048      composePositiveInt(t, "ErrorComponent", "subDetailSequence", element.getSubDetailSequenceElement(), -1);
6049    }
6050    if (element.hasCode()) {
6051      composeCodeableConcept(t, "ErrorComponent", "code", element.getCode(), -1);
6052    }
6053  }
6054
6055  protected void composeClinicalImpression(Complex parent, String parentType, String name, ClinicalImpression element, int index) {
6056    if (element == null) 
6057      return;
6058    Complex t;
6059    if (Utilities.noString(parentType))
6060      t = parent;
6061    else {
6062      t = parent.predicate("fhir:"+parentType+'.'+name);
6063    }
6064    composeDomainResource(t, "ClinicalImpression", name, element, index);
6065    for (int i = 0; i < element.getIdentifier().size(); i++) {
6066      composeIdentifier(t, "ClinicalImpression", "identifier", element.getIdentifier().get(i), i);
6067    }
6068    if (element.hasStatusElement()) {
6069      composeEnum(t, "ClinicalImpression", "status", element.getStatusElement(), -1);
6070    }
6071    if (element.hasStatusReason()) {
6072      composeCodeableConcept(t, "ClinicalImpression", "statusReason", element.getStatusReason(), -1);
6073    }
6074    if (element.hasDescriptionElement()) {
6075      composeString(t, "ClinicalImpression", "description", element.getDescriptionElement(), -1);
6076    }
6077    if (element.hasSubject()) {
6078      composeReference(t, "ClinicalImpression", "subject", element.getSubject(), -1);
6079    }
6080    if (element.hasEncounter()) {
6081      composeReference(t, "ClinicalImpression", "encounter", element.getEncounter(), -1);
6082    }
6083    if (element.hasEffective()) {
6084      composeType(t, "ClinicalImpression", "effective", element.getEffective(), -1);
6085    }
6086    if (element.hasDateElement()) {
6087      composeDateTime(t, "ClinicalImpression", "date", element.getDateElement(), -1);
6088    }
6089    if (element.hasPerformer()) {
6090      composeReference(t, "ClinicalImpression", "performer", element.getPerformer(), -1);
6091    }
6092    if (element.hasPrevious()) {
6093      composeReference(t, "ClinicalImpression", "previous", element.getPrevious(), -1);
6094    }
6095    for (int i = 0; i < element.getProblem().size(); i++) {
6096      composeReference(t, "ClinicalImpression", "problem", element.getProblem().get(i), i);
6097    }
6098    for (int i = 0; i < element.getProtocol().size(); i++) {
6099      composeUri(t, "ClinicalImpression", "protocol", element.getProtocol().get(i), i);
6100    }
6101    if (element.hasSummaryElement()) {
6102      composeString(t, "ClinicalImpression", "summary", element.getSummaryElement(), -1);
6103    }
6104    for (int i = 0; i < element.getFinding().size(); i++) {
6105      composeClinicalImpressionFindingComponent(t, "ClinicalImpression", "finding", element.getFinding().get(i), i);
6106    }
6107    for (int i = 0; i < element.getPrognosisCodeableConcept().size(); i++) {
6108      composeCodeableConcept(t, "ClinicalImpression", "prognosisCodeableConcept", element.getPrognosisCodeableConcept().get(i), i);
6109    }
6110    for (int i = 0; i < element.getPrognosisReference().size(); i++) {
6111      composeReference(t, "ClinicalImpression", "prognosisReference", element.getPrognosisReference().get(i), i);
6112    }
6113    for (int i = 0; i < element.getSupportingInfo().size(); i++) {
6114      composeReference(t, "ClinicalImpression", "supportingInfo", element.getSupportingInfo().get(i), i);
6115    }
6116    for (int i = 0; i < element.getNote().size(); i++) {
6117      composeAnnotation(t, "ClinicalImpression", "note", element.getNote().get(i), i);
6118    }
6119  }
6120
6121  protected void composeClinicalImpressionFindingComponent(Complex parent, String parentType, String name, ClinicalImpression.ClinicalImpressionFindingComponent element, int index) {
6122    if (element == null) 
6123      return;
6124    Complex t;
6125    if (Utilities.noString(parentType))
6126      t = parent;
6127    else {
6128      t = parent.predicate("fhir:"+parentType+'.'+name);
6129    }
6130    composeBackboneElement(t, "finding", name, element, index);
6131    if (element.hasItem()) {
6132      composeCodeableReference(t, "ClinicalImpressionFindingComponent", "item", element.getItem(), -1);
6133    }
6134    if (element.hasBasisElement()) {
6135      composeString(t, "ClinicalImpressionFindingComponent", "basis", element.getBasisElement(), -1);
6136    }
6137  }
6138
6139  protected void composeClinicalUseDefinition(Complex parent, String parentType, String name, ClinicalUseDefinition element, int index) {
6140    if (element == null) 
6141      return;
6142    Complex t;
6143    if (Utilities.noString(parentType))
6144      t = parent;
6145    else {
6146      t = parent.predicate("fhir:"+parentType+'.'+name);
6147    }
6148    composeDomainResource(t, "ClinicalUseDefinition", name, element, index);
6149    for (int i = 0; i < element.getIdentifier().size(); i++) {
6150      composeIdentifier(t, "ClinicalUseDefinition", "identifier", element.getIdentifier().get(i), i);
6151    }
6152    if (element.hasTypeElement()) {
6153      composeEnum(t, "ClinicalUseDefinition", "type", element.getTypeElement(), -1);
6154    }
6155    for (int i = 0; i < element.getCategory().size(); i++) {
6156      composeCodeableConcept(t, "ClinicalUseDefinition", "category", element.getCategory().get(i), i);
6157    }
6158    for (int i = 0; i < element.getSubject().size(); i++) {
6159      composeReference(t, "ClinicalUseDefinition", "subject", element.getSubject().get(i), i);
6160    }
6161    if (element.hasStatus()) {
6162      composeCodeableConcept(t, "ClinicalUseDefinition", "status", element.getStatus(), -1);
6163    }
6164    if (element.hasContraindication()) {
6165      composeClinicalUseDefinitionContraindicationComponent(t, "ClinicalUseDefinition", "contraindication", element.getContraindication(), -1);
6166    }
6167    if (element.hasIndication()) {
6168      composeClinicalUseDefinitionIndicationComponent(t, "ClinicalUseDefinition", "indication", element.getIndication(), -1);
6169    }
6170    if (element.hasInteraction()) {
6171      composeClinicalUseDefinitionInteractionComponent(t, "ClinicalUseDefinition", "interaction", element.getInteraction(), -1);
6172    }
6173    for (int i = 0; i < element.getPopulation().size(); i++) {
6174      composeReference(t, "ClinicalUseDefinition", "population", element.getPopulation().get(i), i);
6175    }
6176    if (element.hasUndesirableEffect()) {
6177      composeClinicalUseDefinitionUndesirableEffectComponent(t, "ClinicalUseDefinition", "undesirableEffect", element.getUndesirableEffect(), -1);
6178    }
6179    if (element.hasWarning()) {
6180      composeClinicalUseDefinitionWarningComponent(t, "ClinicalUseDefinition", "warning", element.getWarning(), -1);
6181    }
6182  }
6183
6184  protected void composeClinicalUseDefinitionContraindicationComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent element, int index) {
6185    if (element == null) 
6186      return;
6187    Complex t;
6188    if (Utilities.noString(parentType))
6189      t = parent;
6190    else {
6191      t = parent.predicate("fhir:"+parentType+'.'+name);
6192    }
6193    composeBackboneElement(t, "contraindication", name, element, index);
6194    if (element.hasDiseaseSymptomProcedure()) {
6195      composeCodeableReference(t, "ClinicalUseDefinitionContraindicationComponent", "diseaseSymptomProcedure", element.getDiseaseSymptomProcedure(), -1);
6196    }
6197    if (element.hasDiseaseStatus()) {
6198      composeCodeableReference(t, "ClinicalUseDefinitionContraindicationComponent", "diseaseStatus", element.getDiseaseStatus(), -1);
6199    }
6200    for (int i = 0; i < element.getComorbidity().size(); i++) {
6201      composeCodeableReference(t, "ClinicalUseDefinitionContraindicationComponent", "comorbidity", element.getComorbidity().get(i), i);
6202    }
6203    for (int i = 0; i < element.getIndication().size(); i++) {
6204      composeReference(t, "ClinicalUseDefinitionContraindicationComponent", "indication", element.getIndication().get(i), i);
6205    }
6206    for (int i = 0; i < element.getOtherTherapy().size(); i++) {
6207      composeClinicalUseDefinitionContraindicationOtherTherapyComponent(t, "ClinicalUseDefinitionContraindicationComponent", "otherTherapy", element.getOtherTherapy().get(i), i);
6208    }
6209  }
6210
6211  protected void composeClinicalUseDefinitionContraindicationOtherTherapyComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent element, int index) {
6212    if (element == null) 
6213      return;
6214    Complex t;
6215    if (Utilities.noString(parentType))
6216      t = parent;
6217    else {
6218      t = parent.predicate("fhir:"+parentType+'.'+name);
6219    }
6220    composeBackboneElement(t, "otherTherapy", name, element, index);
6221    if (element.hasRelationshipType()) {
6222      composeCodeableConcept(t, "ClinicalUseDefinitionContraindicationOtherTherapyComponent", "relationshipType", element.getRelationshipType(), -1);
6223    }
6224    if (element.hasTherapy()) {
6225      composeCodeableReference(t, "ClinicalUseDefinitionContraindicationOtherTherapyComponent", "therapy", element.getTherapy(), -1);
6226    }
6227  }
6228
6229  protected void composeClinicalUseDefinitionIndicationComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent element, int index) {
6230    if (element == null) 
6231      return;
6232    Complex t;
6233    if (Utilities.noString(parentType))
6234      t = parent;
6235    else {
6236      t = parent.predicate("fhir:"+parentType+'.'+name);
6237    }
6238    composeBackboneElement(t, "indication", name, element, index);
6239    if (element.hasDiseaseSymptomProcedure()) {
6240      composeCodeableReference(t, "ClinicalUseDefinitionIndicationComponent", "diseaseSymptomProcedure", element.getDiseaseSymptomProcedure(), -1);
6241    }
6242    if (element.hasDiseaseStatus()) {
6243      composeCodeableReference(t, "ClinicalUseDefinitionIndicationComponent", "diseaseStatus", element.getDiseaseStatus(), -1);
6244    }
6245    for (int i = 0; i < element.getComorbidity().size(); i++) {
6246      composeCodeableReference(t, "ClinicalUseDefinitionIndicationComponent", "comorbidity", element.getComorbidity().get(i), i);
6247    }
6248    if (element.hasIntendedEffect()) {
6249      composeCodeableReference(t, "ClinicalUseDefinitionIndicationComponent", "intendedEffect", element.getIntendedEffect(), -1);
6250    }
6251    if (element.hasDuration()) {
6252      composeQuantity(t, "ClinicalUseDefinitionIndicationComponent", "duration", element.getDuration(), -1);
6253    }
6254    for (int i = 0; i < element.getUndesirableEffect().size(); i++) {
6255      composeReference(t, "ClinicalUseDefinitionIndicationComponent", "undesirableEffect", element.getUndesirableEffect().get(i), i);
6256    }
6257    for (int i = 0; i < element.getOtherTherapy().size(); i++) {
6258      composeClinicalUseDefinitionContraindicationOtherTherapyComponent(t, "ClinicalUseDefinitionIndicationComponent", "otherTherapy", element.getOtherTherapy().get(i), i);
6259    }
6260  }
6261
6262  protected void composeClinicalUseDefinitionInteractionComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent element, int index) {
6263    if (element == null) 
6264      return;
6265    Complex t;
6266    if (Utilities.noString(parentType))
6267      t = parent;
6268    else {
6269      t = parent.predicate("fhir:"+parentType+'.'+name);
6270    }
6271    composeBackboneElement(t, "interaction", name, element, index);
6272    for (int i = 0; i < element.getInteractant().size(); i++) {
6273      composeClinicalUseDefinitionInteractionInteractantComponent(t, "ClinicalUseDefinitionInteractionComponent", "interactant", element.getInteractant().get(i), i);
6274    }
6275    if (element.hasType()) {
6276      composeCodeableConcept(t, "ClinicalUseDefinitionInteractionComponent", "type", element.getType(), -1);
6277    }
6278    if (element.hasEffect()) {
6279      composeCodeableReference(t, "ClinicalUseDefinitionInteractionComponent", "effect", element.getEffect(), -1);
6280    }
6281    if (element.hasIncidence()) {
6282      composeCodeableConcept(t, "ClinicalUseDefinitionInteractionComponent", "incidence", element.getIncidence(), -1);
6283    }
6284    for (int i = 0; i < element.getManagement().size(); i++) {
6285      composeCodeableConcept(t, "ClinicalUseDefinitionInteractionComponent", "management", element.getManagement().get(i), i);
6286    }
6287  }
6288
6289  protected void composeClinicalUseDefinitionInteractionInteractantComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent element, int index) {
6290    if (element == null) 
6291      return;
6292    Complex t;
6293    if (Utilities.noString(parentType))
6294      t = parent;
6295    else {
6296      t = parent.predicate("fhir:"+parentType+'.'+name);
6297    }
6298    composeBackboneElement(t, "interactant", name, element, index);
6299    if (element.hasItem()) {
6300      composeType(t, "ClinicalUseDefinitionInteractionInteractantComponent", "item", element.getItem(), -1);
6301    }
6302  }
6303
6304  protected void composeClinicalUseDefinitionUndesirableEffectComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent element, int index) {
6305    if (element == null) 
6306      return;
6307    Complex t;
6308    if (Utilities.noString(parentType))
6309      t = parent;
6310    else {
6311      t = parent.predicate("fhir:"+parentType+'.'+name);
6312    }
6313    composeBackboneElement(t, "undesirableEffect", name, element, index);
6314    if (element.hasSymptomConditionEffect()) {
6315      composeCodeableReference(t, "ClinicalUseDefinitionUndesirableEffectComponent", "symptomConditionEffect", element.getSymptomConditionEffect(), -1);
6316    }
6317    if (element.hasClassification()) {
6318      composeCodeableConcept(t, "ClinicalUseDefinitionUndesirableEffectComponent", "classification", element.getClassification(), -1);
6319    }
6320    if (element.hasFrequencyOfOccurrence()) {
6321      composeCodeableConcept(t, "ClinicalUseDefinitionUndesirableEffectComponent", "frequencyOfOccurrence", element.getFrequencyOfOccurrence(), -1);
6322    }
6323  }
6324
6325  protected void composeClinicalUseDefinitionWarningComponent(Complex parent, String parentType, String name, ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent element, int index) {
6326    if (element == null) 
6327      return;
6328    Complex t;
6329    if (Utilities.noString(parentType))
6330      t = parent;
6331    else {
6332      t = parent.predicate("fhir:"+parentType+'.'+name);
6333    }
6334    composeBackboneElement(t, "warning", name, element, index);
6335    if (element.hasDescriptionElement()) {
6336      composeMarkdown(t, "ClinicalUseDefinitionWarningComponent", "description", element.getDescriptionElement(), -1);
6337    }
6338    if (element.hasCode()) {
6339      composeCodeableConcept(t, "ClinicalUseDefinitionWarningComponent", "code", element.getCode(), -1);
6340    }
6341  }
6342
6343  protected void composeClinicalUseIssue(Complex parent, String parentType, String name, ClinicalUseIssue element, int index) {
6344    if (element == null) 
6345      return;
6346    Complex t;
6347    if (Utilities.noString(parentType))
6348      t = parent;
6349    else {
6350      t = parent.predicate("fhir:"+parentType+'.'+name);
6351    }
6352    composeDomainResource(t, "ClinicalUseIssue", name, element, index);
6353    for (int i = 0; i < element.getIdentifier().size(); i++) {
6354      composeIdentifier(t, "ClinicalUseIssue", "identifier", element.getIdentifier().get(i), i);
6355    }
6356    if (element.hasTypeElement()) {
6357      composeEnum(t, "ClinicalUseIssue", "type", element.getTypeElement(), -1);
6358    }
6359    for (int i = 0; i < element.getCategory().size(); i++) {
6360      composeCodeableConcept(t, "ClinicalUseIssue", "category", element.getCategory().get(i), i);
6361    }
6362    for (int i = 0; i < element.getSubject().size(); i++) {
6363      composeReference(t, "ClinicalUseIssue", "subject", element.getSubject().get(i), i);
6364    }
6365    if (element.hasStatus()) {
6366      composeCodeableConcept(t, "ClinicalUseIssue", "status", element.getStatus(), -1);
6367    }
6368    if (element.hasDescriptionElement()) {
6369      composeMarkdown(t, "ClinicalUseIssue", "description", element.getDescriptionElement(), -1);
6370    }
6371    if (element.hasContraindication()) {
6372      composeClinicalUseIssueContraindicationComponent(t, "ClinicalUseIssue", "contraindication", element.getContraindication(), -1);
6373    }
6374    if (element.hasIndication()) {
6375      composeClinicalUseIssueIndicationComponent(t, "ClinicalUseIssue", "indication", element.getIndication(), -1);
6376    }
6377    if (element.hasInteraction()) {
6378      composeClinicalUseIssueInteractionComponent(t, "ClinicalUseIssue", "interaction", element.getInteraction(), -1);
6379    }
6380    for (int i = 0; i < element.getPopulation().size(); i++) {
6381      composePopulation(t, "ClinicalUseIssue", "population", element.getPopulation().get(i), i);
6382    }
6383    if (element.hasUndesirableEffect()) {
6384      composeClinicalUseIssueUndesirableEffectComponent(t, "ClinicalUseIssue", "undesirableEffect", element.getUndesirableEffect(), -1);
6385    }
6386  }
6387
6388  protected void composeClinicalUseIssueContraindicationComponent(Complex parent, String parentType, String name, ClinicalUseIssue.ClinicalUseIssueContraindicationComponent element, int index) {
6389    if (element == null) 
6390      return;
6391    Complex t;
6392    if (Utilities.noString(parentType))
6393      t = parent;
6394    else {
6395      t = parent.predicate("fhir:"+parentType+'.'+name);
6396    }
6397    composeBackboneElement(t, "contraindication", name, element, index);
6398    if (element.hasDiseaseSymptomProcedure()) {
6399      composeCodeableReference(t, "ClinicalUseIssueContraindicationComponent", "diseaseSymptomProcedure", element.getDiseaseSymptomProcedure(), -1);
6400    }
6401    if (element.hasDiseaseStatus()) {
6402      composeCodeableReference(t, "ClinicalUseIssueContraindicationComponent", "diseaseStatus", element.getDiseaseStatus(), -1);
6403    }
6404    for (int i = 0; i < element.getComorbidity().size(); i++) {
6405      composeCodeableReference(t, "ClinicalUseIssueContraindicationComponent", "comorbidity", element.getComorbidity().get(i), i);
6406    }
6407    for (int i = 0; i < element.getIndication().size(); i++) {
6408      composeReference(t, "ClinicalUseIssueContraindicationComponent", "indication", element.getIndication().get(i), i);
6409    }
6410    for (int i = 0; i < element.getOtherTherapy().size(); i++) {
6411      composeClinicalUseIssueContraindicationOtherTherapyComponent(t, "ClinicalUseIssueContraindicationComponent", "otherTherapy", element.getOtherTherapy().get(i), i);
6412    }
6413  }
6414
6415  protected void composeClinicalUseIssueContraindicationOtherTherapyComponent(Complex parent, String parentType, String name, ClinicalUseIssue.ClinicalUseIssueContraindicationOtherTherapyComponent element, int index) {
6416    if (element == null) 
6417      return;
6418    Complex t;
6419    if (Utilities.noString(parentType))
6420      t = parent;
6421    else {
6422      t = parent.predicate("fhir:"+parentType+'.'+name);
6423    }
6424    composeBackboneElement(t, "otherTherapy", name, element, index);
6425    if (element.hasRelationshipType()) {
6426      composeCodeableConcept(t, "ClinicalUseIssueContraindicationOtherTherapyComponent", "relationshipType", element.getRelationshipType(), -1);
6427    }
6428    if (element.hasTherapy()) {
6429      composeCodeableReference(t, "ClinicalUseIssueContraindicationOtherTherapyComponent", "therapy", element.getTherapy(), -1);
6430    }
6431  }
6432
6433  protected void composeClinicalUseIssueIndicationComponent(Complex parent, String parentType, String name, ClinicalUseIssue.ClinicalUseIssueIndicationComponent element, int index) {
6434    if (element == null) 
6435      return;
6436    Complex t;
6437    if (Utilities.noString(parentType))
6438      t = parent;
6439    else {
6440      t = parent.predicate("fhir:"+parentType+'.'+name);
6441    }
6442    composeBackboneElement(t, "indication", name, element, index);
6443    if (element.hasDiseaseSymptomProcedure()) {
6444      composeCodeableReference(t, "ClinicalUseIssueIndicationComponent", "diseaseSymptomProcedure", element.getDiseaseSymptomProcedure(), -1);
6445    }
6446    if (element.hasDiseaseStatus()) {
6447      composeCodeableReference(t, "ClinicalUseIssueIndicationComponent", "diseaseStatus", element.getDiseaseStatus(), -1);
6448    }
6449    for (int i = 0; i < element.getComorbidity().size(); i++) {
6450      composeCodeableReference(t, "ClinicalUseIssueIndicationComponent", "comorbidity", element.getComorbidity().get(i), i);
6451    }
6452    if (element.hasIntendedEffect()) {
6453      composeCodeableReference(t, "ClinicalUseIssueIndicationComponent", "intendedEffect", element.getIntendedEffect(), -1);
6454    }
6455    if (element.hasDuration()) {
6456      composeQuantity(t, "ClinicalUseIssueIndicationComponent", "duration", element.getDuration(), -1);
6457    }
6458    for (int i = 0; i < element.getUndesirableEffect().size(); i++) {
6459      composeReference(t, "ClinicalUseIssueIndicationComponent", "undesirableEffect", element.getUndesirableEffect().get(i), i);
6460    }
6461    for (int i = 0; i < element.getOtherTherapy().size(); i++) {
6462      composeClinicalUseIssueContraindicationOtherTherapyComponent(t, "ClinicalUseIssueIndicationComponent", "otherTherapy", element.getOtherTherapy().get(i), i);
6463    }
6464  }
6465
6466  protected void composeClinicalUseIssueInteractionComponent(Complex parent, String parentType, String name, ClinicalUseIssue.ClinicalUseIssueInteractionComponent element, int index) {
6467    if (element == null) 
6468      return;
6469    Complex t;
6470    if (Utilities.noString(parentType))
6471      t = parent;
6472    else {
6473      t = parent.predicate("fhir:"+parentType+'.'+name);
6474    }
6475    composeBackboneElement(t, "interaction", name, element, index);
6476    for (int i = 0; i < element.getInteractant().size(); i++) {
6477      composeClinicalUseIssueInteractionInteractantComponent(t, "ClinicalUseIssueInteractionComponent", "interactant", element.getInteractant().get(i), i);
6478    }
6479    if (element.hasType()) {
6480      composeCodeableConcept(t, "ClinicalUseIssueInteractionComponent", "type", element.getType(), -1);
6481    }
6482    if (element.hasEffect()) {
6483      composeCodeableReference(t, "ClinicalUseIssueInteractionComponent", "effect", element.getEffect(), -1);
6484    }
6485    if (element.hasIncidence()) {
6486      composeCodeableConcept(t, "ClinicalUseIssueInteractionComponent", "incidence", element.getIncidence(), -1);
6487    }
6488    for (int i = 0; i < element.getManagement().size(); i++) {
6489      composeCodeableConcept(t, "ClinicalUseIssueInteractionComponent", "management", element.getManagement().get(i), i);
6490    }
6491  }
6492
6493  protected void composeClinicalUseIssueInteractionInteractantComponent(Complex parent, String parentType, String name, ClinicalUseIssue.ClinicalUseIssueInteractionInteractantComponent element, int index) {
6494    if (element == null) 
6495      return;
6496    Complex t;
6497    if (Utilities.noString(parentType))
6498      t = parent;
6499    else {
6500      t = parent.predicate("fhir:"+parentType+'.'+name);
6501    }
6502    composeBackboneElement(t, "interactant", name, element, index);
6503    if (element.hasItem()) {
6504      composeType(t, "ClinicalUseIssueInteractionInteractantComponent", "item", element.getItem(), -1);
6505    }
6506  }
6507
6508  protected void composeClinicalUseIssueUndesirableEffectComponent(Complex parent, String parentType, String name, ClinicalUseIssue.ClinicalUseIssueUndesirableEffectComponent element, int index) {
6509    if (element == null) 
6510      return;
6511    Complex t;
6512    if (Utilities.noString(parentType))
6513      t = parent;
6514    else {
6515      t = parent.predicate("fhir:"+parentType+'.'+name);
6516    }
6517    composeBackboneElement(t, "undesirableEffect", name, element, index);
6518    if (element.hasSymptomConditionEffect()) {
6519      composeCodeableReference(t, "ClinicalUseIssueUndesirableEffectComponent", "symptomConditionEffect", element.getSymptomConditionEffect(), -1);
6520    }
6521    if (element.hasClassification()) {
6522      composeCodeableConcept(t, "ClinicalUseIssueUndesirableEffectComponent", "classification", element.getClassification(), -1);
6523    }
6524    if (element.hasFrequencyOfOccurrence()) {
6525      composeCodeableConcept(t, "ClinicalUseIssueUndesirableEffectComponent", "frequencyOfOccurrence", element.getFrequencyOfOccurrence(), -1);
6526    }
6527  }
6528
6529  protected void composeCodeSystem(Complex parent, String parentType, String name, CodeSystem element, int index) {
6530    if (element == null) 
6531      return;
6532    Complex t;
6533    if (Utilities.noString(parentType))
6534      t = parent;
6535    else {
6536      t = parent.predicate("fhir:"+parentType+'.'+name);
6537    }
6538    composeCanonicalResource(t, "CodeSystem", name, element, index);
6539    if (element.hasUrlElement()) {
6540      composeUri(t, "CodeSystem", "url", element.getUrlElement(), -1);
6541    }
6542    for (int i = 0; i < element.getIdentifier().size(); i++) {
6543      composeIdentifier(t, "CodeSystem", "identifier", element.getIdentifier().get(i), i);
6544    }
6545    if (element.hasVersionElement()) {
6546      composeString(t, "CodeSystem", "version", element.getVersionElement(), -1);
6547    }
6548    if (element.hasNameElement()) {
6549      composeString(t, "CodeSystem", "name", element.getNameElement(), -1);
6550    }
6551    if (element.hasTitleElement()) {
6552      composeString(t, "CodeSystem", "title", element.getTitleElement(), -1);
6553    }
6554    if (element.hasStatusElement()) {
6555      composeEnum(t, "CodeSystem", "status", element.getStatusElement(), -1);
6556    }
6557    if (element.hasExperimentalElement()) {
6558      composeBoolean(t, "CodeSystem", "experimental", element.getExperimentalElement(), -1);
6559    }
6560    if (element.hasDateElement()) {
6561      composeDateTime(t, "CodeSystem", "date", element.getDateElement(), -1);
6562    }
6563    if (element.hasPublisherElement()) {
6564      composeString(t, "CodeSystem", "publisher", element.getPublisherElement(), -1);
6565    }
6566    for (int i = 0; i < element.getContact().size(); i++) {
6567      composeContactDetail(t, "CodeSystem", "contact", element.getContact().get(i), i);
6568    }
6569    if (element.hasDescriptionElement()) {
6570      composeMarkdown(t, "CodeSystem", "description", element.getDescriptionElement(), -1);
6571    }
6572    for (int i = 0; i < element.getUseContext().size(); i++) {
6573      composeUsageContext(t, "CodeSystem", "useContext", element.getUseContext().get(i), i);
6574    }
6575    for (int i = 0; i < element.getJurisdiction().size(); i++) {
6576      composeCodeableConcept(t, "CodeSystem", "jurisdiction", element.getJurisdiction().get(i), i);
6577    }
6578    if (element.hasPurposeElement()) {
6579      composeMarkdown(t, "CodeSystem", "purpose", element.getPurposeElement(), -1);
6580    }
6581    if (element.hasCopyrightElement()) {
6582      composeMarkdown(t, "CodeSystem", "copyright", element.getCopyrightElement(), -1);
6583    }
6584    if (element.hasCaseSensitiveElement()) {
6585      composeBoolean(t, "CodeSystem", "caseSensitive", element.getCaseSensitiveElement(), -1);
6586    }
6587    if (element.hasValueSetElement()) {
6588      composeCanonical(t, "CodeSystem", "valueSet", element.getValueSetElement(), -1);
6589    }
6590    if (element.hasHierarchyMeaningElement()) {
6591      composeEnum(t, "CodeSystem", "hierarchyMeaning", element.getHierarchyMeaningElement(), -1);
6592    }
6593    if (element.hasCompositionalElement()) {
6594      composeBoolean(t, "CodeSystem", "compositional", element.getCompositionalElement(), -1);
6595    }
6596    if (element.hasVersionNeededElement()) {
6597      composeBoolean(t, "CodeSystem", "versionNeeded", element.getVersionNeededElement(), -1);
6598    }
6599    if (element.hasContentElement()) {
6600      composeEnum(t, "CodeSystem", "content", element.getContentElement(), -1);
6601    }
6602    if (element.hasSupplementsElement()) {
6603      composeCanonical(t, "CodeSystem", "supplements", element.getSupplementsElement(), -1);
6604    }
6605    if (element.hasCountElement()) {
6606      composeUnsignedInt(t, "CodeSystem", "count", element.getCountElement(), -1);
6607    }
6608    for (int i = 0; i < element.getFilter().size(); i++) {
6609      composeCodeSystemFilterComponent(t, "CodeSystem", "filter", element.getFilter().get(i), i);
6610    }
6611    for (int i = 0; i < element.getProperty().size(); i++) {
6612      composeCodeSystemPropertyComponent(t, "CodeSystem", "property", element.getProperty().get(i), i);
6613    }
6614    for (int i = 0; i < element.getConcept().size(); i++) {
6615      composeCodeSystemConceptDefinitionComponent(t, "CodeSystem", "concept", element.getConcept().get(i), i);
6616    }
6617  }
6618
6619  protected void composeCodeSystemFilterComponent(Complex parent, String parentType, String name, CodeSystem.CodeSystemFilterComponent element, int index) {
6620    if (element == null) 
6621      return;
6622    Complex t;
6623    if (Utilities.noString(parentType))
6624      t = parent;
6625    else {
6626      t = parent.predicate("fhir:"+parentType+'.'+name);
6627    }
6628    composeBackboneElement(t, "filter", name, element, index);
6629    if (element.hasCodeElement()) {
6630      composeCode(t, "CodeSystemFilterComponent", "code", element.getCodeElement(), -1);
6631    }
6632    if (element.hasDescriptionElement()) {
6633      composeString(t, "CodeSystemFilterComponent", "description", element.getDescriptionElement(), -1);
6634    }
6635    for (int i = 0; i < element.getOperator().size(); i++) {
6636      composeEnum(t, "CodeSystemFilterComponent", "operator", element.getOperator().get(i), i);
6637    }
6638    if (element.hasValueElement()) {
6639      composeString(t, "CodeSystemFilterComponent", "value", element.getValueElement(), -1);
6640    }
6641  }
6642
6643  protected void composeCodeSystemPropertyComponent(Complex parent, String parentType, String name, CodeSystem.PropertyComponent element, int index) {
6644    if (element == null) 
6645      return;
6646    Complex t;
6647    if (Utilities.noString(parentType))
6648      t = parent;
6649    else {
6650      t = parent.predicate("fhir:"+parentType+'.'+name);
6651    }
6652    composeBackboneElement(t, "property", name, element, index);
6653    if (element.hasCodeElement()) {
6654      composeCode(t, "PropertyComponent", "code", element.getCodeElement(), -1);
6655    }
6656    if (element.hasUriElement()) {
6657      composeUri(t, "PropertyComponent", "uri", element.getUriElement(), -1);
6658    }
6659    if (element.hasDescriptionElement()) {
6660      composeString(t, "PropertyComponent", "description", element.getDescriptionElement(), -1);
6661    }
6662    if (element.hasTypeElement()) {
6663      composeEnum(t, "PropertyComponent", "type", element.getTypeElement(), -1);
6664    }
6665  }
6666
6667  protected void composeCodeSystemConceptDefinitionComponent(Complex parent, String parentType, String name, CodeSystem.ConceptDefinitionComponent element, int index) {
6668    if (element == null) 
6669      return;
6670    Complex t;
6671    if (Utilities.noString(parentType))
6672      t = parent;
6673    else {
6674      t = parent.predicate("fhir:"+parentType+'.'+name);
6675    }
6676    composeBackboneElement(t, "concept", name, element, index);
6677    if (element.hasCodeElement()) {
6678      composeCode(t, "ConceptDefinitionComponent", "code", element.getCodeElement(), -1);
6679    }
6680    if (element.hasDisplayElement()) {
6681      composeString(t, "ConceptDefinitionComponent", "display", element.getDisplayElement(), -1);
6682    }
6683    if (element.hasDefinitionElement()) {
6684      composeString(t, "ConceptDefinitionComponent", "definition", element.getDefinitionElement(), -1);
6685    }
6686    for (int i = 0; i < element.getDesignation().size(); i++) {
6687      composeCodeSystemConceptDefinitionDesignationComponent(t, "ConceptDefinitionComponent", "designation", element.getDesignation().get(i), i);
6688    }
6689    for (int i = 0; i < element.getProperty().size(); i++) {
6690      composeCodeSystemConceptPropertyComponent(t, "ConceptDefinitionComponent", "property", element.getProperty().get(i), i);
6691    }
6692    for (int i = 0; i < element.getConcept().size(); i++) {
6693      composeCodeSystemConceptDefinitionComponent(t, "ConceptDefinitionComponent", "concept", element.getConcept().get(i), i);
6694    }
6695  }
6696
6697  protected void composeCodeSystemConceptDefinitionDesignationComponent(Complex parent, String parentType, String name, CodeSystem.ConceptDefinitionDesignationComponent element, int index) {
6698    if (element == null) 
6699      return;
6700    Complex t;
6701    if (Utilities.noString(parentType))
6702      t = parent;
6703    else {
6704      t = parent.predicate("fhir:"+parentType+'.'+name);
6705    }
6706    composeBackboneElement(t, "designation", name, element, index);
6707    if (element.hasLanguageElement()) {
6708      composeCode(t, "ConceptDefinitionDesignationComponent", "language", element.getLanguageElement(), -1);
6709    }
6710    if (element.hasUse()) {
6711      composeCoding(t, "ConceptDefinitionDesignationComponent", "use", element.getUse(), -1);
6712    }
6713    if (element.hasValueElement()) {
6714      composeString(t, "ConceptDefinitionDesignationComponent", "value", element.getValueElement(), -1);
6715    }
6716  }
6717
6718  protected void composeCodeSystemConceptPropertyComponent(Complex parent, String parentType, String name, CodeSystem.ConceptPropertyComponent element, int index) {
6719    if (element == null) 
6720      return;
6721    Complex t;
6722    if (Utilities.noString(parentType))
6723      t = parent;
6724    else {
6725      t = parent.predicate("fhir:"+parentType+'.'+name);
6726    }
6727    composeBackboneElement(t, "property", name, element, index);
6728    if (element.hasCodeElement()) {
6729      composeCode(t, "ConceptPropertyComponent", "code", element.getCodeElement(), -1);
6730    }
6731    if (element.hasValue()) {
6732      composeType(t, "ConceptPropertyComponent", "value", element.getValue(), -1);
6733    }
6734  }
6735
6736  protected void composeCommunication(Complex parent, String parentType, String name, Communication element, int index) {
6737    if (element == null) 
6738      return;
6739    Complex t;
6740    if (Utilities.noString(parentType))
6741      t = parent;
6742    else {
6743      t = parent.predicate("fhir:"+parentType+'.'+name);
6744    }
6745    composeDomainResource(t, "Communication", name, element, index);
6746    for (int i = 0; i < element.getIdentifier().size(); i++) {
6747      composeIdentifier(t, "Communication", "identifier", element.getIdentifier().get(i), i);
6748    }
6749    for (int i = 0; i < element.getInstantiatesCanonical().size(); i++) {
6750      composeCanonical(t, "Communication", "instantiatesCanonical", element.getInstantiatesCanonical().get(i), i);
6751    }
6752    for (int i = 0; i < element.getInstantiatesUri().size(); i++) {
6753      composeUri(t, "Communication", "instantiatesUri", element.getInstantiatesUri().get(i), i);
6754    }
6755    for (int i = 0; i < element.getBasedOn().size(); i++) {
6756      composeReference(t, "Communication", "basedOn", element.getBasedOn().get(i), i);
6757    }
6758    for (int i = 0; i < element.getPartOf().size(); i++) {
6759      composeReference(t, "Communication", "partOf", element.getPartOf().get(i), i);
6760    }
6761    for (int i = 0; i < element.getInResponseTo().size(); i++) {
6762      composeReference(t, "Communication", "inResponseTo", element.getInResponseTo().get(i), i);
6763    }
6764    if (element.hasStatusElement()) {
6765      composeEnum(t, "Communication", "status", element.getStatusElement(), -1);
6766    }
6767    if (element.hasStatusReason()) {
6768      composeCodeableConcept(t, "Communication", "statusReason", element.getStatusReason(), -1);
6769    }
6770    for (int i = 0; i < element.getCategory().size(); i++) {
6771      composeCodeableConcept(t, "Communication", "category", element.getCategory().get(i), i);
6772    }
6773    if (element.hasPriorityElement()) {
6774      composeEnum(t, "Communication", "priority", element.getPriorityElement(), -1);
6775    }
6776    for (int i = 0; i < element.getMedium().size(); i++) {
6777      composeCodeableConcept(t, "Communication", "medium", element.getMedium().get(i), i);
6778    }
6779    if (element.hasSubject()) {
6780      composeReference(t, "Communication", "subject", element.getSubject(), -1);
6781    }
6782    if (element.hasTopic()) {
6783      composeCodeableConcept(t, "Communication", "topic", element.getTopic(), -1);
6784    }
6785    for (int i = 0; i < element.getAbout().size(); i++) {
6786      composeReference(t, "Communication", "about", element.getAbout().get(i), i);
6787    }
6788    if (element.hasEncounter()) {
6789      composeReference(t, "Communication", "encounter", element.getEncounter(), -1);
6790    }
6791    if (element.hasSentElement()) {
6792      composeDateTime(t, "Communication", "sent", element.getSentElement(), -1);
6793    }
6794    if (element.hasReceivedElement()) {
6795      composeDateTime(t, "Communication", "received", element.getReceivedElement(), -1);
6796    }
6797    for (int i = 0; i < element.getRecipient().size(); i++) {
6798      composeReference(t, "Communication", "recipient", element.getRecipient().get(i), i);
6799    }
6800    if (element.hasSender()) {
6801      composeReference(t, "Communication", "sender", element.getSender(), -1);
6802    }
6803    for (int i = 0; i < element.getReason().size(); i++) {
6804      composeCodeableReference(t, "Communication", "reason", element.getReason().get(i), i);
6805    }
6806    for (int i = 0; i < element.getPayload().size(); i++) {
6807      composeCommunicationPayloadComponent(t, "Communication", "payload", element.getPayload().get(i), i);
6808    }
6809    for (int i = 0; i < element.getNote().size(); i++) {
6810      composeAnnotation(t, "Communication", "note", element.getNote().get(i), i);
6811    }
6812  }
6813
6814  protected void composeCommunicationPayloadComponent(Complex parent, String parentType, String name, Communication.CommunicationPayloadComponent element, int index) {
6815    if (element == null) 
6816      return;
6817    Complex t;
6818    if (Utilities.noString(parentType))
6819      t = parent;
6820    else {
6821      t = parent.predicate("fhir:"+parentType+'.'+name);
6822    }
6823    composeBackboneElement(t, "payload", name, element, index);
6824    if (element.hasContent()) {
6825      composeType(t, "CommunicationPayloadComponent", "content", element.getContent(), -1);
6826    }
6827  }
6828
6829  protected void composeCommunicationRequest(Complex parent, String parentType, String name, CommunicationRequest element, int index) {
6830    if (element == null) 
6831      return;
6832    Complex t;
6833    if (Utilities.noString(parentType))
6834      t = parent;
6835    else {
6836      t = parent.predicate("fhir:"+parentType+'.'+name);
6837    }
6838    composeDomainResource(t, "CommunicationRequest", name, element, index);
6839    for (int i = 0; i < element.getIdentifier().size(); i++) {
6840      composeIdentifier(t, "CommunicationRequest", "identifier", element.getIdentifier().get(i), i);
6841    }
6842    for (int i = 0; i < element.getBasedOn().size(); i++) {
6843      composeReference(t, "CommunicationRequest", "basedOn", element.getBasedOn().get(i), i);
6844    }
6845    for (int i = 0; i < element.getReplaces().size(); i++) {
6846      composeReference(t, "CommunicationRequest", "replaces", element.getReplaces().get(i), i);
6847    }
6848    if (element.hasGroupIdentifier()) {
6849      composeIdentifier(t, "CommunicationRequest", "groupIdentifier", element.getGroupIdentifier(), -1);
6850    }
6851    if (element.hasStatusElement()) {
6852      composeEnum(t, "CommunicationRequest", "status", element.getStatusElement(), -1);
6853    }
6854    if (element.hasStatusReason()) {
6855      composeCodeableConcept(t, "CommunicationRequest", "statusReason", element.getStatusReason(), -1);
6856    }
6857    if (element.hasIntentElement()) {
6858      composeEnum(t, "CommunicationRequest", "intent", element.getIntentElement(), -1);
6859    }
6860    for (int i = 0; i < element.getCategory().size(); i++) {
6861      composeCodeableConcept(t, "CommunicationRequest", "category", element.getCategory().get(i), i);
6862    }
6863    if (element.hasPriorityElement()) {
6864      composeEnum(t, "CommunicationRequest", "priority", element.getPriorityElement(), -1);
6865    }
6866    if (element.hasDoNotPerformElement()) {
6867      composeBoolean(t, "CommunicationRequest", "doNotPerform", element.getDoNotPerformElement(), -1);
6868    }
6869    for (int i = 0; i < element.getMedium().size(); i++) {
6870      composeCodeableConcept(t, "CommunicationRequest", "medium", element.getMedium().get(i), i);
6871    }
6872    if (element.hasSubject()) {
6873      composeReference(t, "CommunicationRequest", "subject", element.getSubject(), -1);
6874    }
6875    for (int i = 0; i < element.getAbout().size(); i++) {
6876      composeReference(t, "CommunicationRequest", "about", element.getAbout().get(i), i);
6877    }
6878    if (element.hasEncounter()) {
6879      composeReference(t, "CommunicationRequest", "encounter", element.getEncounter(), -1);
6880    }
6881    for (int i = 0; i < element.getPayload().size(); i++) {
6882      composeCommunicationRequestPayloadComponent(t, "CommunicationRequest", "payload", element.getPayload().get(i), i);
6883    }
6884    if (element.hasOccurrence()) {
6885      composeType(t, "CommunicationRequest", "occurrence", element.getOccurrence(), -1);
6886    }
6887    if (element.hasAuthoredOnElement()) {
6888      composeDateTime(t, "CommunicationRequest", "authoredOn", element.getAuthoredOnElement(), -1);
6889    }
6890    if (element.hasRequester()) {
6891      composeReference(t, "CommunicationRequest", "requester", element.getRequester(), -1);
6892    }
6893    for (int i = 0; i < element.getRecipient().size(); i++) {
6894      composeReference(t, "CommunicationRequest", "recipient", element.getRecipient().get(i), i);
6895    }
6896    for (int i = 0; i < element.getInformationProvider().size(); i++) {
6897      composeReference(t, "CommunicationRequest", "informationProvider", element.getInformationProvider().get(i), i);
6898    }
6899    for (int i = 0; i < element.getReason().size(); i++) {
6900      composeCodeableReference(t, "CommunicationRequest", "reason", element.getReason().get(i), i);
6901    }
6902    for (int i = 0; i < element.getNote().size(); i++) {
6903      composeAnnotation(t, "CommunicationRequest", "note", element.getNote().get(i), i);
6904    }
6905  }
6906
6907  protected void composeCommunicationRequestPayloadComponent(Complex parent, String parentType, String name, CommunicationRequest.CommunicationRequestPayloadComponent element, int index) {
6908    if (element == null) 
6909      return;
6910    Complex t;
6911    if (Utilities.noString(parentType))
6912      t = parent;
6913    else {
6914      t = parent.predicate("fhir:"+parentType+'.'+name);
6915    }
6916    composeBackboneElement(t, "payload", name, element, index);
6917    if (element.hasContent()) {
6918      composeType(t, "CommunicationRequestPayloadComponent", "content", element.getContent(), -1);
6919    }
6920  }
6921
6922  protected void composeCompartmentDefinition(Complex parent, String parentType, String name, CompartmentDefinition element, int index) {
6923    if (element == null) 
6924      return;
6925    Complex t;
6926    if (Utilities.noString(parentType))
6927      t = parent;
6928    else {
6929      t = parent.predicate("fhir:"+parentType+'.'+name);
6930    }
6931    composeCanonicalResource(t, "CompartmentDefinition", name, element, index);
6932    if (element.hasUrlElement()) {
6933      composeUri(t, "CompartmentDefinition", "url", element.getUrlElement(), -1);
6934    }
6935    if (element.hasVersionElement()) {
6936      composeString(t, "CompartmentDefinition", "version", element.getVersionElement(), -1);
6937    }
6938    if (element.hasNameElement()) {
6939      composeString(t, "CompartmentDefinition", "name", element.getNameElement(), -1);
6940    }
6941    if (element.hasStatusElement()) {
6942      composeEnum(t, "CompartmentDefinition", "status", element.getStatusElement(), -1);
6943    }
6944    if (element.hasExperimentalElement()) {
6945      composeBoolean(t, "CompartmentDefinition", "experimental", element.getExperimentalElement(), -1);
6946    }
6947    if (element.hasDateElement()) {
6948      composeDateTime(t, "CompartmentDefinition", "date", element.getDateElement(), -1);
6949    }
6950    if (element.hasPublisherElement()) {
6951      composeString(t, "CompartmentDefinition", "publisher", element.getPublisherElement(), -1);
6952    }
6953    for (int i = 0; i < element.getContact().size(); i++) {
6954      composeContactDetail(t, "CompartmentDefinition", "contact", element.getContact().get(i), i);
6955    }
6956    if (element.hasDescriptionElement()) {
6957      composeMarkdown(t, "CompartmentDefinition", "description", element.getDescriptionElement(), -1);
6958    }
6959    for (int i = 0; i < element.getUseContext().size(); i++) {
6960      composeUsageContext(t, "CompartmentDefinition", "useContext", element.getUseContext().get(i), i);
6961    }
6962    if (element.hasPurposeElement()) {
6963      composeMarkdown(t, "CompartmentDefinition", "purpose", element.getPurposeElement(), -1);
6964    }
6965    if (element.hasCodeElement()) {
6966      composeEnum(t, "CompartmentDefinition", "code", element.getCodeElement(), -1);
6967    }
6968    if (element.hasSearchElement()) {
6969      composeBoolean(t, "CompartmentDefinition", "search", element.getSearchElement(), -1);
6970    }
6971    for (int i = 0; i < element.getResource().size(); i++) {
6972      composeCompartmentDefinitionResourceComponent(t, "CompartmentDefinition", "resource", element.getResource().get(i), i);
6973    }
6974  }
6975
6976  protected void composeCompartmentDefinitionResourceComponent(Complex parent, String parentType, String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element, int index) {
6977    if (element == null) 
6978      return;
6979    Complex t;
6980    if (Utilities.noString(parentType))
6981      t = parent;
6982    else {
6983      t = parent.predicate("fhir:"+parentType+'.'+name);
6984    }
6985    composeBackboneElement(t, "resource", name, element, index);
6986    if (element.hasCodeElement()) {
6987      composeCode(t, "CompartmentDefinitionResourceComponent", "code", element.getCodeElement(), -1);
6988    }
6989    for (int i = 0; i < element.getParam().size(); i++) {
6990      composeString(t, "CompartmentDefinitionResourceComponent", "param", element.getParam().get(i), i);
6991    }
6992    if (element.hasDocumentationElement()) {
6993      composeString(t, "CompartmentDefinitionResourceComponent", "documentation", element.getDocumentationElement(), -1);
6994    }
6995  }
6996
6997  protected void composeComposition(Complex parent, String parentType, String name, Composition element, int index) {
6998    if (element == null) 
6999      return;
7000    Complex t;
7001    if (Utilities.noString(parentType))
7002      t = parent;
7003    else {
7004      t = parent.predicate("fhir:"+parentType+'.'+name);
7005    }
7006    composeDomainResource(t, "Composition", name, element, index);
7007    if (element.hasIdentifier()) {
7008      composeIdentifier(t, "Composition", "identifier", element.getIdentifier(), -1);
7009    }
7010    if (element.hasStatusElement()) {
7011      composeEnum(t, "Composition", "status", element.getStatusElement(), -1);
7012    }
7013    if (element.hasType()) {
7014      composeCodeableConcept(t, "Composition", "type", element.getType(), -1);
7015    }
7016    for (int i = 0; i < element.getCategory().size(); i++) {
7017      composeCodeableConcept(t, "Composition", "category", element.getCategory().get(i), i);
7018    }
7019    if (element.hasSubject()) {
7020      composeReference(t, "Composition", "subject", element.getSubject(), -1);
7021    }
7022    if (element.hasEncounter()) {
7023      composeReference(t, "Composition", "encounter", element.getEncounter(), -1);
7024    }
7025    if (element.hasDateElement()) {
7026      composeDateTime(t, "Composition", "date", element.getDateElement(), -1);
7027    }
7028    for (int i = 0; i < element.getAuthor().size(); i++) {
7029      composeReference(t, "Composition", "author", element.getAuthor().get(i), i);
7030    }
7031    if (element.hasTitleElement()) {
7032      composeString(t, "Composition", "title", element.getTitleElement(), -1);
7033    }
7034    if (element.hasConfidentialityElement()) {
7035      composeCode(t, "Composition", "confidentiality", element.getConfidentialityElement(), -1);
7036    }
7037    for (int i = 0; i < element.getAttester().size(); i++) {
7038      composeCompositionAttesterComponent(t, "Composition", "attester", element.getAttester().get(i), i);
7039    }
7040    if (element.hasCustodian()) {
7041      composeReference(t, "Composition", "custodian", element.getCustodian(), -1);
7042    }
7043    for (int i = 0; i < element.getRelatesTo().size(); i++) {
7044      composeRelatedArtifact(t, "Composition", "relatesTo", element.getRelatesTo().get(i), i);
7045    }
7046    for (int i = 0; i < element.getEvent().size(); i++) {
7047      composeCompositionEventComponent(t, "Composition", "event", element.getEvent().get(i), i);
7048    }
7049    for (int i = 0; i < element.getSection().size(); i++) {
7050      composeCompositionSectionComponent(t, "Composition", "section", element.getSection().get(i), i);
7051    }
7052  }
7053
7054  protected void composeCompositionAttesterComponent(Complex parent, String parentType, String name, Composition.CompositionAttesterComponent element, int index) {
7055    if (element == null) 
7056      return;
7057    Complex t;
7058    if (Utilities.noString(parentType))
7059      t = parent;
7060    else {
7061      t = parent.predicate("fhir:"+parentType+'.'+name);
7062    }
7063    composeBackboneElement(t, "attester", name, element, index);
7064    if (element.hasMode()) {
7065      composeCodeableConcept(t, "CompositionAttesterComponent", "mode", element.getMode(), -1);
7066    }
7067    if (element.hasTimeElement()) {
7068      composeDateTime(t, "CompositionAttesterComponent", "time", element.getTimeElement(), -1);
7069    }
7070    if (element.hasParty()) {
7071      composeReference(t, "CompositionAttesterComponent", "party", element.getParty(), -1);
7072    }
7073  }
7074
7075  protected void composeCompositionEventComponent(Complex parent, String parentType, String name, Composition.CompositionEventComponent element, int index) {
7076    if (element == null) 
7077      return;
7078    Complex t;
7079    if (Utilities.noString(parentType))
7080      t = parent;
7081    else {
7082      t = parent.predicate("fhir:"+parentType+'.'+name);
7083    }
7084    composeBackboneElement(t, "event", name, element, index);
7085    for (int i = 0; i < element.getCode().size(); i++) {
7086      composeCodeableConcept(t, "CompositionEventComponent", "code", element.getCode().get(i), i);
7087    }
7088    if (element.hasPeriod()) {
7089      composePeriod(t, "CompositionEventComponent", "period", element.getPeriod(), -1);
7090    }
7091    for (int i = 0; i < element.getDetail().size(); i++) {
7092      composeReference(t, "CompositionEventComponent", "detail", element.getDetail().get(i), i);
7093    }
7094  }
7095
7096  protected void composeCompositionSectionComponent(Complex parent, String parentType, String name, Composition.SectionComponent element, int index) {
7097    if (element == null) 
7098      return;
7099    Complex t;
7100    if (Utilities.noString(parentType))
7101      t = parent;
7102    else {
7103      t = parent.predicate("fhir:"+parentType+'.'+name);
7104    }
7105    composeBackboneElement(t, "section", name, element, index);
7106    if (element.hasTitleElement()) {
7107      composeString(t, "SectionComponent", "title", element.getTitleElement(), -1);
7108    }
7109    if (element.hasCode()) {
7110      composeCodeableConcept(t, "SectionComponent", "code", element.getCode(), -1);
7111    }
7112    for (int i = 0; i < element.getAuthor().size(); i++) {
7113      composeReference(t, "SectionComponent", "author", element.getAuthor().get(i), i);
7114    }
7115    if (element.hasFocus()) {
7116      composeReference(t, "SectionComponent", "focus", element.getFocus(), -1);
7117    }
7118    if (element.hasText()) {
7119      composeNarrative(t, "SectionComponent", "text", element.getText(), -1);
7120    }
7121    if (element.hasModeElement()) {
7122      composeEnum(t, "SectionComponent", "mode", element.getModeElement(), -1);
7123    }
7124    if (element.hasOrderedBy()) {
7125      composeCodeableConcept(t, "SectionComponent", "orderedBy", element.getOrderedBy(), -1);
7126    }
7127    for (int i = 0; i < element.getEntry().size(); i++) {
7128      composeReference(t, "SectionComponent", "entry", element.getEntry().get(i), i);
7129    }
7130    if (element.hasEmptyReason()) {
7131      composeCodeableConcept(t, "SectionComponent", "emptyReason", element.getEmptyReason(), -1);
7132    }
7133    for (int i = 0; i < element.getSection().size(); i++) {
7134      composeCompositionSectionComponent(t, "SectionComponent", "section", element.getSection().get(i), i);
7135    }
7136  }
7137
7138  protected void composeConceptMap(Complex parent, String parentType, String name, ConceptMap element, int index) {
7139    if (element == null) 
7140      return;
7141    Complex t;
7142    if (Utilities.noString(parentType))
7143      t = parent;
7144    else {
7145      t = parent.predicate("fhir:"+parentType+'.'+name);
7146    }
7147    composeCanonicalResource(t, "ConceptMap", name, element, index);
7148    if (element.hasUrlElement()) {
7149      composeUri(t, "ConceptMap", "url", element.getUrlElement(), -1);
7150    }
7151    for (int i = 0; i < element.getIdentifier().size(); i++) {
7152      composeIdentifier(t, "ConceptMap", "identifier", element.getIdentifier().get(i), i);
7153    }
7154    if (element.hasVersionElement()) {
7155      composeString(t, "ConceptMap", "version", element.getVersionElement(), -1);
7156    }
7157    if (element.hasNameElement()) {
7158      composeString(t, "ConceptMap", "name", element.getNameElement(), -1);
7159    }
7160    if (element.hasTitleElement()) {
7161      composeString(t, "ConceptMap", "title", element.getTitleElement(), -1);
7162    }
7163    if (element.hasStatusElement()) {
7164      composeEnum(t, "ConceptMap", "status", element.getStatusElement(), -1);
7165    }
7166    if (element.hasExperimentalElement()) {
7167      composeBoolean(t, "ConceptMap", "experimental", element.getExperimentalElement(), -1);
7168    }
7169    if (element.hasDateElement()) {
7170      composeDateTime(t, "ConceptMap", "date", element.getDateElement(), -1);
7171    }
7172    if (element.hasPublisherElement()) {
7173      composeString(t, "ConceptMap", "publisher", element.getPublisherElement(), -1);
7174    }
7175    for (int i = 0; i < element.getContact().size(); i++) {
7176      composeContactDetail(t, "ConceptMap", "contact", element.getContact().get(i), i);
7177    }
7178    if (element.hasDescriptionElement()) {
7179      composeMarkdown(t, "ConceptMap", "description", element.getDescriptionElement(), -1);
7180    }
7181    for (int i = 0; i < element.getUseContext().size(); i++) {
7182      composeUsageContext(t, "ConceptMap", "useContext", element.getUseContext().get(i), i);
7183    }
7184    for (int i = 0; i < element.getJurisdiction().size(); i++) {
7185      composeCodeableConcept(t, "ConceptMap", "jurisdiction", element.getJurisdiction().get(i), i);
7186    }
7187    if (element.hasPurposeElement()) {
7188      composeMarkdown(t, "ConceptMap", "purpose", element.getPurposeElement(), -1);
7189    }
7190    if (element.hasCopyrightElement()) {
7191      composeMarkdown(t, "ConceptMap", "copyright", element.getCopyrightElement(), -1);
7192    }
7193    if (element.hasSource()) {
7194      composeType(t, "ConceptMap", "source", element.getSource(), -1);
7195    }
7196    if (element.hasTarget()) {
7197      composeType(t, "ConceptMap", "target", element.getTarget(), -1);
7198    }
7199    for (int i = 0; i < element.getGroup().size(); i++) {
7200      composeConceptMapGroupComponent(t, "ConceptMap", "group", element.getGroup().get(i), i);
7201    }
7202  }
7203
7204  protected void composeConceptMapGroupComponent(Complex parent, String parentType, String name, ConceptMap.ConceptMapGroupComponent element, int index) {
7205    if (element == null) 
7206      return;
7207    Complex t;
7208    if (Utilities.noString(parentType))
7209      t = parent;
7210    else {
7211      t = parent.predicate("fhir:"+parentType+'.'+name);
7212    }
7213    composeBackboneElement(t, "group", name, element, index);
7214    if (element.hasSourceElement()) {
7215      composeCanonical(t, "ConceptMapGroupComponent", "source", element.getSourceElement(), -1);
7216    }
7217    if (element.hasTargetElement()) {
7218      composeCanonical(t, "ConceptMapGroupComponent", "target", element.getTargetElement(), -1);
7219    }
7220    for (int i = 0; i < element.getElement().size(); i++) {
7221      composeConceptMapSourceElementComponent(t, "ConceptMapGroupComponent", "element", element.getElement().get(i), i);
7222    }
7223    if (element.hasUnmapped()) {
7224      composeConceptMapGroupUnmappedComponent(t, "ConceptMapGroupComponent", "unmapped", element.getUnmapped(), -1);
7225    }
7226  }
7227
7228  protected void composeConceptMapSourceElementComponent(Complex parent, String parentType, String name, ConceptMap.SourceElementComponent element, int index) {
7229    if (element == null) 
7230      return;
7231    Complex t;
7232    if (Utilities.noString(parentType))
7233      t = parent;
7234    else {
7235      t = parent.predicate("fhir:"+parentType+'.'+name);
7236    }
7237    composeBackboneElement(t, "element", name, element, index);
7238    if (element.hasCodeElement()) {
7239      composeCode(t, "SourceElementComponent", "code", element.getCodeElement(), -1);
7240    }
7241    if (element.hasDisplayElement()) {
7242      composeString(t, "SourceElementComponent", "display", element.getDisplayElement(), -1);
7243    }
7244    if (element.hasNoMapElement()) {
7245      composeBoolean(t, "SourceElementComponent", "noMap", element.getNoMapElement(), -1);
7246    }
7247    for (int i = 0; i < element.getTarget().size(); i++) {
7248      composeConceptMapTargetElementComponent(t, "SourceElementComponent", "target", element.getTarget().get(i), i);
7249    }
7250  }
7251
7252  protected void composeConceptMapTargetElementComponent(Complex parent, String parentType, String name, ConceptMap.TargetElementComponent element, int index) {
7253    if (element == null) 
7254      return;
7255    Complex t;
7256    if (Utilities.noString(parentType))
7257      t = parent;
7258    else {
7259      t = parent.predicate("fhir:"+parentType+'.'+name);
7260    }
7261    composeBackboneElement(t, "target", name, element, index);
7262    if (element.hasCodeElement()) {
7263      composeCode(t, "TargetElementComponent", "code", element.getCodeElement(), -1);
7264    }
7265    if (element.hasDisplayElement()) {
7266      composeString(t, "TargetElementComponent", "display", element.getDisplayElement(), -1);
7267    }
7268    if (element.hasRelationshipElement()) {
7269      composeEnum(t, "TargetElementComponent", "relationship", element.getRelationshipElement(), -1);
7270    }
7271    if (element.hasCommentElement()) {
7272      composeString(t, "TargetElementComponent", "comment", element.getCommentElement(), -1);
7273    }
7274    for (int i = 0; i < element.getDependsOn().size(); i++) {
7275      composeConceptMapOtherElementComponent(t, "TargetElementComponent", "dependsOn", element.getDependsOn().get(i), i);
7276    }
7277    for (int i = 0; i < element.getProduct().size(); i++) {
7278      composeConceptMapOtherElementComponent(t, "TargetElementComponent", "product", element.getProduct().get(i), i);
7279    }
7280  }
7281
7282  protected void composeConceptMapOtherElementComponent(Complex parent, String parentType, String name, ConceptMap.OtherElementComponent element, int index) {
7283    if (element == null) 
7284      return;
7285    Complex t;
7286    if (Utilities.noString(parentType))
7287      t = parent;
7288    else {
7289      t = parent.predicate("fhir:"+parentType+'.'+name);
7290    }
7291    composeBackboneElement(t, "dependsOn", name, element, index);
7292    if (element.hasPropertyElement()) {
7293      composeUri(t, "OtherElementComponent", "property", element.getPropertyElement(), -1);
7294    }
7295    if (element.hasSystemElement()) {
7296      composeCanonical(t, "OtherElementComponent", "system", element.getSystemElement(), -1);
7297    }
7298    if (element.hasValueElement()) {
7299      composeString(t, "OtherElementComponent", "value", element.getValueElement(), -1);
7300    }
7301    if (element.hasDisplayElement()) {
7302      composeString(t, "OtherElementComponent", "display", element.getDisplayElement(), -1);
7303    }
7304  }
7305
7306  protected void composeConceptMapGroupUnmappedComponent(Complex parent, String parentType, String name, ConceptMap.ConceptMapGroupUnmappedComponent element, int index) {
7307    if (element == null) 
7308      return;
7309    Complex t;
7310    if (Utilities.noString(parentType))
7311      t = parent;
7312    else {
7313      t = parent.predicate("fhir:"+parentType+'.'+name);
7314    }
7315    composeBackboneElement(t, "unmapped", name, element, index);
7316    if (element.hasModeElement()) {
7317      composeEnum(t, "ConceptMapGroupUnmappedComponent", "mode", element.getModeElement(), -1);
7318    }
7319    if (element.hasCodeElement()) {
7320      composeCode(t, "ConceptMapGroupUnmappedComponent", "code", element.getCodeElement(), -1);
7321    }
7322    if (element.hasDisplayElement()) {
7323      composeString(t, "ConceptMapGroupUnmappedComponent", "display", element.getDisplayElement(), -1);
7324    }
7325    if (element.hasUrlElement()) {
7326      composeCanonical(t, "ConceptMapGroupUnmappedComponent", "url", element.getUrlElement(), -1);
7327    }
7328  }
7329
7330  protected void composeConceptMap2(Complex parent, String parentType, String name, ConceptMap2 element, int index) {
7331    if (element == null) 
7332      return;
7333    Complex t;
7334    if (Utilities.noString(parentType))
7335      t = parent;
7336    else {
7337      t = parent.predicate("fhir:"+parentType+'.'+name);
7338    }
7339    composeCanonicalResource(t, "ConceptMap2", name, element, index);
7340    if (element.hasUrlElement()) {
7341      composeUri(t, "ConceptMap2", "url", element.getUrlElement(), -1);
7342    }
7343    for (int i = 0; i < element.getIdentifier().size(); i++) {
7344      composeIdentifier(t, "ConceptMap2", "identifier", element.getIdentifier().get(i), i);
7345    }
7346    if (element.hasVersionElement()) {
7347      composeString(t, "ConceptMap2", "version", element.getVersionElement(), -1);
7348    }
7349    if (element.hasNameElement()) {
7350      composeString(t, "ConceptMap2", "name", element.getNameElement(), -1);
7351    }
7352    if (element.hasTitleElement()) {
7353      composeString(t, "ConceptMap2", "title", element.getTitleElement(), -1);
7354    }
7355    if (element.hasStatusElement()) {
7356      composeEnum(t, "ConceptMap2", "status", element.getStatusElement(), -1);
7357    }
7358    if (element.hasExperimentalElement()) {
7359      composeBoolean(t, "ConceptMap2", "experimental", element.getExperimentalElement(), -1);
7360    }
7361    if (element.hasDateElement()) {
7362      composeDateTime(t, "ConceptMap2", "date", element.getDateElement(), -1);
7363    }
7364    if (element.hasPublisherElement()) {
7365      composeString(t, "ConceptMap2", "publisher", element.getPublisherElement(), -1);
7366    }
7367    for (int i = 0; i < element.getContact().size(); i++) {
7368      composeContactDetail(t, "ConceptMap2", "contact", element.getContact().get(i), i);
7369    }
7370    if (element.hasDescriptionElement()) {
7371      composeMarkdown(t, "ConceptMap2", "description", element.getDescriptionElement(), -1);
7372    }
7373    for (int i = 0; i < element.getUseContext().size(); i++) {
7374      composeUsageContext(t, "ConceptMap2", "useContext", element.getUseContext().get(i), i);
7375    }
7376    for (int i = 0; i < element.getJurisdiction().size(); i++) {
7377      composeCodeableConcept(t, "ConceptMap2", "jurisdiction", element.getJurisdiction().get(i), i);
7378    }
7379    if (element.hasPurposeElement()) {
7380      composeMarkdown(t, "ConceptMap2", "purpose", element.getPurposeElement(), -1);
7381    }
7382    if (element.hasCopyrightElement()) {
7383      composeMarkdown(t, "ConceptMap2", "copyright", element.getCopyrightElement(), -1);
7384    }
7385    if (element.hasSource()) {
7386      composeType(t, "ConceptMap2", "source", element.getSource(), -1);
7387    }
7388    if (element.hasTarget()) {
7389      composeType(t, "ConceptMap2", "target", element.getTarget(), -1);
7390    }
7391    for (int i = 0; i < element.getGroup().size(); i++) {
7392      composeConceptMap2GroupComponent(t, "ConceptMap2", "group", element.getGroup().get(i), i);
7393    }
7394  }
7395
7396  protected void composeConceptMap2GroupComponent(Complex parent, String parentType, String name, ConceptMap2.ConceptMap2GroupComponent element, int index) {
7397    if (element == null) 
7398      return;
7399    Complex t;
7400    if (Utilities.noString(parentType))
7401      t = parent;
7402    else {
7403      t = parent.predicate("fhir:"+parentType+'.'+name);
7404    }
7405    composeBackboneElement(t, "group", name, element, index);
7406    if (element.hasSourceElement()) {
7407      composeCanonical(t, "ConceptMap2GroupComponent", "source", element.getSourceElement(), -1);
7408    }
7409    if (element.hasTargetElement()) {
7410      composeCanonical(t, "ConceptMap2GroupComponent", "target", element.getTargetElement(), -1);
7411    }
7412    for (int i = 0; i < element.getElement().size(); i++) {
7413      composeConceptMap2SourceElementComponent(t, "ConceptMap2GroupComponent", "element", element.getElement().get(i), i);
7414    }
7415    if (element.hasUnmapped()) {
7416      composeConceptMap2GroupUnmappedComponent(t, "ConceptMap2GroupComponent", "unmapped", element.getUnmapped(), -1);
7417    }
7418  }
7419
7420  protected void composeConceptMap2SourceElementComponent(Complex parent, String parentType, String name, ConceptMap2.SourceElementComponent element, int index) {
7421    if (element == null) 
7422      return;
7423    Complex t;
7424    if (Utilities.noString(parentType))
7425      t = parent;
7426    else {
7427      t = parent.predicate("fhir:"+parentType+'.'+name);
7428    }
7429    composeBackboneElement(t, "element", name, element, index);
7430    if (element.hasCodeElement()) {
7431      composeCode(t, "SourceElementComponent", "code", element.getCodeElement(), -1);
7432    }
7433    if (element.hasDisplayElement()) {
7434      composeString(t, "SourceElementComponent", "display", element.getDisplayElement(), -1);
7435    }
7436    if (element.hasValueSetElement()) {
7437      composeCanonical(t, "SourceElementComponent", "valueSet", element.getValueSetElement(), -1);
7438    }
7439    if (element.hasNoMapElement()) {
7440      composeBoolean(t, "SourceElementComponent", "noMap", element.getNoMapElement(), -1);
7441    }
7442    for (int i = 0; i < element.getTarget().size(); i++) {
7443      composeConceptMap2TargetElementComponent(t, "SourceElementComponent", "target", element.getTarget().get(i), i);
7444    }
7445  }
7446
7447  protected void composeConceptMap2TargetElementComponent(Complex parent, String parentType, String name, ConceptMap2.TargetElementComponent element, int index) {
7448    if (element == null) 
7449      return;
7450    Complex t;
7451    if (Utilities.noString(parentType))
7452      t = parent;
7453    else {
7454      t = parent.predicate("fhir:"+parentType+'.'+name);
7455    }
7456    composeBackboneElement(t, "target", name, element, index);
7457    if (element.hasCodeElement()) {
7458      composeCode(t, "TargetElementComponent", "code", element.getCodeElement(), -1);
7459    }
7460    if (element.hasDisplayElement()) {
7461      composeString(t, "TargetElementComponent", "display", element.getDisplayElement(), -1);
7462    }
7463    if (element.hasValueSetElement()) {
7464      composeCanonical(t, "TargetElementComponent", "valueSet", element.getValueSetElement(), -1);
7465    }
7466    if (element.hasRelationshipElement()) {
7467      composeEnum(t, "TargetElementComponent", "relationship", element.getRelationshipElement(), -1);
7468    }
7469    if (element.hasCommentElement()) {
7470      composeString(t, "TargetElementComponent", "comment", element.getCommentElement(), -1);
7471    }
7472    for (int i = 0; i < element.getDependsOn().size(); i++) {
7473      composeConceptMap2OtherElementComponent(t, "TargetElementComponent", "dependsOn", element.getDependsOn().get(i), i);
7474    }
7475    for (int i = 0; i < element.getProduct().size(); i++) {
7476      composeConceptMap2OtherElementComponent(t, "TargetElementComponent", "product", element.getProduct().get(i), i);
7477    }
7478  }
7479
7480  protected void composeConceptMap2OtherElementComponent(Complex parent, String parentType, String name, ConceptMap2.OtherElementComponent element, int index) {
7481    if (element == null) 
7482      return;
7483    Complex t;
7484    if (Utilities.noString(parentType))
7485      t = parent;
7486    else {
7487      t = parent.predicate("fhir:"+parentType+'.'+name);
7488    }
7489    composeBackboneElement(t, "dependsOn", name, element, index);
7490    if (element.hasPropertyElement()) {
7491      composeUri(t, "OtherElementComponent", "property", element.getPropertyElement(), -1);
7492    }
7493    if (element.hasValue()) {
7494      composeType(t, "OtherElementComponent", "value", element.getValue(), -1);
7495    }
7496  }
7497
7498  protected void composeConceptMap2GroupUnmappedComponent(Complex parent, String parentType, String name, ConceptMap2.ConceptMap2GroupUnmappedComponent element, int index) {
7499    if (element == null) 
7500      return;
7501    Complex t;
7502    if (Utilities.noString(parentType))
7503      t = parent;
7504    else {
7505      t = parent.predicate("fhir:"+parentType+'.'+name);
7506    }
7507    composeBackboneElement(t, "unmapped", name, element, index);
7508    if (element.hasModeElement()) {
7509      composeEnum(t, "ConceptMap2GroupUnmappedComponent", "mode", element.getModeElement(), -1);
7510    }
7511    if (element.hasCodeElement()) {
7512      composeCode(t, "ConceptMap2GroupUnmappedComponent", "code", element.getCodeElement(), -1);
7513    }
7514    if (element.hasDisplayElement()) {
7515      composeString(t, "ConceptMap2GroupUnmappedComponent", "display", element.getDisplayElement(), -1);
7516    }
7517    if (element.hasValueSetElement()) {
7518      composeCanonical(t, "ConceptMap2GroupUnmappedComponent", "valueSet", element.getValueSetElement(), -1);
7519    }
7520    if (element.hasUrlElement()) {
7521      composeCanonical(t, "ConceptMap2GroupUnmappedComponent", "url", element.getUrlElement(), -1);
7522    }
7523  }
7524
7525  protected void composeCondition(Complex parent, String parentType, String name, Condition element, int index) {
7526    if (element == null) 
7527      return;
7528    Complex t;
7529    if (Utilities.noString(parentType))
7530      t = parent;
7531    else {
7532      t = parent.predicate("fhir:"+parentType+'.'+name);
7533    }
7534    composeDomainResource(t, "Condition", name, element, index);
7535    for (int i = 0; i < element.getIdentifier().size(); i++) {
7536      composeIdentifier(t, "Condition", "identifier", element.getIdentifier().get(i), i);
7537    }
7538    if (element.hasClinicalStatus()) {
7539      composeCodeableConcept(t, "Condition", "clinicalStatus", element.getClinicalStatus(), -1);
7540    }
7541    if (element.hasVerificationStatus()) {
7542      composeCodeableConcept(t, "Condition", "verificationStatus", element.getVerificationStatus(), -1);
7543    }
7544    for (int i = 0; i < element.getCategory().size(); i++) {
7545      composeCodeableConcept(t, "Condition", "category", element.getCategory().get(i), i);
7546    }
7547    if (element.hasSeverity()) {
7548      composeCodeableConcept(t, "Condition", "severity", element.getSeverity(), -1);
7549    }
7550    if (element.hasCode()) {
7551      composeCodeableConcept(t, "Condition", "code", element.getCode(), -1);
7552    }
7553    for (int i = 0; i < element.getBodySite().size(); i++) {
7554      composeCodeableConcept(t, "Condition", "bodySite", element.getBodySite().get(i), i);
7555    }
7556    if (element.hasSubject()) {
7557      composeReference(t, "Condition", "subject", element.getSubject(), -1);
7558    }
7559    if (element.hasEncounter()) {
7560      composeReference(t, "Condition", "encounter", element.getEncounter(), -1);
7561    }
7562    if (element.hasOnset()) {
7563      composeType(t, "Condition", "onset", element.getOnset(), -1);
7564    }
7565    if (element.hasAbatement()) {
7566      composeType(t, "Condition", "abatement", element.getAbatement(), -1);
7567    }
7568    if (element.hasRecordedDateElement()) {
7569      composeDateTime(t, "Condition", "recordedDate", element.getRecordedDateElement(), -1);
7570    }
7571    if (element.hasRecorder()) {
7572      composeReference(t, "Condition", "recorder", element.getRecorder(), -1);
7573    }
7574    if (element.hasAsserter()) {
7575      composeReference(t, "Condition", "asserter", element.getAsserter(), -1);
7576    }
7577    for (int i = 0; i < element.getStage().size(); i++) {
7578      composeConditionStageComponent(t, "Condition", "stage", element.getStage().get(i), i);
7579    }
7580    for (int i = 0; i < element.getEvidence().size(); i++) {
7581      composeConditionEvidenceComponent(t, "Condition", "evidence", element.getEvidence().get(i), i);
7582    }
7583    for (int i = 0; i < element.getNote().size(); i++) {
7584      composeAnnotation(t, "Condition", "note", element.getNote().get(i), i);
7585    }
7586  }
7587
7588  protected void composeConditionStageComponent(Complex parent, String parentType, String name, Condition.ConditionStageComponent element, int index) {
7589    if (element == null) 
7590      return;
7591    Complex t;
7592    if (Utilities.noString(parentType))
7593      t = parent;
7594    else {
7595      t = parent.predicate("fhir:"+parentType+'.'+name);
7596    }
7597    composeBackboneElement(t, "stage", name, element, index);
7598    if (element.hasSummary()) {
7599      composeCodeableConcept(t, "ConditionStageComponent", "summary", element.getSummary(), -1);
7600    }
7601    for (int i = 0; i < element.getAssessment().size(); i++) {
7602      composeReference(t, "ConditionStageComponent", "assessment", element.getAssessment().get(i), i);
7603    }
7604    if (element.hasType()) {
7605      composeCodeableConcept(t, "ConditionStageComponent", "type", element.getType(), -1);
7606    }
7607  }
7608
7609  protected void composeConditionEvidenceComponent(Complex parent, String parentType, String name, Condition.ConditionEvidenceComponent element, int index) {
7610    if (element == null) 
7611      return;
7612    Complex t;
7613    if (Utilities.noString(parentType))
7614      t = parent;
7615    else {
7616      t = parent.predicate("fhir:"+parentType+'.'+name);
7617    }
7618    composeBackboneElement(t, "evidence", name, element, index);
7619    for (int i = 0; i < element.getCode().size(); i++) {
7620      composeCodeableConcept(t, "ConditionEvidenceComponent", "code", element.getCode().get(i), i);
7621    }
7622    for (int i = 0; i < element.getDetail().size(); i++) {
7623      composeReference(t, "ConditionEvidenceComponent", "detail", element.getDetail().get(i), i);
7624    }
7625  }
7626
7627  protected void composeConditionDefinition(Complex parent, String parentType, String name, ConditionDefinition element, int index) {
7628    if (element == null) 
7629      return;
7630    Complex t;
7631    if (Utilities.noString(parentType))
7632      t = parent;
7633    else {
7634      t = parent.predicate("fhir:"+parentType+'.'+name);
7635    }
7636    composeMetadataResource(t, "ConditionDefinition", name, element, index);
7637    if (element.hasUrlElement()) {
7638      composeUri(t, "ConditionDefinition", "url", element.getUrlElement(), -1);
7639    }
7640    for (int i = 0; i < element.getIdentifier().size(); i++) {
7641      composeIdentifier(t, "ConditionDefinition", "identifier", element.getIdentifier().get(i), i);
7642    }
7643    if (element.hasVersionElement()) {
7644      composeString(t, "ConditionDefinition", "version", element.getVersionElement(), -1);
7645    }
7646    if (element.hasNameElement()) {
7647      composeString(t, "ConditionDefinition", "name", element.getNameElement(), -1);
7648    }
7649    if (element.hasTitleElement()) {
7650      composeString(t, "ConditionDefinition", "title", element.getTitleElement(), -1);
7651    }
7652    if (element.hasSubtitleElement()) {
7653      composeString(t, "ConditionDefinition", "subtitle", element.getSubtitleElement(), -1);
7654    }
7655    if (element.hasStatusElement()) {
7656      composeEnum(t, "ConditionDefinition", "status", element.getStatusElement(), -1);
7657    }
7658    if (element.hasExperimentalElement()) {
7659      composeBoolean(t, "ConditionDefinition", "experimental", element.getExperimentalElement(), -1);
7660    }
7661    if (element.hasDateElement()) {
7662      composeDateTime(t, "ConditionDefinition", "date", element.getDateElement(), -1);
7663    }
7664    if (element.hasPublisherElement()) {
7665      composeString(t, "ConditionDefinition", "publisher", element.getPublisherElement(), -1);
7666    }
7667    for (int i = 0; i < element.getContact().size(); i++) {
7668      composeContactDetail(t, "ConditionDefinition", "contact", element.getContact().get(i), i);
7669    }
7670    if (element.hasDescriptionElement()) {
7671      composeMarkdown(t, "ConditionDefinition", "description", element.getDescriptionElement(), -1);
7672    }
7673    for (int i = 0; i < element.getUseContext().size(); i++) {
7674      composeUsageContext(t, "ConditionDefinition", "useContext", element.getUseContext().get(i), i);
7675    }
7676    for (int i = 0; i < element.getJurisdiction().size(); i++) {
7677      composeCodeableConcept(t, "ConditionDefinition", "jurisdiction", element.getJurisdiction().get(i), i);
7678    }
7679    if (element.hasCode()) {
7680      composeCodeableConcept(t, "ConditionDefinition", "code", element.getCode(), -1);
7681    }
7682    if (element.hasSeverity()) {
7683      composeCodeableConcept(t, "ConditionDefinition", "severity", element.getSeverity(), -1);
7684    }
7685    if (element.hasBodySite()) {
7686      composeCodeableConcept(t, "ConditionDefinition", "bodySite", element.getBodySite(), -1);
7687    }
7688    if (element.hasStage()) {
7689      composeCodeableConcept(t, "ConditionDefinition", "stage", element.getStage(), -1);
7690    }
7691    if (element.hasHasSeverityElement()) {
7692      composeBoolean(t, "ConditionDefinition", "hasSeverity", element.getHasSeverityElement(), -1);
7693    }
7694    if (element.hasHasBodySiteElement()) {
7695      composeBoolean(t, "ConditionDefinition", "hasBodySite", element.getHasBodySiteElement(), -1);
7696    }
7697    if (element.hasHasStageElement()) {
7698      composeBoolean(t, "ConditionDefinition", "hasStage", element.getHasStageElement(), -1);
7699    }
7700    for (int i = 0; i < element.getDefinition().size(); i++) {
7701      composeUri(t, "ConditionDefinition", "definition", element.getDefinition().get(i), i);
7702    }
7703    for (int i = 0; i < element.getObservation().size(); i++) {
7704      composeConditionDefinitionObservationComponent(t, "ConditionDefinition", "observation", element.getObservation().get(i), i);
7705    }
7706    for (int i = 0; i < element.getMedication().size(); i++) {
7707      composeConditionDefinitionMedicationComponent(t, "ConditionDefinition", "medication", element.getMedication().get(i), i);
7708    }
7709    for (int i = 0; i < element.getPrecondition().size(); i++) {
7710      composeConditionDefinitionPreconditionComponent(t, "ConditionDefinition", "precondition", element.getPrecondition().get(i), i);
7711    }
7712    for (int i = 0; i < element.getTeam().size(); i++) {
7713      composeReference(t, "ConditionDefinition", "team", element.getTeam().get(i), i);
7714    }
7715    for (int i = 0; i < element.getQuestionnaire().size(); i++) {
7716      composeConditionDefinitionQuestionnaireComponent(t, "ConditionDefinition", "questionnaire", element.getQuestionnaire().get(i), i);
7717    }
7718    for (int i = 0; i < element.getPlan().size(); i++) {
7719      composeConditionDefinitionPlanComponent(t, "ConditionDefinition", "plan", element.getPlan().get(i), i);
7720    }
7721  }
7722
7723  protected void composeConditionDefinitionObservationComponent(Complex parent, String parentType, String name, ConditionDefinition.ConditionDefinitionObservationComponent element, int index) {
7724    if (element == null) 
7725      return;
7726    Complex t;
7727    if (Utilities.noString(parentType))
7728      t = parent;
7729    else {
7730      t = parent.predicate("fhir:"+parentType+'.'+name);
7731    }
7732    composeBackboneElement(t, "observation", name, element, index);
7733    if (element.hasCategory()) {
7734      composeCodeableConcept(t, "ConditionDefinitionObservationComponent", "category", element.getCategory(), -1);
7735    }
7736    if (element.hasCode()) {
7737      composeCodeableConcept(t, "ConditionDefinitionObservationComponent", "code", element.getCode(), -1);
7738    }
7739  }
7740
7741  protected void composeConditionDefinitionMedicationComponent(Complex parent, String parentType, String name, ConditionDefinition.ConditionDefinitionMedicationComponent element, int index) {
7742    if (element == null) 
7743      return;
7744    Complex t;
7745    if (Utilities.noString(parentType))
7746      t = parent;
7747    else {
7748      t = parent.predicate("fhir:"+parentType+'.'+name);
7749    }
7750    composeBackboneElement(t, "medication", name, element, index);
7751    if (element.hasCategory()) {
7752      composeCodeableConcept(t, "ConditionDefinitionMedicationComponent", "category", element.getCategory(), -1);
7753    }
7754    if (element.hasCode()) {
7755      composeCodeableConcept(t, "ConditionDefinitionMedicationComponent", "code", element.getCode(), -1);
7756    }
7757  }
7758
7759  protected void composeConditionDefinitionPreconditionComponent(Complex parent, String parentType, String name, ConditionDefinition.ConditionDefinitionPreconditionComponent element, int index) {
7760    if (element == null) 
7761      return;
7762    Complex t;
7763    if (Utilities.noString(parentType))
7764      t = parent;
7765    else {
7766      t = parent.predicate("fhir:"+parentType+'.'+name);
7767    }
7768    composeBackboneElement(t, "precondition", name, element, index);
7769    if (element.hasTypeElement()) {
7770      composeEnum(t, "ConditionDefinitionPreconditionComponent", "type", element.getTypeElement(), -1);
7771    }
7772    if (element.hasCode()) {
7773      composeCodeableConcept(t, "ConditionDefinitionPreconditionComponent", "code", element.getCode(), -1);
7774    }
7775    if (element.hasValue()) {
7776      composeType(t, "ConditionDefinitionPreconditionComponent", "value", element.getValue(), -1);
7777    }
7778  }
7779
7780  protected void composeConditionDefinitionQuestionnaireComponent(Complex parent, String parentType, String name, ConditionDefinition.ConditionDefinitionQuestionnaireComponent element, int index) {
7781    if (element == null) 
7782      return;
7783    Complex t;
7784    if (Utilities.noString(parentType))
7785      t = parent;
7786    else {
7787      t = parent.predicate("fhir:"+parentType+'.'+name);
7788    }
7789    composeBackboneElement(t, "questionnaire", name, element, index);
7790    if (element.hasPurposeElement()) {
7791      composeEnum(t, "ConditionDefinitionQuestionnaireComponent", "purpose", element.getPurposeElement(), -1);
7792    }
7793    if (element.hasReference()) {
7794      composeReference(t, "ConditionDefinitionQuestionnaireComponent", "reference", element.getReference(), -1);
7795    }
7796  }
7797
7798  protected void composeConditionDefinitionPlanComponent(Complex parent, String parentType, String name, ConditionDefinition.ConditionDefinitionPlanComponent element, int index) {
7799    if (element == null) 
7800      return;
7801    Complex t;
7802    if (Utilities.noString(parentType))
7803      t = parent;
7804    else {
7805      t = parent.predicate("fhir:"+parentType+'.'+name);
7806    }
7807    composeBackboneElement(t, "plan", name, element, index);
7808    if (element.hasRole()) {
7809      composeCodeableConcept(t, "ConditionDefinitionPlanComponent", "role", element.getRole(), -1);
7810    }
7811    if (element.hasReference()) {
7812      composeReference(t, "ConditionDefinitionPlanComponent", "reference", element.getReference(), -1);
7813    }
7814  }
7815
7816  protected void composeConsent(Complex parent, String parentType, String name, Consent element, int index) {
7817    if (element == null) 
7818      return;
7819    Complex t;
7820    if (Utilities.noString(parentType))
7821      t = parent;
7822    else {
7823      t = parent.predicate("fhir:"+parentType+'.'+name);
7824    }
7825    composeDomainResource(t, "Consent", name, element, index);
7826    for (int i = 0; i < element.getIdentifier().size(); i++) {
7827      composeIdentifier(t, "Consent", "identifier", element.getIdentifier().get(i), i);
7828    }
7829    if (element.hasStatusElement()) {
7830      composeEnum(t, "Consent", "status", element.getStatusElement(), -1);
7831    }
7832    for (int i = 0; i < element.getCategory().size(); i++) {
7833      composeCodeableConcept(t, "Consent", "category", element.getCategory().get(i), i);
7834    }
7835    if (element.hasSubject()) {
7836      composeReference(t, "Consent", "subject", element.getSubject(), -1);
7837    }
7838    if (element.hasDateTimeElement()) {
7839      composeDateTime(t, "Consent", "dateTime", element.getDateTimeElement(), -1);
7840    }
7841    for (int i = 0; i < element.getGrantor().size(); i++) {
7842      composeReference(t, "Consent", "grantor", element.getGrantor().get(i), i);
7843    }
7844    for (int i = 0; i < element.getGrantee().size(); i++) {
7845      composeReference(t, "Consent", "grantee", element.getGrantee().get(i), i);
7846    }
7847    for (int i = 0; i < element.getManager().size(); i++) {
7848      composeReference(t, "Consent", "manager", element.getManager().get(i), i);
7849    }
7850    for (int i = 0; i < element.getController().size(); i++) {
7851      composeReference(t, "Consent", "controller", element.getController().get(i), i);
7852    }
7853    for (int i = 0; i < element.getSourceAttachment().size(); i++) {
7854      composeAttachment(t, "Consent", "sourceAttachment", element.getSourceAttachment().get(i), i);
7855    }
7856    for (int i = 0; i < element.getSourceReference().size(); i++) {
7857      composeReference(t, "Consent", "sourceReference", element.getSourceReference().get(i), i);
7858    }
7859    for (int i = 0; i < element.getPolicy().size(); i++) {
7860      composeConsentPolicyComponent(t, "Consent", "policy", element.getPolicy().get(i), i);
7861    }
7862    if (element.hasPolicyRule()) {
7863      composeCodeableConcept(t, "Consent", "policyRule", element.getPolicyRule(), -1);
7864    }
7865    for (int i = 0; i < element.getVerification().size(); i++) {
7866      composeConsentVerificationComponent(t, "Consent", "verification", element.getVerification().get(i), i);
7867    }
7868    if (element.hasProvision()) {
7869      composeConsentProvisionComponent(t, "Consent", "provision", element.getProvision(), -1);
7870    }
7871  }
7872
7873  protected void composeConsentPolicyComponent(Complex parent, String parentType, String name, Consent.ConsentPolicyComponent element, int index) {
7874    if (element == null) 
7875      return;
7876    Complex t;
7877    if (Utilities.noString(parentType))
7878      t = parent;
7879    else {
7880      t = parent.predicate("fhir:"+parentType+'.'+name);
7881    }
7882    composeBackboneElement(t, "policy", name, element, index);
7883    if (element.hasAuthorityElement()) {
7884      composeUri(t, "ConsentPolicyComponent", "authority", element.getAuthorityElement(), -1);
7885    }
7886    if (element.hasUriElement()) {
7887      composeUri(t, "ConsentPolicyComponent", "uri", element.getUriElement(), -1);
7888    }
7889  }
7890
7891  protected void composeConsentVerificationComponent(Complex parent, String parentType, String name, Consent.ConsentVerificationComponent element, int index) {
7892    if (element == null) 
7893      return;
7894    Complex t;
7895    if (Utilities.noString(parentType))
7896      t = parent;
7897    else {
7898      t = parent.predicate("fhir:"+parentType+'.'+name);
7899    }
7900    composeBackboneElement(t, "verification", name, element, index);
7901    if (element.hasVerifiedElement()) {
7902      composeBoolean(t, "ConsentVerificationComponent", "verified", element.getVerifiedElement(), -1);
7903    }
7904    if (element.hasVerificationType()) {
7905      composeCodeableConcept(t, "ConsentVerificationComponent", "verificationType", element.getVerificationType(), -1);
7906    }
7907    if (element.hasVerifiedBy()) {
7908      composeReference(t, "ConsentVerificationComponent", "verifiedBy", element.getVerifiedBy(), -1);
7909    }
7910    if (element.hasVerifiedWith()) {
7911      composeReference(t, "ConsentVerificationComponent", "verifiedWith", element.getVerifiedWith(), -1);
7912    }
7913    for (int i = 0; i < element.getVerificationDate().size(); i++) {
7914      composeDateTime(t, "ConsentVerificationComponent", "verificationDate", element.getVerificationDate().get(i), i);
7915    }
7916  }
7917
7918  protected void composeConsentProvisionComponent(Complex parent, String parentType, String name, Consent.ProvisionComponent element, int index) {
7919    if (element == null) 
7920      return;
7921    Complex t;
7922    if (Utilities.noString(parentType))
7923      t = parent;
7924    else {
7925      t = parent.predicate("fhir:"+parentType+'.'+name);
7926    }
7927    composeBackboneElement(t, "provision", name, element, index);
7928    if (element.hasTypeElement()) {
7929      composeEnum(t, "ProvisionComponent", "type", element.getTypeElement(), -1);
7930    }
7931    if (element.hasPeriod()) {
7932      composePeriod(t, "ProvisionComponent", "period", element.getPeriod(), -1);
7933    }
7934    for (int i = 0; i < element.getActor().size(); i++) {
7935      composeConsentProvisionActorComponent(t, "ProvisionComponent", "actor", element.getActor().get(i), i);
7936    }
7937    for (int i = 0; i < element.getAction().size(); i++) {
7938      composeCodeableConcept(t, "ProvisionComponent", "action", element.getAction().get(i), i);
7939    }
7940    for (int i = 0; i < element.getSecurityLabel().size(); i++) {
7941      composeCoding(t, "ProvisionComponent", "securityLabel", element.getSecurityLabel().get(i), i);
7942    }
7943    for (int i = 0; i < element.getPurpose().size(); i++) {
7944      composeCoding(t, "ProvisionComponent", "purpose", element.getPurpose().get(i), i);
7945    }
7946    for (int i = 0; i < element.getClass_().size(); i++) {
7947      composeCoding(t, "ProvisionComponent", "class", element.getClass_().get(i), i);
7948    }
7949    for (int i = 0; i < element.getCode().size(); i++) {
7950      composeCodeableConcept(t, "ProvisionComponent", "code", element.getCode().get(i), i);
7951    }
7952    if (element.hasDataPeriod()) {
7953      composePeriod(t, "ProvisionComponent", "dataPeriod", element.getDataPeriod(), -1);
7954    }
7955    for (int i = 0; i < element.getData().size(); i++) {
7956      composeConsentProvisionDataComponent(t, "ProvisionComponent", "data", element.getData().get(i), i);
7957    }
7958    if (element.hasExpression()) {
7959      composeExpression(t, "ProvisionComponent", "expression", element.getExpression(), -1);
7960    }
7961    for (int i = 0; i < element.getProvision().size(); i++) {
7962      composeConsentProvisionComponent(t, "ProvisionComponent", "provision", element.getProvision().get(i), i);
7963    }
7964  }
7965
7966  protected void composeConsentProvisionActorComponent(Complex parent, String parentType, String name, Consent.ProvisionActorComponent element, int index) {
7967    if (element == null) 
7968      return;
7969    Complex t;
7970    if (Utilities.noString(parentType))
7971      t = parent;
7972    else {
7973      t = parent.predicate("fhir:"+parentType+'.'+name);
7974    }
7975    composeBackboneElement(t, "actor", name, element, index);
7976    if (element.hasRole()) {
7977      composeCodeableConcept(t, "ProvisionActorComponent", "role", element.getRole(), -1);
7978    }
7979    if (element.hasReference()) {
7980      composeReference(t, "ProvisionActorComponent", "reference", element.getReference(), -1);
7981    }
7982  }
7983
7984  protected void composeConsentProvisionDataComponent(Complex parent, String parentType, String name, Consent.ProvisionDataComponent element, int index) {
7985    if (element == null) 
7986      return;
7987    Complex t;
7988    if (Utilities.noString(parentType))
7989      t = parent;
7990    else {
7991      t = parent.predicate("fhir:"+parentType+'.'+name);
7992    }
7993    composeBackboneElement(t, "data", name, element, index);
7994    if (element.hasMeaningElement()) {
7995      composeEnum(t, "ProvisionDataComponent", "meaning", element.getMeaningElement(), -1);
7996    }
7997    if (element.hasReference()) {
7998      composeReference(t, "ProvisionDataComponent", "reference", element.getReference(), -1);
7999    }
8000  }
8001
8002  protected void composeContract(Complex parent, String parentType, String name, Contract element, int index) {
8003    if (element == null) 
8004      return;
8005    Complex t;
8006    if (Utilities.noString(parentType))
8007      t = parent;
8008    else {
8009      t = parent.predicate("fhir:"+parentType+'.'+name);
8010    }
8011    composeDomainResource(t, "Contract", name, element, index);
8012    for (int i = 0; i < element.getIdentifier().size(); i++) {
8013      composeIdentifier(t, "Contract", "identifier", element.getIdentifier().get(i), i);
8014    }
8015    if (element.hasUrlElement()) {
8016      composeUri(t, "Contract", "url", element.getUrlElement(), -1);
8017    }
8018    if (element.hasVersionElement()) {
8019      composeString(t, "Contract", "version", element.getVersionElement(), -1);
8020    }
8021    if (element.hasStatusElement()) {
8022      composeEnum(t, "Contract", "status", element.getStatusElement(), -1);
8023    }
8024    if (element.hasLegalState()) {
8025      composeCodeableConcept(t, "Contract", "legalState", element.getLegalState(), -1);
8026    }
8027    if (element.hasInstantiatesCanonical()) {
8028      composeReference(t, "Contract", "instantiatesCanonical", element.getInstantiatesCanonical(), -1);
8029    }
8030    if (element.hasInstantiatesUriElement()) {
8031      composeUri(t, "Contract", "instantiatesUri", element.getInstantiatesUriElement(), -1);
8032    }
8033    if (element.hasContentDerivative()) {
8034      composeCodeableConcept(t, "Contract", "contentDerivative", element.getContentDerivative(), -1);
8035    }
8036    if (element.hasIssuedElement()) {
8037      composeDateTime(t, "Contract", "issued", element.getIssuedElement(), -1);
8038    }
8039    if (element.hasApplies()) {
8040      composePeriod(t, "Contract", "applies", element.getApplies(), -1);
8041    }
8042    if (element.hasExpirationType()) {
8043      composeCodeableConcept(t, "Contract", "expirationType", element.getExpirationType(), -1);
8044    }
8045    for (int i = 0; i < element.getSubject().size(); i++) {
8046      composeReference(t, "Contract", "subject", element.getSubject().get(i), i);
8047    }
8048    for (int i = 0; i < element.getAuthority().size(); i++) {
8049      composeReference(t, "Contract", "authority", element.getAuthority().get(i), i);
8050    }
8051    for (int i = 0; i < element.getDomain().size(); i++) {
8052      composeReference(t, "Contract", "domain", element.getDomain().get(i), i);
8053    }
8054    for (int i = 0; i < element.getSite().size(); i++) {
8055      composeReference(t, "Contract", "site", element.getSite().get(i), i);
8056    }
8057    if (element.hasNameElement()) {
8058      composeString(t, "Contract", "name", element.getNameElement(), -1);
8059    }
8060    if (element.hasTitleElement()) {
8061      composeString(t, "Contract", "title", element.getTitleElement(), -1);
8062    }
8063    if (element.hasSubtitleElement()) {
8064      composeString(t, "Contract", "subtitle", element.getSubtitleElement(), -1);
8065    }
8066    for (int i = 0; i < element.getAlias().size(); i++) {
8067      composeString(t, "Contract", "alias", element.getAlias().get(i), i);
8068    }
8069    if (element.hasAuthor()) {
8070      composeReference(t, "Contract", "author", element.getAuthor(), -1);
8071    }
8072    if (element.hasScope()) {
8073      composeCodeableConcept(t, "Contract", "scope", element.getScope(), -1);
8074    }
8075    if (element.hasTopic()) {
8076      composeType(t, "Contract", "topic", element.getTopic(), -1);
8077    }
8078    if (element.hasType()) {
8079      composeCodeableConcept(t, "Contract", "type", element.getType(), -1);
8080    }
8081    for (int i = 0; i < element.getSubType().size(); i++) {
8082      composeCodeableConcept(t, "Contract", "subType", element.getSubType().get(i), i);
8083    }
8084    if (element.hasContentDefinition()) {
8085      composeContractContentDefinitionComponent(t, "Contract", "contentDefinition", element.getContentDefinition(), -1);
8086    }
8087    for (int i = 0; i < element.getTerm().size(); i++) {
8088      composeContractTermComponent(t, "Contract", "term", element.getTerm().get(i), i);
8089    }
8090    for (int i = 0; i < element.getSupportingInfo().size(); i++) {
8091      composeReference(t, "Contract", "supportingInfo", element.getSupportingInfo().get(i), i);
8092    }
8093    for (int i = 0; i < element.getRelevantHistory().size(); i++) {
8094      composeReference(t, "Contract", "relevantHistory", element.getRelevantHistory().get(i), i);
8095    }
8096    for (int i = 0; i < element.getSigner().size(); i++) {
8097      composeContractSignatoryComponent(t, "Contract", "signer", element.getSigner().get(i), i);
8098    }
8099    for (int i = 0; i < element.getFriendly().size(); i++) {
8100      composeContractFriendlyLanguageComponent(t, "Contract", "friendly", element.getFriendly().get(i), i);
8101    }
8102    for (int i = 0; i < element.getLegal().size(); i++) {
8103      composeContractLegalLanguageComponent(t, "Contract", "legal", element.getLegal().get(i), i);
8104    }
8105    for (int i = 0; i < element.getRule().size(); i++) {
8106      composeContractComputableLanguageComponent(t, "Contract", "rule", element.getRule().get(i), i);
8107    }
8108    if (element.hasLegallyBinding()) {
8109      composeType(t, "Contract", "legallyBinding", element.getLegallyBinding(), -1);
8110    }
8111  }
8112
8113  protected void composeContractContentDefinitionComponent(Complex parent, String parentType, String name, Contract.ContentDefinitionComponent element, int index) {
8114    if (element == null) 
8115      return;
8116    Complex t;
8117    if (Utilities.noString(parentType))
8118      t = parent;
8119    else {
8120      t = parent.predicate("fhir:"+parentType+'.'+name);
8121    }
8122    composeBackboneElement(t, "contentDefinition", name, element, index);
8123    if (element.hasType()) {
8124      composeCodeableConcept(t, "ContentDefinitionComponent", "type", element.getType(), -1);
8125    }
8126    if (element.hasSubType()) {
8127      composeCodeableConcept(t, "ContentDefinitionComponent", "subType", element.getSubType(), -1);
8128    }
8129    if (element.hasPublisher()) {
8130      composeReference(t, "ContentDefinitionComponent", "publisher", element.getPublisher(), -1);
8131    }
8132    if (element.hasPublicationDateElement()) {
8133      composeDateTime(t, "ContentDefinitionComponent", "publicationDate", element.getPublicationDateElement(), -1);
8134    }
8135    if (element.hasPublicationStatusElement()) {
8136      composeEnum(t, "ContentDefinitionComponent", "publicationStatus", element.getPublicationStatusElement(), -1);
8137    }
8138    if (element.hasCopyrightElement()) {
8139      composeMarkdown(t, "ContentDefinitionComponent", "copyright", element.getCopyrightElement(), -1);
8140    }
8141  }
8142
8143  protected void composeContractTermComponent(Complex parent, String parentType, String name, Contract.TermComponent element, int index) {
8144    if (element == null) 
8145      return;
8146    Complex t;
8147    if (Utilities.noString(parentType))
8148      t = parent;
8149    else {
8150      t = parent.predicate("fhir:"+parentType+'.'+name);
8151    }
8152    composeBackboneElement(t, "term", name, element, index);
8153    if (element.hasIdentifier()) {
8154      composeIdentifier(t, "TermComponent", "identifier", element.getIdentifier(), -1);
8155    }
8156    if (element.hasIssuedElement()) {
8157      composeDateTime(t, "TermComponent", "issued", element.getIssuedElement(), -1);
8158    }
8159    if (element.hasApplies()) {
8160      composePeriod(t, "TermComponent", "applies", element.getApplies(), -1);
8161    }
8162    if (element.hasTopic()) {
8163      composeType(t, "TermComponent", "topic", element.getTopic(), -1);
8164    }
8165    if (element.hasType()) {
8166      composeCodeableConcept(t, "TermComponent", "type", element.getType(), -1);
8167    }
8168    if (element.hasSubType()) {
8169      composeCodeableConcept(t, "TermComponent", "subType", element.getSubType(), -1);
8170    }
8171    if (element.hasTextElement()) {
8172      composeString(t, "TermComponent", "text", element.getTextElement(), -1);
8173    }
8174    for (int i = 0; i < element.getSecurityLabel().size(); i++) {
8175      composeContractSecurityLabelComponent(t, "TermComponent", "securityLabel", element.getSecurityLabel().get(i), i);
8176    }
8177    if (element.hasOffer()) {
8178      composeContractOfferComponent(t, "TermComponent", "offer", element.getOffer(), -1);
8179    }
8180    for (int i = 0; i < element.getAsset().size(); i++) {
8181      composeContractAssetComponent(t, "TermComponent", "asset", element.getAsset().get(i), i);
8182    }
8183    for (int i = 0; i < element.getAction().size(); i++) {
8184      composeContractActionComponent(t, "TermComponent", "action", element.getAction().get(i), i);
8185    }
8186    for (int i = 0; i < element.getGroup().size(); i++) {
8187      composeContractTermComponent(t, "TermComponent", "group", element.getGroup().get(i), i);
8188    }
8189  }
8190
8191  protected void composeContractSecurityLabelComponent(Complex parent, String parentType, String name, Contract.SecurityLabelComponent element, int index) {
8192    if (element == null) 
8193      return;
8194    Complex t;
8195    if (Utilities.noString(parentType))
8196      t = parent;
8197    else {
8198      t = parent.predicate("fhir:"+parentType+'.'+name);
8199    }
8200    composeBackboneElement(t, "securityLabel", name, element, index);
8201    for (int i = 0; i < element.getNumber().size(); i++) {
8202      composeUnsignedInt(t, "SecurityLabelComponent", "number", element.getNumber().get(i), i);
8203    }
8204    if (element.hasClassification()) {
8205      composeCoding(t, "SecurityLabelComponent", "classification", element.getClassification(), -1);
8206    }
8207    for (int i = 0; i < element.getCategory().size(); i++) {
8208      composeCoding(t, "SecurityLabelComponent", "category", element.getCategory().get(i), i);
8209    }
8210    for (int i = 0; i < element.getControl().size(); i++) {
8211      composeCoding(t, "SecurityLabelComponent", "control", element.getControl().get(i), i);
8212    }
8213  }
8214
8215  protected void composeContractOfferComponent(Complex parent, String parentType, String name, Contract.ContractOfferComponent element, int index) {
8216    if (element == null) 
8217      return;
8218    Complex t;
8219    if (Utilities.noString(parentType))
8220      t = parent;
8221    else {
8222      t = parent.predicate("fhir:"+parentType+'.'+name);
8223    }
8224    composeBackboneElement(t, "offer", name, element, index);
8225    for (int i = 0; i < element.getIdentifier().size(); i++) {
8226      composeIdentifier(t, "ContractOfferComponent", "identifier", element.getIdentifier().get(i), i);
8227    }
8228    for (int i = 0; i < element.getParty().size(); i++) {
8229      composeContractPartyComponent(t, "ContractOfferComponent", "party", element.getParty().get(i), i);
8230    }
8231    if (element.hasTopic()) {
8232      composeReference(t, "ContractOfferComponent", "topic", element.getTopic(), -1);
8233    }
8234    if (element.hasType()) {
8235      composeCodeableConcept(t, "ContractOfferComponent", "type", element.getType(), -1);
8236    }
8237    if (element.hasDecision()) {
8238      composeCodeableConcept(t, "ContractOfferComponent", "decision", element.getDecision(), -1);
8239    }
8240    for (int i = 0; i < element.getDecisionMode().size(); i++) {
8241      composeCodeableConcept(t, "ContractOfferComponent", "decisionMode", element.getDecisionMode().get(i), i);
8242    }
8243    for (int i = 0; i < element.getAnswer().size(); i++) {
8244      composeContractAnswerComponent(t, "ContractOfferComponent", "answer", element.getAnswer().get(i), i);
8245    }
8246    if (element.hasTextElement()) {
8247      composeString(t, "ContractOfferComponent", "text", element.getTextElement(), -1);
8248    }
8249    for (int i = 0; i < element.getLinkId().size(); i++) {
8250      composeString(t, "ContractOfferComponent", "linkId", element.getLinkId().get(i), i);
8251    }
8252    for (int i = 0; i < element.getSecurityLabelNumber().size(); i++) {
8253      composeUnsignedInt(t, "ContractOfferComponent", "securityLabelNumber", element.getSecurityLabelNumber().get(i), i);
8254    }
8255  }
8256
8257  protected void composeContractPartyComponent(Complex parent, String parentType, String name, Contract.ContractPartyComponent element, int index) {
8258    if (element == null) 
8259      return;
8260    Complex t;
8261    if (Utilities.noString(parentType))
8262      t = parent;
8263    else {
8264      t = parent.predicate("fhir:"+parentType+'.'+name);
8265    }
8266    composeBackboneElement(t, "party", name, element, index);
8267    for (int i = 0; i < element.getReference().size(); i++) {
8268      composeReference(t, "ContractPartyComponent", "reference", element.getReference().get(i), i);
8269    }
8270    if (element.hasRole()) {
8271      composeCodeableConcept(t, "ContractPartyComponent", "role", element.getRole(), -1);
8272    }
8273  }
8274
8275  protected void composeContractAnswerComponent(Complex parent, String parentType, String name, Contract.AnswerComponent element, int index) {
8276    if (element == null) 
8277      return;
8278    Complex t;
8279    if (Utilities.noString(parentType))
8280      t = parent;
8281    else {
8282      t = parent.predicate("fhir:"+parentType+'.'+name);
8283    }
8284    composeBackboneElement(t, "answer", name, element, index);
8285    if (element.hasValue()) {
8286      composeType(t, "AnswerComponent", "value", element.getValue(), -1);
8287    }
8288  }
8289
8290  protected void composeContractAssetComponent(Complex parent, String parentType, String name, Contract.ContractAssetComponent element, int index) {
8291    if (element == null) 
8292      return;
8293    Complex t;
8294    if (Utilities.noString(parentType))
8295      t = parent;
8296    else {
8297      t = parent.predicate("fhir:"+parentType+'.'+name);
8298    }
8299    composeBackboneElement(t, "asset", name, element, index);
8300    if (element.hasScope()) {
8301      composeCodeableConcept(t, "ContractAssetComponent", "scope", element.getScope(), -1);
8302    }
8303    for (int i = 0; i < element.getType().size(); i++) {
8304      composeCodeableConcept(t, "ContractAssetComponent", "type", element.getType().get(i), i);
8305    }
8306    for (int i = 0; i < element.getTypeReference().size(); i++) {
8307      composeReference(t, "ContractAssetComponent", "typeReference", element.getTypeReference().get(i), i);
8308    }
8309    for (int i = 0; i < element.getSubtype().size(); i++) {
8310      composeCodeableConcept(t, "ContractAssetComponent", "subtype", element.getSubtype().get(i), i);
8311    }
8312    if (element.hasRelationship()) {
8313      composeCoding(t, "ContractAssetComponent", "relationship", element.getRelationship(), -1);
8314    }
8315    for (int i = 0; i < element.getContext().size(); i++) {
8316      composeContractAssetContextComponent(t, "ContractAssetComponent", "context", element.getContext().get(i), i);
8317    }
8318    if (element.hasConditionElement()) {
8319      composeString(t, "ContractAssetComponent", "condition", element.getConditionElement(), -1);
8320    }
8321    for (int i = 0; i < element.getPeriodType().size(); i++) {
8322      composeCodeableConcept(t, "ContractAssetComponent", "periodType", element.getPeriodType().get(i), i);
8323    }
8324    for (int i = 0; i < element.getPeriod().size(); i++) {
8325      composePeriod(t, "ContractAssetComponent", "period", element.getPeriod().get(i), i);
8326    }
8327    for (int i = 0; i < element.getUsePeriod().size(); i++) {
8328      composePeriod(t, "ContractAssetComponent", "usePeriod", element.getUsePeriod().get(i), i);
8329    }
8330    if (element.hasTextElement()) {
8331      composeString(t, "ContractAssetComponent", "text", element.getTextElement(), -1);
8332    }
8333    for (int i = 0; i < element.getLinkId().size(); i++) {
8334      composeString(t, "ContractAssetComponent", "linkId", element.getLinkId().get(i), i);
8335    }
8336    for (int i = 0; i < element.getAnswer().size(); i++) {
8337      composeContractAnswerComponent(t, "ContractAssetComponent", "answer", element.getAnswer().get(i), i);
8338    }
8339    for (int i = 0; i < element.getSecurityLabelNumber().size(); i++) {
8340      composeUnsignedInt(t, "ContractAssetComponent", "securityLabelNumber", element.getSecurityLabelNumber().get(i), i);
8341    }
8342    for (int i = 0; i < element.getValuedItem().size(); i++) {
8343      composeContractValuedItemComponent(t, "ContractAssetComponent", "valuedItem", element.getValuedItem().get(i), i);
8344    }
8345  }
8346
8347  protected void composeContractAssetContextComponent(Complex parent, String parentType, String name, Contract.AssetContextComponent element, int index) {
8348    if (element == null) 
8349      return;
8350    Complex t;
8351    if (Utilities.noString(parentType))
8352      t = parent;
8353    else {
8354      t = parent.predicate("fhir:"+parentType+'.'+name);
8355    }
8356    composeBackboneElement(t, "context", name, element, index);
8357    if (element.hasReference()) {
8358      composeReference(t, "AssetContextComponent", "reference", element.getReference(), -1);
8359    }
8360    for (int i = 0; i < element.getCode().size(); i++) {
8361      composeCodeableConcept(t, "AssetContextComponent", "code", element.getCode().get(i), i);
8362    }
8363    if (element.hasTextElement()) {
8364      composeString(t, "AssetContextComponent", "text", element.getTextElement(), -1);
8365    }
8366  }
8367
8368  protected void composeContractValuedItemComponent(Complex parent, String parentType, String name, Contract.ValuedItemComponent element, int index) {
8369    if (element == null) 
8370      return;
8371    Complex t;
8372    if (Utilities.noString(parentType))
8373      t = parent;
8374    else {
8375      t = parent.predicate("fhir:"+parentType+'.'+name);
8376    }
8377    composeBackboneElement(t, "valuedItem", name, element, index);
8378    if (element.hasEntity()) {
8379      composeType(t, "ValuedItemComponent", "entity", element.getEntity(), -1);
8380    }
8381    if (element.hasIdentifier()) {
8382      composeIdentifier(t, "ValuedItemComponent", "identifier", element.getIdentifier(), -1);
8383    }
8384    if (element.hasEffectiveTimeElement()) {
8385      composeDateTime(t, "ValuedItemComponent", "effectiveTime", element.getEffectiveTimeElement(), -1);
8386    }
8387    if (element.hasQuantity()) {
8388      composeQuantity(t, "ValuedItemComponent", "quantity", element.getQuantity(), -1);
8389    }
8390    if (element.hasUnitPrice()) {
8391      composeMoney(t, "ValuedItemComponent", "unitPrice", element.getUnitPrice(), -1);
8392    }
8393    if (element.hasFactorElement()) {
8394      composeDecimal(t, "ValuedItemComponent", "factor", element.getFactorElement(), -1);
8395    }
8396    if (element.hasPointsElement()) {
8397      composeDecimal(t, "ValuedItemComponent", "points", element.getPointsElement(), -1);
8398    }
8399    if (element.hasNet()) {
8400      composeMoney(t, "ValuedItemComponent", "net", element.getNet(), -1);
8401    }
8402    if (element.hasPaymentElement()) {
8403      composeString(t, "ValuedItemComponent", "payment", element.getPaymentElement(), -1);
8404    }
8405    if (element.hasPaymentDateElement()) {
8406      composeDateTime(t, "ValuedItemComponent", "paymentDate", element.getPaymentDateElement(), -1);
8407    }
8408    if (element.hasResponsible()) {
8409      composeReference(t, "ValuedItemComponent", "responsible", element.getResponsible(), -1);
8410    }
8411    if (element.hasRecipient()) {
8412      composeReference(t, "ValuedItemComponent", "recipient", element.getRecipient(), -1);
8413    }
8414    for (int i = 0; i < element.getLinkId().size(); i++) {
8415      composeString(t, "ValuedItemComponent", "linkId", element.getLinkId().get(i), i);
8416    }
8417    for (int i = 0; i < element.getSecurityLabelNumber().size(); i++) {
8418      composeUnsignedInt(t, "ValuedItemComponent", "securityLabelNumber", element.getSecurityLabelNumber().get(i), i);
8419    }
8420  }
8421
8422  protected void composeContractActionComponent(Complex parent, String parentType, String name, Contract.ActionComponent element, int index) {
8423    if (element == null) 
8424      return;
8425    Complex t;
8426    if (Utilities.noString(parentType))
8427      t = parent;
8428    else {
8429      t = parent.predicate("fhir:"+parentType+'.'+name);
8430    }
8431    composeBackboneElement(t, "action", name, element, index);
8432    if (element.hasDoNotPerformElement()) {
8433      composeBoolean(t, "ActionComponent", "doNotPerform", element.getDoNotPerformElement(), -1);
8434    }
8435    if (element.hasType()) {
8436      composeCodeableConcept(t, "ActionComponent", "type", element.getType(), -1);
8437    }
8438    for (int i = 0; i < element.getSubject().size(); i++) {
8439      composeContractActionSubjectComponent(t, "ActionComponent", "subject", element.getSubject().get(i), i);
8440    }
8441    if (element.hasIntent()) {
8442      composeCodeableConcept(t, "ActionComponent", "intent", element.getIntent(), -1);
8443    }
8444    for (int i = 0; i < element.getLinkId().size(); i++) {
8445      composeString(t, "ActionComponent", "linkId", element.getLinkId().get(i), i);
8446    }
8447    if (element.hasStatus()) {
8448      composeCodeableConcept(t, "ActionComponent", "status", element.getStatus(), -1);
8449    }
8450    if (element.hasContext()) {
8451      composeReference(t, "ActionComponent", "context", element.getContext(), -1);
8452    }
8453    for (int i = 0; i < element.getContextLinkId().size(); i++) {
8454      composeString(t, "ActionComponent", "contextLinkId", element.getContextLinkId().get(i), i);
8455    }
8456    if (element.hasOccurrence()) {
8457      composeType(t, "ActionComponent", "occurrence", element.getOccurrence(), -1);
8458    }
8459    for (int i = 0; i < element.getRequester().size(); i++) {
8460      composeReference(t, "ActionComponent", "requester", element.getRequester().get(i), i);
8461    }
8462    for (int i = 0; i < element.getRequesterLinkId().size(); i++) {
8463      composeString(t, "ActionComponent", "requesterLinkId", element.getRequesterLinkId().get(i), i);
8464    }
8465    for (int i = 0; i < element.getPerformerType().size(); i++) {
8466      composeCodeableConcept(t, "ActionComponent", "performerType", element.getPerformerType().get(i), i);
8467    }
8468    if (element.hasPerformerRole()) {
8469      composeCodeableConcept(t, "ActionComponent", "performerRole", element.getPerformerRole(), -1);
8470    }
8471    if (element.hasPerformer()) {
8472      composeReference(t, "ActionComponent", "performer", element.getPerformer(), -1);
8473    }
8474    for (int i = 0; i < element.getPerformerLinkId().size(); i++) {
8475      composeString(t, "ActionComponent", "performerLinkId", element.getPerformerLinkId().get(i), i);
8476    }
8477    for (int i = 0; i < element.getReason().size(); i++) {
8478      composeCodeableReference(t, "ActionComponent", "reason", element.getReason().get(i), i);
8479    }
8480    for (int i = 0; i < element.getReasonLinkId().size(); i++) {
8481      composeString(t, "ActionComponent", "reasonLinkId", element.getReasonLinkId().get(i), i);
8482    }
8483    for (int i = 0; i < element.getNote().size(); i++) {
8484      composeAnnotation(t, "ActionComponent", "note", element.getNote().get(i), i);
8485    }
8486    for (int i = 0; i < element.getSecurityLabelNumber().size(); i++) {
8487      composeUnsignedInt(t, "ActionComponent", "securityLabelNumber", element.getSecurityLabelNumber().get(i), i);
8488    }
8489  }
8490
8491  protected void composeContractActionSubjectComponent(Complex parent, String parentType, String name, Contract.ActionSubjectComponent element, int index) {
8492    if (element == null) 
8493      return;
8494    Complex t;
8495    if (Utilities.noString(parentType))
8496      t = parent;
8497    else {
8498      t = parent.predicate("fhir:"+parentType+'.'+name);
8499    }
8500    composeBackboneElement(t, "subject", name, element, index);
8501    for (int i = 0; i < element.getReference().size(); i++) {
8502      composeReference(t, "ActionSubjectComponent", "reference", element.getReference().get(i), i);
8503    }
8504    if (element.hasRole()) {
8505      composeCodeableConcept(t, "ActionSubjectComponent", "role", element.getRole(), -1);
8506    }
8507  }
8508
8509  protected void composeContractSignatoryComponent(Complex parent, String parentType, String name, Contract.SignatoryComponent element, int index) {
8510    if (element == null) 
8511      return;
8512    Complex t;
8513    if (Utilities.noString(parentType))
8514      t = parent;
8515    else {
8516      t = parent.predicate("fhir:"+parentType+'.'+name);
8517    }
8518    composeBackboneElement(t, "signer", name, element, index);
8519    if (element.hasType()) {
8520      composeCoding(t, "SignatoryComponent", "type", element.getType(), -1);
8521    }
8522    if (element.hasParty()) {
8523      composeReference(t, "SignatoryComponent", "party", element.getParty(), -1);
8524    }
8525    for (int i = 0; i < element.getSignature().size(); i++) {
8526      composeSignature(t, "SignatoryComponent", "signature", element.getSignature().get(i), i);
8527    }
8528  }
8529
8530  protected void composeContractFriendlyLanguageComponent(Complex parent, String parentType, String name, Contract.FriendlyLanguageComponent element, int index) {
8531    if (element == null) 
8532      return;
8533    Complex t;
8534    if (Utilities.noString(parentType))
8535      t = parent;
8536    else {
8537      t = parent.predicate("fhir:"+parentType+'.'+name);
8538    }
8539    composeBackboneElement(t, "friendly", name, element, index);
8540    if (element.hasContent()) {
8541      composeType(t, "FriendlyLanguageComponent", "content", element.getContent(), -1);
8542    }
8543  }
8544
8545  protected void composeContractLegalLanguageComponent(Complex parent, String parentType, String name, Contract.LegalLanguageComponent element, int index) {
8546    if (element == null) 
8547      return;
8548    Complex t;
8549    if (Utilities.noString(parentType))
8550      t = parent;
8551    else {
8552      t = parent.predicate("fhir:"+parentType+'.'+name);
8553    }
8554    composeBackboneElement(t, "legal", name, element, index);
8555    if (element.hasContent()) {
8556      composeType(t, "LegalLanguageComponent", "content", element.getContent(), -1);
8557    }
8558  }
8559
8560  protected void composeContractComputableLanguageComponent(Complex parent, String parentType, String name, Contract.ComputableLanguageComponent element, int index) {
8561    if (element == null) 
8562      return;
8563    Complex t;
8564    if (Utilities.noString(parentType))
8565      t = parent;
8566    else {
8567      t = parent.predicate("fhir:"+parentType+'.'+name);
8568    }
8569    composeBackboneElement(t, "rule", name, element, index);
8570    if (element.hasContent()) {
8571      composeType(t, "ComputableLanguageComponent", "content", element.getContent(), -1);
8572    }
8573  }
8574
8575  protected void composeCoverage(Complex parent, String parentType, String name, Coverage element, int index) {
8576    if (element == null) 
8577      return;
8578    Complex t;
8579    if (Utilities.noString(parentType))
8580      t = parent;
8581    else {
8582      t = parent.predicate("fhir:"+parentType+'.'+name);
8583    }
8584    composeDomainResource(t, "Coverage", name, element, index);
8585    for (int i = 0; i < element.getIdentifier().size(); i++) {
8586      composeIdentifier(t, "Coverage", "identifier", element.getIdentifier().get(i), i);
8587    }
8588    if (element.hasStatusElement()) {
8589      composeEnum(t, "Coverage", "status", element.getStatusElement(), -1);
8590    }
8591    if (element.hasType()) {
8592      composeCodeableConcept(t, "Coverage", "type", element.getType(), -1);
8593    }
8594    if (element.hasPolicyHolder()) {
8595      composeReference(t, "Coverage", "policyHolder", element.getPolicyHolder(), -1);
8596    }
8597    if (element.hasSubscriber()) {
8598      composeReference(t, "Coverage", "subscriber", element.getSubscriber(), -1);
8599    }
8600    if (element.hasSubscriberId()) {
8601      composeIdentifier(t, "Coverage", "subscriberId", element.getSubscriberId(), -1);
8602    }
8603    if (element.hasBeneficiary()) {
8604      composeReference(t, "Coverage", "beneficiary", element.getBeneficiary(), -1);
8605    }
8606    if (element.hasDependentElement()) {
8607      composeString(t, "Coverage", "dependent", element.getDependentElement(), -1);
8608    }
8609    if (element.hasRelationship()) {
8610      composeCodeableConcept(t, "Coverage", "relationship", element.getRelationship(), -1);
8611    }
8612    if (element.hasPeriod()) {
8613      composePeriod(t, "Coverage", "period", element.getPeriod(), -1);
8614    }
8615    for (int i = 0; i < element.getPayor().size(); i++) {
8616      composeReference(t, "Coverage", "payor", element.getPayor().get(i), i);
8617    }
8618    for (int i = 0; i < element.getClass_().size(); i++) {
8619      composeCoverageClassComponent(t, "Coverage", "class", element.getClass_().get(i), i);
8620    }
8621    if (element.hasOrderElement()) {
8622      composePositiveInt(t, "Coverage", "order", element.getOrderElement(), -1);
8623    }
8624    if (element.hasNetworkElement()) {
8625      composeString(t, "Coverage", "network", element.getNetworkElement(), -1);
8626    }
8627    for (int i = 0; i < element.getCostToBeneficiary().size(); i++) {
8628      composeCoverageCostToBeneficiaryComponent(t, "Coverage", "costToBeneficiary", element.getCostToBeneficiary().get(i), i);
8629    }
8630    if (element.hasSubrogationElement()) {
8631      composeBoolean(t, "Coverage", "subrogation", element.getSubrogationElement(), -1);
8632    }
8633    for (int i = 0; i < element.getContract().size(); i++) {
8634      composeReference(t, "Coverage", "contract", element.getContract().get(i), i);
8635    }
8636  }
8637
8638  protected void composeCoverageClassComponent(Complex parent, String parentType, String name, Coverage.ClassComponent element, int index) {
8639    if (element == null) 
8640      return;
8641    Complex t;
8642    if (Utilities.noString(parentType))
8643      t = parent;
8644    else {
8645      t = parent.predicate("fhir:"+parentType+'.'+name);
8646    }
8647    composeBackboneElement(t, "class", name, element, index);
8648    if (element.hasType()) {
8649      composeCodeableConcept(t, "ClassComponent", "type", element.getType(), -1);
8650    }
8651    if (element.hasValueElement()) {
8652      composeString(t, "ClassComponent", "value", element.getValueElement(), -1);
8653    }
8654    if (element.hasNameElement()) {
8655      composeString(t, "ClassComponent", "name", element.getNameElement(), -1);
8656    }
8657  }
8658
8659  protected void composeCoverageCostToBeneficiaryComponent(Complex parent, String parentType, String name, Coverage.CostToBeneficiaryComponent element, int index) {
8660    if (element == null) 
8661      return;
8662    Complex t;
8663    if (Utilities.noString(parentType))
8664      t = parent;
8665    else {
8666      t = parent.predicate("fhir:"+parentType+'.'+name);
8667    }
8668    composeBackboneElement(t, "costToBeneficiary", name, element, index);
8669    if (element.hasType()) {
8670      composeCodeableConcept(t, "CostToBeneficiaryComponent", "type", element.getType(), -1);
8671    }
8672    if (element.hasValue()) {
8673      composeType(t, "CostToBeneficiaryComponent", "value", element.getValue(), -1);
8674    }
8675    for (int i = 0; i < element.getException().size(); i++) {
8676      composeCoverageExemptionComponent(t, "CostToBeneficiaryComponent", "exception", element.getException().get(i), i);
8677    }
8678  }
8679
8680  protected void composeCoverageExemptionComponent(Complex parent, String parentType, String name, Coverage.ExemptionComponent element, int index) {
8681    if (element == null) 
8682      return;
8683    Complex t;
8684    if (Utilities.noString(parentType))
8685      t = parent;
8686    else {
8687      t = parent.predicate("fhir:"+parentType+'.'+name);
8688    }
8689    composeBackboneElement(t, "exception", name, element, index);
8690    if (element.hasType()) {
8691      composeCodeableConcept(t, "ExemptionComponent", "type", element.getType(), -1);
8692    }
8693    if (element.hasPeriod()) {
8694      composePeriod(t, "ExemptionComponent", "period", element.getPeriod(), -1);
8695    }
8696  }
8697
8698  protected void composeCoverageEligibilityRequest(Complex parent, String parentType, String name, CoverageEligibilityRequest element, int index) {
8699    if (element == null) 
8700      return;
8701    Complex t;
8702    if (Utilities.noString(parentType))
8703      t = parent;
8704    else {
8705      t = parent.predicate("fhir:"+parentType+'.'+name);
8706    }
8707    composeDomainResource(t, "CoverageEligibilityRequest", name, element, index);
8708    for (int i = 0; i < element.getIdentifier().size(); i++) {
8709      composeIdentifier(t, "CoverageEligibilityRequest", "identifier", element.getIdentifier().get(i), i);
8710    }
8711    if (element.hasStatusElement()) {
8712      composeEnum(t, "CoverageEligibilityRequest", "status", element.getStatusElement(), -1);
8713    }
8714    if (element.hasPriority()) {
8715      composeCodeableConcept(t, "CoverageEligibilityRequest", "priority", element.getPriority(), -1);
8716    }
8717    for (int i = 0; i < element.getPurpose().size(); i++) {
8718      composeEnum(t, "CoverageEligibilityRequest", "purpose", element.getPurpose().get(i), i);
8719    }
8720    if (element.hasPatient()) {
8721      composeReference(t, "CoverageEligibilityRequest", "patient", element.getPatient(), -1);
8722    }
8723    if (element.hasServiced()) {
8724      composeType(t, "CoverageEligibilityRequest", "serviced", element.getServiced(), -1);
8725    }
8726    if (element.hasCreatedElement()) {
8727      composeDateTime(t, "CoverageEligibilityRequest", "created", element.getCreatedElement(), -1);
8728    }
8729    if (element.hasEnterer()) {
8730      composeReference(t, "CoverageEligibilityRequest", "enterer", element.getEnterer(), -1);
8731    }
8732    if (element.hasProvider()) {
8733      composeReference(t, "CoverageEligibilityRequest", "provider", element.getProvider(), -1);
8734    }
8735    if (element.hasInsurer()) {
8736      composeReference(t, "CoverageEligibilityRequest", "insurer", element.getInsurer(), -1);
8737    }
8738    if (element.hasFacility()) {
8739      composeReference(t, "CoverageEligibilityRequest", "facility", element.getFacility(), -1);
8740    }
8741    for (int i = 0; i < element.getSupportingInfo().size(); i++) {
8742      composeCoverageEligibilityRequestSupportingInformationComponent(t, "CoverageEligibilityRequest", "supportingInfo", element.getSupportingInfo().get(i), i);
8743    }
8744    for (int i = 0; i < element.getInsurance().size(); i++) {
8745      composeCoverageEligibilityRequestInsuranceComponent(t, "CoverageEligibilityRequest", "insurance", element.getInsurance().get(i), i);
8746    }
8747    for (int i = 0; i < element.getItem().size(); i++) {
8748      composeCoverageEligibilityRequestDetailsComponent(t, "CoverageEligibilityRequest", "item", element.getItem().get(i), i);
8749    }
8750  }
8751
8752  protected void composeCoverageEligibilityRequestSupportingInformationComponent(Complex parent, String parentType, String name, CoverageEligibilityRequest.SupportingInformationComponent element, int index) {
8753    if (element == null) 
8754      return;
8755    Complex t;
8756    if (Utilities.noString(parentType))
8757      t = parent;
8758    else {
8759      t = parent.predicate("fhir:"+parentType+'.'+name);
8760    }
8761    composeBackboneElement(t, "supportingInfo", name, element, index);
8762    if (element.hasSequenceElement()) {
8763      composePositiveInt(t, "SupportingInformationComponent", "sequence", element.getSequenceElement(), -1);
8764    }
8765    if (element.hasInformation()) {
8766      composeReference(t, "SupportingInformationComponent", "information", element.getInformation(), -1);
8767    }
8768    if (element.hasAppliesToAllElement()) {
8769      composeBoolean(t, "SupportingInformationComponent", "appliesToAll", element.getAppliesToAllElement(), -1);
8770    }
8771  }
8772
8773  protected void composeCoverageEligibilityRequestInsuranceComponent(Complex parent, String parentType, String name, CoverageEligibilityRequest.InsuranceComponent element, int index) {
8774    if (element == null) 
8775      return;
8776    Complex t;
8777    if (Utilities.noString(parentType))
8778      t = parent;
8779    else {
8780      t = parent.predicate("fhir:"+parentType+'.'+name);
8781    }
8782    composeBackboneElement(t, "insurance", name, element, index);
8783    if (element.hasFocalElement()) {
8784      composeBoolean(t, "InsuranceComponent", "focal", element.getFocalElement(), -1);
8785    }
8786    if (element.hasCoverage()) {
8787      composeReference(t, "InsuranceComponent", "coverage", element.getCoverage(), -1);
8788    }
8789    if (element.hasBusinessArrangementElement()) {
8790      composeString(t, "InsuranceComponent", "businessArrangement", element.getBusinessArrangementElement(), -1);
8791    }
8792  }
8793
8794  protected void composeCoverageEligibilityRequestDetailsComponent(Complex parent, String parentType, String name, CoverageEligibilityRequest.DetailsComponent element, int index) {
8795    if (element == null) 
8796      return;
8797    Complex t;
8798    if (Utilities.noString(parentType))
8799      t = parent;
8800    else {
8801      t = parent.predicate("fhir:"+parentType+'.'+name);
8802    }
8803    composeBackboneElement(t, "item", name, element, index);
8804    for (int i = 0; i < element.getSupportingInfoSequence().size(); i++) {
8805      composePositiveInt(t, "DetailsComponent", "supportingInfoSequence", element.getSupportingInfoSequence().get(i), i);
8806    }
8807    if (element.hasCategory()) {
8808      composeCodeableConcept(t, "DetailsComponent", "category", element.getCategory(), -1);
8809    }
8810    if (element.hasProductOrService()) {
8811      composeCodeableConcept(t, "DetailsComponent", "productOrService", element.getProductOrService(), -1);
8812    }
8813    for (int i = 0; i < element.getModifier().size(); i++) {
8814      composeCodeableConcept(t, "DetailsComponent", "modifier", element.getModifier().get(i), i);
8815    }
8816    if (element.hasProvider()) {
8817      composeReference(t, "DetailsComponent", "provider", element.getProvider(), -1);
8818    }
8819    if (element.hasQuantity()) {
8820      composeQuantity(t, "DetailsComponent", "quantity", element.getQuantity(), -1);
8821    }
8822    if (element.hasUnitPrice()) {
8823      composeMoney(t, "DetailsComponent", "unitPrice", element.getUnitPrice(), -1);
8824    }
8825    if (element.hasFacility()) {
8826      composeReference(t, "DetailsComponent", "facility", element.getFacility(), -1);
8827    }
8828    for (int i = 0; i < element.getDiagnosis().size(); i++) {
8829      composeCoverageEligibilityRequestDiagnosisComponent(t, "DetailsComponent", "diagnosis", element.getDiagnosis().get(i), i);
8830    }
8831    for (int i = 0; i < element.getDetail().size(); i++) {
8832      composeReference(t, "DetailsComponent", "detail", element.getDetail().get(i), i);
8833    }
8834  }
8835
8836  protected void composeCoverageEligibilityRequestDiagnosisComponent(Complex parent, String parentType, String name, CoverageEligibilityRequest.DiagnosisComponent element, int index) {
8837    if (element == null) 
8838      return;
8839    Complex t;
8840    if (Utilities.noString(parentType))
8841      t = parent;
8842    else {
8843      t = parent.predicate("fhir:"+parentType+'.'+name);
8844    }
8845    composeBackboneElement(t, "diagnosis", name, element, index);
8846    if (element.hasDiagnosis()) {
8847      composeType(t, "DiagnosisComponent", "diagnosis", element.getDiagnosis(), -1);
8848    }
8849  }
8850
8851  protected void composeCoverageEligibilityResponse(Complex parent, String parentType, String name, CoverageEligibilityResponse element, int index) {
8852    if (element == null) 
8853      return;
8854    Complex t;
8855    if (Utilities.noString(parentType))
8856      t = parent;
8857    else {
8858      t = parent.predicate("fhir:"+parentType+'.'+name);
8859    }
8860    composeDomainResource(t, "CoverageEligibilityResponse", name, element, index);
8861    for (int i = 0; i < element.getIdentifier().size(); i++) {
8862      composeIdentifier(t, "CoverageEligibilityResponse", "identifier", element.getIdentifier().get(i), i);
8863    }
8864    if (element.hasStatusElement()) {
8865      composeEnum(t, "CoverageEligibilityResponse", "status", element.getStatusElement(), -1);
8866    }
8867    for (int i = 0; i < element.getPurpose().size(); i++) {
8868      composeEnum(t, "CoverageEligibilityResponse", "purpose", element.getPurpose().get(i), i);
8869    }
8870    if (element.hasPatient()) {
8871      composeReference(t, "CoverageEligibilityResponse", "patient", element.getPatient(), -1);
8872    }
8873    if (element.hasServiced()) {
8874      composeType(t, "CoverageEligibilityResponse", "serviced", element.getServiced(), -1);
8875    }
8876    if (element.hasCreatedElement()) {
8877      composeDateTime(t, "CoverageEligibilityResponse", "created", element.getCreatedElement(), -1);
8878    }
8879    if (element.hasRequestor()) {
8880      composeReference(t, "CoverageEligibilityResponse", "requestor", element.getRequestor(), -1);
8881    }
8882    if (element.hasRequest()) {
8883      composeReference(t, "CoverageEligibilityResponse", "request", element.getRequest(), -1);
8884    }
8885    if (element.hasOutcomeElement()) {
8886      composeEnum(t, "CoverageEligibilityResponse", "outcome", element.getOutcomeElement(), -1);
8887    }
8888    if (element.hasDispositionElement()) {
8889      composeString(t, "CoverageEligibilityResponse", "disposition", element.getDispositionElement(), -1);
8890    }
8891    if (element.hasInsurer()) {
8892      composeReference(t, "CoverageEligibilityResponse", "insurer", element.getInsurer(), -1);
8893    }
8894    for (int i = 0; i < element.getInsurance().size(); i++) {
8895      composeCoverageEligibilityResponseInsuranceComponent(t, "CoverageEligibilityResponse", "insurance", element.getInsurance().get(i), i);
8896    }
8897    if (element.hasPreAuthRefElement()) {
8898      composeString(t, "CoverageEligibilityResponse", "preAuthRef", element.getPreAuthRefElement(), -1);
8899    }
8900    if (element.hasForm()) {
8901      composeCodeableConcept(t, "CoverageEligibilityResponse", "form", element.getForm(), -1);
8902    }
8903    for (int i = 0; i < element.getError().size(); i++) {
8904      composeCoverageEligibilityResponseErrorsComponent(t, "CoverageEligibilityResponse", "error", element.getError().get(i), i);
8905    }
8906  }
8907
8908  protected void composeCoverageEligibilityResponseInsuranceComponent(Complex parent, String parentType, String name, CoverageEligibilityResponse.InsuranceComponent element, int index) {
8909    if (element == null) 
8910      return;
8911    Complex t;
8912    if (Utilities.noString(parentType))
8913      t = parent;
8914    else {
8915      t = parent.predicate("fhir:"+parentType+'.'+name);
8916    }
8917    composeBackboneElement(t, "insurance", name, element, index);
8918    if (element.hasCoverage()) {
8919      composeReference(t, "InsuranceComponent", "coverage", element.getCoverage(), -1);
8920    }
8921    if (element.hasInforceElement()) {
8922      composeBoolean(t, "InsuranceComponent", "inforce", element.getInforceElement(), -1);
8923    }
8924    if (element.hasBenefitPeriod()) {
8925      composePeriod(t, "InsuranceComponent", "benefitPeriod", element.getBenefitPeriod(), -1);
8926    }
8927    for (int i = 0; i < element.getItem().size(); i++) {
8928      composeCoverageEligibilityResponseItemsComponent(t, "InsuranceComponent", "item", element.getItem().get(i), i);
8929    }
8930  }
8931
8932  protected void composeCoverageEligibilityResponseItemsComponent(Complex parent, String parentType, String name, CoverageEligibilityResponse.ItemsComponent element, int index) {
8933    if (element == null) 
8934      return;
8935    Complex t;
8936    if (Utilities.noString(parentType))
8937      t = parent;
8938    else {
8939      t = parent.predicate("fhir:"+parentType+'.'+name);
8940    }
8941    composeBackboneElement(t, "item", name, element, index);
8942    if (element.hasCategory()) {
8943      composeCodeableConcept(t, "ItemsComponent", "category", element.getCategory(), -1);
8944    }
8945    if (element.hasProductOrService()) {
8946      composeCodeableConcept(t, "ItemsComponent", "productOrService", element.getProductOrService(), -1);
8947    }
8948    for (int i = 0; i < element.getModifier().size(); i++) {
8949      composeCodeableConcept(t, "ItemsComponent", "modifier", element.getModifier().get(i), i);
8950    }
8951    if (element.hasProvider()) {
8952      composeReference(t, "ItemsComponent", "provider", element.getProvider(), -1);
8953    }
8954    if (element.hasExcludedElement()) {
8955      composeBoolean(t, "ItemsComponent", "excluded", element.getExcludedElement(), -1);
8956    }
8957    if (element.hasNameElement()) {
8958      composeString(t, "ItemsComponent", "name", element.getNameElement(), -1);
8959    }
8960    if (element.hasDescriptionElement()) {
8961      composeString(t, "ItemsComponent", "description", element.getDescriptionElement(), -1);
8962    }
8963    if (element.hasNetwork()) {
8964      composeCodeableConcept(t, "ItemsComponent", "network", element.getNetwork(), -1);
8965    }
8966    if (element.hasUnit()) {
8967      composeCodeableConcept(t, "ItemsComponent", "unit", element.getUnit(), -1);
8968    }
8969    if (element.hasTerm()) {
8970      composeCodeableConcept(t, "ItemsComponent", "term", element.getTerm(), -1);
8971    }
8972    for (int i = 0; i < element.getBenefit().size(); i++) {
8973      composeCoverageEligibilityResponseBenefitComponent(t, "ItemsComponent", "benefit", element.getBenefit().get(i), i);
8974    }
8975    if (element.hasAuthorizationRequiredElement()) {
8976      composeBoolean(t, "ItemsComponent", "authorizationRequired", element.getAuthorizationRequiredElement(), -1);
8977    }
8978    for (int i = 0; i < element.getAuthorizationSupporting().size(); i++) {
8979      composeCodeableConcept(t, "ItemsComponent", "authorizationSupporting", element.getAuthorizationSupporting().get(i), i);
8980    }
8981    if (element.hasAuthorizationUrlElement()) {
8982      composeUri(t, "ItemsComponent", "authorizationUrl", element.getAuthorizationUrlElement(), -1);
8983    }
8984  }
8985
8986  protected void composeCoverageEligibilityResponseBenefitComponent(Complex parent, String parentType, String name, CoverageEligibilityResponse.BenefitComponent element, int index) {
8987    if (element == null) 
8988      return;
8989    Complex t;
8990    if (Utilities.noString(parentType))
8991      t = parent;
8992    else {
8993      t = parent.predicate("fhir:"+parentType+'.'+name);
8994    }
8995    composeBackboneElement(t, "benefit", name, element, index);
8996    if (element.hasType()) {
8997      composeCodeableConcept(t, "BenefitComponent", "type", element.getType(), -1);
8998    }
8999    if (element.hasAllowed()) {
9000      composeType(t, "BenefitComponent", "allowed", element.getAllowed(), -1);
9001    }
9002    if (element.hasUsed()) {
9003      composeType(t, "BenefitComponent", "used", element.getUsed(), -1);
9004    }
9005  }
9006
9007  protected void composeCoverageEligibilityResponseErrorsComponent(Complex parent, String parentType, String name, CoverageEligibilityResponse.ErrorsComponent element, int index) {
9008    if (element == null) 
9009      return;
9010    Complex t;
9011    if (Utilities.noString(parentType))
9012      t = parent;
9013    else {
9014      t = parent.predicate("fhir:"+parentType+'.'+name);
9015    }
9016    composeBackboneElement(t, "error", name, element, index);
9017    if (element.hasCode()) {
9018      composeCodeableConcept(t, "ErrorsComponent", "code", element.getCode(), -1);
9019    }
9020  }
9021
9022  protected void composeDetectedIssue(Complex parent, String parentType, String name, DetectedIssue element, int index) {
9023    if (element == null) 
9024      return;
9025    Complex t;
9026    if (Utilities.noString(parentType))
9027      t = parent;
9028    else {
9029      t = parent.predicate("fhir:"+parentType+'.'+name);
9030    }
9031    composeDomainResource(t, "DetectedIssue", name, element, index);
9032    for (int i = 0; i < element.getIdentifier().size(); i++) {
9033      composeIdentifier(t, "DetectedIssue", "identifier", element.getIdentifier().get(i), i);
9034    }
9035    if (element.hasStatusElement()) {
9036      composeEnum(t, "DetectedIssue", "status", element.getStatusElement(), -1);
9037    }
9038    if (element.hasCode()) {
9039      composeCodeableConcept(t, "DetectedIssue", "code", element.getCode(), -1);
9040    }
9041    if (element.hasSeverityElement()) {
9042      composeEnum(t, "DetectedIssue", "severity", element.getSeverityElement(), -1);
9043    }
9044    if (element.hasPatient()) {
9045      composeReference(t, "DetectedIssue", "patient", element.getPatient(), -1);
9046    }
9047    if (element.hasIdentified()) {
9048      composeType(t, "DetectedIssue", "identified", element.getIdentified(), -1);
9049    }
9050    if (element.hasAuthor()) {
9051      composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1);
9052    }
9053    for (int i = 0; i < element.getImplicated().size(); i++) {
9054      composeReference(t, "DetectedIssue", "implicated", element.getImplicated().get(i), i);
9055    }
9056    for (int i = 0; i < element.getEvidence().size(); i++) {
9057      composeDetectedIssueEvidenceComponent(t, "DetectedIssue", "evidence", element.getEvidence().get(i), i);
9058    }
9059    if (element.hasDetailElement()) {
9060      composeString(t, "DetectedIssue", "detail", element.getDetailElement(), -1);
9061    }
9062    if (element.hasReferenceElement()) {
9063      composeUri(t, "DetectedIssue", "reference", element.getReferenceElement(), -1);
9064    }
9065    for (int i = 0; i < element.getMitigation().size(); i++) {
9066      composeDetectedIssueMitigationComponent(t, "DetectedIssue", "mitigation", element.getMitigation().get(i), i);
9067    }
9068  }
9069
9070  protected void composeDetectedIssueEvidenceComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueEvidenceComponent element, int index) {
9071    if (element == null) 
9072      return;
9073    Complex t;
9074    if (Utilities.noString(parentType))
9075      t = parent;
9076    else {
9077      t = parent.predicate("fhir:"+parentType+'.'+name);
9078    }
9079    composeBackboneElement(t, "evidence", name, element, index);
9080    for (int i = 0; i < element.getCode().size(); i++) {
9081      composeCodeableConcept(t, "DetectedIssueEvidenceComponent", "code", element.getCode().get(i), i);
9082    }
9083    for (int i = 0; i < element.getDetail().size(); i++) {
9084      composeReference(t, "DetectedIssueEvidenceComponent", "detail", element.getDetail().get(i), i);
9085    }
9086  }
9087
9088  protected void composeDetectedIssueMitigationComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueMitigationComponent element, int index) {
9089    if (element == null) 
9090      return;
9091    Complex t;
9092    if (Utilities.noString(parentType))
9093      t = parent;
9094    else {
9095      t = parent.predicate("fhir:"+parentType+'.'+name);
9096    }
9097    composeBackboneElement(t, "mitigation", name, element, index);
9098    if (element.hasAction()) {
9099      composeCodeableConcept(t, "DetectedIssueMitigationComponent", "action", element.getAction(), -1);
9100    }
9101    if (element.hasDateElement()) {
9102      composeDateTime(t, "DetectedIssueMitigationComponent", "date", element.getDateElement(), -1);
9103    }
9104    if (element.hasAuthor()) {
9105      composeReference(t, "DetectedIssueMitigationComponent", "author", element.getAuthor(), -1);
9106    }
9107  }
9108
9109  protected void composeDevice(Complex parent, String parentType, String name, Device element, int index) {
9110    if (element == null) 
9111      return;
9112    Complex t;
9113    if (Utilities.noString(parentType))
9114      t = parent;
9115    else {
9116      t = parent.predicate("fhir:"+parentType+'.'+name);
9117    }
9118    composeDomainResource(t, "Device", name, element, index);
9119    for (int i = 0; i < element.getIdentifier().size(); i++) {
9120      composeIdentifier(t, "Device", "identifier", element.getIdentifier().get(i), i);
9121    }
9122    if (element.hasDisplayNameElement()) {
9123      composeString(t, "Device", "displayName", element.getDisplayNameElement(), -1);
9124    }
9125    if (element.hasDefinition()) {
9126      composeCodeableReference(t, "Device", "definition", element.getDefinition(), -1);
9127    }
9128    for (int i = 0; i < element.getUdiCarrier().size(); i++) {
9129      composeDeviceUdiCarrierComponent(t, "Device", "udiCarrier", element.getUdiCarrier().get(i), i);
9130    }
9131    if (element.hasStatusElement()) {
9132      composeEnum(t, "Device", "status", element.getStatusElement(), -1);
9133    }
9134    for (int i = 0; i < element.getStatusReason().size(); i++) {
9135      composeCodeableConcept(t, "Device", "statusReason", element.getStatusReason().get(i), i);
9136    }
9137    if (element.hasBiologicalSource()) {
9138      composeIdentifier(t, "Device", "biologicalSource", element.getBiologicalSource(), -1);
9139    }
9140    if (element.hasManufacturerElement()) {
9141      composeString(t, "Device", "manufacturer", element.getManufacturerElement(), -1);
9142    }
9143    if (element.hasManufactureDateElement()) {
9144      composeDateTime(t, "Device", "manufactureDate", element.getManufactureDateElement(), -1);
9145    }
9146    if (element.hasExpirationDateElement()) {
9147      composeDateTime(t, "Device", "expirationDate", element.getExpirationDateElement(), -1);
9148    }
9149    if (element.hasLotNumberElement()) {
9150      composeString(t, "Device", "lotNumber", element.getLotNumberElement(), -1);
9151    }
9152    if (element.hasSerialNumberElement()) {
9153      composeString(t, "Device", "serialNumber", element.getSerialNumberElement(), -1);
9154    }
9155    for (int i = 0; i < element.getDeviceName().size(); i++) {
9156      composeDeviceDeviceNameComponent(t, "Device", "deviceName", element.getDeviceName().get(i), i);
9157    }
9158    if (element.hasModelNumberElement()) {
9159      composeString(t, "Device", "modelNumber", element.getModelNumberElement(), -1);
9160    }
9161    if (element.hasPartNumberElement()) {
9162      composeString(t, "Device", "partNumber", element.getPartNumberElement(), -1);
9163    }
9164    for (int i = 0; i < element.getType().size(); i++) {
9165      composeCodeableConcept(t, "Device", "type", element.getType().get(i), i);
9166    }
9167    for (int i = 0; i < element.getVersion().size(); i++) {
9168      composeDeviceVersionComponent(t, "Device", "version", element.getVersion().get(i), i);
9169    }
9170    for (int i = 0; i < element.getProperty().size(); i++) {
9171      composeDevicePropertyComponent(t, "Device", "property", element.getProperty().get(i), i);
9172    }
9173    if (element.hasSubject()) {
9174      composeReference(t, "Device", "subject", element.getSubject(), -1);
9175    }
9176    if (element.hasOperationalStatus()) {
9177      composeDeviceOperationalStatusComponent(t, "Device", "operationalStatus", element.getOperationalStatus(), -1);
9178    }
9179    if (element.hasAssociationStatus()) {
9180      composeDeviceAssociationStatusComponent(t, "Device", "associationStatus", element.getAssociationStatus(), -1);
9181    }
9182    if (element.hasOwner()) {
9183      composeReference(t, "Device", "owner", element.getOwner(), -1);
9184    }
9185    for (int i = 0; i < element.getContact().size(); i++) {
9186      composeContactPoint(t, "Device", "contact", element.getContact().get(i), i);
9187    }
9188    if (element.hasLocation()) {
9189      composeReference(t, "Device", "location", element.getLocation(), -1);
9190    }
9191    if (element.hasUrlElement()) {
9192      composeUri(t, "Device", "url", element.getUrlElement(), -1);
9193    }
9194    for (int i = 0; i < element.getEndpoint().size(); i++) {
9195      composeReference(t, "Device", "endpoint", element.getEndpoint().get(i), i);
9196    }
9197    for (int i = 0; i < element.getLink().size(); i++) {
9198      composeDeviceLinkComponent(t, "Device", "link", element.getLink().get(i), i);
9199    }
9200    for (int i = 0; i < element.getNote().size(); i++) {
9201      composeAnnotation(t, "Device", "note", element.getNote().get(i), i);
9202    }
9203    for (int i = 0; i < element.getSafety().size(); i++) {
9204      composeCodeableConcept(t, "Device", "safety", element.getSafety().get(i), i);
9205    }
9206    if (element.hasParent()) {
9207      composeReference(t, "Device", "parent", element.getParent(), -1);
9208    }
9209  }
9210
9211  protected void composeDeviceUdiCarrierComponent(Complex parent, String parentType, String name, Device.DeviceUdiCarrierComponent element, int index) {
9212    if (element == null) 
9213      return;
9214    Complex t;
9215    if (Utilities.noString(parentType))
9216      t = parent;
9217    else {
9218      t = parent.predicate("fhir:"+parentType+'.'+name);
9219    }
9220    composeBackboneElement(t, "udiCarrier", name, element, index);
9221    if (element.hasDeviceIdentifierElement()) {
9222      composeString(t, "DeviceUdiCarrierComponent", "deviceIdentifier", element.getDeviceIdentifierElement(), -1);
9223    }
9224    if (element.hasIssuerElement()) {
9225      composeUri(t, "DeviceUdiCarrierComponent", "issuer", element.getIssuerElement(), -1);
9226    }
9227    if (element.hasJurisdictionElement()) {
9228      composeUri(t, "DeviceUdiCarrierComponent", "jurisdiction", element.getJurisdictionElement(), -1);
9229    }
9230    if (element.hasCarrierAIDCElement()) {
9231      composeBase64Binary(t, "DeviceUdiCarrierComponent", "carrierAIDC", element.getCarrierAIDCElement(), -1);
9232    }
9233    if (element.hasCarrierHRFElement()) {
9234      composeString(t, "DeviceUdiCarrierComponent", "carrierHRF", element.getCarrierHRFElement(), -1);
9235    }
9236    if (element.hasEntryTypeElement()) {
9237      composeEnum(t, "DeviceUdiCarrierComponent", "entryType", element.getEntryTypeElement(), -1);
9238    }
9239  }
9240
9241  protected void composeDeviceDeviceNameComponent(Complex parent, String parentType, String name, Device.DeviceDeviceNameComponent element, int index) {
9242    if (element == null) 
9243      return;
9244    Complex t;
9245    if (Utilities.noString(parentType))
9246      t = parent;
9247    else {
9248      t = parent.predicate("fhir:"+parentType+'.'+name);
9249    }
9250    composeBackboneElement(t, "deviceName", name, element, index);
9251    if (element.hasNameElement()) {
9252      composeString(t, "DeviceDeviceNameComponent", "name", element.getNameElement(), -1);
9253    }
9254    if (element.hasTypeElement()) {
9255      composeEnum(t, "DeviceDeviceNameComponent", "type", element.getTypeElement(), -1);
9256    }
9257  }
9258
9259  protected void composeDeviceVersionComponent(Complex parent, String parentType, String name, Device.DeviceVersionComponent element, int index) {
9260    if (element == null) 
9261      return;
9262    Complex t;
9263    if (Utilities.noString(parentType))
9264      t = parent;
9265    else {
9266      t = parent.predicate("fhir:"+parentType+'.'+name);
9267    }
9268    composeBackboneElement(t, "version", name, element, index);
9269    if (element.hasType()) {
9270      composeCodeableConcept(t, "DeviceVersionComponent", "type", element.getType(), -1);
9271    }
9272    if (element.hasComponent()) {
9273      composeIdentifier(t, "DeviceVersionComponent", "component", element.getComponent(), -1);
9274    }
9275    if (element.hasValueElement()) {
9276      composeString(t, "DeviceVersionComponent", "value", element.getValueElement(), -1);
9277    }
9278  }
9279
9280  protected void composeDevicePropertyComponent(Complex parent, String parentType, String name, Device.DevicePropertyComponent element, int index) {
9281    if (element == null) 
9282      return;
9283    Complex t;
9284    if (Utilities.noString(parentType))
9285      t = parent;
9286    else {
9287      t = parent.predicate("fhir:"+parentType+'.'+name);
9288    }
9289    composeBackboneElement(t, "property", name, element, index);
9290    if (element.hasType()) {
9291      composeCodeableConcept(t, "DevicePropertyComponent", "type", element.getType(), -1);
9292    }
9293    if (element.hasValue()) {
9294      composeType(t, "DevicePropertyComponent", "value", element.getValue(), -1);
9295    }
9296  }
9297
9298  protected void composeDeviceOperationalStatusComponent(Complex parent, String parentType, String name, Device.DeviceOperationalStatusComponent element, int index) {
9299    if (element == null) 
9300      return;
9301    Complex t;
9302    if (Utilities.noString(parentType))
9303      t = parent;
9304    else {
9305      t = parent.predicate("fhir:"+parentType+'.'+name);
9306    }
9307    composeBackboneElement(t, "operationalStatus", name, element, index);
9308    if (element.hasValue()) {
9309      composeCodeableConcept(t, "DeviceOperationalStatusComponent", "value", element.getValue(), -1);
9310    }
9311    for (int i = 0; i < element.getReason().size(); i++) {
9312      composeCodeableConcept(t, "DeviceOperationalStatusComponent", "reason", element.getReason().get(i), i);
9313    }
9314  }
9315
9316  protected void composeDeviceAssociationStatusComponent(Complex parent, String parentType, String name, Device.DeviceAssociationStatusComponent element, int index) {
9317    if (element == null) 
9318      return;
9319    Complex t;
9320    if (Utilities.noString(parentType))
9321      t = parent;
9322    else {
9323      t = parent.predicate("fhir:"+parentType+'.'+name);
9324    }
9325    composeBackboneElement(t, "associationStatus", name, element, index);
9326    if (element.hasValue()) {
9327      composeCodeableConcept(t, "DeviceAssociationStatusComponent", "value", element.getValue(), -1);
9328    }
9329    for (int i = 0; i < element.getReason().size(); i++) {
9330      composeCodeableConcept(t, "DeviceAssociationStatusComponent", "reason", element.getReason().get(i), i);
9331    }
9332  }
9333
9334  protected void composeDeviceLinkComponent