org.hl7.fhir.r5.formats.JsonParser Maven / Gradle / Ivy
package org.hl7.fhir.r5.formats;
// generated
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, \
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this \
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, \
this list of conditions and the following disclaimer in the documentation \
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
import org.hl7.fhir.r5.model.*;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.utilities.json.JsonTrackingParser.PresentedBigDecimal;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import java.io.IOException;
public class JsonParser extends JsonParserBase {
public JsonParser() {
super();
}
public JsonParser(boolean allowUnknownContent) {
super();
setAllowUnknownContent(allowUnknownContent);
}
public JsonParser(boolean allowUnknownContent, boolean allowComments) {
super();
setAllowUnknownContent(allowUnknownContent);
setAllowComments(allowComments);
}
protected void parseBaseProperties(JsonObject json, Base res) throws IOException, FHIRFormatError {
// nothing
}
@SuppressWarnings("unchecked")
protected > Enumeration parseEnumeration(String s, E item, EnumFactory e) throws IOException, FHIRFormatError {
Enumeration res = new Enumeration(e);
if (s != null)
res.setValue((E) e.fromCode(s));
return res;
}
protected DateType parseDate(String v) throws IOException, FHIRFormatError {
DateType res = new DateType(v);
return res;
}
protected DateTimeType parseDateTime(String v) throws IOException, FHIRFormatError {
DateTimeType res = new DateTimeType(v);
return res;
}
protected CodeType parseCode(String v) throws IOException, FHIRFormatError {
CodeType res = new CodeType(v);
return res;
}
protected StringType parseString(String v) throws IOException, FHIRFormatError {
StringType res = new StringType(v);
return res;
}
protected IntegerType parseInteger(java.lang.Long v) throws IOException, FHIRFormatError {
IntegerType res = new IntegerType(v);
return res;
}
protected Integer64Type parseInteger64(java.lang.Long v) throws IOException, FHIRFormatError {
Integer64Type res = new Integer64Type(v);
return res;
}
protected OidType parseOid(String v) throws IOException, FHIRFormatError {
OidType res = new OidType(v);
return res;
}
protected CanonicalType parseCanonical(String v) throws IOException, FHIRFormatError {
CanonicalType res = new CanonicalType(v);
return res;
}
protected UriType parseUri(String v) throws IOException, FHIRFormatError {
UriType res = new UriType(v);
return res;
}
protected UuidType parseUuid(String v) throws IOException, FHIRFormatError {
UuidType res = new UuidType(v);
return res;
}
protected UrlType parseUrl(String v) throws IOException, FHIRFormatError {
UrlType res = new UrlType(v);
return res;
}
protected InstantType parseInstant(String v) throws IOException, FHIRFormatError {
InstantType res = new InstantType(v);
return res;
}
protected BooleanType parseBoolean(java.lang.Boolean v) throws IOException, FHIRFormatError {
BooleanType res = new BooleanType(v);
return res;
}
protected Base64BinaryType parseBase64Binary(String v) throws IOException, FHIRFormatError {
Base64BinaryType res = new Base64BinaryType(v);
return res;
}
protected UnsignedIntType parseUnsignedInt(String v) throws IOException, FHIRFormatError {
UnsignedIntType res = new UnsignedIntType(v);
return res;
}
protected MarkdownType parseMarkdown(String v) throws IOException, FHIRFormatError {
MarkdownType res = new MarkdownType(v);
return res;
}
protected TimeType parseTime(String v) throws IOException, FHIRFormatError {
TimeType res = new TimeType(v);
return res;
}
protected IdType parseId(String v) throws IOException, FHIRFormatError {
IdType res = new IdType(v);
return res;
}
protected PositiveIntType parsePositiveInt(String v) throws IOException, FHIRFormatError {
PositiveIntType res = new PositiveIntType(v);
return res;
}
protected DecimalType parseDecimal(java.math.BigDecimal v) throws IOException, FHIRFormatError {
DecimalType res = new DecimalType(v);
if (v instanceof PresentedBigDecimal)
res.setRepresentation(((PresentedBigDecimal) v).getPresentation());
return res;
}
protected void parseBackboneElementProperties(JsonObject json, BackboneElement res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("modifierExtension")) {
JsonArray array = getJArray(json, "modifierExtension");
for (int i = 0; i < array.size(); i++) {
res.getModifierExtension().add(parseExtension(getJsonObjectFromArray(array, i)));
}
};
}
protected void parseBackboneTypeProperties(JsonObject json, BackboneType res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("modifierExtension")) {
JsonArray array = getJArray(json, "modifierExtension");
for (int i = 0; i < array.size(); i++) {
res.getModifierExtension().add(parseExtension(getJsonObjectFromArray(array, i)));
}
};
}
protected void parseDataTypeProperties(JsonObject json, DataType res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
}
protected void parseElementProperties(JsonObject json, Element res) throws IOException, FHIRFormatError {
if (json.has("id"))
res.setIdElement(parseString(json.get("id").getAsString()));
if (json.has("_id"))
parseElementProperties(getJObject(json, "_id"), res.getIdElement());
if (json.has("extension")) {
JsonArray array = getJArray(json, "extension");
for (int i = 0; i < array.size(); i++) {
res.getExtension().add(parseExtension(getJsonObjectFromArray(array, i)));
}
};
}
protected Address parseAddress(JsonObject json) throws IOException, FHIRFormatError {
Address res = new Address();
parseAddressProperties(json, res);
return res;
}
protected void parseAddressProperties(JsonObject json, Address res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Address.AddressUse.NULL, new Address.AddressUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Address.AddressType.NULL, new Address.AddressTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("line")) {
JsonArray array = getJArray(json, "line");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLine().add(new StringType());
} else {;
res.getLine().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_line")) {
JsonArray array = getJArray(json, "_line");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLine().size())
res.getLine().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLine().get(i));
}
};
if (json.has("city"))
res.setCityElement(parseString(json.get("city").getAsString()));
if (json.has("_city"))
parseElementProperties(getJObject(json, "_city"), res.getCityElement());
if (json.has("district"))
res.setDistrictElement(parseString(json.get("district").getAsString()));
if (json.has("_district"))
parseElementProperties(getJObject(json, "_district"), res.getDistrictElement());
if (json.has("state"))
res.setStateElement(parseString(json.get("state").getAsString()));
if (json.has("_state"))
parseElementProperties(getJObject(json, "_state"), res.getStateElement());
if (json.has("postalCode"))
res.setPostalCodeElement(parseString(json.get("postalCode").getAsString()));
if (json.has("_postalCode"))
parseElementProperties(getJObject(json, "_postalCode"), res.getPostalCodeElement());
if (json.has("country"))
res.setCountryElement(parseString(json.get("country").getAsString()));
if (json.has("_country"))
parseElementProperties(getJObject(json, "_country"), res.getCountryElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Age parseAge(JsonObject json) throws IOException, FHIRFormatError {
Age res = new Age();
parseAgeProperties(json, res);
return res;
}
protected void parseAgeProperties(JsonObject json, Age res) throws IOException, FHIRFormatError {
parseQuantityProperties(json, res);
}
protected Annotation parseAnnotation(JsonObject json) throws IOException, FHIRFormatError {
Annotation res = new Annotation();
parseAnnotationProperties(json, res);
return res;
}
protected void parseAnnotationProperties(JsonObject json, Annotation res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
DataType author = parseType("author", json);
if (author != null)
res.setAuthor(author);
if (json.has("time"))
res.setTimeElement(parseDateTime(json.get("time").getAsString()));
if (json.has("_time"))
parseElementProperties(getJObject(json, "_time"), res.getTimeElement());
if (json.has("text"))
res.setTextElement(parseMarkdown(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Attachment parseAttachment(JsonObject json) throws IOException, FHIRFormatError {
Attachment res = new Attachment();
parseAttachmentProperties(json, res);
return res;
}
protected void parseAttachmentProperties(JsonObject json, Attachment res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("contentType"))
res.setContentTypeElement(parseCode(json.get("contentType").getAsString()));
if (json.has("_contentType"))
parseElementProperties(getJObject(json, "_contentType"), res.getContentTypeElement());
if (json.has("language"))
res.setLanguageElement(parseCode(json.get("language").getAsString()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("data"))
res.setDataElement(parseBase64Binary(json.get("data").getAsString()));
if (json.has("_data"))
parseElementProperties(getJObject(json, "_data"), res.getDataElement());
if (json.has("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("size"))
res.setSizeElement(parseInteger64(json.get("size").getAsLong()));
if (json.has("_size"))
parseElementProperties(getJObject(json, "_size"), res.getSizeElement());
if (json.has("hash"))
res.setHashElement(parseBase64Binary(json.get("hash").getAsString()));
if (json.has("_hash"))
parseElementProperties(getJObject(json, "_hash"), res.getHashElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("creation"))
res.setCreationElement(parseDateTime(json.get("creation").getAsString()));
if (json.has("_creation"))
parseElementProperties(getJObject(json, "_creation"), res.getCreationElement());
if (json.has("height"))
res.setHeightElement(parsePositiveInt(json.get("height").getAsString()));
if (json.has("_height"))
parseElementProperties(getJObject(json, "_height"), res.getHeightElement());
if (json.has("width"))
res.setWidthElement(parsePositiveInt(json.get("width").getAsString()));
if (json.has("_width"))
parseElementProperties(getJObject(json, "_width"), res.getWidthElement());
if (json.has("frames"))
res.setFramesElement(parsePositiveInt(json.get("frames").getAsString()));
if (json.has("_frames"))
parseElementProperties(getJObject(json, "_frames"), res.getFramesElement());
if (json.has("duration"))
res.setDurationElement(parseDecimal(json.get("duration").getAsBigDecimal()));
if (json.has("_duration"))
parseElementProperties(getJObject(json, "_duration"), res.getDurationElement());
if (json.has("pages"))
res.setPagesElement(parsePositiveInt(json.get("pages").getAsString()));
if (json.has("_pages"))
parseElementProperties(getJObject(json, "_pages"), res.getPagesElement());
}
protected Availability parseAvailability(JsonObject json) throws IOException, FHIRFormatError {
Availability res = new Availability();
parseAvailabilityProperties(json, res);
return res;
}
protected void parseAvailabilityProperties(JsonObject json, Availability res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("availableTime")) {
JsonArray array = getJArray(json, "availableTime");
for (int i = 0; i < array.size(); i++) {
res.getAvailableTime().add(parseAvailabilityAvailableTimeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("notAvailableTime")) {
JsonArray array = getJArray(json, "notAvailableTime");
for (int i = 0; i < array.size(); i++) {
res.getNotAvailableTime().add(parseAvailabilityNotAvailableTimeComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Availability.AvailabilityAvailableTimeComponent parseAvailabilityAvailableTimeComponent(JsonObject json) throws IOException, FHIRFormatError {
Availability.AvailabilityAvailableTimeComponent res = new Availability.AvailabilityAvailableTimeComponent();
parseAvailabilityAvailableTimeComponentProperties(json, res);
return res;
}
protected void parseAvailabilityAvailableTimeComponentProperties(JsonObject json, Availability.AvailabilityAvailableTimeComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("daysOfWeek")) {
JsonArray array = getJArray(json, "daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDaysOfWeek().add(new Enumeration(new Enumerations.DaysOfWeekEnumFactory(), Enumerations.DaysOfWeek.NULL));
} else {;
res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), Enumerations.DaysOfWeek.NULL, new Enumerations.DaysOfWeekEnumFactory()));
}
}
};
if (json.has("_daysOfWeek")) {
JsonArray array = getJArray(json, "_daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDaysOfWeek().size())
res.getDaysOfWeek().add(parseEnumeration(null, Enumerations.DaysOfWeek.NULL, new Enumerations.DaysOfWeekEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDaysOfWeek().get(i));
}
};
if (json.has("allDay"))
res.setAllDayElement(parseBoolean(json.get("allDay").getAsBoolean()));
if (json.has("_allDay"))
parseElementProperties(getJObject(json, "_allDay"), res.getAllDayElement());
if (json.has("availableStartTime"))
res.setAvailableStartTimeElement(parseTime(json.get("availableStartTime").getAsString()));
if (json.has("_availableStartTime"))
parseElementProperties(getJObject(json, "_availableStartTime"), res.getAvailableStartTimeElement());
if (json.has("availableEndTime"))
res.setAvailableEndTimeElement(parseTime(json.get("availableEndTime").getAsString()));
if (json.has("_availableEndTime"))
parseElementProperties(getJObject(json, "_availableEndTime"), res.getAvailableEndTimeElement());
}
protected Availability.AvailabilityNotAvailableTimeComponent parseAvailabilityNotAvailableTimeComponent(JsonObject json) throws IOException, FHIRFormatError {
Availability.AvailabilityNotAvailableTimeComponent res = new Availability.AvailabilityNotAvailableTimeComponent();
parseAvailabilityNotAvailableTimeComponentProperties(json, res);
return res;
}
protected void parseAvailabilityNotAvailableTimeComponentProperties(JsonObject json, Availability.AvailabilityNotAvailableTimeComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("during"))
res.setDuring(parsePeriod(getJObject(json, "during")));
}
protected CodeableConcept parseCodeableConcept(JsonObject json) throws IOException, FHIRFormatError {
CodeableConcept res = new CodeableConcept();
parseCodeableConceptProperties(json, res);
return res;
}
protected void parseCodeableConceptProperties(JsonObject json, CodeableConcept res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("coding")) {
JsonArray array = getJArray(json, "coding");
for (int i = 0; i < array.size(); i++) {
res.getCoding().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected CodeableReference parseCodeableReference(JsonObject json) throws IOException, FHIRFormatError {
CodeableReference res = new CodeableReference();
parseCodeableReferenceProperties(json, res);
return res;
}
protected void parseCodeableReferenceProperties(JsonObject json, CodeableReference res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("concept"))
res.setConcept(parseCodeableConcept(getJObject(json, "concept")));
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected Coding parseCoding(JsonObject json) throws IOException, FHIRFormatError {
Coding res = new Coding();
parseCodingProperties(json, res);
return res;
}
protected void parseCodingProperties(JsonObject json, Coding res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("system"))
res.setSystemElement(parseUri(json.get("system").getAsString()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("userSelected"))
res.setUserSelectedElement(parseBoolean(json.get("userSelected").getAsBoolean()));
if (json.has("_userSelected"))
parseElementProperties(getJObject(json, "_userSelected"), res.getUserSelectedElement());
}
protected ContactDetail parseContactDetail(JsonObject json) throws IOException, FHIRFormatError {
ContactDetail res = new ContactDetail();
parseContactDetailProperties(json, res);
return res;
}
protected void parseContactDetailProperties(JsonObject json, ContactDetail res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
}
protected ContactPoint parseContactPoint(JsonObject json) throws IOException, FHIRFormatError {
ContactPoint res = new ContactPoint();
parseContactPointProperties(json, res);
return res;
}
protected void parseContactPointProperties(JsonObject json, ContactPoint res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("system"))
res.setSystemElement(parseEnumeration(json.get("system").getAsString(), ContactPoint.ContactPointSystem.NULL, new ContactPoint.ContactPointSystemEnumFactory()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), ContactPoint.ContactPointUse.NULL, new ContactPoint.ContactPointUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("rank"))
res.setRankElement(parsePositiveInt(json.get("rank").getAsString()));
if (json.has("_rank"))
parseElementProperties(getJObject(json, "_rank"), res.getRankElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Contributor parseContributor(JsonObject json) throws IOException, FHIRFormatError {
Contributor res = new Contributor();
parseContributorProperties(json, res);
return res;
}
protected void parseContributorProperties(JsonObject json, Contributor res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Contributor.ContributorType.NULL, new Contributor.ContributorTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
}
protected Count parseCount(JsonObject json) throws IOException, FHIRFormatError {
Count res = new Count();
parseCountProperties(json, res);
return res;
}
protected void parseCountProperties(JsonObject json, Count res) throws IOException, FHIRFormatError {
parseQuantityProperties(json, res);
}
protected DataRequirement parseDataRequirement(JsonObject json) throws IOException, FHIRFormatError {
DataRequirement res = new DataRequirement();
parseDataRequirementProperties(json, res);
return res;
}
protected void parseDataRequirementProperties(JsonObject json, DataRequirement res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProfile().add(new CanonicalType());
} else {;
res.getProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_profile")) {
JsonArray array = getJArray(json, "_profile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProfile().size())
res.getProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProfile().get(i));
}
};
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("mustSupport")) {
JsonArray array = getJArray(json, "mustSupport");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getMustSupport().add(new StringType());
} else {;
res.getMustSupport().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_mustSupport")) {
JsonArray array = getJArray(json, "_mustSupport");
for (int i = 0; i < array.size(); i++) {
if (i == res.getMustSupport().size())
res.getMustSupport().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getMustSupport().get(i));
}
};
if (json.has("codeFilter")) {
JsonArray array = getJArray(json, "codeFilter");
for (int i = 0; i < array.size(); i++) {
res.getCodeFilter().add(parseDataRequirementCodeFilterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dateFilter")) {
JsonArray array = getJArray(json, "dateFilter");
for (int i = 0; i < array.size(); i++) {
res.getDateFilter().add(parseDataRequirementDateFilterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("valueFilter")) {
JsonArray array = getJArray(json, "valueFilter");
for (int i = 0; i < array.size(); i++) {
res.getValueFilter().add(parseDataRequirementValueFilterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("limit"))
res.setLimitElement(parsePositiveInt(json.get("limit").getAsString()));
if (json.has("_limit"))
parseElementProperties(getJObject(json, "_limit"), res.getLimitElement());
if (json.has("sort")) {
JsonArray array = getJArray(json, "sort");
for (int i = 0; i < array.size(); i++) {
res.getSort().add(parseDataRequirementSortComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementCodeFilterComponent(JsonObject json) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent();
parseDataRequirementCodeFilterComponentProperties(json, res);
return res;
}
protected void parseDataRequirementCodeFilterComponentProperties(JsonObject json, DataRequirement.DataRequirementCodeFilterComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("searchParam"))
res.setSearchParamElement(parseString(json.get("searchParam").getAsString()));
if (json.has("_searchParam"))
parseElementProperties(getJObject(json, "_searchParam"), res.getSearchParamElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
}
protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDateFilterComponent(JsonObject json) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent();
parseDataRequirementDateFilterComponentProperties(json, res);
return res;
}
protected void parseDataRequirementDateFilterComponentProperties(JsonObject json, DataRequirement.DataRequirementDateFilterComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("searchParam"))
res.setSearchParamElement(parseString(json.get("searchParam").getAsString()));
if (json.has("_searchParam"))
parseElementProperties(getJObject(json, "_searchParam"), res.getSearchParamElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DataRequirement.DataRequirementValueFilterComponent parseDataRequirementValueFilterComponent(JsonObject json) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementValueFilterComponent res = new DataRequirement.DataRequirementValueFilterComponent();
parseDataRequirementValueFilterComponentProperties(json, res);
return res;
}
protected void parseDataRequirementValueFilterComponentProperties(JsonObject json, DataRequirement.DataRequirementValueFilterComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("searchParam"))
res.setSearchParamElement(parseString(json.get("searchParam").getAsString()));
if (json.has("_searchParam"))
parseElementProperties(getJObject(json, "_searchParam"), res.getSearchParamElement());
if (json.has("comparator"))
res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), DataRequirement.ValueFilterComparator.NULL, new DataRequirement.ValueFilterComparatorEnumFactory()));
if (json.has("_comparator"))
parseElementProperties(getJObject(json, "_comparator"), res.getComparatorElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DataRequirement.DataRequirementSortComponent parseDataRequirementSortComponent(JsonObject json) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementSortComponent res = new DataRequirement.DataRequirementSortComponent();
parseDataRequirementSortComponentProperties(json, res);
return res;
}
protected void parseDataRequirementSortComponentProperties(JsonObject json, DataRequirement.DataRequirementSortComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("direction"))
res.setDirectionElement(parseEnumeration(json.get("direction").getAsString(), DataRequirement.SortDirection.NULL, new DataRequirement.SortDirectionEnumFactory()));
if (json.has("_direction"))
parseElementProperties(getJObject(json, "_direction"), res.getDirectionElement());
}
protected Distance parseDistance(JsonObject json) throws IOException, FHIRFormatError {
Distance res = new Distance();
parseDistanceProperties(json, res);
return res;
}
protected void parseDistanceProperties(JsonObject json, Distance res) throws IOException, FHIRFormatError {
parseQuantityProperties(json, res);
}
protected Dosage parseDosage(JsonObject json) throws IOException, FHIRFormatError {
Dosage res = new Dosage();
parseDosageProperties(json, res);
return res;
}
protected void parseDosageProperties(JsonObject json, Dosage res) throws IOException, FHIRFormatError {
parseBackboneTypeProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parseInteger(json.get("sequence").getAsLong()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("additionalInstruction")) {
JsonArray array = getJArray(json, "additionalInstruction");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalInstruction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientInstruction"))
res.setPatientInstructionElement(parseString(json.get("patientInstruction").getAsString()));
if (json.has("_patientInstruction"))
parseElementProperties(getJObject(json, "_patientInstruction"), res.getPatientInstructionElement());
if (json.has("timing"))
res.setTiming(parseTiming(getJObject(json, "timing")));
if (json.has("asNeeded"))
res.setAsNeededElement(parseBoolean(json.get("asNeeded").getAsBoolean()));
if (json.has("_asNeeded"))
parseElementProperties(getJObject(json, "_asNeeded"), res.getAsNeededElement());
if (json.has("asNeededFor")) {
JsonArray array = getJArray(json, "asNeededFor");
for (int i = 0; i < array.size(); i++) {
res.getAsNeededFor().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("site"))
res.setSite(parseCodeableConcept(getJObject(json, "site")));
if (json.has("route"))
res.setRoute(parseCodeableConcept(getJObject(json, "route")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("doseAndRate")) {
JsonArray array = getJArray(json, "doseAndRate");
for (int i = 0; i < array.size(); i++) {
res.getDoseAndRate().add(parseDosageDoseAndRateComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("maxDosePerPeriod")) {
JsonArray array = getJArray(json, "maxDosePerPeriod");
for (int i = 0; i < array.size(); i++) {
res.getMaxDosePerPeriod().add(parseRatio(getJsonObjectFromArray(array, i)));
}
};
if (json.has("maxDosePerAdministration"))
res.setMaxDosePerAdministration(parseQuantity(getJObject(json, "maxDosePerAdministration")));
if (json.has("maxDosePerLifetime"))
res.setMaxDosePerLifetime(parseQuantity(getJObject(json, "maxDosePerLifetime")));
}
protected Dosage.DosageDoseAndRateComponent parseDosageDoseAndRateComponent(JsonObject json) throws IOException, FHIRFormatError {
Dosage.DosageDoseAndRateComponent res = new Dosage.DosageDoseAndRateComponent();
parseDosageDoseAndRateComponentProperties(json, res);
return res;
}
protected void parseDosageDoseAndRateComponentProperties(JsonObject json, Dosage.DosageDoseAndRateComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType dose = parseType("dose", json);
if (dose != null)
res.setDose(dose);
DataType rate = parseType("rate", json);
if (rate != null)
res.setRate(rate);
}
protected Duration parseDuration(JsonObject json) throws IOException, FHIRFormatError {
Duration res = new Duration();
parseDurationProperties(json, res);
return res;
}
protected void parseDurationProperties(JsonObject json, Duration res) throws IOException, FHIRFormatError {
parseQuantityProperties(json, res);
}
protected ElementDefinition parseElementDefinition(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition res = new ElementDefinition();
parseElementDefinitionProperties(json, res);
return res;
}
protected void parseElementDefinitionProperties(JsonObject json, ElementDefinition res) throws IOException, FHIRFormatError {
parseBackboneTypeProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("representation")) {
JsonArray array = getJArray(json, "representation");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getRepresentation().add(new Enumeration(new ElementDefinition.PropertyRepresentationEnumFactory(), ElementDefinition.PropertyRepresentation.NULL));
} else {;
res.getRepresentation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory()));
}
}
};
if (json.has("_representation")) {
JsonArray array = getJArray(json, "_representation");
for (int i = 0; i < array.size(); i++) {
if (i == res.getRepresentation().size())
res.getRepresentation().add(parseEnumeration(null, ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getRepresentation().get(i));
}
};
if (json.has("sliceName"))
res.setSliceNameElement(parseString(json.get("sliceName").getAsString()));
if (json.has("_sliceName"))
parseElementProperties(getJObject(json, "_sliceName"), res.getSliceNameElement());
if (json.has("sliceIsConstraining"))
res.setSliceIsConstrainingElement(parseBoolean(json.get("sliceIsConstraining").getAsBoolean()));
if (json.has("_sliceIsConstraining"))
parseElementProperties(getJObject(json, "_sliceIsConstraining"), res.getSliceIsConstrainingElement());
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("slicing"))
res.setSlicing(parseElementDefinitionSlicingComponent(getJObject(json, "slicing")));
if (json.has("short"))
res.setShortElement(parseString(json.get("short").getAsString()));
if (json.has("_short"))
parseElementProperties(getJObject(json, "_short"), res.getShortElement());
if (json.has("definition"))
res.setDefinitionElement(parseMarkdown(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("requirements"))
res.setRequirementsElement(parseMarkdown(json.get("requirements").getAsString()));
if (json.has("_requirements"))
parseElementProperties(getJObject(json, "_requirements"), res.getRequirementsElement());
if (json.has("alias")) {
JsonArray array = getJArray(json, "alias");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAlias().add(new StringType());
} else {;
res.getAlias().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_alias")) {
JsonArray array = getJArray(json, "_alias");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAlias().size())
res.getAlias().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAlias().get(i));
}
};
if (json.has("min"))
res.setMinElement(parseUnsignedInt(json.get("min").getAsString()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
if (json.has("base"))
res.setBase(parseElementDefinitionBaseComponent(getJObject(json, "base")));
if (json.has("contentReference"))
res.setContentReferenceElement(parseUri(json.get("contentReference").getAsString()));
if (json.has("_contentReference"))
parseElementProperties(getJObject(json, "_contentReference"), res.getContentReferenceElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseElementDefinitionTypeRefComponent(getJsonObjectFromArray(array, i)));
}
};
DataType defaultValue = parseType("defaultValue", json);
if (defaultValue != null)
res.setDefaultValue(defaultValue);
if (json.has("meaningWhenMissing"))
res.setMeaningWhenMissingElement(parseMarkdown(json.get("meaningWhenMissing").getAsString()));
if (json.has("_meaningWhenMissing"))
parseElementProperties(getJObject(json, "_meaningWhenMissing"), res.getMeaningWhenMissingElement());
if (json.has("orderMeaning"))
res.setOrderMeaningElement(parseString(json.get("orderMeaning").getAsString()));
if (json.has("_orderMeaning"))
parseElementProperties(getJObject(json, "_orderMeaning"), res.getOrderMeaningElement());
DataType fixed = parseType("fixed", json);
if (fixed != null)
res.setFixed(fixed);
DataType pattern = parseType("pattern", json);
if (pattern != null)
res.setPattern(pattern);
if (json.has("example")) {
JsonArray array = getJArray(json, "example");
for (int i = 0; i < array.size(); i++) {
res.getExample().add(parseElementDefinitionExampleComponent(getJsonObjectFromArray(array, i)));
}
};
DataType minValue = parseType("minValue", json);
if (minValue != null)
res.setMinValue(minValue);
DataType maxValue = parseType("maxValue", json);
if (maxValue != null)
res.setMaxValue(maxValue);
if (json.has("maxLength"))
res.setMaxLengthElement(parseInteger(json.get("maxLength").getAsLong()));
if (json.has("_maxLength"))
parseElementProperties(getJObject(json, "_maxLength"), res.getMaxLengthElement());
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCondition().add(new IdType());
} else {;
res.getCondition().add(parseId(array.get(i).getAsString()));
}
}
};
if (json.has("_condition")) {
JsonArray array = getJArray(json, "_condition");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCondition().size())
res.getCondition().add(parseId(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCondition().get(i));
}
};
if (json.has("constraint")) {
JsonArray array = getJArray(json, "constraint");
for (int i = 0; i < array.size(); i++) {
res.getConstraint().add(parseElementDefinitionConstraintComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("mustHaveValue"))
res.setMustHaveValueElement(parseBoolean(json.get("mustHaveValue").getAsBoolean()));
if (json.has("_mustHaveValue"))
parseElementProperties(getJObject(json, "_mustHaveValue"), res.getMustHaveValueElement());
if (json.has("valueAlternatives")) {
JsonArray array = getJArray(json, "valueAlternatives");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getValueAlternatives().add(new CanonicalType());
} else {;
res.getValueAlternatives().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_valueAlternatives")) {
JsonArray array = getJArray(json, "_valueAlternatives");
for (int i = 0; i < array.size(); i++) {
if (i == res.getValueAlternatives().size())
res.getValueAlternatives().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getValueAlternatives().get(i));
}
};
if (json.has("mustSupport"))
res.setMustSupportElement(parseBoolean(json.get("mustSupport").getAsBoolean()));
if (json.has("_mustSupport"))
parseElementProperties(getJObject(json, "_mustSupport"), res.getMustSupportElement());
if (json.has("isModifier"))
res.setIsModifierElement(parseBoolean(json.get("isModifier").getAsBoolean()));
if (json.has("_isModifier"))
parseElementProperties(getJObject(json, "_isModifier"), res.getIsModifierElement());
if (json.has("isModifierReason"))
res.setIsModifierReasonElement(parseString(json.get("isModifierReason").getAsString()));
if (json.has("_isModifierReason"))
parseElementProperties(getJObject(json, "_isModifierReason"), res.getIsModifierReasonElement());
if (json.has("isSummary"))
res.setIsSummaryElement(parseBoolean(json.get("isSummary").getAsBoolean()));
if (json.has("_isSummary"))
parseElementProperties(getJObject(json, "_isSummary"), res.getIsSummaryElement());
if (json.has("binding"))
res.setBinding(parseElementDefinitionBindingComponent(getJObject(json, "binding")));
if (json.has("mapping")) {
JsonArray array = getJArray(json, "mapping");
for (int i = 0; i < array.size(); i++) {
res.getMapping().add(parseElementDefinitionMappingComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionSlicingComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent();
parseElementDefinitionSlicingComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionSlicingComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionSlicingComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("discriminator")) {
JsonArray array = getJArray(json, "discriminator");
for (int i = 0; i < array.size(); i++) {
res.getDiscriminator().add(parseElementDefinitionSlicingDiscriminatorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("ordered"))
res.setOrderedElement(parseBoolean(json.get("ordered").getAsBoolean()));
if (json.has("_ordered"))
parseElementProperties(getJObject(json, "_ordered"), res.getOrderedElement());
if (json.has("rules"))
res.setRulesElement(parseEnumeration(json.get("rules").getAsString(), ElementDefinition.SlicingRules.NULL, new ElementDefinition.SlicingRulesEnumFactory()));
if (json.has("_rules"))
parseElementProperties(getJObject(json, "_rules"), res.getRulesElement());
}
protected ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent parseElementDefinitionSlicingDiscriminatorComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent();
parseElementDefinitionSlicingDiscriminatorComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionSlicingDiscriminatorComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ElementDefinition.DiscriminatorType.NULL, new ElementDefinition.DiscriminatorTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
}
protected ElementDefinition.ElementDefinitionBaseComponent parseElementDefinitionBaseComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent();
parseElementDefinitionBaseComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionBaseComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionBaseComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("min"))
res.setMinElement(parseUnsignedInt(json.get("min").getAsString()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
}
protected ElementDefinition.TypeRefComponent parseElementDefinitionTypeRefComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent();
parseElementDefinitionTypeRefComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionTypeRefComponentProperties(JsonObject json, ElementDefinition.TypeRefComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseUri(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProfile().add(new CanonicalType());
} else {;
res.getProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_profile")) {
JsonArray array = getJArray(json, "_profile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProfile().size())
res.getProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProfile().get(i));
}
};
if (json.has("targetProfile")) {
JsonArray array = getJArray(json, "targetProfile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getTargetProfile().add(new CanonicalType());
} else {;
res.getTargetProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_targetProfile")) {
JsonArray array = getJArray(json, "_targetProfile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getTargetProfile().size())
res.getTargetProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getTargetProfile().get(i));
}
};
if (json.has("aggregation")) {
JsonArray array = getJArray(json, "aggregation");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAggregation().add(new Enumeration(new ElementDefinition.AggregationModeEnumFactory(), ElementDefinition.AggregationMode.NULL));
} else {;
res.getAggregation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory()));
}
}
};
if (json.has("_aggregation")) {
JsonArray array = getJArray(json, "_aggregation");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAggregation().size())
res.getAggregation().add(parseEnumeration(null, ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAggregation().get(i));
}
};
if (json.has("versioning"))
res.setVersioningElement(parseEnumeration(json.get("versioning").getAsString(), ElementDefinition.ReferenceVersionRules.NULL, new ElementDefinition.ReferenceVersionRulesEnumFactory()));
if (json.has("_versioning"))
parseElementProperties(getJObject(json, "_versioning"), res.getVersioningElement());
}
protected ElementDefinition.ElementDefinitionExampleComponent parseElementDefinitionExampleComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent();
parseElementDefinitionExampleComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionExampleComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionExampleComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionConstraintComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent();
parseElementDefinitionConstraintComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionConstraintComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionConstraintComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("key"))
res.setKeyElement(parseId(json.get("key").getAsString()));
if (json.has("_key"))
parseElementProperties(getJObject(json, "_key"), res.getKeyElement());
if (json.has("requirements"))
res.setRequirementsElement(parseMarkdown(json.get("requirements").getAsString()));
if (json.has("_requirements"))
parseElementProperties(getJObject(json, "_requirements"), res.getRequirementsElement());
if (json.has("severity"))
res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), ElementDefinition.ConstraintSeverity.NULL, new ElementDefinition.ConstraintSeverityEnumFactory()));
if (json.has("_severity"))
parseElementProperties(getJObject(json, "_severity"), res.getSeverityElement());
if (json.has("suppress"))
res.setSuppressElement(parseBoolean(json.get("suppress").getAsBoolean()));
if (json.has("_suppress"))
parseElementProperties(getJObject(json, "_suppress"), res.getSuppressElement());
if (json.has("human"))
res.setHumanElement(parseString(json.get("human").getAsString()));
if (json.has("_human"))
parseElementProperties(getJObject(json, "_human"), res.getHumanElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
if (json.has("source"))
res.setSourceElement(parseCanonical(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
}
protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionBindingComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent();
parseElementDefinitionBindingComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionBindingComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionBindingComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("strength"))
res.setStrengthElement(parseEnumeration(json.get("strength").getAsString(), Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory()));
if (json.has("_strength"))
parseElementProperties(getJObject(json, "_strength"), res.getStrengthElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("additional")) {
JsonArray array = getJArray(json, "additional");
for (int i = 0; i < array.size(); i++) {
res.getAdditional().add(parseElementDefinitionBindingAdditionalComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ElementDefinition.ElementDefinitionBindingAdditionalComponent parseElementDefinitionBindingAdditionalComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionBindingAdditionalComponent res = new ElementDefinition.ElementDefinitionBindingAdditionalComponent();
parseElementDefinitionBindingAdditionalComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionBindingAdditionalComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionBindingAdditionalComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("purpose"))
res.setPurposeElement(parseEnumeration(json.get("purpose").getAsString(), ElementDefinition.AdditionalBindingPurposeVS.NULL, new ElementDefinition.AdditionalBindingPurposeVSEnumFactory()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("shortDoco"))
res.setShortDocoElement(parseString(json.get("shortDoco").getAsString()));
if (json.has("_shortDoco"))
parseElementProperties(getJObject(json, "_shortDoco"), res.getShortDocoElement());
if (json.has("usage")) {
JsonArray array = getJArray(json, "usage");
for (int i = 0; i < array.size(); i++) {
res.getUsage().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("any"))
res.setAnyElement(parseBoolean(json.get("any").getAsBoolean()));
if (json.has("_any"))
parseElementProperties(getJObject(json, "_any"), res.getAnyElement());
}
protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionMappingComponent(JsonObject json) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent();
parseElementDefinitionMappingComponentProperties(json, res);
return res;
}
protected void parseElementDefinitionMappingComponentProperties(JsonObject json, ElementDefinition.ElementDefinitionMappingComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
if (json.has("identity"))
res.setIdentityElement(parseId(json.get("identity").getAsString()));
if (json.has("_identity"))
parseElementProperties(getJObject(json, "_identity"), res.getIdentityElement());
if (json.has("language"))
res.setLanguageElement(parseCode(json.get("language").getAsString()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("map"))
res.setMapElement(parseString(json.get("map").getAsString()));
if (json.has("_map"))
parseElementProperties(getJObject(json, "_map"), res.getMapElement());
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected Expression parseExpression(JsonObject json) throws IOException, FHIRFormatError {
Expression res = new Expression();
parseExpressionProperties(json, res);
return res;
}
protected void parseExpressionProperties(JsonObject json, Expression res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("name"))
res.setNameElement(parseCode(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("language"))
res.setLanguageElement(parseCode(json.get("language").getAsString()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
if (json.has("reference"))
res.setReferenceElement(parseUri(json.get("reference").getAsString()));
if (json.has("_reference"))
parseElementProperties(getJObject(json, "_reference"), res.getReferenceElement());
}
protected ExtendedContactDetail parseExtendedContactDetail(JsonObject json) throws IOException, FHIRFormatError {
ExtendedContactDetail res = new ExtendedContactDetail();
parseExtendedContactDetailProperties(json, res);
return res;
}
protected void parseExtendedContactDetailProperties(JsonObject json, ExtendedContactDetail res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("purpose"))
res.setPurpose(parseCodeableConcept(getJObject(json, "purpose")));
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(getJsonObjectFromArray(array, i)));
}
};
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("address"))
res.setAddress(parseAddress(getJObject(json, "address")));
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Extension parseExtension(JsonObject json) throws IOException, FHIRFormatError {
Extension res = new Extension();
parseExtensionProperties(json, res);
return res;
}
protected void parseExtensionProperties(JsonObject json, Extension res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected HumanName parseHumanName(JsonObject json) throws IOException, FHIRFormatError {
HumanName res = new HumanName();
parseHumanNameProperties(json, res);
return res;
}
protected void parseHumanNameProperties(JsonObject json, HumanName res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), HumanName.NameUse.NULL, new HumanName.NameUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("family"))
res.setFamilyElement(parseString(json.get("family").getAsString()));
if (json.has("_family"))
parseElementProperties(getJObject(json, "_family"), res.getFamilyElement());
if (json.has("given")) {
JsonArray array = getJArray(json, "given");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getGiven().add(new StringType());
} else {;
res.getGiven().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_given")) {
JsonArray array = getJArray(json, "_given");
for (int i = 0; i < array.size(); i++) {
if (i == res.getGiven().size())
res.getGiven().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getGiven().get(i));
}
};
if (json.has("prefix")) {
JsonArray array = getJArray(json, "prefix");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPrefix().add(new StringType());
} else {;
res.getPrefix().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_prefix")) {
JsonArray array = getJArray(json, "_prefix");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPrefix().size())
res.getPrefix().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPrefix().get(i));
}
};
if (json.has("suffix")) {
JsonArray array = getJArray(json, "suffix");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSuffix().add(new StringType());
} else {;
res.getSuffix().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_suffix")) {
JsonArray array = getJArray(json, "_suffix");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSuffix().size())
res.getSuffix().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSuffix().get(i));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Identifier parseIdentifier(JsonObject json) throws IOException, FHIRFormatError {
Identifier res = new Identifier();
parseIdentifierProperties(json, res);
return res;
}
protected void parseIdentifierProperties(JsonObject json, Identifier res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Identifier.IdentifierUse.NULL, new Identifier.IdentifierUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("system"))
res.setSystemElement(parseUri(json.get("system").getAsString()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("assigner"))
res.setAssigner(parseReference(getJObject(json, "assigner")));
}
protected MarketingStatus parseMarketingStatus(JsonObject json) throws IOException, FHIRFormatError {
MarketingStatus res = new MarketingStatus();
parseMarketingStatusProperties(json, res);
return res;
}
protected void parseMarketingStatusProperties(JsonObject json, MarketingStatus res) throws IOException, FHIRFormatError {
parseBackboneTypeProperties(json, res);
if (json.has("country"))
res.setCountry(parseCodeableConcept(getJObject(json, "country")));
if (json.has("jurisdiction"))
res.setJurisdiction(parseCodeableConcept(getJObject(json, "jurisdiction")));
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("dateRange"))
res.setDateRange(parsePeriod(getJObject(json, "dateRange")));
if (json.has("restoreDate"))
res.setRestoreDateElement(parseDateTime(json.get("restoreDate").getAsString()));
if (json.has("_restoreDate"))
parseElementProperties(getJObject(json, "_restoreDate"), res.getRestoreDateElement());
}
protected Meta parseMeta(JsonObject json) throws IOException, FHIRFormatError {
Meta res = new Meta();
parseMetaProperties(json, res);
return res;
}
protected void parseMetaProperties(JsonObject json, Meta res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("versionId"))
res.setVersionIdElement(parseId(json.get("versionId").getAsString()));
if (json.has("_versionId"))
parseElementProperties(getJObject(json, "_versionId"), res.getVersionIdElement());
if (json.has("lastUpdated"))
res.setLastUpdatedElement(parseInstant(json.get("lastUpdated").getAsString()));
if (json.has("_lastUpdated"))
parseElementProperties(getJObject(json, "_lastUpdated"), res.getLastUpdatedElement());
if (json.has("source"))
res.setSourceElement(parseUri(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProfile().add(new CanonicalType());
} else {;
res.getProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_profile")) {
JsonArray array = getJArray(json, "_profile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProfile().size())
res.getProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProfile().get(i));
}
};
if (json.has("security")) {
JsonArray array = getJArray(json, "security");
for (int i = 0; i < array.size(); i++) {
res.getSecurity().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("tag")) {
JsonArray array = getJArray(json, "tag");
for (int i = 0; i < array.size(); i++) {
res.getTag().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
}
protected MonetaryComponent parseMonetaryComponent(JsonObject json) throws IOException, FHIRFormatError {
MonetaryComponent res = new MonetaryComponent();
parseMonetaryComponentProperties(json, res);
return res;
}
protected void parseMonetaryComponentProperties(JsonObject json, MonetaryComponent res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MonetaryComponent.PriceComponentType.NULL, new MonetaryComponent.PriceComponentTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
}
protected Money parseMoney(JsonObject json) throws IOException, FHIRFormatError {
Money res = new Money();
parseMoneyProperties(json, res);
return res;
}
protected void parseMoneyProperties(JsonObject json, Money res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("value"))
res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("currency"))
res.setCurrencyElement(parseCode(json.get("currency").getAsString()));
if (json.has("_currency"))
parseElementProperties(getJObject(json, "_currency"), res.getCurrencyElement());
}
protected Narrative parseNarrative(JsonObject json) throws IOException, FHIRFormatError {
Narrative res = new Narrative();
parseNarrativeProperties(json, res);
return res;
}
protected void parseNarrativeProperties(JsonObject json, Narrative res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Narrative.NarrativeStatus.NULL, new Narrative.NarrativeStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("div"))
res.setDiv(parseXhtml(json.get("div").getAsString()));
}
protected ParameterDefinition parseParameterDefinition(JsonObject json) throws IOException, FHIRFormatError {
ParameterDefinition res = new ParameterDefinition();
parseParameterDefinitionProperties(json, res);
return res;
}
protected void parseParameterDefinitionProperties(JsonObject json, ParameterDefinition res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("name"))
res.setNameElement(parseCode(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Enumerations.OperationParameterUse.NULL, new Enumerations.OperationParameterUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("min"))
res.setMinElement(parseInteger(json.get("min").getAsLong()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
}
protected Period parsePeriod(JsonObject json) throws IOException, FHIRFormatError {
Period res = new Period();
parsePeriodProperties(json, res);
return res;
}
protected void parsePeriodProperties(JsonObject json, Period res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("start"))
res.setStartElement(parseDateTime(json.get("start").getAsString()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("end"))
res.setEndElement(parseDateTime(json.get("end").getAsString()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
}
protected ProductShelfLife parseProductShelfLife(JsonObject json) throws IOException, FHIRFormatError {
ProductShelfLife res = new ProductShelfLife();
parseProductShelfLifeProperties(json, res);
return res;
}
protected void parseProductShelfLifeProperties(JsonObject json, ProductShelfLife res) throws IOException, FHIRFormatError {
parseBackboneTypeProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType period = parseType("period", json);
if (period != null)
res.setPeriod(period);
if (json.has("specialPrecautionsForStorage")) {
JsonArray array = getJArray(json, "specialPrecautionsForStorage");
for (int i = 0; i < array.size(); i++) {
res.getSpecialPrecautionsForStorage().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Quantity parseQuantity(JsonObject json) throws IOException, FHIRFormatError {
Quantity res = new Quantity();
parseQuantityProperties(json, res);
return res;
}
protected void parseQuantityProperties(JsonObject json, Quantity res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("value"))
res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("comparator"))
res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), Enumerations.QuantityComparator.NULL, new Enumerations.QuantityComparatorEnumFactory()));
if (json.has("_comparator"))
parseElementProperties(getJObject(json, "_comparator"), res.getComparatorElement());
if (json.has("unit"))
res.setUnitElement(parseString(json.get("unit").getAsString()));
if (json.has("_unit"))
parseElementProperties(getJObject(json, "_unit"), res.getUnitElement());
if (json.has("system"))
res.setSystemElement(parseUri(json.get("system").getAsString()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
}
protected Range parseRange(JsonObject json) throws IOException, FHIRFormatError {
Range res = new Range();
parseRangeProperties(json, res);
return res;
}
protected void parseRangeProperties(JsonObject json, Range res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("low"))
res.setLow(parseQuantity(getJObject(json, "low")));
if (json.has("high"))
res.setHigh(parseQuantity(getJObject(json, "high")));
}
protected Ratio parseRatio(JsonObject json) throws IOException, FHIRFormatError {
Ratio res = new Ratio();
parseRatioProperties(json, res);
return res;
}
protected void parseRatioProperties(JsonObject json, Ratio res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("numerator"))
res.setNumerator(parseQuantity(getJObject(json, "numerator")));
if (json.has("denominator"))
res.setDenominator(parseQuantity(getJObject(json, "denominator")));
}
protected RatioRange parseRatioRange(JsonObject json) throws IOException, FHIRFormatError {
RatioRange res = new RatioRange();
parseRatioRangeProperties(json, res);
return res;
}
protected void parseRatioRangeProperties(JsonObject json, RatioRange res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("lowNumerator"))
res.setLowNumerator(parseQuantity(getJObject(json, "lowNumerator")));
if (json.has("highNumerator"))
res.setHighNumerator(parseQuantity(getJObject(json, "highNumerator")));
if (json.has("denominator"))
res.setDenominator(parseQuantity(getJObject(json, "denominator")));
}
protected Reference parseReference(JsonObject json) throws IOException, FHIRFormatError {
Reference res = new Reference();
parseReferenceProperties(json, res);
return res;
}
protected void parseReferenceProperties(JsonObject json, Reference res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("reference"))
res.setReferenceElement(parseString(json.get("reference").getAsString()));
if (json.has("_reference"))
parseElementProperties(getJObject(json, "_reference"), res.getReferenceElement());
if (json.has("type"))
res.setTypeElement(parseUri(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
}
protected RelatedArtifact parseRelatedArtifact(JsonObject json) throws IOException, FHIRFormatError {
RelatedArtifact res = new RelatedArtifact();
parseRelatedArtifactProperties(json, res);
return res;
}
protected void parseRelatedArtifactProperties(JsonObject json, RelatedArtifact res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), RelatedArtifact.RelatedArtifactType.NULL, new RelatedArtifact.RelatedArtifactTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("citation"))
res.setCitationElement(parseMarkdown(json.get("citation").getAsString()));
if (json.has("_citation"))
parseElementProperties(getJObject(json, "_citation"), res.getCitationElement());
if (json.has("document"))
res.setDocument(parseAttachment(getJObject(json, "document")));
if (json.has("resource"))
res.setResourceElement(parseCanonical(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("resourceReference"))
res.setResourceReference(parseReference(getJObject(json, "resourceReference")));
if (json.has("publicationStatus"))
res.setPublicationStatusElement(parseEnumeration(json.get("publicationStatus").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_publicationStatus"))
parseElementProperties(getJObject(json, "_publicationStatus"), res.getPublicationStatusElement());
if (json.has("publicationDate"))
res.setPublicationDateElement(parseDate(json.get("publicationDate").getAsString()));
if (json.has("_publicationDate"))
parseElementProperties(getJObject(json, "_publicationDate"), res.getPublicationDateElement());
}
protected SampledData parseSampledData(JsonObject json) throws IOException, FHIRFormatError {
SampledData res = new SampledData();
parseSampledDataProperties(json, res);
return res;
}
protected void parseSampledDataProperties(JsonObject json, SampledData res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("origin"))
res.setOrigin(parseQuantity(getJObject(json, "origin")));
if (json.has("interval"))
res.setIntervalElement(parseDecimal(json.get("interval").getAsBigDecimal()));
if (json.has("_interval"))
parseElementProperties(getJObject(json, "_interval"), res.getIntervalElement());
if (json.has("intervalUnit"))
res.setIntervalUnitElement(parseCode(json.get("intervalUnit").getAsString()));
if (json.has("_intervalUnit"))
parseElementProperties(getJObject(json, "_intervalUnit"), res.getIntervalUnitElement());
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("lowerLimit"))
res.setLowerLimitElement(parseDecimal(json.get("lowerLimit").getAsBigDecimal()));
if (json.has("_lowerLimit"))
parseElementProperties(getJObject(json, "_lowerLimit"), res.getLowerLimitElement());
if (json.has("upperLimit"))
res.setUpperLimitElement(parseDecimal(json.get("upperLimit").getAsBigDecimal()));
if (json.has("_upperLimit"))
parseElementProperties(getJObject(json, "_upperLimit"), res.getUpperLimitElement());
if (json.has("dimensions"))
res.setDimensionsElement(parsePositiveInt(json.get("dimensions").getAsString()));
if (json.has("_dimensions"))
parseElementProperties(getJObject(json, "_dimensions"), res.getDimensionsElement());
if (json.has("codeMap"))
res.setCodeMapElement(parseCanonical(json.get("codeMap").getAsString()));
if (json.has("_codeMap"))
parseElementProperties(getJObject(json, "_codeMap"), res.getCodeMapElement());
if (json.has("offsets"))
res.setOffsetsElement(parseString(json.get("offsets").getAsString()));
if (json.has("_offsets"))
parseElementProperties(getJObject(json, "_offsets"), res.getOffsetsElement());
if (json.has("data"))
res.setDataElement(parseString(json.get("data").getAsString()));
if (json.has("_data"))
parseElementProperties(getJObject(json, "_data"), res.getDataElement());
}
protected Signature parseSignature(JsonObject json) throws IOException, FHIRFormatError {
Signature res = new Signature();
parseSignatureProperties(json, res);
return res;
}
protected void parseSignatureProperties(JsonObject json, Signature res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("when"))
res.setWhenElement(parseInstant(json.get("when").getAsString()));
if (json.has("_when"))
parseElementProperties(getJObject(json, "_when"), res.getWhenElement());
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
if (json.has("targetFormat"))
res.setTargetFormatElement(parseCode(json.get("targetFormat").getAsString()));
if (json.has("_targetFormat"))
parseElementProperties(getJObject(json, "_targetFormat"), res.getTargetFormatElement());
if (json.has("sigFormat"))
res.setSigFormatElement(parseCode(json.get("sigFormat").getAsString()));
if (json.has("_sigFormat"))
parseElementProperties(getJObject(json, "_sigFormat"), res.getSigFormatElement());
if (json.has("data"))
res.setDataElement(parseBase64Binary(json.get("data").getAsString()));
if (json.has("_data"))
parseElementProperties(getJObject(json, "_data"), res.getDataElement());
}
protected Timing parseTiming(JsonObject json) throws IOException, FHIRFormatError {
Timing res = new Timing();
parseTimingProperties(json, res);
return res;
}
protected void parseTimingProperties(JsonObject json, Timing res) throws IOException, FHIRFormatError {
parseBackboneTypeProperties(json, res);
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getEvent().add(new DateTimeType());
} else {;
res.getEvent().add(parseDateTime(array.get(i).getAsString()));
}
}
};
if (json.has("_event")) {
JsonArray array = getJArray(json, "_event");
for (int i = 0; i < array.size(); i++) {
if (i == res.getEvent().size())
res.getEvent().add(parseDateTime(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getEvent().get(i));
}
};
if (json.has("repeat"))
res.setRepeat(parseTimingRepeatComponent(getJObject(json, "repeat")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
protected Timing.TimingRepeatComponent parseTimingRepeatComponent(JsonObject json) throws IOException, FHIRFormatError {
Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent();
parseTimingRepeatComponentProperties(json, res);
return res;
}
protected void parseTimingRepeatComponentProperties(JsonObject json, Timing.TimingRepeatComponent res) throws IOException, FHIRFormatError {
parseElementProperties(json, res);
DataType bounds = parseType("bounds", json);
if (bounds != null)
res.setBounds(bounds);
if (json.has("count"))
res.setCountElement(parsePositiveInt(json.get("count").getAsString()));
if (json.has("_count"))
parseElementProperties(getJObject(json, "_count"), res.getCountElement());
if (json.has("countMax"))
res.setCountMaxElement(parsePositiveInt(json.get("countMax").getAsString()));
if (json.has("_countMax"))
parseElementProperties(getJObject(json, "_countMax"), res.getCountMaxElement());
if (json.has("duration"))
res.setDurationElement(parseDecimal(json.get("duration").getAsBigDecimal()));
if (json.has("_duration"))
parseElementProperties(getJObject(json, "_duration"), res.getDurationElement());
if (json.has("durationMax"))
res.setDurationMaxElement(parseDecimal(json.get("durationMax").getAsBigDecimal()));
if (json.has("_durationMax"))
parseElementProperties(getJObject(json, "_durationMax"), res.getDurationMaxElement());
if (json.has("durationUnit"))
res.setDurationUnitElement(parseEnumeration(json.get("durationUnit").getAsString(), Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory()));
if (json.has("_durationUnit"))
parseElementProperties(getJObject(json, "_durationUnit"), res.getDurationUnitElement());
if (json.has("frequency"))
res.setFrequencyElement(parsePositiveInt(json.get("frequency").getAsString()));
if (json.has("_frequency"))
parseElementProperties(getJObject(json, "_frequency"), res.getFrequencyElement());
if (json.has("frequencyMax"))
res.setFrequencyMaxElement(parsePositiveInt(json.get("frequencyMax").getAsString()));
if (json.has("_frequencyMax"))
parseElementProperties(getJObject(json, "_frequencyMax"), res.getFrequencyMaxElement());
if (json.has("period"))
res.setPeriodElement(parseDecimal(json.get("period").getAsBigDecimal()));
if (json.has("_period"))
parseElementProperties(getJObject(json, "_period"), res.getPeriodElement());
if (json.has("periodMax"))
res.setPeriodMaxElement(parseDecimal(json.get("periodMax").getAsBigDecimal()));
if (json.has("_periodMax"))
parseElementProperties(getJObject(json, "_periodMax"), res.getPeriodMaxElement());
if (json.has("periodUnit"))
res.setPeriodUnitElement(parseEnumeration(json.get("periodUnit").getAsString(), Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory()));
if (json.has("_periodUnit"))
parseElementProperties(getJObject(json, "_periodUnit"), res.getPeriodUnitElement());
if (json.has("dayOfWeek")) {
JsonArray array = getJArray(json, "dayOfWeek");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDayOfWeek().add(new Enumeration(new Enumerations.DaysOfWeekEnumFactory(), Enumerations.DaysOfWeek.NULL));
} else {;
res.getDayOfWeek().add(parseEnumeration(array.get(i).getAsString(), Enumerations.DaysOfWeek.NULL, new Enumerations.DaysOfWeekEnumFactory()));
}
}
};
if (json.has("_dayOfWeek")) {
JsonArray array = getJArray(json, "_dayOfWeek");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDayOfWeek().size())
res.getDayOfWeek().add(parseEnumeration(null, Enumerations.DaysOfWeek.NULL, new Enumerations.DaysOfWeekEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDayOfWeek().get(i));
}
};
if (json.has("timeOfDay")) {
JsonArray array = getJArray(json, "timeOfDay");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getTimeOfDay().add(new TimeType());
} else {;
res.getTimeOfDay().add(parseTime(array.get(i).getAsString()));
}
}
};
if (json.has("_timeOfDay")) {
JsonArray array = getJArray(json, "_timeOfDay");
for (int i = 0; i < array.size(); i++) {
if (i == res.getTimeOfDay().size())
res.getTimeOfDay().add(parseTime(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getTimeOfDay().get(i));
}
};
if (json.has("when")) {
JsonArray array = getJArray(json, "when");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getWhen().add(new Enumeration(new Timing.EventTimingEnumFactory(), Timing.EventTiming.NULL));
} else {;
res.getWhen().add(parseEnumeration(array.get(i).getAsString(), Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory()));
}
}
};
if (json.has("_when")) {
JsonArray array = getJArray(json, "_when");
for (int i = 0; i < array.size(); i++) {
if (i == res.getWhen().size())
res.getWhen().add(parseEnumeration(null, Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getWhen().get(i));
}
};
if (json.has("offset"))
res.setOffsetElement(parseUnsignedInt(json.get("offset").getAsString()));
if (json.has("_offset"))
parseElementProperties(getJObject(json, "_offset"), res.getOffsetElement());
}
protected TriggerDefinition parseTriggerDefinition(JsonObject json) throws IOException, FHIRFormatError {
TriggerDefinition res = new TriggerDefinition();
parseTriggerDefinitionProperties(json, res);
return res;
}
protected void parseTriggerDefinitionProperties(JsonObject json, TriggerDefinition res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), TriggerDefinition.TriggerType.NULL, new TriggerDefinition.TriggerTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subscriptionTopic"))
res.setSubscriptionTopicElement(parseCanonical(json.get("subscriptionTopic").getAsString()));
if (json.has("_subscriptionTopic"))
parseElementProperties(getJObject(json, "_subscriptionTopic"), res.getSubscriptionTopicElement());
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("data")) {
JsonArray array = getJArray(json, "data");
for (int i = 0; i < array.size(); i++) {
res.getData().add(parseDataRequirement(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition"))
res.setCondition(parseExpression(getJObject(json, "condition")));
}
protected UsageContext parseUsageContext(JsonObject json) throws IOException, FHIRFormatError {
UsageContext res = new UsageContext();
parseUsageContextProperties(json, res);
return res;
}
protected void parseUsageContextProperties(JsonObject json, UsageContext res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("code"))
res.setCode(parseCoding(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected VirtualServiceDetail parseVirtualServiceDetail(JsonObject json) throws IOException, FHIRFormatError {
VirtualServiceDetail res = new VirtualServiceDetail();
parseVirtualServiceDetailProperties(json, res);
return res;
}
protected void parseVirtualServiceDetailProperties(JsonObject json, VirtualServiceDetail res) throws IOException, FHIRFormatError {
parseDataTypeProperties(json, res);
if (json.has("channelType"))
res.setChannelType(parseCoding(getJObject(json, "channelType")));
DataType address = parseType("address", json);
if (address != null)
res.setAddress(address);
if (json.has("additionalInfo")) {
JsonArray array = getJArray(json, "additionalInfo");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAdditionalInfo().add(new UrlType());
} else {;
res.getAdditionalInfo().add(parseUrl(array.get(i).getAsString()));
}
}
};
if (json.has("_additionalInfo")) {
JsonArray array = getJArray(json, "_additionalInfo");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAdditionalInfo().size())
res.getAdditionalInfo().add(parseUrl(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAdditionalInfo().get(i));
}
};
if (json.has("maxParticipants"))
res.setMaxParticipantsElement(parsePositiveInt(json.get("maxParticipants").getAsString()));
if (json.has("_maxParticipants"))
parseElementProperties(getJObject(json, "_maxParticipants"), res.getMaxParticipantsElement());
if (json.has("sessionKey"))
res.setSessionKeyElement(parseString(json.get("sessionKey").getAsString()));
if (json.has("_sessionKey"))
parseElementProperties(getJObject(json, "_sessionKey"), res.getSessionKeyElement());
}
protected void parseCanonicalResourceProperties(JsonObject json, CanonicalResource res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
}
protected void parseDomainResourceProperties(JsonObject json, DomainResource res) throws IOException, FHIRFormatError {
parseResourceProperties(json, res);
if (json.has("text"))
res.setText(parseNarrative(getJObject(json, "text")));
if (json.has("contained")) {
JsonArray array = getJArray(json, "contained");
for (int i = 0; i < array.size(); i++) {
res.getContained().add(parseResource(getJsonObjectFromArray(array, i)));
}
};
if (json.has("extension")) {
JsonArray array = getJArray(json, "extension");
for (int i = 0; i < array.size(); i++) {
res.getExtension().add(parseExtension(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modifierExtension")) {
JsonArray array = getJArray(json, "modifierExtension");
for (int i = 0; i < array.size(); i++) {
res.getModifierExtension().add(parseExtension(getJsonObjectFromArray(array, i)));
}
};
}
protected void parseMetadataResourceProperties(JsonObject json, MetadataResource res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
}
protected void parseResourceProperties(JsonObject json, Resource res) throws IOException, FHIRFormatError {
parseBaseProperties(json, res);
if (json.has("id"))
res.setIdElement(parseId(json.get("id").getAsString()));
if (json.has("_id"))
parseElementProperties(getJObject(json, "_id"), res.getIdElement());
if (json.has("meta"))
res.setMeta(parseMeta(getJObject(json, "meta")));
if (json.has("implicitRules"))
res.setImplicitRulesElement(parseUri(json.get("implicitRules").getAsString()));
if (json.has("_implicitRules"))
parseElementProperties(getJObject(json, "_implicitRules"), res.getImplicitRulesElement());
if (json.has("language"))
res.setLanguageElement(parseCode(json.get("language").getAsString()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
}
protected Account parseAccount(JsonObject json) throws IOException, FHIRFormatError {
Account res = new Account();
parseAccountProperties(json, res);
return res;
}
protected void parseAccountProperties(JsonObject json, Account res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Account.AccountStatus.NULL, new Account.AccountStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("billingStatus"))
res.setBillingStatus(parseCodeableConcept(getJObject(json, "billingStatus")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("servicePeriod"))
res.setServicePeriod(parsePeriod(getJObject(json, "servicePeriod")));
if (json.has("coverage")) {
JsonArray array = getJArray(json, "coverage");
for (int i = 0; i < array.size(); i++) {
res.getCoverage().add(parseAccountCoverageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("guarantor")) {
JsonArray array = getJArray(json, "guarantor");
for (int i = 0; i < array.size(); i++) {
res.getGuarantor().add(parseAccountGuarantorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosis")) {
JsonArray array = getJArray(json, "diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseAccountDiagnosisComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("procedure")) {
JsonArray array = getJArray(json, "procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseAccountProcedureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedAccount")) {
JsonArray array = getJArray(json, "relatedAccount");
for (int i = 0; i < array.size(); i++) {
res.getRelatedAccount().add(parseAccountRelatedAccountComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("currency"))
res.setCurrency(parseCodeableConcept(getJObject(json, "currency")));
if (json.has("balance")) {
JsonArray array = getJArray(json, "balance");
for (int i = 0; i < array.size(); i++) {
res.getBalance().add(parseAccountBalanceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("calculatedAt"))
res.setCalculatedAtElement(parseInstant(json.get("calculatedAt").getAsString()));
if (json.has("_calculatedAt"))
parseElementProperties(getJObject(json, "_calculatedAt"), res.getCalculatedAtElement());
}
protected Account.CoverageComponent parseAccountCoverageComponent(JsonObject json) throws IOException, FHIRFormatError {
Account.CoverageComponent res = new Account.CoverageComponent();
parseAccountCoverageComponentProperties(json, res);
return res;
}
protected void parseAccountCoverageComponentProperties(JsonObject json, Account.CoverageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
if (json.has("priority"))
res.setPriorityElement(parsePositiveInt(json.get("priority").getAsString()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
}
protected Account.GuarantorComponent parseAccountGuarantorComponent(JsonObject json) throws IOException, FHIRFormatError {
Account.GuarantorComponent res = new Account.GuarantorComponent();
parseAccountGuarantorComponentProperties(json, res);
return res;
}
protected void parseAccountGuarantorComponentProperties(JsonObject json, Account.GuarantorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
if (json.has("onHold"))
res.setOnHoldElement(parseBoolean(json.get("onHold").getAsBoolean()));
if (json.has("_onHold"))
parseElementProperties(getJObject(json, "_onHold"), res.getOnHoldElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Account.AccountDiagnosisComponent parseAccountDiagnosisComponent(JsonObject json) throws IOException, FHIRFormatError {
Account.AccountDiagnosisComponent res = new Account.AccountDiagnosisComponent();
parseAccountDiagnosisComponentProperties(json, res);
return res;
}
protected void parseAccountDiagnosisComponentProperties(JsonObject json, Account.AccountDiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("condition"))
res.setCondition(parseCodeableReference(getJObject(json, "condition")));
if (json.has("dateOfDiagnosis"))
res.setDateOfDiagnosisElement(parseDateTime(json.get("dateOfDiagnosis").getAsString()));
if (json.has("_dateOfDiagnosis"))
parseElementProperties(getJObject(json, "_dateOfDiagnosis"), res.getDateOfDiagnosisElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("onAdmission"))
res.setOnAdmissionElement(parseBoolean(json.get("onAdmission").getAsBoolean()));
if (json.has("_onAdmission"))
parseElementProperties(getJObject(json, "_onAdmission"), res.getOnAdmissionElement());
if (json.has("packageCode")) {
JsonArray array = getJArray(json, "packageCode");
for (int i = 0; i < array.size(); i++) {
res.getPackageCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Account.AccountProcedureComponent parseAccountProcedureComponent(JsonObject json) throws IOException, FHIRFormatError {
Account.AccountProcedureComponent res = new Account.AccountProcedureComponent();
parseAccountProcedureComponentProperties(json, res);
return res;
}
protected void parseAccountProcedureComponentProperties(JsonObject json, Account.AccountProcedureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("code"))
res.setCode(parseCodeableReference(getJObject(json, "code")));
if (json.has("dateOfService"))
res.setDateOfServiceElement(parseDateTime(json.get("dateOfService").getAsString()));
if (json.has("_dateOfService"))
parseElementProperties(getJObject(json, "_dateOfService"), res.getDateOfServiceElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packageCode")) {
JsonArray array = getJArray(json, "packageCode");
for (int i = 0; i < array.size(); i++) {
res.getPackageCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device")) {
JsonArray array = getJArray(json, "device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Account.AccountRelatedAccountComponent parseAccountRelatedAccountComponent(JsonObject json) throws IOException, FHIRFormatError {
Account.AccountRelatedAccountComponent res = new Account.AccountRelatedAccountComponent();
parseAccountRelatedAccountComponentProperties(json, res);
return res;
}
protected void parseAccountRelatedAccountComponentProperties(JsonObject json, Account.AccountRelatedAccountComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relationship"))
res.setRelationship(parseCodeableConcept(getJObject(json, "relationship")));
if (json.has("account"))
res.setAccount(parseReference(getJObject(json, "account")));
}
protected Account.AccountBalanceComponent parseAccountBalanceComponent(JsonObject json) throws IOException, FHIRFormatError {
Account.AccountBalanceComponent res = new Account.AccountBalanceComponent();
parseAccountBalanceComponentProperties(json, res);
return res;
}
protected void parseAccountBalanceComponentProperties(JsonObject json, Account.AccountBalanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("aggregate"))
res.setAggregate(parseCodeableConcept(getJObject(json, "aggregate")));
if (json.has("term"))
res.setTerm(parseCodeableConcept(getJObject(json, "term")));
if (json.has("estimate"))
res.setEstimateElement(parseBoolean(json.get("estimate").getAsBoolean()));
if (json.has("_estimate"))
parseElementProperties(getJObject(json, "_estimate"), res.getEstimateElement());
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
}
protected ActivityDefinition parseActivityDefinition(JsonObject json) throws IOException, FHIRFormatError {
ActivityDefinition res = new ActivityDefinition();
parseActivityDefinitionProperties(json, res);
return res;
}
protected void parseActivityDefinitionProperties(JsonObject json, ActivityDefinition res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("usage"))
res.setUsageElement(parseMarkdown(json.get("usage").getAsString()));
if (json.has("_usage"))
parseElementProperties(getJObject(json, "_usage"), res.getUsageElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("library")) {
JsonArray array = getJArray(json, "library");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLibrary().add(new CanonicalType());
} else {;
res.getLibrary().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_library")) {
JsonArray array = getJArray(json, "_library");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLibrary().size())
res.getLibrary().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLibrary().get(i));
}
};
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), ActivityDefinition.RequestResourceTypes.NULL, new ActivityDefinition.RequestResourceTypesEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Enumerations.RequestIntent.NULL, new Enumerations.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
DataType asNeeded = parseType("asNeeded", json);
if (asNeeded != null)
res.setAsNeeded(asNeeded);
if (json.has("location"))
res.setLocation(parseCodeableReference(getJObject(json, "location")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseActivityDefinitionParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
DataType product = parseType("product", json);
if (product != null)
res.setProduct(product);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("dosage")) {
JsonArray array = getJArray(json, "dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseDosage(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specimenRequirement")) {
JsonArray array = getJArray(json, "specimenRequirement");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSpecimenRequirement().add(new CanonicalType());
} else {;
res.getSpecimenRequirement().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_specimenRequirement")) {
JsonArray array = getJArray(json, "_specimenRequirement");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSpecimenRequirement().size())
res.getSpecimenRequirement().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSpecimenRequirement().get(i));
}
};
if (json.has("observationRequirement")) {
JsonArray array = getJArray(json, "observationRequirement");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getObservationRequirement().add(new CanonicalType());
} else {;
res.getObservationRequirement().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_observationRequirement")) {
JsonArray array = getJArray(json, "_observationRequirement");
for (int i = 0; i < array.size(); i++) {
if (i == res.getObservationRequirement().size())
res.getObservationRequirement().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getObservationRequirement().get(i));
}
};
if (json.has("observationResultRequirement")) {
JsonArray array = getJArray(json, "observationResultRequirement");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getObservationResultRequirement().add(new CanonicalType());
} else {;
res.getObservationResultRequirement().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_observationResultRequirement")) {
JsonArray array = getJArray(json, "_observationResultRequirement");
for (int i = 0; i < array.size(); i++) {
if (i == res.getObservationResultRequirement().size())
res.getObservationResultRequirement().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getObservationResultRequirement().get(i));
}
};
if (json.has("transform"))
res.setTransformElement(parseCanonical(json.get("transform").getAsString()));
if (json.has("_transform"))
parseElementProperties(getJObject(json, "_transform"), res.getTransformElement());
if (json.has("dynamicValue")) {
JsonArray array = getJArray(json, "dynamicValue");
for (int i = 0; i < array.size(); i++) {
res.getDynamicValue().add(parseActivityDefinitionDynamicValueComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent();
parseActivityDefinitionParticipantComponentProperties(json, res);
return res;
}
protected void parseActivityDefinitionParticipantComponentProperties(JsonObject json, ActivityDefinition.ActivityDefinitionParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ActionParticipantType.NULL, new Enumerations.ActionParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("typeCanonical"))
res.setTypeCanonicalElement(parseCanonical(json.get("typeCanonical").getAsString()));
if (json.has("_typeCanonical"))
parseElementProperties(getJObject(json, "_typeCanonical"), res.getTypeCanonicalElement());
if (json.has("typeReference"))
res.setTypeReference(parseReference(getJObject(json, "typeReference")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
}
protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionDynamicValueComponent(JsonObject json) throws IOException, FHIRFormatError {
ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent();
parseActivityDefinitionDynamicValueComponentProperties(json, res);
return res;
}
protected void parseActivityDefinitionDynamicValueComponentProperties(JsonObject json, ActivityDefinition.ActivityDefinitionDynamicValueComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected ActorDefinition parseActorDefinition(JsonObject json) throws IOException, FHIRFormatError {
ActorDefinition res = new ActorDefinition();
parseActorDefinitionProperties(json, res);
return res;
}
protected void parseActorDefinitionProperties(JsonObject json, ActorDefinition res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ExampleScenarioActorType.NULL, new Enumerations.ExampleScenarioActorTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("reference")) {
JsonArray array = getJArray(json, "reference");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReference().add(new UrlType());
} else {;
res.getReference().add(parseUrl(array.get(i).getAsString()));
}
}
};
if (json.has("_reference")) {
JsonArray array = getJArray(json, "_reference");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReference().size())
res.getReference().add(parseUrl(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReference().get(i));
}
};
if (json.has("capabilities"))
res.setCapabilitiesElement(parseCanonical(json.get("capabilities").getAsString()));
if (json.has("_capabilities"))
parseElementProperties(getJObject(json, "_capabilities"), res.getCapabilitiesElement());
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFrom().add(new CanonicalType());
} else {;
res.getDerivedFrom().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFrom")) {
JsonArray array = getJArray(json, "_derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFrom().size())
res.getDerivedFrom().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFrom().get(i));
}
};
}
protected AdministrableProductDefinition parseAdministrableProductDefinition(JsonObject json) throws IOException, FHIRFormatError {
AdministrableProductDefinition res = new AdministrableProductDefinition();
parseAdministrableProductDefinitionProperties(json, res);
return res;
}
protected void parseAdministrableProductDefinitionProperties(JsonObject json, AdministrableProductDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("formOf")) {
JsonArray array = getJArray(json, "formOf");
for (int i = 0; i < array.size(); i++) {
res.getFormOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("administrableDoseForm"))
res.setAdministrableDoseForm(parseCodeableConcept(getJObject(json, "administrableDoseForm")));
if (json.has("unitOfPresentation"))
res.setUnitOfPresentation(parseCodeableConcept(getJObject(json, "unitOfPresentation")));
if (json.has("producedFrom")) {
JsonArray array = getJArray(json, "producedFrom");
for (int i = 0; i < array.size(); i++) {
res.getProducedFrom().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseAdministrableProductDefinitionPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("routeOfAdministration")) {
JsonArray array = getJArray(json, "routeOfAdministration");
for (int i = 0; i < array.size(); i++) {
res.getRouteOfAdministration().add(parseAdministrableProductDefinitionRouteOfAdministrationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent parseAdministrableProductDefinitionPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent res = new AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent();
parseAdministrableProductDefinitionPropertyComponentProperties(json, res);
return res;
}
protected void parseAdministrableProductDefinitionPropertyComponentProperties(JsonObject json, AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
}
protected AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent parseAdministrableProductDefinitionRouteOfAdministrationComponent(JsonObject json) throws IOException, FHIRFormatError {
AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent res = new AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent();
parseAdministrableProductDefinitionRouteOfAdministrationComponentProperties(json, res);
return res;
}
protected void parseAdministrableProductDefinitionRouteOfAdministrationComponentProperties(JsonObject json, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("firstDose"))
res.setFirstDose(parseQuantity(getJObject(json, "firstDose")));
if (json.has("maxSingleDose"))
res.setMaxSingleDose(parseQuantity(getJObject(json, "maxSingleDose")));
if (json.has("maxDosePerDay"))
res.setMaxDosePerDay(parseQuantity(getJObject(json, "maxDosePerDay")));
if (json.has("maxDosePerTreatmentPeriod"))
res.setMaxDosePerTreatmentPeriod(parseRatio(getJObject(json, "maxDosePerTreatmentPeriod")));
if (json.has("maxTreatmentPeriod"))
res.setMaxTreatmentPeriod(parseDuration(getJObject(json, "maxTreatmentPeriod")));
if (json.has("targetSpecies")) {
JsonArray array = getJArray(json, "targetSpecies");
for (int i = 0; i < array.size(); i++) {
res.getTargetSpecies().add(parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent(JsonObject json) throws IOException, FHIRFormatError {
AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent res = new AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent();
parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponentProperties(json, res);
return res;
}
protected void parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponentProperties(JsonObject json, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("withdrawalPeriod")) {
JsonArray array = getJArray(json, "withdrawalPeriod");
for (int i = 0; i < array.size(); i++) {
res.getWithdrawalPeriod().add(parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(JsonObject json) throws IOException, FHIRFormatError {
AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent res = new AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent();
parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentProperties(json, res);
return res;
}
protected void parseAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentProperties(JsonObject json, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("tissue"))
res.setTissue(parseCodeableConcept(getJObject(json, "tissue")));
if (json.has("value"))
res.setValue(parseQuantity(getJObject(json, "value")));
if (json.has("supportingInformation"))
res.setSupportingInformationElement(parseString(json.get("supportingInformation").getAsString()));
if (json.has("_supportingInformation"))
parseElementProperties(getJObject(json, "_supportingInformation"), res.getSupportingInformationElement());
}
protected AdverseEvent parseAdverseEvent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent res = new AdverseEvent();
parseAdverseEventProperties(json, res);
return res;
}
protected void parseAdverseEventProperties(JsonObject json, AdverseEvent res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), AdverseEvent.AdverseEventStatus.NULL, new AdverseEvent.AdverseEventStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("actuality"))
res.setActualityElement(parseEnumeration(json.get("actuality").getAsString(), AdverseEvent.AdverseEventActuality.NULL, new AdverseEvent.AdverseEventActualityEnumFactory()));
if (json.has("_actuality"))
parseElementProperties(getJObject(json, "_actuality"), res.getActualityElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("detected"))
res.setDetectedElement(parseDateTime(json.get("detected").getAsString()));
if (json.has("_detected"))
parseElementProperties(getJObject(json, "_detected"), res.getDetectedElement());
if (json.has("recordedDate"))
res.setRecordedDateElement(parseDateTime(json.get("recordedDate").getAsString()));
if (json.has("_recordedDate"))
parseElementProperties(getJObject(json, "_recordedDate"), res.getRecordedDateElement());
if (json.has("resultingEffect")) {
JsonArray array = getJArray(json, "resultingEffect");
for (int i = 0; i < array.size(); i++) {
res.getResultingEffect().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("seriousness"))
res.setSeriousness(parseCodeableConcept(getJObject(json, "seriousness")));
if (json.has("outcome")) {
JsonArray array = getJArray(json, "outcome");
for (int i = 0; i < array.size(); i++) {
res.getOutcome().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseAdverseEventParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("study")) {
JsonArray array = getJArray(json, "study");
for (int i = 0; i < array.size(); i++) {
res.getStudy().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("expectedInResearchStudy"))
res.setExpectedInResearchStudyElement(parseBoolean(json.get("expectedInResearchStudy").getAsBoolean()));
if (json.has("_expectedInResearchStudy"))
parseElementProperties(getJObject(json, "_expectedInResearchStudy"), res.getExpectedInResearchStudyElement());
if (json.has("suspectEntity")) {
JsonArray array = getJArray(json, "suspectEntity");
for (int i = 0; i < array.size(); i++) {
res.getSuspectEntity().add(parseAdverseEventSuspectEntityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contributingFactor")) {
JsonArray array = getJArray(json, "contributingFactor");
for (int i = 0; i < array.size(); i++) {
res.getContributingFactor().add(parseAdverseEventContributingFactorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preventiveAction")) {
JsonArray array = getJArray(json, "preventiveAction");
for (int i = 0; i < array.size(); i++) {
res.getPreventiveAction().add(parseAdverseEventPreventiveActionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("mitigatingAction")) {
JsonArray array = getJArray(json, "mitigatingAction");
for (int i = 0; i < array.size(); i++) {
res.getMitigatingAction().add(parseAdverseEventMitigatingActionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseAdverseEventSupportingInfoComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected AdverseEvent.AdverseEventParticipantComponent parseAdverseEventParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventParticipantComponent res = new AdverseEvent.AdverseEventParticipantComponent();
parseAdverseEventParticipantComponentProperties(json, res);
return res;
}
protected void parseAdverseEventParticipantComponentProperties(JsonObject json, AdverseEvent.AdverseEventParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventSuspectEntityComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent();
parseAdverseEventSuspectEntityComponentProperties(json, res);
return res;
}
protected void parseAdverseEventSuspectEntityComponentProperties(JsonObject json, AdverseEvent.AdverseEventSuspectEntityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType instance = parseType("instance", json);
if (instance != null)
res.setInstance(instance);
if (json.has("causality"))
res.setCausality(parseAdverseEventSuspectEntityCausalityComponent(getJObject(json, "causality")));
}
protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventSuspectEntityCausalityComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent();
parseAdverseEventSuspectEntityCausalityComponentProperties(json, res);
return res;
}
protected void parseAdverseEventSuspectEntityCausalityComponentProperties(JsonObject json, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("assessmentMethod"))
res.setAssessmentMethod(parseCodeableConcept(getJObject(json, "assessmentMethod")));
if (json.has("entityRelatedness"))
res.setEntityRelatedness(parseCodeableConcept(getJObject(json, "entityRelatedness")));
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
}
protected AdverseEvent.AdverseEventContributingFactorComponent parseAdverseEventContributingFactorComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventContributingFactorComponent res = new AdverseEvent.AdverseEventContributingFactorComponent();
parseAdverseEventContributingFactorComponentProperties(json, res);
return res;
}
protected void parseAdverseEventContributingFactorComponentProperties(JsonObject json, AdverseEvent.AdverseEventContributingFactorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected AdverseEvent.AdverseEventPreventiveActionComponent parseAdverseEventPreventiveActionComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventPreventiveActionComponent res = new AdverseEvent.AdverseEventPreventiveActionComponent();
parseAdverseEventPreventiveActionComponentProperties(json, res);
return res;
}
protected void parseAdverseEventPreventiveActionComponentProperties(JsonObject json, AdverseEvent.AdverseEventPreventiveActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected AdverseEvent.AdverseEventMitigatingActionComponent parseAdverseEventMitigatingActionComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventMitigatingActionComponent res = new AdverseEvent.AdverseEventMitigatingActionComponent();
parseAdverseEventMitigatingActionComponentProperties(json, res);
return res;
}
protected void parseAdverseEventMitigatingActionComponentProperties(JsonObject json, AdverseEvent.AdverseEventMitigatingActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected AdverseEvent.AdverseEventSupportingInfoComponent parseAdverseEventSupportingInfoComponent(JsonObject json) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventSupportingInfoComponent res = new AdverseEvent.AdverseEventSupportingInfoComponent();
parseAdverseEventSupportingInfoComponentProperties(json, res);
return res;
}
protected void parseAdverseEventSupportingInfoComponentProperties(JsonObject json, AdverseEvent.AdverseEventSupportingInfoComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected AllergyIntolerance parseAllergyIntolerance(JsonObject json) throws IOException, FHIRFormatError {
AllergyIntolerance res = new AllergyIntolerance();
parseAllergyIntoleranceProperties(json, res);
return res;
}
protected void parseAllergyIntoleranceProperties(JsonObject json, AllergyIntolerance res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("clinicalStatus"))
res.setClinicalStatus(parseCodeableConcept(getJObject(json, "clinicalStatus")));
if (json.has("verificationStatus"))
res.setVerificationStatus(parseCodeableConcept(getJObject(json, "verificationStatus")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCategory().add(new Enumeration(new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), AllergyIntolerance.AllergyIntoleranceCategory.NULL));
} else {;
res.getCategory().add(parseEnumeration(array.get(i).getAsString(), AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory()));
}
}
};
if (json.has("_category")) {
JsonArray array = getJArray(json, "_category");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCategory().size())
res.getCategory().add(parseEnumeration(null, AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCategory().get(i));
}
};
if (json.has("criticality"))
res.setCriticalityElement(parseEnumeration(json.get("criticality").getAsString(), AllergyIntolerance.AllergyIntoleranceCriticality.NULL, new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory()));
if (json.has("_criticality"))
parseElementProperties(getJObject(json, "_criticality"), res.getCriticalityElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType onset = parseType("onset", json);
if (onset != null)
res.setOnset(onset);
if (json.has("recordedDate"))
res.setRecordedDateElement(parseDateTime(json.get("recordedDate").getAsString()));
if (json.has("_recordedDate"))
parseElementProperties(getJObject(json, "_recordedDate"), res.getRecordedDateElement());
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseAllergyIntoleranceParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("lastOccurrence"))
res.setLastOccurrenceElement(parseDateTime(json.get("lastOccurrence").getAsString()));
if (json.has("_lastOccurrence"))
parseElementProperties(getJObject(json, "_lastOccurrence"), res.getLastOccurrenceElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reaction")) {
JsonArray array = getJArray(json, "reaction");
for (int i = 0; i < array.size(); i++) {
res.getReaction().add(parseAllergyIntoleranceReactionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AllergyIntolerance.AllergyIntoleranceParticipantComponent parseAllergyIntoleranceParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
AllergyIntolerance.AllergyIntoleranceParticipantComponent res = new AllergyIntolerance.AllergyIntoleranceParticipantComponent();
parseAllergyIntoleranceParticipantComponentProperties(json, res);
return res;
}
protected void parseAllergyIntoleranceParticipantComponentProperties(JsonObject json, AllergyIntolerance.AllergyIntoleranceParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceReactionComponent(JsonObject json) throws IOException, FHIRFormatError {
AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent();
parseAllergyIntoleranceReactionComponentProperties(json, res);
return res;
}
protected void parseAllergyIntoleranceReactionComponentProperties(JsonObject json, AllergyIntolerance.AllergyIntoleranceReactionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("substance"))
res.setSubstance(parseCodeableConcept(getJObject(json, "substance")));
if (json.has("manifestation")) {
JsonArray array = getJArray(json, "manifestation");
for (int i = 0; i < array.size(); i++) {
res.getManifestation().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("onset"))
res.setOnsetElement(parseDateTime(json.get("onset").getAsString()));
if (json.has("_onset"))
parseElementProperties(getJObject(json, "_onset"), res.getOnsetElement());
if (json.has("severity"))
res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), AllergyIntolerance.AllergyIntoleranceSeverity.NULL, new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory()));
if (json.has("_severity"))
parseElementProperties(getJObject(json, "_severity"), res.getSeverityElement());
if (json.has("exposureRoute"))
res.setExposureRoute(parseCodeableConcept(getJObject(json, "exposureRoute")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Appointment parseAppointment(JsonObject json) throws IOException, FHIRFormatError {
Appointment res = new Appointment();
parseAppointmentProperties(json, res);
return res;
}
protected void parseAppointmentProperties(JsonObject json, Appointment res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Appointment.AppointmentStatus.NULL, new Appointment.AppointmentStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("cancellationReason"))
res.setCancellationReason(parseCodeableConcept(getJObject(json, "cancellationReason")));
if (json.has("class")) {
JsonArray array = getJArray(json, "class");
for (int i = 0; i < array.size(); i++) {
res.getClass_().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceCategory")) {
JsonArray array = getJArray(json, "serviceCategory");
for (int i = 0; i < array.size(); i++) {
res.getServiceCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceType")) {
JsonArray array = getJArray(json, "serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialty")) {
JsonArray array = getJArray(json, "specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("appointmentType"))
res.setAppointmentType(parseCodeableConcept(getJObject(json, "appointmentType")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("virtualService")) {
JsonArray array = getJArray(json, "virtualService");
for (int i = 0; i < array.size(); i++) {
res.getVirtualService().add(parseVirtualServiceDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("previousAppointment"))
res.setPreviousAppointment(parseReference(getJObject(json, "previousAppointment")));
if (json.has("originatingAppointment"))
res.setOriginatingAppointment(parseReference(getJObject(json, "originatingAppointment")));
if (json.has("start"))
res.setStartElement(parseInstant(json.get("start").getAsString()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("end"))
res.setEndElement(parseInstant(json.get("end").getAsString()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
if (json.has("minutesDuration"))
res.setMinutesDurationElement(parsePositiveInt(json.get("minutesDuration").getAsString()));
if (json.has("_minutesDuration"))
parseElementProperties(getJObject(json, "_minutesDuration"), res.getMinutesDurationElement());
if (json.has("requestedPeriod")) {
JsonArray array = getJArray(json, "requestedPeriod");
for (int i = 0; i < array.size(); i++) {
res.getRequestedPeriod().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("slot")) {
JsonArray array = getJArray(json, "slot");
for (int i = 0; i < array.size(); i++) {
res.getSlot().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("account")) {
JsonArray array = getJArray(json, "account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("cancellationDate"))
res.setCancellationDateElement(parseDateTime(json.get("cancellationDate").getAsString()));
if (json.has("_cancellationDate"))
parseElementProperties(getJObject(json, "_cancellationDate"), res.getCancellationDateElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientInstruction")) {
JsonArray array = getJArray(json, "patientInstruction");
for (int i = 0; i < array.size(); i++) {
res.getPatientInstruction().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseAppointmentParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("recurrenceId"))
res.setRecurrenceIdElement(parsePositiveInt(json.get("recurrenceId").getAsString()));
if (json.has("_recurrenceId"))
parseElementProperties(getJObject(json, "_recurrenceId"), res.getRecurrenceIdElement());
if (json.has("occurrenceChanged"))
res.setOccurrenceChangedElement(parseBoolean(json.get("occurrenceChanged").getAsBoolean()));
if (json.has("_occurrenceChanged"))
parseElementProperties(getJObject(json, "_occurrenceChanged"), res.getOccurrenceChangedElement());
if (json.has("recurrenceTemplate")) {
JsonArray array = getJArray(json, "recurrenceTemplate");
for (int i = 0; i < array.size(); i++) {
res.getRecurrenceTemplate().add(parseAppointmentRecurrenceTemplateComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Appointment.AppointmentParticipantComponent parseAppointmentParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent();
parseAppointmentParticipantComponentProperties(json, res);
return res;
}
protected void parseAppointmentParticipantComponentProperties(JsonObject json, Appointment.AppointmentParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
if (json.has("required"))
res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean()));
if (json.has("_required"))
parseElementProperties(getJObject(json, "_required"), res.getRequiredElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Appointment.ParticipationStatus.NULL, new Appointment.ParticipationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
}
protected Appointment.AppointmentRecurrenceTemplateComponent parseAppointmentRecurrenceTemplateComponent(JsonObject json) throws IOException, FHIRFormatError {
Appointment.AppointmentRecurrenceTemplateComponent res = new Appointment.AppointmentRecurrenceTemplateComponent();
parseAppointmentRecurrenceTemplateComponentProperties(json, res);
return res;
}
protected void parseAppointmentRecurrenceTemplateComponentProperties(JsonObject json, Appointment.AppointmentRecurrenceTemplateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("timezone"))
res.setTimezone(parseCodeableConcept(getJObject(json, "timezone")));
if (json.has("recurrenceType"))
res.setRecurrenceType(parseCodeableConcept(getJObject(json, "recurrenceType")));
if (json.has("lastOccurrenceDate"))
res.setLastOccurrenceDateElement(parseDate(json.get("lastOccurrenceDate").getAsString()));
if (json.has("_lastOccurrenceDate"))
parseElementProperties(getJObject(json, "_lastOccurrenceDate"), res.getLastOccurrenceDateElement());
if (json.has("occurrenceCount"))
res.setOccurrenceCountElement(parsePositiveInt(json.get("occurrenceCount").getAsString()));
if (json.has("_occurrenceCount"))
parseElementProperties(getJObject(json, "_occurrenceCount"), res.getOccurrenceCountElement());
if (json.has("occurrenceDate")) {
JsonArray array = getJArray(json, "occurrenceDate");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getOccurrenceDate().add(new DateType());
} else {;
res.getOccurrenceDate().add(parseDate(array.get(i).getAsString()));
}
}
};
if (json.has("_occurrenceDate")) {
JsonArray array = getJArray(json, "_occurrenceDate");
for (int i = 0; i < array.size(); i++) {
if (i == res.getOccurrenceDate().size())
res.getOccurrenceDate().add(parseDate(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getOccurrenceDate().get(i));
}
};
if (json.has("weeklyTemplate"))
res.setWeeklyTemplate(parseAppointmentRecurrenceTemplateWeeklyTemplateComponent(getJObject(json, "weeklyTemplate")));
if (json.has("monthlyTemplate"))
res.setMonthlyTemplate(parseAppointmentRecurrenceTemplateMonthlyTemplateComponent(getJObject(json, "monthlyTemplate")));
if (json.has("yearlyTemplate"))
res.setYearlyTemplate(parseAppointmentRecurrenceTemplateYearlyTemplateComponent(getJObject(json, "yearlyTemplate")));
if (json.has("excludingDate")) {
JsonArray array = getJArray(json, "excludingDate");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getExcludingDate().add(new DateType());
} else {;
res.getExcludingDate().add(parseDate(array.get(i).getAsString()));
}
}
};
if (json.has("_excludingDate")) {
JsonArray array = getJArray(json, "_excludingDate");
for (int i = 0; i < array.size(); i++) {
if (i == res.getExcludingDate().size())
res.getExcludingDate().add(parseDate(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getExcludingDate().get(i));
}
};
if (json.has("excludingRecurrenceId")) {
JsonArray array = getJArray(json, "excludingRecurrenceId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getExcludingRecurrenceId().add(new PositiveIntType());
} else {;
res.getExcludingRecurrenceId().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_excludingRecurrenceId")) {
JsonArray array = getJArray(json, "_excludingRecurrenceId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getExcludingRecurrenceId().size())
res.getExcludingRecurrenceId().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getExcludingRecurrenceId().get(i));
}
};
}
protected Appointment.AppointmentRecurrenceTemplateWeeklyTemplateComponent parseAppointmentRecurrenceTemplateWeeklyTemplateComponent(JsonObject json) throws IOException, FHIRFormatError {
Appointment.AppointmentRecurrenceTemplateWeeklyTemplateComponent res = new Appointment.AppointmentRecurrenceTemplateWeeklyTemplateComponent();
parseAppointmentRecurrenceTemplateWeeklyTemplateComponentProperties(json, res);
return res;
}
protected void parseAppointmentRecurrenceTemplateWeeklyTemplateComponentProperties(JsonObject json, Appointment.AppointmentRecurrenceTemplateWeeklyTemplateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("monday"))
res.setMondayElement(parseBoolean(json.get("monday").getAsBoolean()));
if (json.has("_monday"))
parseElementProperties(getJObject(json, "_monday"), res.getMondayElement());
if (json.has("tuesday"))
res.setTuesdayElement(parseBoolean(json.get("tuesday").getAsBoolean()));
if (json.has("_tuesday"))
parseElementProperties(getJObject(json, "_tuesday"), res.getTuesdayElement());
if (json.has("wednesday"))
res.setWednesdayElement(parseBoolean(json.get("wednesday").getAsBoolean()));
if (json.has("_wednesday"))
parseElementProperties(getJObject(json, "_wednesday"), res.getWednesdayElement());
if (json.has("thursday"))
res.setThursdayElement(parseBoolean(json.get("thursday").getAsBoolean()));
if (json.has("_thursday"))
parseElementProperties(getJObject(json, "_thursday"), res.getThursdayElement());
if (json.has("friday"))
res.setFridayElement(parseBoolean(json.get("friday").getAsBoolean()));
if (json.has("_friday"))
parseElementProperties(getJObject(json, "_friday"), res.getFridayElement());
if (json.has("saturday"))
res.setSaturdayElement(parseBoolean(json.get("saturday").getAsBoolean()));
if (json.has("_saturday"))
parseElementProperties(getJObject(json, "_saturday"), res.getSaturdayElement());
if (json.has("sunday"))
res.setSundayElement(parseBoolean(json.get("sunday").getAsBoolean()));
if (json.has("_sunday"))
parseElementProperties(getJObject(json, "_sunday"), res.getSundayElement());
if (json.has("weekInterval"))
res.setWeekIntervalElement(parsePositiveInt(json.get("weekInterval").getAsString()));
if (json.has("_weekInterval"))
parseElementProperties(getJObject(json, "_weekInterval"), res.getWeekIntervalElement());
}
protected Appointment.AppointmentRecurrenceTemplateMonthlyTemplateComponent parseAppointmentRecurrenceTemplateMonthlyTemplateComponent(JsonObject json) throws IOException, FHIRFormatError {
Appointment.AppointmentRecurrenceTemplateMonthlyTemplateComponent res = new Appointment.AppointmentRecurrenceTemplateMonthlyTemplateComponent();
parseAppointmentRecurrenceTemplateMonthlyTemplateComponentProperties(json, res);
return res;
}
protected void parseAppointmentRecurrenceTemplateMonthlyTemplateComponentProperties(JsonObject json, Appointment.AppointmentRecurrenceTemplateMonthlyTemplateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("dayOfMonth"))
res.setDayOfMonthElement(parsePositiveInt(json.get("dayOfMonth").getAsString()));
if (json.has("_dayOfMonth"))
parseElementProperties(getJObject(json, "_dayOfMonth"), res.getDayOfMonthElement());
if (json.has("nthWeekOfMonth"))
res.setNthWeekOfMonth(parseCoding(getJObject(json, "nthWeekOfMonth")));
if (json.has("dayOfWeek"))
res.setDayOfWeek(parseCoding(getJObject(json, "dayOfWeek")));
if (json.has("monthInterval"))
res.setMonthIntervalElement(parsePositiveInt(json.get("monthInterval").getAsString()));
if (json.has("_monthInterval"))
parseElementProperties(getJObject(json, "_monthInterval"), res.getMonthIntervalElement());
}
protected Appointment.AppointmentRecurrenceTemplateYearlyTemplateComponent parseAppointmentRecurrenceTemplateYearlyTemplateComponent(JsonObject json) throws IOException, FHIRFormatError {
Appointment.AppointmentRecurrenceTemplateYearlyTemplateComponent res = new Appointment.AppointmentRecurrenceTemplateYearlyTemplateComponent();
parseAppointmentRecurrenceTemplateYearlyTemplateComponentProperties(json, res);
return res;
}
protected void parseAppointmentRecurrenceTemplateYearlyTemplateComponentProperties(JsonObject json, Appointment.AppointmentRecurrenceTemplateYearlyTemplateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("yearInterval"))
res.setYearIntervalElement(parsePositiveInt(json.get("yearInterval").getAsString()));
if (json.has("_yearInterval"))
parseElementProperties(getJObject(json, "_yearInterval"), res.getYearIntervalElement());
}
protected AppointmentResponse parseAppointmentResponse(JsonObject json) throws IOException, FHIRFormatError {
AppointmentResponse res = new AppointmentResponse();
parseAppointmentResponseProperties(json, res);
return res;
}
protected void parseAppointmentResponseProperties(JsonObject json, AppointmentResponse res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("appointment"))
res.setAppointment(parseReference(getJObject(json, "appointment")));
if (json.has("proposedNewTime"))
res.setProposedNewTimeElement(parseBoolean(json.get("proposedNewTime").getAsBoolean()));
if (json.has("_proposedNewTime"))
parseElementProperties(getJObject(json, "_proposedNewTime"), res.getProposedNewTimeElement());
if (json.has("start"))
res.setStartElement(parseInstant(json.get("start").getAsString()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("end"))
res.setEndElement(parseInstant(json.get("end").getAsString()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
if (json.has("participantType")) {
JsonArray array = getJArray(json, "participantType");
for (int i = 0; i < array.size(); i++) {
res.getParticipantType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
if (json.has("participantStatus"))
res.setParticipantStatusElement(parseEnumeration(json.get("participantStatus").getAsString(), AppointmentResponse.AppointmentResponseStatus.NULL, new AppointmentResponse.AppointmentResponseStatusEnumFactory()));
if (json.has("_participantStatus"))
parseElementProperties(getJObject(json, "_participantStatus"), res.getParticipantStatusElement());
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("recurring"))
res.setRecurringElement(parseBoolean(json.get("recurring").getAsBoolean()));
if (json.has("_recurring"))
parseElementProperties(getJObject(json, "_recurring"), res.getRecurringElement());
if (json.has("occurrenceDate"))
res.setOccurrenceDateElement(parseDate(json.get("occurrenceDate").getAsString()));
if (json.has("_occurrenceDate"))
parseElementProperties(getJObject(json, "_occurrenceDate"), res.getOccurrenceDateElement());
if (json.has("recurrenceId"))
res.setRecurrenceIdElement(parsePositiveInt(json.get("recurrenceId").getAsString()));
if (json.has("_recurrenceId"))
parseElementProperties(getJObject(json, "_recurrenceId"), res.getRecurrenceIdElement());
}
protected ArtifactAssessment parseArtifactAssessment(JsonObject json) throws IOException, FHIRFormatError {
ArtifactAssessment res = new ArtifactAssessment();
parseArtifactAssessmentProperties(json, res);
return res;
}
protected void parseArtifactAssessmentProperties(JsonObject json, ArtifactAssessment res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
DataType citeAs = parseType("citeAs", json);
if (citeAs != null)
res.setCiteAs(citeAs);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
DataType artifact = parseType("artifact", json);
if (artifact != null)
res.setArtifact(artifact);
if (json.has("content")) {
JsonArray array = getJArray(json, "content");
for (int i = 0; i < array.size(); i++) {
res.getContent().add(parseArtifactAssessmentContentComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("workflowStatus"))
res.setWorkflowStatusElement(parseEnumeration(json.get("workflowStatus").getAsString(), ArtifactAssessment.ArtifactAssessmentWorkflowStatus.NULL, new ArtifactAssessment.ArtifactAssessmentWorkflowStatusEnumFactory()));
if (json.has("_workflowStatus"))
parseElementProperties(getJObject(json, "_workflowStatus"), res.getWorkflowStatusElement());
if (json.has("disposition"))
res.setDispositionElement(parseEnumeration(json.get("disposition").getAsString(), ArtifactAssessment.ArtifactAssessmentDisposition.NULL, new ArtifactAssessment.ArtifactAssessmentDispositionEnumFactory()));
if (json.has("_disposition"))
parseElementProperties(getJObject(json, "_disposition"), res.getDispositionElement());
}
protected ArtifactAssessment.ArtifactAssessmentContentComponent parseArtifactAssessmentContentComponent(JsonObject json) throws IOException, FHIRFormatError {
ArtifactAssessment.ArtifactAssessmentContentComponent res = new ArtifactAssessment.ArtifactAssessmentContentComponent();
parseArtifactAssessmentContentComponentProperties(json, res);
return res;
}
protected void parseArtifactAssessmentContentComponentProperties(JsonObject json, ArtifactAssessment.ArtifactAssessmentContentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("informationType"))
res.setInformationTypeElement(parseEnumeration(json.get("informationType").getAsString(), ArtifactAssessment.ArtifactAssessmentInformationType.NULL, new ArtifactAssessment.ArtifactAssessmentInformationTypeEnumFactory()));
if (json.has("_informationType"))
parseElementProperties(getJObject(json, "_informationType"), res.getInformationTypeElement());
if (json.has("summary"))
res.setSummaryElement(parseMarkdown(json.get("summary").getAsString()));
if (json.has("_summary"))
parseElementProperties(getJObject(json, "_summary"), res.getSummaryElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("path")) {
JsonArray array = getJArray(json, "path");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPath().add(new UriType());
} else {;
res.getPath().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_path")) {
JsonArray array = getJArray(json, "_path");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPath().size())
res.getPath().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPath().get(i));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("freeToShare"))
res.setFreeToShareElement(parseBoolean(json.get("freeToShare").getAsBoolean()));
if (json.has("_freeToShare"))
parseElementProperties(getJObject(json, "_freeToShare"), res.getFreeToShareElement());
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseArtifactAssessmentContentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AuditEvent parseAuditEvent(JsonObject json) throws IOException, FHIRFormatError {
AuditEvent res = new AuditEvent();
parseAuditEventProperties(json, res);
return res;
}
protected void parseAuditEventProperties(JsonObject json, AuditEvent res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("action"))
res.setActionElement(parseEnumeration(json.get("action").getAsString(), AuditEvent.AuditEventAction.NULL, new AuditEvent.AuditEventActionEnumFactory()));
if (json.has("_action"))
parseElementProperties(getJObject(json, "_action"), res.getActionElement());
if (json.has("severity"))
res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), AuditEvent.AuditEventSeverity.NULL, new AuditEvent.AuditEventSeverityEnumFactory()));
if (json.has("_severity"))
parseElementProperties(getJObject(json, "_severity"), res.getSeverityElement());
DataType occurred = parseType("occurred", json);
if (occurred != null)
res.setOccurred(occurred);
if (json.has("recorded"))
res.setRecordedElement(parseInstant(json.get("recorded").getAsString()));
if (json.has("_recorded"))
parseElementProperties(getJObject(json, "_recorded"), res.getRecordedElement());
if (json.has("outcome"))
res.setOutcome(parseAuditEventOutcomeComponent(getJObject(json, "outcome")));
if (json.has("authorization")) {
JsonArray array = getJArray(json, "authorization");
for (int i = 0; i < array.size(); i++) {
res.getAuthorization().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("agent")) {
JsonArray array = getJArray(json, "agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseAuditEventAgentComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("source"))
res.setSource(parseAuditEventSourceComponent(getJObject(json, "source")));
if (json.has("entity")) {
JsonArray array = getJArray(json, "entity");
for (int i = 0; i < array.size(); i++) {
res.getEntity().add(parseAuditEventEntityComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AuditEvent.AuditEventOutcomeComponent parseAuditEventOutcomeComponent(JsonObject json) throws IOException, FHIRFormatError {
AuditEvent.AuditEventOutcomeComponent res = new AuditEvent.AuditEventOutcomeComponent();
parseAuditEventOutcomeComponentProperties(json, res);
return res;
}
protected void parseAuditEventOutcomeComponentProperties(JsonObject json, AuditEvent.AuditEventOutcomeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCoding(getJObject(json, "code")));
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected AuditEvent.AuditEventAgentComponent parseAuditEventAgentComponent(JsonObject json) throws IOException, FHIRFormatError {
AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent();
parseAuditEventAgentComponentProperties(json, res);
return res;
}
protected void parseAuditEventAgentComponentProperties(JsonObject json, AuditEvent.AuditEventAgentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("role")) {
JsonArray array = getJArray(json, "role");
for (int i = 0; i < array.size(); i++) {
res.getRole().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("requestor"))
res.setRequestorElement(parseBoolean(json.get("requestor").getAsBoolean()));
if (json.has("_requestor"))
parseElementProperties(getJObject(json, "_requestor"), res.getRequestorElement());
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("policy")) {
JsonArray array = getJArray(json, "policy");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPolicy().add(new UriType());
} else {;
res.getPolicy().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_policy")) {
JsonArray array = getJArray(json, "_policy");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPolicy().size())
res.getPolicy().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPolicy().get(i));
}
};
DataType network = parseType("network", json);
if (network != null)
res.setNetwork(network);
if (json.has("authorization")) {
JsonArray array = getJArray(json, "authorization");
for (int i = 0; i < array.size(); i++) {
res.getAuthorization().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected AuditEvent.AuditEventSourceComponent parseAuditEventSourceComponent(JsonObject json) throws IOException, FHIRFormatError {
AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent();
parseAuditEventSourceComponentProperties(json, res);
return res;
}
protected void parseAuditEventSourceComponentProperties(JsonObject json, AuditEvent.AuditEventSourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("site"))
res.setSite(parseReference(getJObject(json, "site")));
if (json.has("observer"))
res.setObserver(parseReference(getJObject(json, "observer")));
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected AuditEvent.AuditEventEntityComponent parseAuditEventEntityComponent(JsonObject json) throws IOException, FHIRFormatError {
AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent();
parseAuditEventEntityComponentProperties(json, res);
return res;
}
protected void parseAuditEventEntityComponentProperties(JsonObject json, AuditEvent.AuditEventEntityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("what"))
res.setWhat(parseReference(getJObject(json, "what")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("securityLabel")) {
JsonArray array = getJArray(json, "securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("query"))
res.setQueryElement(parseBase64Binary(json.get("query").getAsString()));
if (json.has("_query"))
parseElementProperties(getJObject(json, "_query"), res.getQueryElement());
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseAuditEventEntityDetailComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("agent")) {
JsonArray array = getJArray(json, "agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseAuditEventAgentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventEntityDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent();
parseAuditEventEntityDetailComponentProperties(json, res);
return res;
}
protected void parseAuditEventEntityDetailComponentProperties(JsonObject json, AuditEvent.AuditEventEntityDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Basic parseBasic(JsonObject json) throws IOException, FHIRFormatError {
Basic res = new Basic();
parseBasicProperties(json, res);
return res;
}
protected void parseBasicProperties(JsonObject json, Basic res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
}
protected Binary parseBinary(JsonObject json) throws IOException, FHIRFormatError {
Binary res = new Binary();
parseBinaryProperties(json, res);
return res;
}
protected void parseBinaryProperties(JsonObject json, Binary res) throws IOException, FHIRFormatError {
parseResourceProperties(json, res);
if (json.has("contentType"))
res.setContentTypeElement(parseCode(json.get("contentType").getAsString()));
if (json.has("_contentType"))
parseElementProperties(getJObject(json, "_contentType"), res.getContentTypeElement());
if (json.has("securityContext"))
res.setSecurityContext(parseReference(getJObject(json, "securityContext")));
if (json.has("data"))
res.setDataElement(parseBase64Binary(json.get("data").getAsString()));
if (json.has("_data"))
parseElementProperties(getJObject(json, "_data"), res.getDataElement());
}
protected BiologicallyDerivedProduct parseBiologicallyDerivedProduct(JsonObject json) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct res = new BiologicallyDerivedProduct();
parseBiologicallyDerivedProductProperties(json, res);
return res;
}
protected void parseBiologicallyDerivedProductProperties(JsonObject json, BiologicallyDerivedProduct res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("productCategory"))
res.setProductCategory(parseCoding(getJObject(json, "productCategory")));
if (json.has("productCode"))
res.setProductCode(parseCodeableConcept(getJObject(json, "productCode")));
if (json.has("parent")) {
JsonArray array = getJArray(json, "parent");
for (int i = 0; i < array.size(); i++) {
res.getParent().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("request")) {
JsonArray array = getJArray(json, "request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("biologicalSourceEvent"))
res.setBiologicalSourceEvent(parseIdentifier(getJObject(json, "biologicalSourceEvent")));
if (json.has("processingFacility")) {
JsonArray array = getJArray(json, "processingFacility");
for (int i = 0; i < array.size(); i++) {
res.getProcessingFacility().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("division"))
res.setDivisionElement(parseString(json.get("division").getAsString()));
if (json.has("_division"))
parseElementProperties(getJObject(json, "_division"), res.getDivisionElement());
if (json.has("productStatus"))
res.setProductStatus(parseCoding(getJObject(json, "productStatus")));
if (json.has("expirationDate"))
res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString()));
if (json.has("_expirationDate"))
parseElementProperties(getJObject(json, "_expirationDate"), res.getExpirationDateElement());
if (json.has("collection"))
res.setCollection(parseBiologicallyDerivedProductCollectionComponent(getJObject(json, "collection")));
if (json.has("storageTempRequirements"))
res.setStorageTempRequirements(parseRange(getJObject(json, "storageTempRequirements")));
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseBiologicallyDerivedProductPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent parseBiologicallyDerivedProductCollectionComponent(JsonObject json) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent();
parseBiologicallyDerivedProductCollectionComponentProperties(json, res);
return res;
}
protected void parseBiologicallyDerivedProductCollectionComponentProperties(JsonObject json, BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("collector"))
res.setCollector(parseReference(getJObject(json, "collector")));
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
DataType collected = parseType("collected", json);
if (collected != null)
res.setCollected(collected);
}
protected BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent parseBiologicallyDerivedProductPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent();
parseBiologicallyDerivedProductPropertyComponentProperties(json, res);
return res;
}
protected void parseBiologicallyDerivedProductPropertyComponentProperties(JsonObject json, BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected BiologicallyDerivedProductDispense parseBiologicallyDerivedProductDispense(JsonObject json) throws IOException, FHIRFormatError {
BiologicallyDerivedProductDispense res = new BiologicallyDerivedProductDispense();
parseBiologicallyDerivedProductDispenseProperties(json, res);
return res;
}
protected void parseBiologicallyDerivedProductDispenseProperties(JsonObject json, BiologicallyDerivedProductDispense res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispenseCodes.NULL, new BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispenseCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("originRelationshipType"))
res.setOriginRelationshipType(parseCodeableConcept(getJObject(json, "originRelationshipType")));
if (json.has("product"))
res.setProduct(parseReference(getJObject(json, "product")));
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("matchStatus"))
res.setMatchStatus(parseCodeableConcept(getJObject(json, "matchStatus")));
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseBiologicallyDerivedProductDispensePerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("preparedDate"))
res.setPreparedDateElement(parseDateTime(json.get("preparedDate").getAsString()));
if (json.has("_preparedDate"))
parseElementProperties(getJObject(json, "_preparedDate"), res.getPreparedDateElement());
if (json.has("whenHandedOver"))
res.setWhenHandedOverElement(parseDateTime(json.get("whenHandedOver").getAsString()));
if (json.has("_whenHandedOver"))
parseElementProperties(getJObject(json, "_whenHandedOver"), res.getWhenHandedOverElement());
if (json.has("destination"))
res.setDestination(parseReference(getJObject(json, "destination")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("usageInstruction"))
res.setUsageInstructionElement(parseString(json.get("usageInstruction").getAsString()));
if (json.has("_usageInstruction"))
parseElementProperties(getJObject(json, "_usageInstruction"), res.getUsageInstructionElement());
}
protected BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent parseBiologicallyDerivedProductDispensePerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent res = new BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent();
parseBiologicallyDerivedProductDispensePerformerComponentProperties(json, res);
return res;
}
protected void parseBiologicallyDerivedProductDispensePerformerComponentProperties(JsonObject json, BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected BodyStructure parseBodyStructure(JsonObject json) throws IOException, FHIRFormatError {
BodyStructure res = new BodyStructure();
parseBodyStructureProperties(json, res);
return res;
}
protected void parseBodyStructureProperties(JsonObject json, BodyStructure res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("morphology"))
res.setMorphology(parseCodeableConcept(getJObject(json, "morphology")));
if (json.has("includedStructure")) {
JsonArray array = getJArray(json, "includedStructure");
for (int i = 0; i < array.size(); i++) {
res.getIncludedStructure().add(parseBodyStructureIncludedStructureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("excludedStructure")) {
JsonArray array = getJArray(json, "excludedStructure");
for (int i = 0; i < array.size(); i++) {
res.getExcludedStructure().add(parseBodyStructureIncludedStructureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("image")) {
JsonArray array = getJArray(json, "image");
for (int i = 0; i < array.size(); i++) {
res.getImage().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
}
protected BodyStructure.BodyStructureIncludedStructureComponent parseBodyStructureIncludedStructureComponent(JsonObject json) throws IOException, FHIRFormatError {
BodyStructure.BodyStructureIncludedStructureComponent res = new BodyStructure.BodyStructureIncludedStructureComponent();
parseBodyStructureIncludedStructureComponentProperties(json, res);
return res;
}
protected void parseBodyStructureIncludedStructureComponentProperties(JsonObject json, BodyStructure.BodyStructureIncludedStructureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("structure"))
res.setStructure(parseCodeableConcept(getJObject(json, "structure")));
if (json.has("laterality"))
res.setLaterality(parseCodeableConcept(getJObject(json, "laterality")));
if (json.has("bodyLandmarkOrientation")) {
JsonArray array = getJArray(json, "bodyLandmarkOrientation");
for (int i = 0; i < array.size(); i++) {
res.getBodyLandmarkOrientation().add(parseBodyStructureIncludedStructureBodyLandmarkOrientationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("spatialReference")) {
JsonArray array = getJArray(json, "spatialReference");
for (int i = 0; i < array.size(); i++) {
res.getSpatialReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("qualifier")) {
JsonArray array = getJArray(json, "qualifier");
for (int i = 0; i < array.size(); i++) {
res.getQualifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent parseBodyStructureIncludedStructureBodyLandmarkOrientationComponent(JsonObject json) throws IOException, FHIRFormatError {
BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent res = new BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent();
parseBodyStructureIncludedStructureBodyLandmarkOrientationComponentProperties(json, res);
return res;
}
protected void parseBodyStructureIncludedStructureBodyLandmarkOrientationComponentProperties(JsonObject json, BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("landmarkDescription")) {
JsonArray array = getJArray(json, "landmarkDescription");
for (int i = 0; i < array.size(); i++) {
res.getLandmarkDescription().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("clockFacePosition")) {
JsonArray array = getJArray(json, "clockFacePosition");
for (int i = 0; i < array.size(); i++) {
res.getClockFacePosition().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("distanceFromLandmark")) {
JsonArray array = getJArray(json, "distanceFromLandmark");
for (int i = 0; i < array.size(); i++) {
res.getDistanceFromLandmark().add(parseBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("surfaceOrientation")) {
JsonArray array = getJArray(json, "surfaceOrientation");
for (int i = 0; i < array.size(); i++) {
res.getSurfaceOrientation().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent parseBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent(JsonObject json) throws IOException, FHIRFormatError {
BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent res = new BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent();
parseBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponentProperties(json, res);
return res;
}
protected void parseBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponentProperties(JsonObject json, BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("device")) {
JsonArray array = getJArray(json, "device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("value")) {
JsonArray array = getJArray(json, "value");
for (int i = 0; i < array.size(); i++) {
res.getValue().add(parseQuantity(getJsonObjectFromArray(array, i)));
}
};
}
protected Bundle parseBundle(JsonObject json) throws IOException, FHIRFormatError {
Bundle res = new Bundle();
parseBundleProperties(json, res);
return res;
}
protected void parseBundleProperties(JsonObject json, Bundle res) throws IOException, FHIRFormatError {
parseResourceProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Bundle.BundleType.NULL, new Bundle.BundleTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("timestamp"))
res.setTimestampElement(parseInstant(json.get("timestamp").getAsString()));
if (json.has("_timestamp"))
parseElementProperties(getJObject(json, "_timestamp"), res.getTimestampElement());
if (json.has("total"))
res.setTotalElement(parseUnsignedInt(json.get("total").getAsString()));
if (json.has("_total"))
parseElementProperties(getJObject(json, "_total"), res.getTotalElement());
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseBundleLinkComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("entry")) {
JsonArray array = getJArray(json, "entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseBundleEntryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("signature"))
res.setSignature(parseSignature(getJObject(json, "signature")));
if (json.has("issues"))
res.setIssues(parseResource(getJObject(json, "issues")));
}
protected Bundle.BundleLinkComponent parseBundleLinkComponent(JsonObject json) throws IOException, FHIRFormatError {
Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent();
parseBundleLinkComponentProperties(json, res);
return res;
}
protected void parseBundleLinkComponentProperties(JsonObject json, Bundle.BundleLinkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relation"))
res.setRelationElement(parseEnumeration(json.get("relation").getAsString(), Bundle.LinkRelationTypes.NULL, new Bundle.LinkRelationTypesEnumFactory()));
if (json.has("_relation"))
parseElementProperties(getJObject(json, "_relation"), res.getRelationElement());
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected Bundle.BundleEntryComponent parseBundleEntryComponent(JsonObject json) throws IOException, FHIRFormatError {
Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent();
parseBundleEntryComponentProperties(json, res);
return res;
}
protected void parseBundleEntryComponentProperties(JsonObject json, Bundle.BundleEntryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseBundleLinkComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("fullUrl"))
res.setFullUrlElement(parseUri(json.get("fullUrl").getAsString()));
if (json.has("_fullUrl"))
parseElementProperties(getJObject(json, "_fullUrl"), res.getFullUrlElement());
if (json.has("resource"))
res.setResource(parseResource(getJObject(json, "resource")));
if (json.has("search"))
res.setSearch(parseBundleEntrySearchComponent(getJObject(json, "search")));
if (json.has("request"))
res.setRequest(parseBundleEntryRequestComponent(getJObject(json, "request")));
if (json.has("response"))
res.setResponse(parseBundleEntryResponseComponent(getJObject(json, "response")));
}
protected Bundle.BundleEntrySearchComponent parseBundleEntrySearchComponent(JsonObject json) throws IOException, FHIRFormatError {
Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent();
parseBundleEntrySearchComponentProperties(json, res);
return res;
}
protected void parseBundleEntrySearchComponentProperties(JsonObject json, Bundle.BundleEntrySearchComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Bundle.SearchEntryMode.NULL, new Bundle.SearchEntryModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("score"))
res.setScoreElement(parseDecimal(json.get("score").getAsBigDecimal()));
if (json.has("_score"))
parseElementProperties(getJObject(json, "_score"), res.getScoreElement());
}
protected Bundle.BundleEntryRequestComponent parseBundleEntryRequestComponent(JsonObject json) throws IOException, FHIRFormatError {
Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent();
parseBundleEntryRequestComponentProperties(json, res);
return res;
}
protected void parseBundleEntryRequestComponentProperties(JsonObject json, Bundle.BundleEntryRequestComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("method"))
res.setMethodElement(parseEnumeration(json.get("method").getAsString(), Bundle.HTTPVerb.NULL, new Bundle.HTTPVerbEnumFactory()));
if (json.has("_method"))
parseElementProperties(getJObject(json, "_method"), res.getMethodElement());
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("ifNoneMatch"))
res.setIfNoneMatchElement(parseString(json.get("ifNoneMatch").getAsString()));
if (json.has("_ifNoneMatch"))
parseElementProperties(getJObject(json, "_ifNoneMatch"), res.getIfNoneMatchElement());
if (json.has("ifModifiedSince"))
res.setIfModifiedSinceElement(parseInstant(json.get("ifModifiedSince").getAsString()));
if (json.has("_ifModifiedSince"))
parseElementProperties(getJObject(json, "_ifModifiedSince"), res.getIfModifiedSinceElement());
if (json.has("ifMatch"))
res.setIfMatchElement(parseString(json.get("ifMatch").getAsString()));
if (json.has("_ifMatch"))
parseElementProperties(getJObject(json, "_ifMatch"), res.getIfMatchElement());
if (json.has("ifNoneExist"))
res.setIfNoneExistElement(parseString(json.get("ifNoneExist").getAsString()));
if (json.has("_ifNoneExist"))
parseElementProperties(getJObject(json, "_ifNoneExist"), res.getIfNoneExistElement());
}
protected Bundle.BundleEntryResponseComponent parseBundleEntryResponseComponent(JsonObject json) throws IOException, FHIRFormatError {
Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent();
parseBundleEntryResponseComponentProperties(json, res);
return res;
}
protected void parseBundleEntryResponseComponentProperties(JsonObject json, Bundle.BundleEntryResponseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("status"))
res.setStatusElement(parseString(json.get("status").getAsString()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("location"))
res.setLocationElement(parseUri(json.get("location").getAsString()));
if (json.has("_location"))
parseElementProperties(getJObject(json, "_location"), res.getLocationElement());
if (json.has("etag"))
res.setEtagElement(parseString(json.get("etag").getAsString()));
if (json.has("_etag"))
parseElementProperties(getJObject(json, "_etag"), res.getEtagElement());
if (json.has("lastModified"))
res.setLastModifiedElement(parseInstant(json.get("lastModified").getAsString()));
if (json.has("_lastModified"))
parseElementProperties(getJObject(json, "_lastModified"), res.getLastModifiedElement());
if (json.has("outcome"))
res.setOutcome(parseResource(getJObject(json, "outcome")));
}
protected CapabilityStatement parseCapabilityStatement(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement res = new CapabilityStatement();
parseCapabilityStatementProperties(json, res);
return res;
}
protected void parseCapabilityStatementProperties(JsonObject json, CapabilityStatement res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), Enumerations.CapabilityStatementKind.NULL, new Enumerations.CapabilityStatementKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("instantiates")) {
JsonArray array = getJArray(json, "instantiates");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiates().add(new CanonicalType());
} else {;
res.getInstantiates().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiates")) {
JsonArray array = getJArray(json, "_instantiates");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiates().size())
res.getInstantiates().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiates().get(i));
}
};
if (json.has("imports")) {
JsonArray array = getJArray(json, "imports");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getImports().add(new CanonicalType());
} else {;
res.getImports().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_imports")) {
JsonArray array = getJArray(json, "_imports");
for (int i = 0; i < array.size(); i++) {
if (i == res.getImports().size())
res.getImports().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getImports().get(i));
}
};
if (json.has("software"))
res.setSoftware(parseCapabilityStatementSoftwareComponent(getJObject(json, "software")));
if (json.has("implementation"))
res.setImplementation(parseCapabilityStatementImplementationComponent(getJObject(json, "implementation")));
if (json.has("fhirVersion"))
res.setFhirVersionElement(parseEnumeration(json.get("fhirVersion").getAsString(), Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory()));
if (json.has("_fhirVersion"))
parseElementProperties(getJObject(json, "_fhirVersion"), res.getFhirVersionElement());
if (json.has("format")) {
JsonArray array = getJArray(json, "format");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getFormat().add(new CodeType());
} else {;
res.getFormat().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_format")) {
JsonArray array = getJArray(json, "_format");
for (int i = 0; i < array.size(); i++) {
if (i == res.getFormat().size())
res.getFormat().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getFormat().get(i));
}
};
if (json.has("patchFormat")) {
JsonArray array = getJArray(json, "patchFormat");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPatchFormat().add(new CodeType());
} else {;
res.getPatchFormat().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_patchFormat")) {
JsonArray array = getJArray(json, "_patchFormat");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPatchFormat().size())
res.getPatchFormat().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPatchFormat().get(i));
}
};
if (json.has("acceptLanguage")) {
JsonArray array = getJArray(json, "acceptLanguage");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAcceptLanguage().add(new CodeType());
} else {;
res.getAcceptLanguage().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_acceptLanguage")) {
JsonArray array = getJArray(json, "_acceptLanguage");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAcceptLanguage().size())
res.getAcceptLanguage().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAcceptLanguage().get(i));
}
};
if (json.has("implementationGuide")) {
JsonArray array = getJArray(json, "implementationGuide");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getImplementationGuide().add(new CanonicalType());
} else {;
res.getImplementationGuide().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_implementationGuide")) {
JsonArray array = getJArray(json, "_implementationGuide");
for (int i = 0; i < array.size(); i++) {
if (i == res.getImplementationGuide().size())
res.getImplementationGuide().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getImplementationGuide().get(i));
}
};
if (json.has("rest")) {
JsonArray array = getJArray(json, "rest");
for (int i = 0; i < array.size(); i++) {
res.getRest().add(parseCapabilityStatementRestComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("messaging")) {
JsonArray array = getJArray(json, "messaging");
for (int i = 0; i < array.size(); i++) {
res.getMessaging().add(parseCapabilityStatementMessagingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("document")) {
JsonArray array = getJArray(json, "document");
for (int i = 0; i < array.size(); i++) {
res.getDocument().add(parseCapabilityStatementDocumentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementSoftwareComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent();
parseCapabilityStatementSoftwareComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementSoftwareComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementSoftwareComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("releaseDate"))
res.setReleaseDateElement(parseDateTime(json.get("releaseDate").getAsString()));
if (json.has("_releaseDate"))
parseElementProperties(getJObject(json, "_releaseDate"), res.getReleaseDateElement());
}
protected CapabilityStatement.CapabilityStatementImplementationComponent parseCapabilityStatementImplementationComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent();
parseCapabilityStatementImplementationComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementImplementationComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementImplementationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
}
protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementRestComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent();
parseCapabilityStatementRestComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementRestComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementRestComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.RestfulCapabilityMode.NULL, new CapabilityStatement.RestfulCapabilityModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("security"))
res.setSecurity(parseCapabilityStatementRestSecurityComponent(getJObject(json, "security")));
if (json.has("resource")) {
JsonArray array = getJArray(json, "resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parseCapabilityStatementRestResourceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("interaction")) {
JsonArray array = getJArray(json, "interaction");
for (int i = 0; i < array.size(); i++) {
res.getInteraction().add(parseCapabilityStatementSystemInteractionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("searchParam")) {
JsonArray array = getJArray(json, "searchParam");
for (int i = 0; i < array.size(); i++) {
res.getSearchParam().add(parseCapabilityStatementRestResourceSearchParamComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("operation")) {
JsonArray array = getJArray(json, "operation");
for (int i = 0; i < array.size(); i++) {
res.getOperation().add(parseCapabilityStatementRestResourceOperationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("compartment")) {
JsonArray array = getJArray(json, "compartment");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCompartment().add(new CanonicalType());
} else {;
res.getCompartment().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_compartment")) {
JsonArray array = getJArray(json, "_compartment");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCompartment().size())
res.getCompartment().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCompartment().get(i));
}
};
}
protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementRestSecurityComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent();
parseCapabilityStatementRestSecurityComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementRestSecurityComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementRestSecurityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("cors"))
res.setCorsElement(parseBoolean(json.get("cors").getAsBoolean()));
if (json.has("_cors"))
parseElementProperties(getJObject(json, "_cors"), res.getCorsElement());
if (json.has("service")) {
JsonArray array = getJArray(json, "service");
for (int i = 0; i < array.size(); i++) {
res.getService().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementRestResourceComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent();
parseCapabilityStatementRestResourceComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementRestResourceComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementRestResourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseCode(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
if (json.has("supportedProfile")) {
JsonArray array = getJArray(json, "supportedProfile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSupportedProfile().add(new CanonicalType());
} else {;
res.getSupportedProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_supportedProfile")) {
JsonArray array = getJArray(json, "_supportedProfile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSupportedProfile().size())
res.getSupportedProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSupportedProfile().get(i));
}
};
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("interaction")) {
JsonArray array = getJArray(json, "interaction");
for (int i = 0; i < array.size(); i++) {
res.getInteraction().add(parseCapabilityStatementResourceInteractionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("versioning"))
res.setVersioningElement(parseEnumeration(json.get("versioning").getAsString(), CapabilityStatement.ResourceVersionPolicy.NULL, new CapabilityStatement.ResourceVersionPolicyEnumFactory()));
if (json.has("_versioning"))
parseElementProperties(getJObject(json, "_versioning"), res.getVersioningElement());
if (json.has("readHistory"))
res.setReadHistoryElement(parseBoolean(json.get("readHistory").getAsBoolean()));
if (json.has("_readHistory"))
parseElementProperties(getJObject(json, "_readHistory"), res.getReadHistoryElement());
if (json.has("updateCreate"))
res.setUpdateCreateElement(parseBoolean(json.get("updateCreate").getAsBoolean()));
if (json.has("_updateCreate"))
parseElementProperties(getJObject(json, "_updateCreate"), res.getUpdateCreateElement());
if (json.has("conditionalCreate"))
res.setConditionalCreateElement(parseBoolean(json.get("conditionalCreate").getAsBoolean()));
if (json.has("_conditionalCreate"))
parseElementProperties(getJObject(json, "_conditionalCreate"), res.getConditionalCreateElement());
if (json.has("conditionalRead"))
res.setConditionalReadElement(parseEnumeration(json.get("conditionalRead").getAsString(), CapabilityStatement.ConditionalReadStatus.NULL, new CapabilityStatement.ConditionalReadStatusEnumFactory()));
if (json.has("_conditionalRead"))
parseElementProperties(getJObject(json, "_conditionalRead"), res.getConditionalReadElement());
if (json.has("conditionalUpdate"))
res.setConditionalUpdateElement(parseBoolean(json.get("conditionalUpdate").getAsBoolean()));
if (json.has("_conditionalUpdate"))
parseElementProperties(getJObject(json, "_conditionalUpdate"), res.getConditionalUpdateElement());
if (json.has("conditionalPatch"))
res.setConditionalPatchElement(parseBoolean(json.get("conditionalPatch").getAsBoolean()));
if (json.has("_conditionalPatch"))
parseElementProperties(getJObject(json, "_conditionalPatch"), res.getConditionalPatchElement());
if (json.has("conditionalDelete"))
res.setConditionalDeleteElement(parseEnumeration(json.get("conditionalDelete").getAsString(), CapabilityStatement.ConditionalDeleteStatus.NULL, new CapabilityStatement.ConditionalDeleteStatusEnumFactory()));
if (json.has("_conditionalDelete"))
parseElementProperties(getJObject(json, "_conditionalDelete"), res.getConditionalDeleteElement());
if (json.has("referencePolicy")) {
JsonArray array = getJArray(json, "referencePolicy");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReferencePolicy().add(new Enumeration(new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), CapabilityStatement.ReferenceHandlingPolicy.NULL));
} else {;
res.getReferencePolicy().add(parseEnumeration(array.get(i).getAsString(), CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory()));
}
}
};
if (json.has("_referencePolicy")) {
JsonArray array = getJArray(json, "_referencePolicy");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReferencePolicy().size())
res.getReferencePolicy().add(parseEnumeration(null, CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReferencePolicy().get(i));
}
};
if (json.has("searchInclude")) {
JsonArray array = getJArray(json, "searchInclude");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSearchInclude().add(new StringType());
} else {;
res.getSearchInclude().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_searchInclude")) {
JsonArray array = getJArray(json, "_searchInclude");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSearchInclude().size())
res.getSearchInclude().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSearchInclude().get(i));
}
};
if (json.has("searchRevInclude")) {
JsonArray array = getJArray(json, "searchRevInclude");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSearchRevInclude().add(new StringType());
} else {;
res.getSearchRevInclude().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_searchRevInclude")) {
JsonArray array = getJArray(json, "_searchRevInclude");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSearchRevInclude().size())
res.getSearchRevInclude().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSearchRevInclude().get(i));
}
};
if (json.has("searchParam")) {
JsonArray array = getJArray(json, "searchParam");
for (int i = 0; i < array.size(); i++) {
res.getSearchParam().add(parseCapabilityStatementRestResourceSearchParamComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("operation")) {
JsonArray array = getJArray(json, "operation");
for (int i = 0; i < array.size(); i++) {
res.getOperation().add(parseCapabilityStatementRestResourceOperationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent();
parseCapabilityStatementResourceInteractionComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementResourceInteractionComponentProperties(JsonObject json, CapabilityStatement.ResourceInteractionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CapabilityStatement.TypeRestfulInteraction.NULL, new CapabilityStatement.TypeRestfulInteractionEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent parseCapabilityStatementRestResourceSearchParamComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent();
parseCapabilityStatementRestResourceSearchParamComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementRestResourceSearchParamComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("definition"))
res.setDefinitionElement(parseCanonical(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected CapabilityStatement.CapabilityStatementRestResourceOperationComponent parseCapabilityStatementRestResourceOperationComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestResourceOperationComponent res = new CapabilityStatement.CapabilityStatementRestResourceOperationComponent();
parseCapabilityStatementRestResourceOperationComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementRestResourceOperationComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementRestResourceOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("definition"))
res.setDefinitionElement(parseCanonical(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected CapabilityStatement.SystemInteractionComponent parseCapabilityStatementSystemInteractionComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent();
parseCapabilityStatementSystemInteractionComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementSystemInteractionComponentProperties(JsonObject json, CapabilityStatement.SystemInteractionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CapabilityStatement.SystemRestfulInteraction.NULL, new CapabilityStatement.SystemRestfulInteractionEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected CapabilityStatement.CapabilityStatementMessagingComponent parseCapabilityStatementMessagingComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent();
parseCapabilityStatementMessagingComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementMessagingComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementMessagingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseCapabilityStatementMessagingEndpointComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reliableCache"))
res.setReliableCacheElement(parseUnsignedInt(json.get("reliableCache").getAsString()));
if (json.has("_reliableCache"))
parseElementProperties(getJObject(json, "_reliableCache"), res.getReliableCacheElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("supportedMessage")) {
JsonArray array = getJArray(json, "supportedMessage");
for (int i = 0; i < array.size(); i++) {
res.getSupportedMessage().add(parseCapabilityStatementMessagingSupportedMessageComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementMessagingEndpointComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent();
parseCapabilityStatementMessagingEndpointComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementMessagingEndpointComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementMessagingEndpointComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("protocol"))
res.setProtocol(parseCoding(getJObject(json, "protocol")));
if (json.has("address"))
res.setAddressElement(parseUrl(json.get("address").getAsString()));
if (json.has("_address"))
parseElementProperties(getJObject(json, "_address"), res.getAddressElement());
}
protected CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent parseCapabilityStatementMessagingSupportedMessageComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent();
parseCapabilityStatementMessagingSupportedMessageComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementMessagingSupportedMessageComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("definition"))
res.setDefinitionElement(parseCanonical(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
}
protected CapabilityStatement.CapabilityStatementDocumentComponent parseCapabilityStatementDocumentComponent(JsonObject json) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent();
parseCapabilityStatementDocumentComponentProperties(json, res);
return res;
}
protected void parseCapabilityStatementDocumentComponentProperties(JsonObject json, CapabilityStatement.CapabilityStatementDocumentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.DocumentMode.NULL, new CapabilityStatement.DocumentModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
}
protected CarePlan parseCarePlan(JsonObject json) throws IOException, FHIRFormatError {
CarePlan res = new CarePlan();
parseCarePlanProperties(json, res);
return res;
}
protected void parseCarePlanProperties(JsonObject json, CarePlan res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.RequestStatus.NULL, new Enumerations.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), CarePlan.CarePlanIntent.NULL, new CarePlan.CarePlanIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
if (json.has("contributor")) {
JsonArray array = getJArray(json, "contributor");
for (int i = 0; i < array.size(); i++) {
res.getContributor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("careTeam")) {
JsonArray array = getJArray(json, "careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("addresses")) {
JsonArray array = getJArray(json, "addresses");
for (int i = 0; i < array.size(); i++) {
res.getAddresses().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("goal")) {
JsonArray array = getJArray(json, "goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("activity")) {
JsonArray array = getJArray(json, "activity");
for (int i = 0; i < array.size(); i++) {
res.getActivity().add(parseCarePlanActivityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected CarePlan.CarePlanActivityComponent parseCarePlanActivityComponent(JsonObject json) throws IOException, FHIRFormatError {
CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent();
parseCarePlanActivityComponentProperties(json, res);
return res;
}
protected void parseCarePlanActivityComponentProperties(JsonObject json, CarePlan.CarePlanActivityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("performedActivity")) {
JsonArray array = getJArray(json, "performedActivity");
for (int i = 0; i < array.size(); i++) {
res.getPerformedActivity().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("progress")) {
JsonArray array = getJArray(json, "progress");
for (int i = 0; i < array.size(); i++) {
res.getProgress().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("plannedActivityReference"))
res.setPlannedActivityReference(parseReference(getJObject(json, "plannedActivityReference")));
}
protected CareTeam parseCareTeam(JsonObject json) throws IOException, FHIRFormatError {
CareTeam res = new CareTeam();
parseCareTeamProperties(json, res);
return res;
}
protected void parseCareTeamProperties(JsonObject json, CareTeam res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CareTeam.CareTeamStatus.NULL, new CareTeam.CareTeamStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseCareTeamParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("managingOrganization")) {
JsonArray array = getJArray(json, "managingOrganization");
for (int i = 0; i < array.size(); i++) {
res.getManagingOrganization().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected CareTeam.CareTeamParticipantComponent parseCareTeamParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent();
parseCareTeamParticipantComponentProperties(json, res);
return res;
}
protected void parseCareTeamParticipantComponentProperties(JsonObject json, CareTeam.CareTeamParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("member"))
res.setMember(parseReference(getJObject(json, "member")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
DataType coverage = parseType("coverage", json);
if (coverage != null)
res.setCoverage(coverage);
}
protected ChargeItem parseChargeItem(JsonObject json) throws IOException, FHIRFormatError {
ChargeItem res = new ChargeItem();
parseChargeItemProperties(json, res);
return res;
}
protected void parseChargeItemProperties(JsonObject json, ChargeItem res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("definitionUri")) {
JsonArray array = getJArray(json, "definitionUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDefinitionUri().add(new UriType());
} else {;
res.getDefinitionUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_definitionUri")) {
JsonArray array = getJArray(json, "_definitionUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDefinitionUri().size())
res.getDefinitionUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDefinitionUri().get(i));
}
};
if (json.has("definitionCanonical")) {
JsonArray array = getJArray(json, "definitionCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDefinitionCanonical().add(new CanonicalType());
} else {;
res.getDefinitionCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_definitionCanonical")) {
JsonArray array = getJArray(json, "_definitionCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDefinitionCanonical().size())
res.getDefinitionCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDefinitionCanonical().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ChargeItem.ChargeItemStatus.NULL, new ChargeItem.ChargeItemStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseChargeItemPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performingOrganization"))
res.setPerformingOrganization(parseReference(getJObject(json, "performingOrganization")));
if (json.has("requestingOrganization"))
res.setRequestingOrganization(parseReference(getJObject(json, "requestingOrganization")));
if (json.has("costCenter"))
res.setCostCenter(parseReference(getJObject(json, "costCenter")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("bodysite")) {
JsonArray array = getJArray(json, "bodysite");
for (int i = 0; i < array.size(); i++) {
res.getBodysite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("unitPriceComponent"))
res.setUnitPriceComponent(parseMonetaryComponent(getJObject(json, "unitPriceComponent")));
if (json.has("totalPriceComponent"))
res.setTotalPriceComponent(parseMonetaryComponent(getJObject(json, "totalPriceComponent")));
if (json.has("overrideReason"))
res.setOverrideReason(parseCodeableConcept(getJObject(json, "overrideReason")));
if (json.has("enterer"))
res.setEnterer(parseReference(getJObject(json, "enterer")));
if (json.has("enteredDate"))
res.setEnteredDateElement(parseDateTime(json.get("enteredDate").getAsString()));
if (json.has("_enteredDate"))
parseElementProperties(getJObject(json, "_enteredDate"), res.getEnteredDateElement());
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("service")) {
JsonArray array = getJArray(json, "service");
for (int i = 0; i < array.size(); i++) {
res.getService().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("product")) {
JsonArray array = getJArray(json, "product");
for (int i = 0; i < array.size(); i++) {
res.getProduct().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("account")) {
JsonArray array = getJArray(json, "account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ChargeItem.ChargeItemPerformerComponent parseChargeItemPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
ChargeItem.ChargeItemPerformerComponent res = new ChargeItem.ChargeItemPerformerComponent();
parseChargeItemPerformerComponentProperties(json, res);
return res;
}
protected void parseChargeItemPerformerComponentProperties(JsonObject json, ChargeItem.ChargeItemPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected ChargeItemDefinition parseChargeItemDefinition(JsonObject json) throws IOException, FHIRFormatError {
ChargeItemDefinition res = new ChargeItemDefinition();
parseChargeItemDefinitionProperties(json, res);
return res;
}
protected void parseChargeItemDefinitionProperties(JsonObject json, ChargeItemDefinition res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("derivedFromUri")) {
JsonArray array = getJArray(json, "derivedFromUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFromUri().add(new UriType());
} else {;
res.getDerivedFromUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFromUri")) {
JsonArray array = getJArray(json, "_derivedFromUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFromUri().size())
res.getDerivedFromUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFromUri().get(i));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPartOf().add(new CanonicalType());
} else {;
res.getPartOf().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_partOf")) {
JsonArray array = getJArray(json, "_partOf");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPartOf().size())
res.getPartOf().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPartOf().get(i));
}
};
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReplaces().add(new CanonicalType());
} else {;
res.getReplaces().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_replaces")) {
JsonArray array = getJArray(json, "_replaces");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReplaces().size())
res.getReplaces().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReplaces().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("instance")) {
JsonArray array = getJArray(json, "instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("applicability")) {
JsonArray array = getJArray(json, "applicability");
for (int i = 0; i < array.size(); i++) {
res.getApplicability().add(parseChargeItemDefinitionApplicabilityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("propertyGroup")) {
JsonArray array = getJArray(json, "propertyGroup");
for (int i = 0; i < array.size(); i++) {
res.getPropertyGroup().add(parseChargeItemDefinitionPropertyGroupComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent parseChargeItemDefinitionApplicabilityComponent(JsonObject json) throws IOException, FHIRFormatError {
ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent res = new ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent();
parseChargeItemDefinitionApplicabilityComponentProperties(json, res);
return res;
}
protected void parseChargeItemDefinitionApplicabilityComponentProperties(JsonObject json, ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("condition"))
res.setCondition(parseExpression(getJObject(json, "condition")));
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("relatedArtifact"))
res.setRelatedArtifact(parseRelatedArtifact(getJObject(json, "relatedArtifact")));
}
protected ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent parseChargeItemDefinitionPropertyGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent res = new ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent();
parseChargeItemDefinitionPropertyGroupComponentProperties(json, res);
return res;
}
protected void parseChargeItemDefinitionPropertyGroupComponentProperties(JsonObject json, ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("applicability")) {
JsonArray array = getJArray(json, "applicability");
for (int i = 0; i < array.size(); i++) {
res.getApplicability().add(parseChargeItemDefinitionApplicabilityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priceComponent")) {
JsonArray array = getJArray(json, "priceComponent");
for (int i = 0; i < array.size(); i++) {
res.getPriceComponent().add(parseMonetaryComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Citation parseCitation(JsonObject json) throws IOException, FHIRFormatError {
Citation res = new Citation();
parseCitationProperties(json, res);
return res;
}
protected void parseCitationProperties(JsonObject json, Citation res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("summary")) {
JsonArray array = getJArray(json, "summary");
for (int i = 0; i < array.size(); i++) {
res.getSummary().add(parseCitationSummaryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("classification")) {
JsonArray array = getJArray(json, "classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCitationClassificationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("currentState")) {
JsonArray array = getJArray(json, "currentState");
for (int i = 0; i < array.size(); i++) {
res.getCurrentState().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("statusDate")) {
JsonArray array = getJArray(json, "statusDate");
for (int i = 0; i < array.size(); i++) {
res.getStatusDate().add(parseCitationStatusDateComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("citedArtifact"))
res.setCitedArtifact(parseCitationCitedArtifactComponent(getJObject(json, "citedArtifact")));
}
protected Citation.CitationSummaryComponent parseCitationSummaryComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationSummaryComponent res = new Citation.CitationSummaryComponent();
parseCitationSummaryComponentProperties(json, res);
return res;
}
protected void parseCitationSummaryComponentProperties(JsonObject json, Citation.CitationSummaryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("style"))
res.setStyle(parseCodeableConcept(getJObject(json, "style")));
if (json.has("text"))
res.setTextElement(parseMarkdown(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Citation.CitationClassificationComponent parseCitationClassificationComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationClassificationComponent res = new Citation.CitationClassificationComponent();
parseCitationClassificationComponentProperties(json, res);
return res;
}
protected void parseCitationClassificationComponentProperties(JsonObject json, Citation.CitationClassificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Citation.CitationStatusDateComponent parseCitationStatusDateComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationStatusDateComponent res = new Citation.CitationStatusDateComponent();
parseCitationStatusDateComponentProperties(json, res);
return res;
}
protected void parseCitationStatusDateComponentProperties(JsonObject json, Citation.CitationStatusDateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("activity"))
res.setActivity(parseCodeableConcept(getJObject(json, "activity")));
if (json.has("actual"))
res.setActualElement(parseBoolean(json.get("actual").getAsBoolean()));
if (json.has("_actual"))
parseElementProperties(getJObject(json, "_actual"), res.getActualElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Citation.CitationCitedArtifactComponent parseCitationCitedArtifactComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactComponent res = new Citation.CitationCitedArtifactComponent();
parseCitationCitedArtifactComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactComponentProperties(JsonObject json, Citation.CitationCitedArtifactComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedIdentifier")) {
JsonArray array = getJArray(json, "relatedIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getRelatedIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dateAccessed"))
res.setDateAccessedElement(parseDateTime(json.get("dateAccessed").getAsString()));
if (json.has("_dateAccessed"))
parseElementProperties(getJObject(json, "_dateAccessed"), res.getDateAccessedElement());
if (json.has("version"))
res.setVersion(parseCitationCitedArtifactVersionComponent(getJObject(json, "version")));
if (json.has("currentState")) {
JsonArray array = getJArray(json, "currentState");
for (int i = 0; i < array.size(); i++) {
res.getCurrentState().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("statusDate")) {
JsonArray array = getJArray(json, "statusDate");
for (int i = 0; i < array.size(); i++) {
res.getStatusDate().add(parseCitationCitedArtifactStatusDateComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("title")) {
JsonArray array = getJArray(json, "title");
for (int i = 0; i < array.size(); i++) {
res.getTitle().add(parseCitationCitedArtifactTitleComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("abstract")) {
JsonArray array = getJArray(json, "abstract");
for (int i = 0; i < array.size(); i++) {
res.getAbstract().add(parseCitationCitedArtifactAbstractComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("part"))
res.setPart(parseCitationCitedArtifactPartComponent(getJObject(json, "part")));
if (json.has("relatesTo")) {
JsonArray array = getJArray(json, "relatesTo");
for (int i = 0; i < array.size(); i++) {
res.getRelatesTo().add(parseCitationCitedArtifactRelatesToComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("publicationForm")) {
JsonArray array = getJArray(json, "publicationForm");
for (int i = 0; i < array.size(); i++) {
res.getPublicationForm().add(parseCitationCitedArtifactPublicationFormComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("webLocation")) {
JsonArray array = getJArray(json, "webLocation");
for (int i = 0; i < array.size(); i++) {
res.getWebLocation().add(parseCitationCitedArtifactWebLocationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("classification")) {
JsonArray array = getJArray(json, "classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCitationCitedArtifactClassificationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contributorship"))
res.setContributorship(parseCitationCitedArtifactContributorshipComponent(getJObject(json, "contributorship")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Citation.CitationCitedArtifactVersionComponent parseCitationCitedArtifactVersionComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactVersionComponent res = new Citation.CitationCitedArtifactVersionComponent();
parseCitationCitedArtifactVersionComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactVersionComponentProperties(JsonObject json, Citation.CitationCitedArtifactVersionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("baseCitation"))
res.setBaseCitation(parseReference(getJObject(json, "baseCitation")));
}
protected Citation.CitationCitedArtifactStatusDateComponent parseCitationCitedArtifactStatusDateComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactStatusDateComponent res = new Citation.CitationCitedArtifactStatusDateComponent();
parseCitationCitedArtifactStatusDateComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactStatusDateComponentProperties(JsonObject json, Citation.CitationCitedArtifactStatusDateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("activity"))
res.setActivity(parseCodeableConcept(getJObject(json, "activity")));
if (json.has("actual"))
res.setActualElement(parseBoolean(json.get("actual").getAsBoolean()));
if (json.has("_actual"))
parseElementProperties(getJObject(json, "_actual"), res.getActualElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Citation.CitationCitedArtifactTitleComponent parseCitationCitedArtifactTitleComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactTitleComponent res = new Citation.CitationCitedArtifactTitleComponent();
parseCitationCitedArtifactTitleComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactTitleComponentProperties(JsonObject json, Citation.CitationCitedArtifactTitleComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
if (json.has("text"))
res.setTextElement(parseMarkdown(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Citation.CitationCitedArtifactAbstractComponent parseCitationCitedArtifactAbstractComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactAbstractComponent res = new Citation.CitationCitedArtifactAbstractComponent();
parseCitationCitedArtifactAbstractComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactAbstractComponentProperties(JsonObject json, Citation.CitationCitedArtifactAbstractComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
if (json.has("text"))
res.setTextElement(parseMarkdown(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
}
protected Citation.CitationCitedArtifactPartComponent parseCitationCitedArtifactPartComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactPartComponent res = new Citation.CitationCitedArtifactPartComponent();
parseCitationCitedArtifactPartComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactPartComponentProperties(JsonObject json, Citation.CitationCitedArtifactPartComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("baseCitation"))
res.setBaseCitation(parseReference(getJObject(json, "baseCitation")));
}
protected Citation.CitationCitedArtifactRelatesToComponent parseCitationCitedArtifactRelatesToComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactRelatesToComponent res = new Citation.CitationCitedArtifactRelatesToComponent();
parseCitationCitedArtifactRelatesToComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactRelatesToComponentProperties(JsonObject json, Citation.CitationCitedArtifactRelatesToComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Citation.RelatedArtifactTypeExpanded.NULL, new Citation.RelatedArtifactTypeExpandedEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("citation"))
res.setCitationElement(parseMarkdown(json.get("citation").getAsString()));
if (json.has("_citation"))
parseElementProperties(getJObject(json, "_citation"), res.getCitationElement());
if (json.has("document"))
res.setDocument(parseAttachment(getJObject(json, "document")));
if (json.has("resource"))
res.setResourceElement(parseCanonical(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("resourceReference"))
res.setResourceReference(parseReference(getJObject(json, "resourceReference")));
}
protected Citation.CitationCitedArtifactPublicationFormComponent parseCitationCitedArtifactPublicationFormComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactPublicationFormComponent res = new Citation.CitationCitedArtifactPublicationFormComponent();
parseCitationCitedArtifactPublicationFormComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactPublicationFormComponentProperties(JsonObject json, Citation.CitationCitedArtifactPublicationFormComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("publishedIn"))
res.setPublishedIn(parseCitationCitedArtifactPublicationFormPublishedInComponent(getJObject(json, "publishedIn")));
if (json.has("citedMedium"))
res.setCitedMedium(parseCodeableConcept(getJObject(json, "citedMedium")));
if (json.has("volume"))
res.setVolumeElement(parseString(json.get("volume").getAsString()));
if (json.has("_volume"))
parseElementProperties(getJObject(json, "_volume"), res.getVolumeElement());
if (json.has("issue"))
res.setIssueElement(parseString(json.get("issue").getAsString()));
if (json.has("_issue"))
parseElementProperties(getJObject(json, "_issue"), res.getIssueElement());
if (json.has("articleDate"))
res.setArticleDateElement(parseDateTime(json.get("articleDate").getAsString()));
if (json.has("_articleDate"))
parseElementProperties(getJObject(json, "_articleDate"), res.getArticleDateElement());
if (json.has("publicationDateText"))
res.setPublicationDateTextElement(parseString(json.get("publicationDateText").getAsString()));
if (json.has("_publicationDateText"))
parseElementProperties(getJObject(json, "_publicationDateText"), res.getPublicationDateTextElement());
if (json.has("publicationDateSeason"))
res.setPublicationDateSeasonElement(parseString(json.get("publicationDateSeason").getAsString()));
if (json.has("_publicationDateSeason"))
parseElementProperties(getJObject(json, "_publicationDateSeason"), res.getPublicationDateSeasonElement());
if (json.has("lastRevisionDate"))
res.setLastRevisionDateElement(parseDateTime(json.get("lastRevisionDate").getAsString()));
if (json.has("_lastRevisionDate"))
parseElementProperties(getJObject(json, "_lastRevisionDate"), res.getLastRevisionDateElement());
if (json.has("language")) {
JsonArray array = getJArray(json, "language");
for (int i = 0; i < array.size(); i++) {
res.getLanguage().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("accessionNumber"))
res.setAccessionNumberElement(parseString(json.get("accessionNumber").getAsString()));
if (json.has("_accessionNumber"))
parseElementProperties(getJObject(json, "_accessionNumber"), res.getAccessionNumberElement());
if (json.has("pageString"))
res.setPageStringElement(parseString(json.get("pageString").getAsString()));
if (json.has("_pageString"))
parseElementProperties(getJObject(json, "_pageString"), res.getPageStringElement());
if (json.has("firstPage"))
res.setFirstPageElement(parseString(json.get("firstPage").getAsString()));
if (json.has("_firstPage"))
parseElementProperties(getJObject(json, "_firstPage"), res.getFirstPageElement());
if (json.has("lastPage"))
res.setLastPageElement(parseString(json.get("lastPage").getAsString()));
if (json.has("_lastPage"))
parseElementProperties(getJObject(json, "_lastPage"), res.getLastPageElement());
if (json.has("pageCount"))
res.setPageCountElement(parseString(json.get("pageCount").getAsString()));
if (json.has("_pageCount"))
parseElementProperties(getJObject(json, "_pageCount"), res.getPageCountElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
}
protected Citation.CitationCitedArtifactPublicationFormPublishedInComponent parseCitationCitedArtifactPublicationFormPublishedInComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactPublicationFormPublishedInComponent res = new Citation.CitationCitedArtifactPublicationFormPublishedInComponent();
parseCitationCitedArtifactPublicationFormPublishedInComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactPublicationFormPublishedInComponentProperties(JsonObject json, Citation.CitationCitedArtifactPublicationFormPublishedInComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("publisher"))
res.setPublisher(parseReference(getJObject(json, "publisher")));
if (json.has("publisherLocation"))
res.setPublisherLocationElement(parseString(json.get("publisherLocation").getAsString()));
if (json.has("_publisherLocation"))
parseElementProperties(getJObject(json, "_publisherLocation"), res.getPublisherLocationElement());
}
protected Citation.CitationCitedArtifactWebLocationComponent parseCitationCitedArtifactWebLocationComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactWebLocationComponent res = new Citation.CitationCitedArtifactWebLocationComponent();
parseCitationCitedArtifactWebLocationComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactWebLocationComponentProperties(JsonObject json, Citation.CitationCitedArtifactWebLocationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected Citation.CitationCitedArtifactClassificationComponent parseCitationCitedArtifactClassificationComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactClassificationComponent res = new Citation.CitationCitedArtifactClassificationComponent();
parseCitationCitedArtifactClassificationComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactClassificationComponentProperties(JsonObject json, Citation.CitationCitedArtifactClassificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("artifactAssessment")) {
JsonArray array = getJArray(json, "artifactAssessment");
for (int i = 0; i < array.size(); i++) {
res.getArtifactAssessment().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Citation.CitationCitedArtifactContributorshipComponent parseCitationCitedArtifactContributorshipComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactContributorshipComponent res = new Citation.CitationCitedArtifactContributorshipComponent();
parseCitationCitedArtifactContributorshipComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactContributorshipComponentProperties(JsonObject json, Citation.CitationCitedArtifactContributorshipComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("complete"))
res.setCompleteElement(parseBoolean(json.get("complete").getAsBoolean()));
if (json.has("_complete"))
parseElementProperties(getJObject(json, "_complete"), res.getCompleteElement());
if (json.has("entry")) {
JsonArray array = getJArray(json, "entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseCitationCitedArtifactContributorshipEntryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("summary")) {
JsonArray array = getJArray(json, "summary");
for (int i = 0; i < array.size(); i++) {
res.getSummary().add(parseCitationContributorshipSummaryComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Citation.CitationCitedArtifactContributorshipEntryComponent parseCitationCitedArtifactContributorshipEntryComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactContributorshipEntryComponent res = new Citation.CitationCitedArtifactContributorshipEntryComponent();
parseCitationCitedArtifactContributorshipEntryComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactContributorshipEntryComponentProperties(JsonObject json, Citation.CitationCitedArtifactContributorshipEntryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("contributor"))
res.setContributor(parseReference(getJObject(json, "contributor")));
if (json.has("forenameInitials"))
res.setForenameInitialsElement(parseString(json.get("forenameInitials").getAsString()));
if (json.has("_forenameInitials"))
parseElementProperties(getJObject(json, "_forenameInitials"), res.getForenameInitialsElement());
if (json.has("affiliation")) {
JsonArray array = getJArray(json, "affiliation");
for (int i = 0; i < array.size(); i++) {
res.getAffiliation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contributionType")) {
JsonArray array = getJArray(json, "contributionType");
for (int i = 0; i < array.size(); i++) {
res.getContributionType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("contributionInstance")) {
JsonArray array = getJArray(json, "contributionInstance");
for (int i = 0; i < array.size(); i++) {
res.getContributionInstance().add(parseCitationCitedArtifactContributorshipEntryContributionInstanceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("correspondingContact"))
res.setCorrespondingContactElement(parseBoolean(json.get("correspondingContact").getAsBoolean()));
if (json.has("_correspondingContact"))
parseElementProperties(getJObject(json, "_correspondingContact"), res.getCorrespondingContactElement());
if (json.has("rankingOrder"))
res.setRankingOrderElement(parsePositiveInt(json.get("rankingOrder").getAsString()));
if (json.has("_rankingOrder"))
parseElementProperties(getJObject(json, "_rankingOrder"), res.getRankingOrderElement());
}
protected Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent parseCitationCitedArtifactContributorshipEntryContributionInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent res = new Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent();
parseCitationCitedArtifactContributorshipEntryContributionInstanceComponentProperties(json, res);
return res;
}
protected void parseCitationCitedArtifactContributorshipEntryContributionInstanceComponentProperties(JsonObject json, Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("time"))
res.setTimeElement(parseDateTime(json.get("time").getAsString()));
if (json.has("_time"))
parseElementProperties(getJObject(json, "_time"), res.getTimeElement());
}
protected Citation.ContributorshipSummaryComponent parseCitationContributorshipSummaryComponent(JsonObject json) throws IOException, FHIRFormatError {
Citation.ContributorshipSummaryComponent res = new Citation.ContributorshipSummaryComponent();
parseCitationContributorshipSummaryComponentProperties(json, res);
return res;
}
protected void parseCitationContributorshipSummaryComponentProperties(JsonObject json, Citation.ContributorshipSummaryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("style"))
res.setStyle(parseCodeableConcept(getJObject(json, "style")));
if (json.has("source"))
res.setSource(parseCodeableConcept(getJObject(json, "source")));
if (json.has("value"))
res.setValueElement(parseMarkdown(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected Claim parseClaim(JsonObject json) throws IOException, FHIRFormatError {
Claim res = new Claim();
parseClaimProperties(json, res);
return res;
}
protected void parseClaimProperties(JsonObject json, Claim res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subType"))
res.setSubType(parseCodeableConcept(getJObject(json, "subType")));
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Enumerations.Use.NULL, new Enumerations.UseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("billablePeriod"))
res.setBillablePeriod(parsePeriod(getJObject(json, "billablePeriod")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("enterer"))
res.setEnterer(parseReference(getJObject(json, "enterer")));
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("fundsReserve"))
res.setFundsReserve(parseCodeableConcept(getJObject(json, "fundsReserve")));
if (json.has("related")) {
JsonArray array = getJArray(json, "related");
for (int i = 0; i < array.size(); i++) {
res.getRelated().add(parseClaimRelatedClaimComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("prescription"))
res.setPrescription(parseReference(getJObject(json, "prescription")));
if (json.has("originalPrescription"))
res.setOriginalPrescription(parseReference(getJObject(json, "originalPrescription")));
if (json.has("payee"))
res.setPayee(parseClaimPayeeComponent(getJObject(json, "payee")));
if (json.has("referral"))
res.setReferral(parseReference(getJObject(json, "referral")));
if (json.has("encounter")) {
JsonArray array = getJArray(json, "encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("facility"))
res.setFacility(parseReference(getJObject(json, "facility")));
if (json.has("diagnosisRelatedGroup"))
res.setDiagnosisRelatedGroup(parseCodeableConcept(getJObject(json, "diagnosisRelatedGroup")));
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseClaimEventComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("careTeam")) {
JsonArray array = getJArray(json, "careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseClaimCareTeamComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseClaimSupportingInformationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosis")) {
JsonArray array = getJArray(json, "diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseClaimDiagnosisComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("procedure")) {
JsonArray array = getJArray(json, "procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseClaimProcedureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseClaimInsuranceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("accident"))
res.setAccident(parseClaimAccidentComponent(getJObject(json, "accident")));
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseClaimItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("total"))
res.setTotal(parseMoney(getJObject(json, "total")));
}
protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent();
parseClaimRelatedClaimComponentProperties(json, res);
return res;
}
protected void parseClaimRelatedClaimComponentProperties(JsonObject json, Claim.RelatedClaimComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("claim"))
res.setClaim(parseReference(getJObject(json, "claim")));
if (json.has("relationship"))
res.setRelationship(parseCodeableConcept(getJObject(json, "relationship")));
if (json.has("reference"))
res.setReference(parseIdentifier(getJObject(json, "reference")));
}
protected Claim.PayeeComponent parseClaimPayeeComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.PayeeComponent res = new Claim.PayeeComponent();
parseClaimPayeeComponentProperties(json, res);
return res;
}
protected void parseClaimPayeeComponentProperties(JsonObject json, Claim.PayeeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
}
protected Claim.ClaimEventComponent parseClaimEventComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.ClaimEventComponent res = new Claim.ClaimEventComponent();
parseClaimEventComponentProperties(json, res);
return res;
}
protected void parseClaimEventComponentProperties(JsonObject json, Claim.ClaimEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType when = parseType("when", json);
if (when != null)
res.setWhen(when);
}
protected Claim.CareTeamComponent parseClaimCareTeamComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.CareTeamComponent res = new Claim.CareTeamComponent();
parseClaimCareTeamComponentProperties(json, res);
return res;
}
protected void parseClaimCareTeamComponentProperties(JsonObject json, Claim.CareTeamComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("responsible"))
res.setResponsibleElement(parseBoolean(json.get("responsible").getAsBoolean()));
if (json.has("_responsible"))
parseElementProperties(getJObject(json, "_responsible"), res.getResponsibleElement());
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("specialty"))
res.setSpecialty(parseCodeableConcept(getJObject(json, "specialty")));
}
protected Claim.SupportingInformationComponent parseClaimSupportingInformationComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.SupportingInformationComponent res = new Claim.SupportingInformationComponent();
parseClaimSupportingInformationComponentProperties(json, res);
return res;
}
protected void parseClaimSupportingInformationComponentProperties(JsonObject json, Claim.SupportingInformationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
}
protected Claim.DiagnosisComponent parseClaimDiagnosisComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.DiagnosisComponent res = new Claim.DiagnosisComponent();
parseClaimDiagnosisComponentProperties(json, res);
return res;
}
protected void parseClaimDiagnosisComponentProperties(JsonObject json, Claim.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
DataType diagnosis = parseType("diagnosis", json);
if (diagnosis != null)
res.setDiagnosis(diagnosis);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("onAdmission"))
res.setOnAdmission(parseCodeableConcept(getJObject(json, "onAdmission")));
}
protected Claim.ProcedureComponent parseClaimProcedureComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.ProcedureComponent res = new Claim.ProcedureComponent();
parseClaimProcedureComponentProperties(json, res);
return res;
}
protected void parseClaimProcedureComponentProperties(JsonObject json, Claim.ProcedureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
DataType procedure = parseType("procedure", json);
if (procedure != null)
res.setProcedure(procedure);
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Claim.InsuranceComponent parseClaimInsuranceComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.InsuranceComponent res = new Claim.InsuranceComponent();
parseClaimInsuranceComponentProperties(json, res);
return res;
}
protected void parseClaimInsuranceComponentProperties(JsonObject json, Claim.InsuranceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("focal"))
res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean()));
if (json.has("_focal"))
parseElementProperties(getJObject(json, "_focal"), res.getFocalElement());
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
if (json.has("businessArrangement"))
res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString()));
if (json.has("_businessArrangement"))
parseElementProperties(getJObject(json, "_businessArrangement"), res.getBusinessArrangementElement());
if (json.has("preAuthRef")) {
JsonArray array = getJArray(json, "preAuthRef");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPreAuthRef().add(new StringType());
} else {;
res.getPreAuthRef().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_preAuthRef")) {
JsonArray array = getJArray(json, "_preAuthRef");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPreAuthRef().size())
res.getPreAuthRef().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPreAuthRef().get(i));
}
};
if (json.has("claimResponse"))
res.setClaimResponse(parseReference(getJObject(json, "claimResponse")));
}
protected Claim.AccidentComponent parseClaimAccidentComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.AccidentComponent res = new Claim.AccidentComponent();
parseClaimAccidentComponentProperties(json, res);
return res;
}
protected void parseClaimAccidentComponentProperties(JsonObject json, Claim.AccidentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType location = parseType("location", json);
if (location != null)
res.setLocation(location);
}
protected Claim.ItemComponent parseClaimItemComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.ItemComponent res = new Claim.ItemComponent();
parseClaimItemComponentProperties(json, res);
return res;
}
protected void parseClaimItemComponentProperties(JsonObject json, Claim.ItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("careTeamSequence")) {
JsonArray array = getJArray(json, "careTeamSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCareTeamSequence().add(new PositiveIntType());
} else {;
res.getCareTeamSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_careTeamSequence")) {
JsonArray array = getJArray(json, "_careTeamSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCareTeamSequence().size())
res.getCareTeamSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCareTeamSequence().get(i));
}
};
if (json.has("diagnosisSequence")) {
JsonArray array = getJArray(json, "diagnosisSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDiagnosisSequence().add(new PositiveIntType());
} else {;
res.getDiagnosisSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_diagnosisSequence")) {
JsonArray array = getJArray(json, "_diagnosisSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDiagnosisSequence().size())
res.getDiagnosisSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDiagnosisSequence().get(i));
}
};
if (json.has("procedureSequence")) {
JsonArray array = getJArray(json, "procedureSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProcedureSequence().add(new PositiveIntType());
} else {;
res.getProcedureSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_procedureSequence")) {
JsonArray array = getJArray(json, "_procedureSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProcedureSequence().size())
res.getProcedureSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProcedureSequence().get(i));
}
};
if (json.has("informationSequence")) {
JsonArray array = getJArray(json, "informationSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInformationSequence().add(new PositiveIntType());
} else {;
res.getInformationSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_informationSequence")) {
JsonArray array = getJArray(json, "_informationSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInformationSequence().size())
res.getInformationSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInformationSequence().get(i));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("request")) {
JsonArray array = getJArray(json, "request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
DataType location = parseType("location", json);
if (location != null)
res.setLocation(location);
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseClaimBodySiteComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter")) {
JsonArray array = getJArray(json, "encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseClaimDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Claim.BodySiteComponent parseClaimBodySiteComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.BodySiteComponent res = new Claim.BodySiteComponent();
parseClaimBodySiteComponentProperties(json, res);
return res;
}
protected void parseClaimBodySiteComponentProperties(JsonObject json, Claim.BodySiteComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("site")) {
JsonArray array = getJArray(json, "site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subSite")) {
JsonArray array = getJArray(json, "subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Claim.DetailComponent parseClaimDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.DetailComponent res = new Claim.DetailComponent();
parseClaimDetailComponentProperties(json, res);
return res;
}
protected void parseClaimDetailComponentProperties(JsonObject json, Claim.DetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subDetail")) {
JsonArray array = getJArray(json, "subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseClaimSubDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Claim.SubDetailComponent parseClaimSubDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
Claim.SubDetailComponent res = new Claim.SubDetailComponent();
parseClaimSubDetailComponentProperties(json, res);
return res;
}
protected void parseClaimSubDetailComponentProperties(JsonObject json, Claim.SubDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse parseClaimResponse(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse res = new ClaimResponse();
parseClaimResponseProperties(json, res);
return res;
}
protected void parseClaimResponseProperties(JsonObject json, ClaimResponse res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subType"))
res.setSubType(parseCodeableConcept(getJObject(json, "subType")));
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Enumerations.Use.NULL, new Enumerations.UseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("requestor"))
res.setRequestor(parseReference(getJObject(json, "requestor")));
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("outcome"))
res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), Enumerations.ClaimProcessingCodes.NULL, new Enumerations.ClaimProcessingCodesEnumFactory()));
if (json.has("_outcome"))
parseElementProperties(getJObject(json, "_outcome"), res.getOutcomeElement());
if (json.has("decision"))
res.setDecision(parseCodeableConcept(getJObject(json, "decision")));
if (json.has("disposition"))
res.setDispositionElement(parseString(json.get("disposition").getAsString()));
if (json.has("_disposition"))
parseElementProperties(getJObject(json, "_disposition"), res.getDispositionElement());
if (json.has("preAuthRef"))
res.setPreAuthRefElement(parseString(json.get("preAuthRef").getAsString()));
if (json.has("_preAuthRef"))
parseElementProperties(getJObject(json, "_preAuthRef"), res.getPreAuthRefElement());
if (json.has("preAuthPeriod"))
res.setPreAuthPeriod(parsePeriod(getJObject(json, "preAuthPeriod")));
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseClaimResponseEventComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("payeeType"))
res.setPayeeType(parseCodeableConcept(getJObject(json, "payeeType")));
if (json.has("encounter")) {
JsonArray array = getJArray(json, "encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosisRelatedGroup"))
res.setDiagnosisRelatedGroup(parseCodeableConcept(getJObject(json, "diagnosisRelatedGroup")));
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseClaimResponseItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("addItem")) {
JsonArray array = getJArray(json, "addItem");
for (int i = 0; i < array.size(); i++) {
res.getAddItem().add(parseClaimResponseAddedItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("total")) {
JsonArray array = getJArray(json, "total");
for (int i = 0; i < array.size(); i++) {
res.getTotal().add(parseClaimResponseTotalComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("payment"))
res.setPayment(parseClaimResponsePaymentComponent(getJObject(json, "payment")));
if (json.has("fundsReserve"))
res.setFundsReserve(parseCodeableConcept(getJObject(json, "fundsReserve")));
if (json.has("formCode"))
res.setFormCode(parseCodeableConcept(getJObject(json, "formCode")));
if (json.has("form"))
res.setForm(parseAttachment(getJObject(json, "form")));
if (json.has("processNote")) {
JsonArray array = getJArray(json, "processNote");
for (int i = 0; i < array.size(); i++) {
res.getProcessNote().add(parseClaimResponseNoteComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communicationRequest")) {
JsonArray array = getJArray(json, "communicationRequest");
for (int i = 0; i < array.size(); i++) {
res.getCommunicationRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseClaimResponseInsuranceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("error")) {
JsonArray array = getJArray(json, "error");
for (int i = 0; i < array.size(); i++) {
res.getError().add(parseClaimResponseErrorComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.ClaimResponseEventComponent parseClaimResponseEventComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.ClaimResponseEventComponent res = new ClaimResponse.ClaimResponseEventComponent();
parseClaimResponseEventComponentProperties(json, res);
return res;
}
protected void parseClaimResponseEventComponentProperties(JsonObject json, ClaimResponse.ClaimResponseEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType when = parseType("when", json);
if (when != null)
res.setWhen(when);
}
protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent();
parseClaimResponseItemComponentProperties(json, res);
return res;
}
protected void parseClaimResponseItemComponentProperties(JsonObject json, ClaimResponse.ItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemSequence"))
res.setItemSequenceElement(parsePositiveInt(json.get("itemSequence").getAsString()));
if (json.has("_itemSequence"))
parseElementProperties(getJObject(json, "_itemSequence"), res.getItemSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseClaimResponseReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseClaimResponseItemDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.ReviewOutcomeComponent parseClaimResponseReviewOutcomeComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.ReviewOutcomeComponent res = new ClaimResponse.ReviewOutcomeComponent();
parseClaimResponseReviewOutcomeComponentProperties(json, res);
return res;
}
protected void parseClaimResponseReviewOutcomeComponentProperties(JsonObject json, ClaimResponse.ReviewOutcomeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("decision"))
res.setDecision(parseCodeableConcept(getJObject(json, "decision")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preAuthRef"))
res.setPreAuthRefElement(parseString(json.get("preAuthRef").getAsString()));
if (json.has("_preAuthRef"))
parseElementProperties(getJObject(json, "_preAuthRef"), res.getPreAuthRefElement());
if (json.has("preAuthPeriod"))
res.setPreAuthPeriod(parsePeriod(getJObject(json, "preAuthPeriod")));
}
protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent();
parseClaimResponseAdjudicationComponentProperties(json, res);
return res;
}
protected void parseClaimResponseAdjudicationComponentProperties(JsonObject json, ClaimResponse.AdjudicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
}
protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent();
parseClaimResponseItemDetailComponentProperties(json, res);
return res;
}
protected void parseClaimResponseItemDetailComponentProperties(JsonObject json, ClaimResponse.ItemDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("detailSequence"))
res.setDetailSequenceElement(parsePositiveInt(json.get("detailSequence").getAsString()));
if (json.has("_detailSequence"))
parseElementProperties(getJObject(json, "_detailSequence"), res.getDetailSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseClaimResponseReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subDetail")) {
JsonArray array = getJArray(json, "subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseClaimResponseSubDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent();
parseClaimResponseSubDetailComponentProperties(json, res);
return res;
}
protected void parseClaimResponseSubDetailComponentProperties(JsonObject json, ClaimResponse.SubDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("subDetailSequence"))
res.setSubDetailSequenceElement(parsePositiveInt(json.get("subDetailSequence").getAsString()));
if (json.has("_subDetailSequence"))
parseElementProperties(getJObject(json, "_subDetailSequence"), res.getSubDetailSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseClaimResponseReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent();
parseClaimResponseAddedItemComponentProperties(json, res);
return res;
}
protected void parseClaimResponseAddedItemComponentProperties(JsonObject json, ClaimResponse.AddedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemSequence")) {
JsonArray array = getJArray(json, "itemSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getItemSequence().add(new PositiveIntType());
} else {;
res.getItemSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_itemSequence")) {
JsonArray array = getJArray(json, "_itemSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getItemSequence().size())
res.getItemSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getItemSequence().get(i));
}
};
if (json.has("detailSequence")) {
JsonArray array = getJArray(json, "detailSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDetailSequence().add(new PositiveIntType());
} else {;
res.getDetailSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_detailSequence")) {
JsonArray array = getJArray(json, "_detailSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDetailSequence().size())
res.getDetailSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDetailSequence().get(i));
}
};
if (json.has("subdetailSequence")) {
JsonArray array = getJArray(json, "subdetailSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSubdetailSequence().add(new PositiveIntType());
} else {;
res.getSubdetailSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_subdetailSequence")) {
JsonArray array = getJArray(json, "_subdetailSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSubdetailSequence().size())
res.getSubdetailSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSubdetailSequence().get(i));
}
};
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("provider")) {
JsonArray array = getJArray(json, "provider");
for (int i = 0; i < array.size(); i++) {
res.getProvider().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("request")) {
JsonArray array = getJArray(json, "request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
DataType location = parseType("location", json);
if (location != null)
res.setLocation(location);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseClaimResponseBodySiteComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseClaimResponseReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseClaimResponseAddedItemDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.BodySiteComponent parseClaimResponseBodySiteComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.BodySiteComponent res = new ClaimResponse.BodySiteComponent();
parseClaimResponseBodySiteComponentProperties(json, res);
return res;
}
protected void parseClaimResponseBodySiteComponentProperties(JsonObject json, ClaimResponse.BodySiteComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("site")) {
JsonArray array = getJArray(json, "site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subSite")) {
JsonArray array = getJArray(json, "subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.AddedItemDetailComponent parseClaimResponseAddedItemDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.AddedItemDetailComponent res = new ClaimResponse.AddedItemDetailComponent();
parseClaimResponseAddedItemDetailComponentProperties(json, res);
return res;
}
protected void parseClaimResponseAddedItemDetailComponentProperties(JsonObject json, ClaimResponse.AddedItemDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseClaimResponseReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subDetail")) {
JsonArray array = getJArray(json, "subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseClaimResponseAddedItemSubDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.AddedItemSubDetailComponent parseClaimResponseAddedItemSubDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.AddedItemSubDetailComponent res = new ClaimResponse.AddedItemSubDetailComponent();
parseClaimResponseAddedItemSubDetailComponentProperties(json, res);
return res;
}
protected void parseClaimResponseAddedItemSubDetailComponentProperties(JsonObject json, ClaimResponse.AddedItemSubDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseClaimResponseReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClaimResponse.TotalComponent parseClaimResponseTotalComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.TotalComponent res = new ClaimResponse.TotalComponent();
parseClaimResponseTotalComponentProperties(json, res);
return res;
}
protected void parseClaimResponseTotalComponentProperties(JsonObject json, ClaimResponse.TotalComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
}
protected ClaimResponse.PaymentComponent parseClaimResponsePaymentComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent();
parseClaimResponsePaymentComponentProperties(json, res);
return res;
}
protected void parseClaimResponsePaymentComponentProperties(JsonObject json, ClaimResponse.PaymentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("adjustment"))
res.setAdjustment(parseMoney(getJObject(json, "adjustment")));
if (json.has("adjustmentReason"))
res.setAdjustmentReason(parseCodeableConcept(getJObject(json, "adjustmentReason")));
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
}
protected ClaimResponse.NoteComponent parseClaimResponseNoteComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent();
parseClaimResponseNoteComponentProperties(json, res);
return res;
}
protected void parseClaimResponseNoteComponentProperties(JsonObject json, ClaimResponse.NoteComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("number"))
res.setNumberElement(parsePositiveInt(json.get("number").getAsString()));
if (json.has("_number"))
parseElementProperties(getJObject(json, "_number"), res.getNumberElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
}
protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent();
parseClaimResponseInsuranceComponentProperties(json, res);
return res;
}
protected void parseClaimResponseInsuranceComponentProperties(JsonObject json, ClaimResponse.InsuranceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("focal"))
res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean()));
if (json.has("_focal"))
parseElementProperties(getJObject(json, "_focal"), res.getFocalElement());
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
if (json.has("businessArrangement"))
res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString()));
if (json.has("_businessArrangement"))
parseElementProperties(getJObject(json, "_businessArrangement"), res.getBusinessArrangementElement());
if (json.has("claimResponse"))
res.setClaimResponse(parseReference(getJObject(json, "claimResponse")));
}
protected ClaimResponse.ErrorComponent parseClaimResponseErrorComponent(JsonObject json) throws IOException, FHIRFormatError {
ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent();
parseClaimResponseErrorComponentProperties(json, res);
return res;
}
protected void parseClaimResponseErrorComponentProperties(JsonObject json, ClaimResponse.ErrorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemSequence"))
res.setItemSequenceElement(parsePositiveInt(json.get("itemSequence").getAsString()));
if (json.has("_itemSequence"))
parseElementProperties(getJObject(json, "_itemSequence"), res.getItemSequenceElement());
if (json.has("detailSequence"))
res.setDetailSequenceElement(parsePositiveInt(json.get("detailSequence").getAsString()));
if (json.has("_detailSequence"))
parseElementProperties(getJObject(json, "_detailSequence"), res.getDetailSequenceElement());
if (json.has("subDetailSequence"))
res.setSubDetailSequenceElement(parsePositiveInt(json.get("subDetailSequence").getAsString()));
if (json.has("_subDetailSequence"))
parseElementProperties(getJObject(json, "_subDetailSequence"), res.getSubDetailSequenceElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("expression")) {
JsonArray array = getJArray(json, "expression");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getExpression().add(new StringType());
} else {;
res.getExpression().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_expression")) {
JsonArray array = getJArray(json, "_expression");
for (int i = 0; i < array.size(); i++) {
if (i == res.getExpression().size())
res.getExpression().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getExpression().get(i));
}
};
}
protected ClinicalImpression parseClinicalImpression(JsonObject json) throws IOException, FHIRFormatError {
ClinicalImpression res = new ClinicalImpression();
parseClinicalImpressionProperties(json, res);
return res;
}
protected void parseClinicalImpressionProperties(JsonObject json, ClinicalImpression res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.EventStatus.NULL, new Enumerations.EventStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType effective = parseType("effective", json);
if (effective != null)
res.setEffective(effective);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
if (json.has("previous"))
res.setPrevious(parseReference(getJObject(json, "previous")));
if (json.has("problem")) {
JsonArray array = getJArray(json, "problem");
for (int i = 0; i < array.size(); i++) {
res.getProblem().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("changePattern"))
res.setChangePattern(parseCodeableConcept(getJObject(json, "changePattern")));
if (json.has("protocol")) {
JsonArray array = getJArray(json, "protocol");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProtocol().add(new UriType());
} else {;
res.getProtocol().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_protocol")) {
JsonArray array = getJArray(json, "_protocol");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProtocol().size())
res.getProtocol().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProtocol().get(i));
}
};
if (json.has("summary"))
res.setSummaryElement(parseString(json.get("summary").getAsString()));
if (json.has("_summary"))
parseElementProperties(getJObject(json, "_summary"), res.getSummaryElement());
if (json.has("finding")) {
JsonArray array = getJArray(json, "finding");
for (int i = 0; i < array.size(); i++) {
res.getFinding().add(parseClinicalImpressionFindingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("prognosisCodeableConcept")) {
JsonArray array = getJArray(json, "prognosisCodeableConcept");
for (int i = 0; i < array.size(); i++) {
res.getPrognosisCodeableConcept().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("prognosisReference")) {
JsonArray array = getJArray(json, "prognosisReference");
for (int i = 0; i < array.size(); i++) {
res.getPrognosisReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionFindingComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent();
parseClinicalImpressionFindingComponentProperties(json, res);
return res;
}
protected void parseClinicalImpressionFindingComponentProperties(JsonObject json, ClinicalImpression.ClinicalImpressionFindingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("basis"))
res.setBasisElement(parseString(json.get("basis").getAsString()));
if (json.has("_basis"))
parseElementProperties(getJObject(json, "_basis"), res.getBasisElement());
}
protected ClinicalUseDefinition parseClinicalUseDefinition(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition res = new ClinicalUseDefinition();
parseClinicalUseDefinitionProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionProperties(JsonObject json, ClinicalUseDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ClinicalUseDefinition.ClinicalUseDefinitionType.NULL, new ClinicalUseDefinition.ClinicalUseDefinitionTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("contraindication"))
res.setContraindication(parseClinicalUseDefinitionContraindicationComponent(getJObject(json, "contraindication")));
if (json.has("indication"))
res.setIndication(parseClinicalUseDefinitionIndicationComponent(getJObject(json, "indication")));
if (json.has("interaction"))
res.setInteraction(parseClinicalUseDefinitionInteractionComponent(getJObject(json, "interaction")));
if (json.has("population")) {
JsonArray array = getJArray(json, "population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("library")) {
JsonArray array = getJArray(json, "library");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLibrary().add(new CanonicalType());
} else {;
res.getLibrary().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_library")) {
JsonArray array = getJArray(json, "_library");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLibrary().size())
res.getLibrary().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLibrary().get(i));
}
};
if (json.has("undesirableEffect"))
res.setUndesirableEffect(parseClinicalUseDefinitionUndesirableEffectComponent(getJObject(json, "undesirableEffect")));
if (json.has("warning"))
res.setWarning(parseClinicalUseDefinitionWarningComponent(getJObject(json, "warning")));
}
protected ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent parseClinicalUseDefinitionContraindicationComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent();
parseClinicalUseDefinitionContraindicationComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionContraindicationComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("diseaseSymptomProcedure"))
res.setDiseaseSymptomProcedure(parseCodeableReference(getJObject(json, "diseaseSymptomProcedure")));
if (json.has("diseaseStatus"))
res.setDiseaseStatus(parseCodeableReference(getJObject(json, "diseaseStatus")));
if (json.has("comorbidity")) {
JsonArray array = getJArray(json, "comorbidity");
for (int i = 0; i < array.size(); i++) {
res.getComorbidity().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("indication")) {
JsonArray array = getJArray(json, "indication");
for (int i = 0; i < array.size(); i++) {
res.getIndication().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("applicability"))
res.setApplicability(parseExpression(getJObject(json, "applicability")));
if (json.has("otherTherapy")) {
JsonArray array = getJArray(json, "otherTherapy");
for (int i = 0; i < array.size(); i++) {
res.getOtherTherapy().add(parseClinicalUseDefinitionContraindicationOtherTherapyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent parseClinicalUseDefinitionContraindicationOtherTherapyComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent();
parseClinicalUseDefinitionContraindicationOtherTherapyComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionContraindicationOtherTherapyComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relationshipType"))
res.setRelationshipType(parseCodeableConcept(getJObject(json, "relationshipType")));
if (json.has("treatment"))
res.setTreatment(parseCodeableReference(getJObject(json, "treatment")));
}
protected ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent parseClinicalUseDefinitionIndicationComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent();
parseClinicalUseDefinitionIndicationComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionIndicationComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("diseaseSymptomProcedure"))
res.setDiseaseSymptomProcedure(parseCodeableReference(getJObject(json, "diseaseSymptomProcedure")));
if (json.has("diseaseStatus"))
res.setDiseaseStatus(parseCodeableReference(getJObject(json, "diseaseStatus")));
if (json.has("comorbidity")) {
JsonArray array = getJArray(json, "comorbidity");
for (int i = 0; i < array.size(); i++) {
res.getComorbidity().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("intendedEffect"))
res.setIntendedEffect(parseCodeableReference(getJObject(json, "intendedEffect")));
DataType duration = parseType("duration", json);
if (duration != null)
res.setDuration(duration);
if (json.has("undesirableEffect")) {
JsonArray array = getJArray(json, "undesirableEffect");
for (int i = 0; i < array.size(); i++) {
res.getUndesirableEffect().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("applicability"))
res.setApplicability(parseExpression(getJObject(json, "applicability")));
if (json.has("otherTherapy")) {
JsonArray array = getJArray(json, "otherTherapy");
for (int i = 0; i < array.size(); i++) {
res.getOtherTherapy().add(parseClinicalUseDefinitionContraindicationOtherTherapyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent parseClinicalUseDefinitionInteractionComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent();
parseClinicalUseDefinitionInteractionComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionInteractionComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("interactant")) {
JsonArray array = getJArray(json, "interactant");
for (int i = 0; i < array.size(); i++) {
res.getInteractant().add(parseClinicalUseDefinitionInteractionInteractantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("effect"))
res.setEffect(parseCodeableReference(getJObject(json, "effect")));
if (json.has("incidence"))
res.setIncidence(parseCodeableConcept(getJObject(json, "incidence")));
if (json.has("management")) {
JsonArray array = getJArray(json, "management");
for (int i = 0; i < array.size(); i++) {
res.getManagement().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent parseClinicalUseDefinitionInteractionInteractantComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent();
parseClinicalUseDefinitionInteractionInteractantComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionInteractionInteractantComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent parseClinicalUseDefinitionUndesirableEffectComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent();
parseClinicalUseDefinitionUndesirableEffectComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionUndesirableEffectComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("symptomConditionEffect"))
res.setSymptomConditionEffect(parseCodeableReference(getJObject(json, "symptomConditionEffect")));
if (json.has("classification"))
res.setClassification(parseCodeableConcept(getJObject(json, "classification")));
if (json.has("frequencyOfOccurrence"))
res.setFrequencyOfOccurrence(parseCodeableConcept(getJObject(json, "frequencyOfOccurrence")));
}
protected ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent parseClinicalUseDefinitionWarningComponent(JsonObject json) throws IOException, FHIRFormatError {
ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent res = new ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent();
parseClinicalUseDefinitionWarningComponentProperties(json, res);
return res;
}
protected void parseClinicalUseDefinitionWarningComponentProperties(JsonObject json, ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
protected CodeSystem parseCodeSystem(JsonObject json) throws IOException, FHIRFormatError {
CodeSystem res = new CodeSystem();
parseCodeSystemProperties(json, res);
return res;
}
protected void parseCodeSystemProperties(JsonObject json, CodeSystem res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("caseSensitive"))
res.setCaseSensitiveElement(parseBoolean(json.get("caseSensitive").getAsBoolean()));
if (json.has("_caseSensitive"))
parseElementProperties(getJObject(json, "_caseSensitive"), res.getCaseSensitiveElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("hierarchyMeaning"))
res.setHierarchyMeaningElement(parseEnumeration(json.get("hierarchyMeaning").getAsString(), CodeSystem.CodeSystemHierarchyMeaning.NULL, new CodeSystem.CodeSystemHierarchyMeaningEnumFactory()));
if (json.has("_hierarchyMeaning"))
parseElementProperties(getJObject(json, "_hierarchyMeaning"), res.getHierarchyMeaningElement());
if (json.has("compositional"))
res.setCompositionalElement(parseBoolean(json.get("compositional").getAsBoolean()));
if (json.has("_compositional"))
parseElementProperties(getJObject(json, "_compositional"), res.getCompositionalElement());
if (json.has("versionNeeded"))
res.setVersionNeededElement(parseBoolean(json.get("versionNeeded").getAsBoolean()));
if (json.has("_versionNeeded"))
parseElementProperties(getJObject(json, "_versionNeeded"), res.getVersionNeededElement());
if (json.has("content"))
res.setContentElement(parseEnumeration(json.get("content").getAsString(), Enumerations.CodeSystemContentMode.NULL, new Enumerations.CodeSystemContentModeEnumFactory()));
if (json.has("_content"))
parseElementProperties(getJObject(json, "_content"), res.getContentElement());
if (json.has("supplements"))
res.setSupplementsElement(parseCanonical(json.get("supplements").getAsString()));
if (json.has("_supplements"))
parseElementProperties(getJObject(json, "_supplements"), res.getSupplementsElement());
if (json.has("count"))
res.setCountElement(parseUnsignedInt(json.get("count").getAsString()));
if (json.has("_count"))
parseElementProperties(getJObject(json, "_count"), res.getCountElement());
if (json.has("filter")) {
JsonArray array = getJArray(json, "filter");
for (int i = 0; i < array.size(); i++) {
res.getFilter().add(parseCodeSystemFilterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseCodeSystemPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("concept")) {
JsonArray array = getJArray(json, "concept");
for (int i = 0; i < array.size(); i++) {
res.getConcept().add(parseCodeSystemConceptDefinitionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CodeSystem.CodeSystemFilterComponent parseCodeSystemFilterComponent(JsonObject json) throws IOException, FHIRFormatError {
CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent();
parseCodeSystemFilterComponentProperties(json, res);
return res;
}
protected void parseCodeSystemFilterComponentProperties(JsonObject json, CodeSystem.CodeSystemFilterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("operator")) {
JsonArray array = getJArray(json, "operator");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getOperator().add(new Enumeration(new Enumerations.FilterOperatorEnumFactory(), Enumerations.FilterOperator.NULL));
} else {;
res.getOperator().add(parseEnumeration(array.get(i).getAsString(), Enumerations.FilterOperator.NULL, new Enumerations.FilterOperatorEnumFactory()));
}
}
};
if (json.has("_operator")) {
JsonArray array = getJArray(json, "_operator");
for (int i = 0; i < array.size(); i++) {
if (i == res.getOperator().size())
res.getOperator().add(parseEnumeration(null, Enumerations.FilterOperator.NULL, new Enumerations.FilterOperatorEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getOperator().get(i));
}
};
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected CodeSystem.PropertyComponent parseCodeSystemPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent();
parseCodeSystemPropertyComponentProperties(json, res);
return res;
}
protected void parseCodeSystemPropertyComponentProperties(JsonObject json, CodeSystem.PropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), CodeSystem.PropertyType.NULL, new CodeSystem.PropertyTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected CodeSystem.ConceptDefinitionComponent parseCodeSystemConceptDefinitionComponent(JsonObject json) throws IOException, FHIRFormatError {
CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent();
parseCodeSystemConceptDefinitionComponentProperties(json, res);
return res;
}
protected void parseCodeSystemConceptDefinitionComponentProperties(JsonObject json, CodeSystem.ConceptDefinitionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("definition"))
res.setDefinitionElement(parseString(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("designation")) {
JsonArray array = getJArray(json, "designation");
for (int i = 0; i < array.size(); i++) {
res.getDesignation().add(parseCodeSystemConceptDefinitionDesignationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseCodeSystemConceptPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("concept")) {
JsonArray array = getJArray(json, "concept");
for (int i = 0; i < array.size(); i++) {
res.getConcept().add(parseCodeSystemConceptDefinitionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent(JsonObject json) throws IOException, FHIRFormatError {
CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent();
parseCodeSystemConceptDefinitionDesignationComponentProperties(json, res);
return res;
}
protected void parseCodeSystemConceptDefinitionDesignationComponentProperties(JsonObject json, CodeSystem.ConceptDefinitionDesignationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguageElement(parseCode(json.get("language").getAsString()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("use"))
res.setUse(parseCoding(getJObject(json, "use")));
if (json.has("additionalUse")) {
JsonArray array = getJArray(json, "additionalUse");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalUse().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent();
parseCodeSystemConceptPropertyComponentProperties(json, res);
return res;
}
protected void parseCodeSystemConceptPropertyComponentProperties(JsonObject json, CodeSystem.ConceptPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Communication parseCommunication(JsonObject json) throws IOException, FHIRFormatError {
Communication res = new Communication();
parseCommunicationProperties(json, res);
return res;
}
protected void parseCommunicationProperties(JsonObject json, Communication res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("inResponseTo")) {
JsonArray array = getJArray(json, "inResponseTo");
for (int i = 0; i < array.size(); i++) {
res.getInResponseTo().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.EventStatus.NULL, new Enumerations.EventStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("medium")) {
JsonArray array = getJArray(json, "medium");
for (int i = 0; i < array.size(); i++) {
res.getMedium().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("topic"))
res.setTopic(parseCodeableConcept(getJObject(json, "topic")));
if (json.has("about")) {
JsonArray array = getJArray(json, "about");
for (int i = 0; i < array.size(); i++) {
res.getAbout().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("sent"))
res.setSentElement(parseDateTime(json.get("sent").getAsString()));
if (json.has("_sent"))
parseElementProperties(getJObject(json, "_sent"), res.getSentElement());
if (json.has("received"))
res.setReceivedElement(parseDateTime(json.get("received").getAsString()));
if (json.has("_received"))
parseElementProperties(getJObject(json, "_received"), res.getReceivedElement());
if (json.has("recipient")) {
JsonArray array = getJArray(json, "recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("sender"))
res.setSender(parseReference(getJObject(json, "sender")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("payload")) {
JsonArray array = getJArray(json, "payload");
for (int i = 0; i < array.size(); i++) {
res.getPayload().add(parseCommunicationPayloadComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Communication.CommunicationPayloadComponent parseCommunicationPayloadComponent(JsonObject json) throws IOException, FHIRFormatError {
Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent();
parseCommunicationPayloadComponentProperties(json, res);
return res;
}
protected void parseCommunicationPayloadComponentProperties(JsonObject json, Communication.CommunicationPayloadComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected CommunicationRequest parseCommunicationRequest(JsonObject json) throws IOException, FHIRFormatError {
CommunicationRequest res = new CommunicationRequest();
parseCommunicationRequestProperties(json, res);
return res;
}
protected void parseCommunicationRequestProperties(JsonObject json, CommunicationRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.RequestStatus.NULL, new Enumerations.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Enumerations.RequestIntent.NULL, new Enumerations.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
if (json.has("medium")) {
JsonArray array = getJArray(json, "medium");
for (int i = 0; i < array.size(); i++) {
res.getMedium().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("about")) {
JsonArray array = getJArray(json, "about");
for (int i = 0; i < array.size(); i++) {
res.getAbout().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("payload")) {
JsonArray array = getJArray(json, "payload");
for (int i = 0; i < array.size(); i++) {
res.getPayload().add(parseCommunicationRequestPayloadComponent(getJsonObjectFromArray(array, i)));
}
};
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("recipient")) {
JsonArray array = getJArray(json, "recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("informationProvider")) {
JsonArray array = getJArray(json, "informationProvider");
for (int i = 0; i < array.size(); i++) {
res.getInformationProvider().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestPayloadComponent(JsonObject json) throws IOException, FHIRFormatError {
CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent();
parseCommunicationRequestPayloadComponentProperties(json, res);
return res;
}
protected void parseCommunicationRequestPayloadComponentProperties(JsonObject json, CommunicationRequest.CommunicationRequestPayloadComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected CompartmentDefinition parseCompartmentDefinition(JsonObject json) throws IOException, FHIRFormatError {
CompartmentDefinition res = new CompartmentDefinition();
parseCompartmentDefinitionProperties(json, res);
return res;
}
protected void parseCompartmentDefinitionProperties(JsonObject json, CompartmentDefinition res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), Enumerations.CompartmentType.NULL, new Enumerations.CompartmentTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("search"))
res.setSearchElement(parseBoolean(json.get("search").getAsBoolean()));
if (json.has("_search"))
parseElementProperties(getJObject(json, "_search"), res.getSearchElement());
if (json.has("resource")) {
JsonArray array = getJArray(json, "resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parseCompartmentDefinitionResourceComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionResourceComponent(JsonObject json) throws IOException, FHIRFormatError {
CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent();
parseCompartmentDefinitionResourceComponentProperties(json, res);
return res;
}
protected void parseCompartmentDefinitionResourceComponentProperties(JsonObject json, CompartmentDefinition.CompartmentDefinitionResourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("param")) {
JsonArray array = getJArray(json, "param");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getParam().add(new StringType());
} else {;
res.getParam().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_param")) {
JsonArray array = getJArray(json, "_param");
for (int i = 0; i < array.size(); i++) {
if (i == res.getParam().size())
res.getParam().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getParam().get(i));
}
};
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("startParam"))
res.setStartParamElement(parseUri(json.get("startParam").getAsString()));
if (json.has("_startParam"))
parseElementProperties(getJObject(json, "_startParam"), res.getStartParamElement());
if (json.has("endParam"))
res.setEndParamElement(parseUri(json.get("endParam").getAsString()));
if (json.has("_endParam"))
parseElementProperties(getJObject(json, "_endParam"), res.getEndParamElement());
}
protected Composition parseComposition(JsonObject json) throws IOException, FHIRFormatError {
Composition res = new Composition();
parseCompositionProperties(json, res);
return res;
}
protected void parseCompositionProperties(JsonObject json, Composition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.CompositionStatus.NULL, new Enumerations.CompositionStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("attester")) {
JsonArray array = getJArray(json, "attester");
for (int i = 0; i < array.size(); i++) {
res.getAttester().add(parseCompositionAttesterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
if (json.has("relatesTo")) {
JsonArray array = getJArray(json, "relatesTo");
for (int i = 0; i < array.size(); i++) {
res.getRelatesTo().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseCompositionEventComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("section")) {
JsonArray array = getJArray(json, "section");
for (int i = 0; i < array.size(); i++) {
res.getSection().add(parseCompositionSectionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Composition.CompositionAttesterComponent parseCompositionAttesterComponent(JsonObject json) throws IOException, FHIRFormatError {
Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent();
parseCompositionAttesterComponentProperties(json, res);
return res;
}
protected void parseCompositionAttesterComponentProperties(JsonObject json, Composition.CompositionAttesterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setMode(parseCodeableConcept(getJObject(json, "mode")));
if (json.has("time"))
res.setTimeElement(parseDateTime(json.get("time").getAsString()));
if (json.has("_time"))
parseElementProperties(getJObject(json, "_time"), res.getTimeElement());
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
}
protected Composition.CompositionEventComponent parseCompositionEventComponent(JsonObject json) throws IOException, FHIRFormatError {
Composition.CompositionEventComponent res = new Composition.CompositionEventComponent();
parseCompositionEventComponentProperties(json, res);
return res;
}
protected void parseCompositionEventComponentProperties(JsonObject json, Composition.CompositionEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Composition.SectionComponent parseCompositionSectionComponent(JsonObject json) throws IOException, FHIRFormatError {
Composition.SectionComponent res = new Composition.SectionComponent();
parseCompositionSectionComponentProperties(json, res);
return res;
}
protected void parseCompositionSectionComponentProperties(JsonObject json, Composition.SectionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("focus"))
res.setFocus(parseReference(getJObject(json, "focus")));
if (json.has("text"))
res.setText(parseNarrative(getJObject(json, "text")));
if (json.has("orderedBy"))
res.setOrderedBy(parseCodeableConcept(getJObject(json, "orderedBy")));
if (json.has("entry")) {
JsonArray array = getJArray(json, "entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("emptyReason"))
res.setEmptyReason(parseCodeableConcept(getJObject(json, "emptyReason")));
if (json.has("section")) {
JsonArray array = getJArray(json, "section");
for (int i = 0; i < array.size(); i++) {
res.getSection().add(parseCompositionSectionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ConceptMap parseConceptMap(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap res = new ConceptMap();
parseConceptMapProperties(json, res);
return res;
}
protected void parseConceptMapProperties(JsonObject json, ConceptMap res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseConceptMapPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("additionalAttribute")) {
JsonArray array = getJArray(json, "additionalAttribute");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalAttribute().add(parseConceptMapAdditionalAttributeComponent(getJsonObjectFromArray(array, i)));
}
};
DataType sourceScope = parseType("sourceScope", json);
if (sourceScope != null)
res.setSourceScope(sourceScope);
DataType targetScope = parseType("targetScope", json);
if (targetScope != null)
res.setTargetScope(targetScope);
if (json.has("group")) {
JsonArray array = getJArray(json, "group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseConceptMapGroupComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ConceptMap.PropertyComponent parseConceptMapPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.PropertyComponent res = new ConceptMap.PropertyComponent();
parseConceptMapPropertyComponentProperties(json, res);
return res;
}
protected void parseConceptMapPropertyComponentProperties(JsonObject json, ConceptMap.PropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ConceptMap.ConceptMapPropertyType.NULL, new ConceptMap.ConceptMapPropertyTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("system"))
res.setSystemElement(parseCanonical(json.get("system").getAsString()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
}
protected ConceptMap.AdditionalAttributeComponent parseConceptMapAdditionalAttributeComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.AdditionalAttributeComponent res = new ConceptMap.AdditionalAttributeComponent();
parseConceptMapAdditionalAttributeComponentProperties(json, res);
return res;
}
protected void parseConceptMapAdditionalAttributeComponentProperties(JsonObject json, ConceptMap.AdditionalAttributeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ConceptMap.ConceptMapAttributeType.NULL, new ConceptMap.ConceptMapAttributeTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected ConceptMap.ConceptMapGroupComponent parseConceptMapGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent();
parseConceptMapGroupComponentProperties(json, res);
return res;
}
protected void parseConceptMapGroupComponentProperties(JsonObject json, ConceptMap.ConceptMapGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("source"))
res.setSourceElement(parseCanonical(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
if (json.has("target"))
res.setTargetElement(parseCanonical(json.get("target").getAsString()));
if (json.has("_target"))
parseElementProperties(getJObject(json, "_target"), res.getTargetElement());
if (json.has("element")) {
JsonArray array = getJArray(json, "element");
for (int i = 0; i < array.size(); i++) {
res.getElement().add(parseConceptMapSourceElementComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("unmapped"))
res.setUnmapped(parseConceptMapGroupUnmappedComponent(getJObject(json, "unmapped")));
}
protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent();
parseConceptMapSourceElementComponentProperties(json, res);
return res;
}
protected void parseConceptMapSourceElementComponentProperties(JsonObject json, ConceptMap.SourceElementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("noMap"))
res.setNoMapElement(parseBoolean(json.get("noMap").getAsBoolean()));
if (json.has("_noMap"))
parseElementProperties(getJObject(json, "_noMap"), res.getNoMapElement());
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseConceptMapTargetElementComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent();
parseConceptMapTargetElementComponentProperties(json, res);
return res;
}
protected void parseConceptMapTargetElementComponentProperties(JsonObject json, ConceptMap.TargetElementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), Enumerations.ConceptMapRelationship.NULL, new Enumerations.ConceptMapRelationshipEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(getJObject(json, "_relationship"), res.getRelationshipElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseConceptMapMappingPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dependsOn")) {
JsonArray array = getJArray(json, "dependsOn");
for (int i = 0; i < array.size(); i++) {
res.getDependsOn().add(parseConceptMapOtherElementComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("product")) {
JsonArray array = getJArray(json, "product");
for (int i = 0; i < array.size(); i++) {
res.getProduct().add(parseConceptMapOtherElementComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ConceptMap.MappingPropertyComponent parseConceptMapMappingPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.MappingPropertyComponent res = new ConceptMap.MappingPropertyComponent();
parseConceptMapMappingPropertyComponentProperties(json, res);
return res;
}
protected void parseConceptMapMappingPropertyComponentProperties(JsonObject json, ConceptMap.MappingPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent();
parseConceptMapOtherElementComponentProperties(json, res);
return res;
}
protected void parseConceptMapOtherElementComponentProperties(JsonObject json, ConceptMap.OtherElementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("attribute"))
res.setAttributeElement(parseCode(json.get("attribute").getAsString()));
if (json.has("_attribute"))
parseElementProperties(getJObject(json, "_attribute"), res.getAttributeElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
}
protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapGroupUnmappedComponent(JsonObject json) throws IOException, FHIRFormatError {
ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent();
parseConceptMapGroupUnmappedComponentProperties(json, res);
return res;
}
protected void parseConceptMapGroupUnmappedComponentProperties(JsonObject json, ConceptMap.ConceptMapGroupUnmappedComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ConceptMap.ConceptMapGroupUnmappedMode.NULL, new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), Enumerations.ConceptMapRelationship.NULL, new Enumerations.ConceptMapRelationshipEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(getJObject(json, "_relationship"), res.getRelationshipElement());
if (json.has("otherMap"))
res.setOtherMapElement(parseCanonical(json.get("otherMap").getAsString()));
if (json.has("_otherMap"))
parseElementProperties(getJObject(json, "_otherMap"), res.getOtherMapElement());
}
protected Condition parseCondition(JsonObject json) throws IOException, FHIRFormatError {
Condition res = new Condition();
parseConditionProperties(json, res);
return res;
}
protected void parseConditionProperties(JsonObject json, Condition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("clinicalStatus"))
res.setClinicalStatus(parseCodeableConcept(getJObject(json, "clinicalStatus")));
if (json.has("verificationStatus"))
res.setVerificationStatus(parseCodeableConcept(getJObject(json, "verificationStatus")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("severity"))
res.setSeverity(parseCodeableConcept(getJObject(json, "severity")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType onset = parseType("onset", json);
if (onset != null)
res.setOnset(onset);
DataType abatement = parseType("abatement", json);
if (abatement != null)
res.setAbatement(abatement);
if (json.has("recordedDate"))
res.setRecordedDateElement(parseDateTime(json.get("recordedDate").getAsString()));
if (json.has("_recordedDate"))
parseElementProperties(getJObject(json, "_recordedDate"), res.getRecordedDateElement());
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseConditionParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("stage")) {
JsonArray array = getJArray(json, "stage");
for (int i = 0; i < array.size(); i++) {
res.getStage().add(parseConditionStageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("evidence")) {
JsonArray array = getJArray(json, "evidence");
for (int i = 0; i < array.size(); i++) {
res.getEvidence().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Condition.ConditionParticipantComponent parseConditionParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
Condition.ConditionParticipantComponent res = new Condition.ConditionParticipantComponent();
parseConditionParticipantComponentProperties(json, res);
return res;
}
protected void parseConditionParticipantComponentProperties(JsonObject json, Condition.ConditionParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected Condition.ConditionStageComponent parseConditionStageComponent(JsonObject json) throws IOException, FHIRFormatError {
Condition.ConditionStageComponent res = new Condition.ConditionStageComponent();
parseConditionStageComponentProperties(json, res);
return res;
}
protected void parseConditionStageComponentProperties(JsonObject json, Condition.ConditionStageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("summary"))
res.setSummary(parseCodeableConcept(getJObject(json, "summary")));
if (json.has("assessment")) {
JsonArray array = getJArray(json, "assessment");
for (int i = 0; i < array.size(); i++) {
res.getAssessment().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
}
protected ConditionDefinition parseConditionDefinition(JsonObject json) throws IOException, FHIRFormatError {
ConditionDefinition res = new ConditionDefinition();
parseConditionDefinitionProperties(json, res);
return res;
}
protected void parseConditionDefinitionProperties(JsonObject json, ConditionDefinition res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("severity"))
res.setSeverity(parseCodeableConcept(getJObject(json, "severity")));
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("stage"))
res.setStage(parseCodeableConcept(getJObject(json, "stage")));
if (json.has("hasSeverity"))
res.setHasSeverityElement(parseBoolean(json.get("hasSeverity").getAsBoolean()));
if (json.has("_hasSeverity"))
parseElementProperties(getJObject(json, "_hasSeverity"), res.getHasSeverityElement());
if (json.has("hasBodySite"))
res.setHasBodySiteElement(parseBoolean(json.get("hasBodySite").getAsBoolean()));
if (json.has("_hasBodySite"))
parseElementProperties(getJObject(json, "_hasBodySite"), res.getHasBodySiteElement());
if (json.has("hasStage"))
res.setHasStageElement(parseBoolean(json.get("hasStage").getAsBoolean()));
if (json.has("_hasStage"))
parseElementProperties(getJObject(json, "_hasStage"), res.getHasStageElement());
if (json.has("definition")) {
JsonArray array = getJArray(json, "definition");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDefinition().add(new UriType());
} else {;
res.getDefinition().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_definition")) {
JsonArray array = getJArray(json, "_definition");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDefinition().size())
res.getDefinition().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDefinition().get(i));
}
};
if (json.has("observation")) {
JsonArray array = getJArray(json, "observation");
for (int i = 0; i < array.size(); i++) {
res.getObservation().add(parseConditionDefinitionObservationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("medication")) {
JsonArray array = getJArray(json, "medication");
for (int i = 0; i < array.size(); i++) {
res.getMedication().add(parseConditionDefinitionMedicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("precondition")) {
JsonArray array = getJArray(json, "precondition");
for (int i = 0; i < array.size(); i++) {
res.getPrecondition().add(parseConditionDefinitionPreconditionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("team")) {
JsonArray array = getJArray(json, "team");
for (int i = 0; i < array.size(); i++) {
res.getTeam().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("questionnaire")) {
JsonArray array = getJArray(json, "questionnaire");
for (int i = 0; i < array.size(); i++) {
res.getQuestionnaire().add(parseConditionDefinitionQuestionnaireComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("plan")) {
JsonArray array = getJArray(json, "plan");
for (int i = 0; i < array.size(); i++) {
res.getPlan().add(parseConditionDefinitionPlanComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ConditionDefinition.ConditionDefinitionObservationComponent parseConditionDefinitionObservationComponent(JsonObject json) throws IOException, FHIRFormatError {
ConditionDefinition.ConditionDefinitionObservationComponent res = new ConditionDefinition.ConditionDefinitionObservationComponent();
parseConditionDefinitionObservationComponentProperties(json, res);
return res;
}
protected void parseConditionDefinitionObservationComponentProperties(JsonObject json, ConditionDefinition.ConditionDefinitionObservationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
protected ConditionDefinition.ConditionDefinitionMedicationComponent parseConditionDefinitionMedicationComponent(JsonObject json) throws IOException, FHIRFormatError {
ConditionDefinition.ConditionDefinitionMedicationComponent res = new ConditionDefinition.ConditionDefinitionMedicationComponent();
parseConditionDefinitionMedicationComponentProperties(json, res);
return res;
}
protected void parseConditionDefinitionMedicationComponentProperties(JsonObject json, ConditionDefinition.ConditionDefinitionMedicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
protected ConditionDefinition.ConditionDefinitionPreconditionComponent parseConditionDefinitionPreconditionComponent(JsonObject json) throws IOException, FHIRFormatError {
ConditionDefinition.ConditionDefinitionPreconditionComponent res = new ConditionDefinition.ConditionDefinitionPreconditionComponent();
parseConditionDefinitionPreconditionComponentProperties(json, res);
return res;
}
protected void parseConditionDefinitionPreconditionComponentProperties(JsonObject json, ConditionDefinition.ConditionDefinitionPreconditionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ConditionDefinition.ConditionPreconditionType.NULL, new ConditionDefinition.ConditionPreconditionTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ConditionDefinition.ConditionDefinitionQuestionnaireComponent parseConditionDefinitionQuestionnaireComponent(JsonObject json) throws IOException, FHIRFormatError {
ConditionDefinition.ConditionDefinitionQuestionnaireComponent res = new ConditionDefinition.ConditionDefinitionQuestionnaireComponent();
parseConditionDefinitionQuestionnaireComponentProperties(json, res);
return res;
}
protected void parseConditionDefinitionQuestionnaireComponentProperties(JsonObject json, ConditionDefinition.ConditionDefinitionQuestionnaireComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("purpose"))
res.setPurposeElement(parseEnumeration(json.get("purpose").getAsString(), ConditionDefinition.ConditionQuestionnairePurpose.NULL, new ConditionDefinition.ConditionQuestionnairePurposeEnumFactory()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected ConditionDefinition.ConditionDefinitionPlanComponent parseConditionDefinitionPlanComponent(JsonObject json) throws IOException, FHIRFormatError {
ConditionDefinition.ConditionDefinitionPlanComponent res = new ConditionDefinition.ConditionDefinitionPlanComponent();
parseConditionDefinitionPlanComponentProperties(json, res);
return res;
}
protected void parseConditionDefinitionPlanComponentProperties(JsonObject json, ConditionDefinition.ConditionDefinitionPlanComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected Consent parseConsent(JsonObject json) throws IOException, FHIRFormatError {
Consent res = new Consent();
parseConsentProperties(json, res);
return res;
}
protected void parseConsentProperties(JsonObject json, Consent res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Consent.ConsentState.NULL, new Consent.ConsentStateEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("grantor")) {
JsonArray array = getJArray(json, "grantor");
for (int i = 0; i < array.size(); i++) {
res.getGrantor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("grantee")) {
JsonArray array = getJArray(json, "grantee");
for (int i = 0; i < array.size(); i++) {
res.getGrantee().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("manager")) {
JsonArray array = getJArray(json, "manager");
for (int i = 0; i < array.size(); i++) {
res.getManager().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("controller")) {
JsonArray array = getJArray(json, "controller");
for (int i = 0; i < array.size(); i++) {
res.getController().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("sourceAttachment")) {
JsonArray array = getJArray(json, "sourceAttachment");
for (int i = 0; i < array.size(); i++) {
res.getSourceAttachment().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("sourceReference")) {
JsonArray array = getJArray(json, "sourceReference");
for (int i = 0; i < array.size(); i++) {
res.getSourceReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("regulatoryBasis")) {
JsonArray array = getJArray(json, "regulatoryBasis");
for (int i = 0; i < array.size(); i++) {
res.getRegulatoryBasis().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("policyBasis"))
res.setPolicyBasis(parseConsentPolicyBasisComponent(getJObject(json, "policyBasis")));
if (json.has("policyText")) {
JsonArray array = getJArray(json, "policyText");
for (int i = 0; i < array.size(); i++) {
res.getPolicyText().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("verification")) {
JsonArray array = getJArray(json, "verification");
for (int i = 0; i < array.size(); i++) {
res.getVerification().add(parseConsentVerificationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("decision"))
res.setDecisionElement(parseEnumeration(json.get("decision").getAsString(), Enumerations.ConsentProvisionType.NULL, new Enumerations.ConsentProvisionTypeEnumFactory()));
if (json.has("_decision"))
parseElementProperties(getJObject(json, "_decision"), res.getDecisionElement());
if (json.has("provision")) {
JsonArray array = getJArray(json, "provision");
for (int i = 0; i < array.size(); i++) {
res.getProvision().add(parseConsentProvisionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Consent.ConsentPolicyBasisComponent parseConsentPolicyBasisComponent(JsonObject json) throws IOException, FHIRFormatError {
Consent.ConsentPolicyBasisComponent res = new Consent.ConsentPolicyBasisComponent();
parseConsentPolicyBasisComponentProperties(json, res);
return res;
}
protected void parseConsentPolicyBasisComponentProperties(JsonObject json, Consent.ConsentPolicyBasisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
if (json.has("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected Consent.ConsentVerificationComponent parseConsentVerificationComponent(JsonObject json) throws IOException, FHIRFormatError {
Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent();
parseConsentVerificationComponentProperties(json, res);
return res;
}
protected void parseConsentVerificationComponentProperties(JsonObject json, Consent.ConsentVerificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("verified"))
res.setVerifiedElement(parseBoolean(json.get("verified").getAsBoolean()));
if (json.has("_verified"))
parseElementProperties(getJObject(json, "_verified"), res.getVerifiedElement());
if (json.has("verificationType"))
res.setVerificationType(parseCodeableConcept(getJObject(json, "verificationType")));
if (json.has("verifiedBy"))
res.setVerifiedBy(parseReference(getJObject(json, "verifiedBy")));
if (json.has("verifiedWith"))
res.setVerifiedWith(parseReference(getJObject(json, "verifiedWith")));
if (json.has("verificationDate")) {
JsonArray array = getJArray(json, "verificationDate");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getVerificationDate().add(new DateTimeType());
} else {;
res.getVerificationDate().add(parseDateTime(array.get(i).getAsString()));
}
}
};
if (json.has("_verificationDate")) {
JsonArray array = getJArray(json, "_verificationDate");
for (int i = 0; i < array.size(); i++) {
if (i == res.getVerificationDate().size())
res.getVerificationDate().add(parseDateTime(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getVerificationDate().get(i));
}
};
}
protected Consent.ProvisionComponent parseConsentProvisionComponent(JsonObject json) throws IOException, FHIRFormatError {
Consent.ProvisionComponent res = new Consent.ProvisionComponent();
parseConsentProvisionComponentProperties(json, res);
return res;
}
protected void parseConsentProvisionComponentProperties(JsonObject json, Consent.ProvisionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("actor")) {
JsonArray array = getJArray(json, "actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseConsentProvisionActorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("securityLabel")) {
JsonArray array = getJArray(json, "securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose")) {
JsonArray array = getJArray(json, "purpose");
for (int i = 0; i < array.size(); i++) {
res.getPurpose().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("documentType")) {
JsonArray array = getJArray(json, "documentType");
for (int i = 0; i < array.size(); i++) {
res.getDocumentType().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("resourceType")) {
JsonArray array = getJArray(json, "resourceType");
for (int i = 0; i < array.size(); i++) {
res.getResourceType().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dataPeriod"))
res.setDataPeriod(parsePeriod(getJObject(json, "dataPeriod")));
if (json.has("data")) {
JsonArray array = getJArray(json, "data");
for (int i = 0; i < array.size(); i++) {
res.getData().add(parseConsentProvisionDataComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
if (json.has("provision")) {
JsonArray array = getJArray(json, "provision");
for (int i = 0; i < array.size(); i++) {
res.getProvision().add(parseConsentProvisionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Consent.ProvisionActorComponent parseConsentProvisionActorComponent(JsonObject json) throws IOException, FHIRFormatError {
Consent.ProvisionActorComponent res = new Consent.ProvisionActorComponent();
parseConsentProvisionActorComponentProperties(json, res);
return res;
}
protected void parseConsentProvisionActorComponentProperties(JsonObject json, Consent.ProvisionActorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected Consent.ProvisionDataComponent parseConsentProvisionDataComponent(JsonObject json) throws IOException, FHIRFormatError {
Consent.ProvisionDataComponent res = new Consent.ProvisionDataComponent();
parseConsentProvisionDataComponentProperties(json, res);
return res;
}
protected void parseConsentProvisionDataComponentProperties(JsonObject json, Consent.ProvisionDataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("meaning"))
res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Enumerations.ConsentDataMeaning.NULL, new Enumerations.ConsentDataMeaningEnumFactory()));
if (json.has("_meaning"))
parseElementProperties(getJObject(json, "_meaning"), res.getMeaningElement());
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected Contract parseContract(JsonObject json) throws IOException, FHIRFormatError {
Contract res = new Contract();
parseContractProperties(json, res);
return res;
}
protected void parseContractProperties(JsonObject json, Contract res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Contract.ContractResourceStatusCodes.NULL, new Contract.ContractResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("legalState"))
res.setLegalState(parseCodeableConcept(getJObject(json, "legalState")));
if (json.has("instantiatesCanonical"))
res.setInstantiatesCanonical(parseReference(getJObject(json, "instantiatesCanonical")));
if (json.has("instantiatesUri"))
res.setInstantiatesUriElement(parseUri(json.get("instantiatesUri").getAsString()));
if (json.has("_instantiatesUri"))
parseElementProperties(getJObject(json, "_instantiatesUri"), res.getInstantiatesUriElement());
if (json.has("contentDerivative"))
res.setContentDerivative(parseCodeableConcept(getJObject(json, "contentDerivative")));
if (json.has("issued"))
res.setIssuedElement(parseDateTime(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("applies"))
res.setApplies(parsePeriod(getJObject(json, "applies")));
if (json.has("expirationType"))
res.setExpirationType(parseCodeableConcept(getJObject(json, "expirationType")));
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("authority")) {
JsonArray array = getJArray(json, "authority");
for (int i = 0; i < array.size(); i++) {
res.getAuthority().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("domain")) {
JsonArray array = getJArray(json, "domain");
for (int i = 0; i < array.size(); i++) {
res.getDomain().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("site")) {
JsonArray array = getJArray(json, "site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("alias")) {
JsonArray array = getJArray(json, "alias");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAlias().add(new StringType());
} else {;
res.getAlias().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_alias")) {
JsonArray array = getJArray(json, "_alias");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAlias().size())
res.getAlias().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAlias().get(i));
}
};
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("scope"))
res.setScope(parseCodeableConcept(getJObject(json, "scope")));
DataType topic = parseType("topic", json);
if (topic != null)
res.setTopic(topic);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subType")) {
JsonArray array = getJArray(json, "subType");
for (int i = 0; i < array.size(); i++) {
res.getSubType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contentDefinition"))
res.setContentDefinition(parseContractContentDefinitionComponent(getJObject(json, "contentDefinition")));
if (json.has("term")) {
JsonArray array = getJArray(json, "term");
for (int i = 0; i < array.size(); i++) {
res.getTerm().add(parseContractTermComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relevantHistory")) {
JsonArray array = getJArray(json, "relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("signer")) {
JsonArray array = getJArray(json, "signer");
for (int i = 0; i < array.size(); i++) {
res.getSigner().add(parseContractSignatoryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("friendly")) {
JsonArray array = getJArray(json, "friendly");
for (int i = 0; i < array.size(); i++) {
res.getFriendly().add(parseContractFriendlyLanguageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("legal")) {
JsonArray array = getJArray(json, "legal");
for (int i = 0; i < array.size(); i++) {
res.getLegal().add(parseContractLegalLanguageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("rule")) {
JsonArray array = getJArray(json, "rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parseContractComputableLanguageComponent(getJsonObjectFromArray(array, i)));
}
};
DataType legallyBinding = parseType("legallyBinding", json);
if (legallyBinding != null)
res.setLegallyBinding(legallyBinding);
}
protected Contract.ContentDefinitionComponent parseContractContentDefinitionComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ContentDefinitionComponent res = new Contract.ContentDefinitionComponent();
parseContractContentDefinitionComponentProperties(json, res);
return res;
}
protected void parseContractContentDefinitionComponentProperties(JsonObject json, Contract.ContentDefinitionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subType"))
res.setSubType(parseCodeableConcept(getJObject(json, "subType")));
if (json.has("publisher"))
res.setPublisher(parseReference(getJObject(json, "publisher")));
if (json.has("publicationDate"))
res.setPublicationDateElement(parseDateTime(json.get("publicationDate").getAsString()));
if (json.has("_publicationDate"))
parseElementProperties(getJObject(json, "_publicationDate"), res.getPublicationDateElement());
if (json.has("publicationStatus"))
res.setPublicationStatusElement(parseEnumeration(json.get("publicationStatus").getAsString(), Contract.ContractResourcePublicationStatusCodes.NULL, new Contract.ContractResourcePublicationStatusCodesEnumFactory()));
if (json.has("_publicationStatus"))
parseElementProperties(getJObject(json, "_publicationStatus"), res.getPublicationStatusElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
}
protected Contract.TermComponent parseContractTermComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.TermComponent res = new Contract.TermComponent();
parseContractTermComponentProperties(json, res);
return res;
}
protected void parseContractTermComponentProperties(JsonObject json, Contract.TermComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("issued"))
res.setIssuedElement(parseDateTime(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("applies"))
res.setApplies(parsePeriod(getJObject(json, "applies")));
DataType topic = parseType("topic", json);
if (topic != null)
res.setTopic(topic);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subType"))
res.setSubType(parseCodeableConcept(getJObject(json, "subType")));
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("securityLabel")) {
JsonArray array = getJArray(json, "securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseContractSecurityLabelComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("offer"))
res.setOffer(parseContractOfferComponent(getJObject(json, "offer")));
if (json.has("asset")) {
JsonArray array = getJArray(json, "asset");
for (int i = 0; i < array.size(); i++) {
res.getAsset().add(parseContractAssetComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseContractActionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("group")) {
JsonArray array = getJArray(json, "group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseContractTermComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Contract.SecurityLabelComponent parseContractSecurityLabelComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.SecurityLabelComponent res = new Contract.SecurityLabelComponent();
parseContractSecurityLabelComponentProperties(json, res);
return res;
}
protected void parseContractSecurityLabelComponentProperties(JsonObject json, Contract.SecurityLabelComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("number")) {
JsonArray array = getJArray(json, "number");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNumber().add(new UnsignedIntType());
} else {;
res.getNumber().add(parseUnsignedInt(array.get(i).getAsString()));
}
}
};
if (json.has("_number")) {
JsonArray array = getJArray(json, "_number");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNumber().size())
res.getNumber().add(parseUnsignedInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNumber().get(i));
}
};
if (json.has("classification"))
res.setClassification(parseCoding(getJObject(json, "classification")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("control")) {
JsonArray array = getJArray(json, "control");
for (int i = 0; i < array.size(); i++) {
res.getControl().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
}
protected Contract.ContractOfferComponent parseContractOfferComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ContractOfferComponent res = new Contract.ContractOfferComponent();
parseContractOfferComponentProperties(json, res);
return res;
}
protected void parseContractOfferComponentProperties(JsonObject json, Contract.ContractOfferComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("party")) {
JsonArray array = getJArray(json, "party");
for (int i = 0; i < array.size(); i++) {
res.getParty().add(parseContractPartyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("topic"))
res.setTopic(parseReference(getJObject(json, "topic")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("decision"))
res.setDecision(parseCodeableConcept(getJObject(json, "decision")));
if (json.has("decisionMode")) {
JsonArray array = getJArray(json, "decisionMode");
for (int i = 0; i < array.size(); i++) {
res.getDecisionMode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("answer")) {
JsonArray array = getJArray(json, "answer");
for (int i = 0; i < array.size(); i++) {
res.getAnswer().add(parseContractAnswerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("linkId")) {
JsonArray array = getJArray(json, "linkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLinkId().add(new StringType());
} else {;
res.getLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_linkId")) {
JsonArray array = getJArray(json, "_linkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLinkId().size())
res.getLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLinkId().get(i));
}
};
if (json.has("securityLabelNumber")) {
JsonArray array = getJArray(json, "securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSecurityLabelNumber().add(new UnsignedIntType());
} else {;
res.getSecurityLabelNumber().add(parseUnsignedInt(array.get(i).getAsString()));
}
}
};
if (json.has("_securityLabelNumber")) {
JsonArray array = getJArray(json, "_securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSecurityLabelNumber().size())
res.getSecurityLabelNumber().add(parseUnsignedInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSecurityLabelNumber().get(i));
}
};
}
protected Contract.ContractPartyComponent parseContractPartyComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ContractPartyComponent res = new Contract.ContractPartyComponent();
parseContractPartyComponentProperties(json, res);
return res;
}
protected void parseContractPartyComponentProperties(JsonObject json, Contract.ContractPartyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference")) {
JsonArray array = getJArray(json, "reference");
for (int i = 0; i < array.size(); i++) {
res.getReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected Contract.AnswerComponent parseContractAnswerComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.AnswerComponent res = new Contract.AnswerComponent();
parseContractAnswerComponentProperties(json, res);
return res;
}
protected void parseContractAnswerComponentProperties(JsonObject json, Contract.AnswerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Contract.ContractAssetComponent parseContractAssetComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ContractAssetComponent res = new Contract.ContractAssetComponent();
parseContractAssetComponentProperties(json, res);
return res;
}
protected void parseContractAssetComponentProperties(JsonObject json, Contract.ContractAssetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("scope"))
res.setScope(parseCodeableConcept(getJObject(json, "scope")));
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("typeReference")) {
JsonArray array = getJArray(json, "typeReference");
for (int i = 0; i < array.size(); i++) {
res.getTypeReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subtype")) {
JsonArray array = getJArray(json, "subtype");
for (int i = 0; i < array.size(); i++) {
res.getSubtype().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relationship"))
res.setRelationship(parseCoding(getJObject(json, "relationship")));
if (json.has("context")) {
JsonArray array = getJArray(json, "context");
for (int i = 0; i < array.size(); i++) {
res.getContext().add(parseContractAssetContextComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition"))
res.setConditionElement(parseString(json.get("condition").getAsString()));
if (json.has("_condition"))
parseElementProperties(getJObject(json, "_condition"), res.getConditionElement());
if (json.has("periodType")) {
JsonArray array = getJArray(json, "periodType");
for (int i = 0; i < array.size(); i++) {
res.getPeriodType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period")) {
JsonArray array = getJArray(json, "period");
for (int i = 0; i < array.size(); i++) {
res.getPeriod().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("usePeriod")) {
JsonArray array = getJArray(json, "usePeriod");
for (int i = 0; i < array.size(); i++) {
res.getUsePeriod().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("linkId")) {
JsonArray array = getJArray(json, "linkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLinkId().add(new StringType());
} else {;
res.getLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_linkId")) {
JsonArray array = getJArray(json, "_linkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLinkId().size())
res.getLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLinkId().get(i));
}
};
if (json.has("answer")) {
JsonArray array = getJArray(json, "answer");
for (int i = 0; i < array.size(); i++) {
res.getAnswer().add(parseContractAnswerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("securityLabelNumber")) {
JsonArray array = getJArray(json, "securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSecurityLabelNumber().add(new UnsignedIntType());
} else {;
res.getSecurityLabelNumber().add(parseUnsignedInt(array.get(i).getAsString()));
}
}
};
if (json.has("_securityLabelNumber")) {
JsonArray array = getJArray(json, "_securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSecurityLabelNumber().size())
res.getSecurityLabelNumber().add(parseUnsignedInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSecurityLabelNumber().get(i));
}
};
if (json.has("valuedItem")) {
JsonArray array = getJArray(json, "valuedItem");
for (int i = 0; i < array.size(); i++) {
res.getValuedItem().add(parseContractValuedItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Contract.AssetContextComponent parseContractAssetContextComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.AssetContextComponent res = new Contract.AssetContextComponent();
parseContractAssetContextComponentProperties(json, res);
return res;
}
protected void parseContractAssetContextComponentProperties(JsonObject json, Contract.AssetContextComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Contract.ValuedItemComponent parseContractValuedItemComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ValuedItemComponent res = new Contract.ValuedItemComponent();
parseContractValuedItemComponentProperties(json, res);
return res;
}
protected void parseContractValuedItemComponentProperties(JsonObject json, Contract.ValuedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType entity = parseType("entity", json);
if (entity != null)
res.setEntity(entity);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("effectiveTime"))
res.setEffectiveTimeElement(parseDateTime(json.get("effectiveTime").getAsString()));
if (json.has("_effectiveTime"))
parseElementProperties(getJObject(json, "_effectiveTime"), res.getEffectiveTimeElement());
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("points"))
res.setPointsElement(parseDecimal(json.get("points").getAsBigDecimal()));
if (json.has("_points"))
parseElementProperties(getJObject(json, "_points"), res.getPointsElement());
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("payment"))
res.setPaymentElement(parseString(json.get("payment").getAsString()));
if (json.has("_payment"))
parseElementProperties(getJObject(json, "_payment"), res.getPaymentElement());
if (json.has("paymentDate"))
res.setPaymentDateElement(parseDateTime(json.get("paymentDate").getAsString()));
if (json.has("_paymentDate"))
parseElementProperties(getJObject(json, "_paymentDate"), res.getPaymentDateElement());
if (json.has("responsible"))
res.setResponsible(parseReference(getJObject(json, "responsible")));
if (json.has("recipient"))
res.setRecipient(parseReference(getJObject(json, "recipient")));
if (json.has("linkId")) {
JsonArray array = getJArray(json, "linkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLinkId().add(new StringType());
} else {;
res.getLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_linkId")) {
JsonArray array = getJArray(json, "_linkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLinkId().size())
res.getLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLinkId().get(i));
}
};
if (json.has("securityLabelNumber")) {
JsonArray array = getJArray(json, "securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSecurityLabelNumber().add(new UnsignedIntType());
} else {;
res.getSecurityLabelNumber().add(parseUnsignedInt(array.get(i).getAsString()));
}
}
};
if (json.has("_securityLabelNumber")) {
JsonArray array = getJArray(json, "_securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSecurityLabelNumber().size())
res.getSecurityLabelNumber().add(parseUnsignedInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSecurityLabelNumber().get(i));
}
};
}
protected Contract.ActionComponent parseContractActionComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ActionComponent res = new Contract.ActionComponent();
parseContractActionComponentProperties(json, res);
return res;
}
protected void parseContractActionComponentProperties(JsonObject json, Contract.ActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseContractActionSubjectComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("intent"))
res.setIntent(parseCodeableConcept(getJObject(json, "intent")));
if (json.has("linkId")) {
JsonArray array = getJArray(json, "linkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLinkId().add(new StringType());
} else {;
res.getLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_linkId")) {
JsonArray array = getJArray(json, "_linkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLinkId().size())
res.getLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLinkId().get(i));
}
};
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("context"))
res.setContext(parseReference(getJObject(json, "context")));
if (json.has("contextLinkId")) {
JsonArray array = getJArray(json, "contextLinkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getContextLinkId().add(new StringType());
} else {;
res.getContextLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_contextLinkId")) {
JsonArray array = getJArray(json, "_contextLinkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getContextLinkId().size())
res.getContextLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getContextLinkId().get(i));
}
};
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("requester")) {
JsonArray array = getJArray(json, "requester");
for (int i = 0; i < array.size(); i++) {
res.getRequester().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("requesterLinkId")) {
JsonArray array = getJArray(json, "requesterLinkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getRequesterLinkId().add(new StringType());
} else {;
res.getRequesterLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_requesterLinkId")) {
JsonArray array = getJArray(json, "_requesterLinkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getRequesterLinkId().size())
res.getRequesterLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getRequesterLinkId().get(i));
}
};
if (json.has("performerType")) {
JsonArray array = getJArray(json, "performerType");
for (int i = 0; i < array.size(); i++) {
res.getPerformerType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performerRole"))
res.setPerformerRole(parseCodeableConcept(getJObject(json, "performerRole")));
if (json.has("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
if (json.has("performerLinkId")) {
JsonArray array = getJArray(json, "performerLinkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPerformerLinkId().add(new StringType());
} else {;
res.getPerformerLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_performerLinkId")) {
JsonArray array = getJArray(json, "_performerLinkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPerformerLinkId().size())
res.getPerformerLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPerformerLinkId().get(i));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reasonLinkId")) {
JsonArray array = getJArray(json, "reasonLinkId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReasonLinkId().add(new StringType());
} else {;
res.getReasonLinkId().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_reasonLinkId")) {
JsonArray array = getJArray(json, "_reasonLinkId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReasonLinkId().size())
res.getReasonLinkId().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReasonLinkId().get(i));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("securityLabelNumber")) {
JsonArray array = getJArray(json, "securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSecurityLabelNumber().add(new UnsignedIntType());
} else {;
res.getSecurityLabelNumber().add(parseUnsignedInt(array.get(i).getAsString()));
}
}
};
if (json.has("_securityLabelNumber")) {
JsonArray array = getJArray(json, "_securityLabelNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSecurityLabelNumber().size())
res.getSecurityLabelNumber().add(parseUnsignedInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSecurityLabelNumber().get(i));
}
};
}
protected Contract.ActionSubjectComponent parseContractActionSubjectComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ActionSubjectComponent res = new Contract.ActionSubjectComponent();
parseContractActionSubjectComponentProperties(json, res);
return res;
}
protected void parseContractActionSubjectComponentProperties(JsonObject json, Contract.ActionSubjectComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference")) {
JsonArray array = getJArray(json, "reference");
for (int i = 0; i < array.size(); i++) {
res.getReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected Contract.SignatoryComponent parseContractSignatoryComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.SignatoryComponent res = new Contract.SignatoryComponent();
parseContractSignatoryComponentProperties(json, res);
return res;
}
protected void parseContractSignatoryComponentProperties(JsonObject json, Contract.SignatoryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCoding(getJObject(json, "type")));
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
if (json.has("signature")) {
JsonArray array = getJArray(json, "signature");
for (int i = 0; i < array.size(); i++) {
res.getSignature().add(parseSignature(getJsonObjectFromArray(array, i)));
}
};
}
protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent();
parseContractFriendlyLanguageComponentProperties(json, res);
return res;
}
protected void parseContractFriendlyLanguageComponentProperties(JsonObject json, Contract.FriendlyLanguageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent();
parseContractLegalLanguageComponentProperties(json, res);
return res;
}
protected void parseContractLegalLanguageComponentProperties(JsonObject json, Contract.LegalLanguageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(JsonObject json) throws IOException, FHIRFormatError {
Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent();
parseContractComputableLanguageComponentProperties(json, res);
return res;
}
protected void parseContractComputableLanguageComponentProperties(JsonObject json, Contract.ComputableLanguageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected Coverage parseCoverage(JsonObject json) throws IOException, FHIRFormatError {
Coverage res = new Coverage();
parseCoverageProperties(json, res);
return res;
}
protected void parseCoverageProperties(JsonObject json, Coverage res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), Coverage.Kind.NULL, new Coverage.KindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("paymentBy")) {
JsonArray array = getJArray(json, "paymentBy");
for (int i = 0; i < array.size(); i++) {
res.getPaymentBy().add(parseCoveragePaymentByComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("policyHolder"))
res.setPolicyHolder(parseReference(getJObject(json, "policyHolder")));
if (json.has("subscriber"))
res.setSubscriber(parseReference(getJObject(json, "subscriber")));
if (json.has("subscriberId")) {
JsonArray array = getJArray(json, "subscriberId");
for (int i = 0; i < array.size(); i++) {
res.getSubscriberId().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("beneficiary"))
res.setBeneficiary(parseReference(getJObject(json, "beneficiary")));
if (json.has("dependent"))
res.setDependentElement(parseString(json.get("dependent").getAsString()));
if (json.has("_dependent"))
parseElementProperties(getJObject(json, "_dependent"), res.getDependentElement());
if (json.has("relationship"))
res.setRelationship(parseCodeableConcept(getJObject(json, "relationship")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("class")) {
JsonArray array = getJArray(json, "class");
for (int i = 0; i < array.size(); i++) {
res.getClass_().add(parseCoverageClassComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("order"))
res.setOrderElement(parsePositiveInt(json.get("order").getAsString()));
if (json.has("_order"))
parseElementProperties(getJObject(json, "_order"), res.getOrderElement());
if (json.has("network"))
res.setNetworkElement(parseString(json.get("network").getAsString()));
if (json.has("_network"))
parseElementProperties(getJObject(json, "_network"), res.getNetworkElement());
if (json.has("costToBeneficiary")) {
JsonArray array = getJArray(json, "costToBeneficiary");
for (int i = 0; i < array.size(); i++) {
res.getCostToBeneficiary().add(parseCoverageCostToBeneficiaryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subrogation"))
res.setSubrogationElement(parseBoolean(json.get("subrogation").getAsBoolean()));
if (json.has("_subrogation"))
parseElementProperties(getJObject(json, "_subrogation"), res.getSubrogationElement());
if (json.has("contract")) {
JsonArray array = getJArray(json, "contract");
for (int i = 0; i < array.size(); i++) {
res.getContract().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("insurancePlan"))
res.setInsurancePlan(parseReference(getJObject(json, "insurancePlan")));
}
protected Coverage.CoveragePaymentByComponent parseCoveragePaymentByComponent(JsonObject json) throws IOException, FHIRFormatError {
Coverage.CoveragePaymentByComponent res = new Coverage.CoveragePaymentByComponent();
parseCoveragePaymentByComponentProperties(json, res);
return res;
}
protected void parseCoveragePaymentByComponentProperties(JsonObject json, Coverage.CoveragePaymentByComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
if (json.has("responsibility"))
res.setResponsibilityElement(parseString(json.get("responsibility").getAsString()));
if (json.has("_responsibility"))
parseElementProperties(getJObject(json, "_responsibility"), res.getResponsibilityElement());
}
protected Coverage.ClassComponent parseCoverageClassComponent(JsonObject json) throws IOException, FHIRFormatError {
Coverage.ClassComponent res = new Coverage.ClassComponent();
parseCoverageClassComponentProperties(json, res);
return res;
}
protected void parseCoverageClassComponentProperties(JsonObject json, Coverage.ClassComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("value"))
res.setValue(parseIdentifier(getJObject(json, "value")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
}
protected Coverage.CostToBeneficiaryComponent parseCoverageCostToBeneficiaryComponent(JsonObject json) throws IOException, FHIRFormatError {
Coverage.CostToBeneficiaryComponent res = new Coverage.CostToBeneficiaryComponent();
parseCoverageCostToBeneficiaryComponentProperties(json, res);
return res;
}
protected void parseCoverageCostToBeneficiaryComponentProperties(JsonObject json, Coverage.CostToBeneficiaryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("network"))
res.setNetwork(parseCodeableConcept(getJObject(json, "network")));
if (json.has("unit"))
res.setUnit(parseCodeableConcept(getJObject(json, "unit")));
if (json.has("term"))
res.setTerm(parseCodeableConcept(getJObject(json, "term")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("exception")) {
JsonArray array = getJArray(json, "exception");
for (int i = 0; i < array.size(); i++) {
res.getException().add(parseCoverageExemptionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Coverage.ExemptionComponent parseCoverageExemptionComponent(JsonObject json) throws IOException, FHIRFormatError {
Coverage.ExemptionComponent res = new Coverage.ExemptionComponent();
parseCoverageExemptionComponentProperties(json, res);
return res;
}
protected void parseCoverageExemptionComponentProperties(JsonObject json, Coverage.ExemptionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected CoverageEligibilityRequest parseCoverageEligibilityRequest(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityRequest res = new CoverageEligibilityRequest();
parseCoverageEligibilityRequestProperties(json, res);
return res;
}
protected void parseCoverageEligibilityRequestProperties(JsonObject json, CoverageEligibilityRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("purpose")) {
JsonArray array = getJArray(json, "purpose");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPurpose().add(new Enumeration(new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory(), CoverageEligibilityRequest.EligibilityRequestPurpose.NULL));
} else {;
res.getPurpose().add(parseEnumeration(array.get(i).getAsString(), CoverageEligibilityRequest.EligibilityRequestPurpose.NULL, new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory()));
}
}
};
if (json.has("_purpose")) {
JsonArray array = getJArray(json, "_purpose");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPurpose().size())
res.getPurpose().add(parseEnumeration(null, CoverageEligibilityRequest.EligibilityRequestPurpose.NULL, new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPurpose().get(i));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseCoverageEligibilityRequestEventComponent(getJsonObjectFromArray(array, i)));
}
};
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("enterer"))
res.setEnterer(parseReference(getJObject(json, "enterer")));
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("facility"))
res.setFacility(parseReference(getJObject(json, "facility")));
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseCoverageEligibilityRequestSupportingInformationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseCoverageEligibilityRequestInsuranceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseCoverageEligibilityRequestDetailsComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent parseCoverageEligibilityRequestEventComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent res = new CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent();
parseCoverageEligibilityRequestEventComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityRequestEventComponentProperties(JsonObject json, CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType when = parseType("when", json);
if (when != null)
res.setWhen(when);
}
protected CoverageEligibilityRequest.SupportingInformationComponent parseCoverageEligibilityRequestSupportingInformationComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.SupportingInformationComponent res = new CoverageEligibilityRequest.SupportingInformationComponent();
parseCoverageEligibilityRequestSupportingInformationComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityRequestSupportingInformationComponentProperties(JsonObject json, CoverageEligibilityRequest.SupportingInformationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("information"))
res.setInformation(parseReference(getJObject(json, "information")));
if (json.has("appliesToAll"))
res.setAppliesToAllElement(parseBoolean(json.get("appliesToAll").getAsBoolean()));
if (json.has("_appliesToAll"))
parseElementProperties(getJObject(json, "_appliesToAll"), res.getAppliesToAllElement());
}
protected CoverageEligibilityRequest.InsuranceComponent parseCoverageEligibilityRequestInsuranceComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.InsuranceComponent res = new CoverageEligibilityRequest.InsuranceComponent();
parseCoverageEligibilityRequestInsuranceComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityRequestInsuranceComponentProperties(JsonObject json, CoverageEligibilityRequest.InsuranceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("focal"))
res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean()));
if (json.has("_focal"))
parseElementProperties(getJObject(json, "_focal"), res.getFocalElement());
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
if (json.has("businessArrangement"))
res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString()));
if (json.has("_businessArrangement"))
parseElementProperties(getJObject(json, "_businessArrangement"), res.getBusinessArrangementElement());
}
protected CoverageEligibilityRequest.DetailsComponent parseCoverageEligibilityRequestDetailsComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.DetailsComponent res = new CoverageEligibilityRequest.DetailsComponent();
parseCoverageEligibilityRequestDetailsComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityRequestDetailsComponentProperties(JsonObject json, CoverageEligibilityRequest.DetailsComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("supportingInfoSequence")) {
JsonArray array = getJArray(json, "supportingInfoSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSupportingInfoSequence().add(new PositiveIntType());
} else {;
res.getSupportingInfoSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_supportingInfoSequence")) {
JsonArray array = getJArray(json, "_supportingInfoSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSupportingInfoSequence().size())
res.getSupportingInfoSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSupportingInfoSequence().get(i));
}
};
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("facility"))
res.setFacility(parseReference(getJObject(json, "facility")));
if (json.has("diagnosis")) {
JsonArray array = getJArray(json, "diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseCoverageEligibilityRequestDiagnosisComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected CoverageEligibilityRequest.DiagnosisComponent parseCoverageEligibilityRequestDiagnosisComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.DiagnosisComponent res = new CoverageEligibilityRequest.DiagnosisComponent();
parseCoverageEligibilityRequestDiagnosisComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityRequestDiagnosisComponentProperties(JsonObject json, CoverageEligibilityRequest.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType diagnosis = parseType("diagnosis", json);
if (diagnosis != null)
res.setDiagnosis(diagnosis);
}
protected CoverageEligibilityResponse parseCoverageEligibilityResponse(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityResponse res = new CoverageEligibilityResponse();
parseCoverageEligibilityResponseProperties(json, res);
return res;
}
protected void parseCoverageEligibilityResponseProperties(JsonObject json, CoverageEligibilityResponse res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("purpose")) {
JsonArray array = getJArray(json, "purpose");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPurpose().add(new Enumeration(new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory(), CoverageEligibilityResponse.EligibilityResponsePurpose.NULL));
} else {;
res.getPurpose().add(parseEnumeration(array.get(i).getAsString(), CoverageEligibilityResponse.EligibilityResponsePurpose.NULL, new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory()));
}
}
};
if (json.has("_purpose")) {
JsonArray array = getJArray(json, "_purpose");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPurpose().size())
res.getPurpose().add(parseEnumeration(null, CoverageEligibilityResponse.EligibilityResponsePurpose.NULL, new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPurpose().get(i));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseCoverageEligibilityResponseEventComponent(getJsonObjectFromArray(array, i)));
}
};
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("requestor"))
res.setRequestor(parseReference(getJObject(json, "requestor")));
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("outcome"))
res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), CoverageEligibilityResponse.EligibilityOutcome.NULL, new CoverageEligibilityResponse.EligibilityOutcomeEnumFactory()));
if (json.has("_outcome"))
parseElementProperties(getJObject(json, "_outcome"), res.getOutcomeElement());
if (json.has("disposition"))
res.setDispositionElement(parseString(json.get("disposition").getAsString()));
if (json.has("_disposition"))
parseElementProperties(getJObject(json, "_disposition"), res.getDispositionElement());
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseCoverageEligibilityResponseInsuranceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preAuthRef"))
res.setPreAuthRefElement(parseString(json.get("preAuthRef").getAsString()));
if (json.has("_preAuthRef"))
parseElementProperties(getJObject(json, "_preAuthRef"), res.getPreAuthRefElement());
if (json.has("form"))
res.setForm(parseCodeableConcept(getJObject(json, "form")));
if (json.has("error")) {
JsonArray array = getJArray(json, "error");
for (int i = 0; i < array.size(); i++) {
res.getError().add(parseCoverageEligibilityResponseErrorsComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent parseCoverageEligibilityResponseEventComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent res = new CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent();
parseCoverageEligibilityResponseEventComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityResponseEventComponentProperties(JsonObject json, CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType when = parseType("when", json);
if (when != null)
res.setWhen(when);
}
protected CoverageEligibilityResponse.InsuranceComponent parseCoverageEligibilityResponseInsuranceComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.InsuranceComponent res = new CoverageEligibilityResponse.InsuranceComponent();
parseCoverageEligibilityResponseInsuranceComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityResponseInsuranceComponentProperties(JsonObject json, CoverageEligibilityResponse.InsuranceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
if (json.has("inforce"))
res.setInforceElement(parseBoolean(json.get("inforce").getAsBoolean()));
if (json.has("_inforce"))
parseElementProperties(getJObject(json, "_inforce"), res.getInforceElement());
if (json.has("benefitPeriod"))
res.setBenefitPeriod(parsePeriod(getJObject(json, "benefitPeriod")));
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseCoverageEligibilityResponseItemsComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected CoverageEligibilityResponse.ItemsComponent parseCoverageEligibilityResponseItemsComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.ItemsComponent res = new CoverageEligibilityResponse.ItemsComponent();
parseCoverageEligibilityResponseItemsComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityResponseItemsComponentProperties(JsonObject json, CoverageEligibilityResponse.ItemsComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("excluded"))
res.setExcludedElement(parseBoolean(json.get("excluded").getAsBoolean()));
if (json.has("_excluded"))
parseElementProperties(getJObject(json, "_excluded"), res.getExcludedElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("network"))
res.setNetwork(parseCodeableConcept(getJObject(json, "network")));
if (json.has("unit"))
res.setUnit(parseCodeableConcept(getJObject(json, "unit")));
if (json.has("term"))
res.setTerm(parseCodeableConcept(getJObject(json, "term")));
if (json.has("benefit")) {
JsonArray array = getJArray(json, "benefit");
for (int i = 0; i < array.size(); i++) {
res.getBenefit().add(parseCoverageEligibilityResponseBenefitComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("authorizationRequired"))
res.setAuthorizationRequiredElement(parseBoolean(json.get("authorizationRequired").getAsBoolean()));
if (json.has("_authorizationRequired"))
parseElementProperties(getJObject(json, "_authorizationRequired"), res.getAuthorizationRequiredElement());
if (json.has("authorizationSupporting")) {
JsonArray array = getJArray(json, "authorizationSupporting");
for (int i = 0; i < array.size(); i++) {
res.getAuthorizationSupporting().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("authorizationUrl"))
res.setAuthorizationUrlElement(parseUri(json.get("authorizationUrl").getAsString()));
if (json.has("_authorizationUrl"))
parseElementProperties(getJObject(json, "_authorizationUrl"), res.getAuthorizationUrlElement());
}
protected CoverageEligibilityResponse.BenefitComponent parseCoverageEligibilityResponseBenefitComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.BenefitComponent res = new CoverageEligibilityResponse.BenefitComponent();
parseCoverageEligibilityResponseBenefitComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityResponseBenefitComponentProperties(JsonObject json, CoverageEligibilityResponse.BenefitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType allowed = parseType("allowed", json);
if (allowed != null)
res.setAllowed(allowed);
DataType used = parseType("used", json);
if (used != null)
res.setUsed(used);
}
protected CoverageEligibilityResponse.ErrorsComponent parseCoverageEligibilityResponseErrorsComponent(JsonObject json) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.ErrorsComponent res = new CoverageEligibilityResponse.ErrorsComponent();
parseCoverageEligibilityResponseErrorsComponentProperties(json, res);
return res;
}
protected void parseCoverageEligibilityResponseErrorsComponentProperties(JsonObject json, CoverageEligibilityResponse.ErrorsComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("expression")) {
JsonArray array = getJArray(json, "expression");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getExpression().add(new StringType());
} else {;
res.getExpression().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_expression")) {
JsonArray array = getJArray(json, "_expression");
for (int i = 0; i < array.size(); i++) {
if (i == res.getExpression().size())
res.getExpression().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getExpression().get(i));
}
};
}
protected DetectedIssue parseDetectedIssue(JsonObject json) throws IOException, FHIRFormatError {
DetectedIssue res = new DetectedIssue();
parseDetectedIssueProperties(json, res);
return res;
}
protected void parseDetectedIssueProperties(JsonObject json, DetectedIssue res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DetectedIssue.DetectedIssueStatus.NULL, new DetectedIssue.DetectedIssueStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("severity"))
res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), DetectedIssue.DetectedIssueSeverity.NULL, new DetectedIssue.DetectedIssueSeverityEnumFactory()));
if (json.has("_severity"))
parseElementProperties(getJObject(json, "_severity"), res.getSeverityElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType identified = parseType("identified", json);
if (identified != null)
res.setIdentified(identified);
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("implicated")) {
JsonArray array = getJArray(json, "implicated");
for (int i = 0; i < array.size(); i++) {
res.getImplicated().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("evidence")) {
JsonArray array = getJArray(json, "evidence");
for (int i = 0; i < array.size(); i++) {
res.getEvidence().add(parseDetectedIssueEvidenceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail"))
res.setDetailElement(parseMarkdown(json.get("detail").getAsString()));
if (json.has("_detail"))
parseElementProperties(getJObject(json, "_detail"), res.getDetailElement());
if (json.has("reference"))
res.setReferenceElement(parseUri(json.get("reference").getAsString()));
if (json.has("_reference"))
parseElementProperties(getJObject(json, "_reference"), res.getReferenceElement());
if (json.has("mitigation")) {
JsonArray array = getJArray(json, "mitigation");
for (int i = 0; i < array.size(); i++) {
res.getMitigation().add(parseDetectedIssueMitigationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DetectedIssue.DetectedIssueEvidenceComponent parseDetectedIssueEvidenceComponent(JsonObject json) throws IOException, FHIRFormatError {
DetectedIssue.DetectedIssueEvidenceComponent res = new DetectedIssue.DetectedIssueEvidenceComponent();
parseDetectedIssueEvidenceComponentProperties(json, res);
return res;
}
protected void parseDetectedIssueEvidenceComponentProperties(JsonObject json, DetectedIssue.DetectedIssueEvidenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueMitigationComponent(JsonObject json) throws IOException, FHIRFormatError {
DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent();
parseDetectedIssueMitigationComponentProperties(json, res);
return res;
}
protected void parseDetectedIssueMitigationComponentProperties(JsonObject json, DetectedIssue.DetectedIssueMitigationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action"))
res.setAction(parseCodeableConcept(getJObject(json, "action")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Device parseDevice(JsonObject json) throws IOException, FHIRFormatError {
Device res = new Device();
parseDeviceProperties(json, res);
return res;
}
protected void parseDeviceProperties(JsonObject json, Device res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("displayName"))
res.setDisplayNameElement(parseString(json.get("displayName").getAsString()));
if (json.has("_displayName"))
parseElementProperties(getJObject(json, "_displayName"), res.getDisplayNameElement());
if (json.has("definition"))
res.setDefinition(parseCodeableReference(getJObject(json, "definition")));
if (json.has("udiCarrier")) {
JsonArray array = getJArray(json, "udiCarrier");
for (int i = 0; i < array.size(); i++) {
res.getUdiCarrier().add(parseDeviceUdiCarrierComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Device.FHIRDeviceStatus.NULL, new Device.FHIRDeviceStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("availabilityStatus"))
res.setAvailabilityStatus(parseCodeableConcept(getJObject(json, "availabilityStatus")));
if (json.has("biologicalSourceEvent"))
res.setBiologicalSourceEvent(parseIdentifier(getJObject(json, "biologicalSourceEvent")));
if (json.has("manufacturer"))
res.setManufacturerElement(parseString(json.get("manufacturer").getAsString()));
if (json.has("_manufacturer"))
parseElementProperties(getJObject(json, "_manufacturer"), res.getManufacturerElement());
if (json.has("manufactureDate"))
res.setManufactureDateElement(parseDateTime(json.get("manufactureDate").getAsString()));
if (json.has("_manufactureDate"))
parseElementProperties(getJObject(json, "_manufactureDate"), res.getManufactureDateElement());
if (json.has("expirationDate"))
res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString()));
if (json.has("_expirationDate"))
parseElementProperties(getJObject(json, "_expirationDate"), res.getExpirationDateElement());
if (json.has("lotNumber"))
res.setLotNumberElement(parseString(json.get("lotNumber").getAsString()));
if (json.has("_lotNumber"))
parseElementProperties(getJObject(json, "_lotNumber"), res.getLotNumberElement());
if (json.has("serialNumber"))
res.setSerialNumberElement(parseString(json.get("serialNumber").getAsString()));
if (json.has("_serialNumber"))
parseElementProperties(getJObject(json, "_serialNumber"), res.getSerialNumberElement());
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseDeviceNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modelNumber"))
res.setModelNumberElement(parseString(json.get("modelNumber").getAsString()));
if (json.has("_modelNumber"))
parseElementProperties(getJObject(json, "_modelNumber"), res.getModelNumberElement());
if (json.has("partNumber"))
res.setPartNumberElement(parseString(json.get("partNumber").getAsString()));
if (json.has("_partNumber"))
parseElementProperties(getJObject(json, "_partNumber"), res.getPartNumberElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version")) {
JsonArray array = getJArray(json, "version");
for (int i = 0; i < array.size(); i++) {
res.getVersion().add(parseDeviceVersionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("conformsTo")) {
JsonArray array = getJArray(json, "conformsTo");
for (int i = 0; i < array.size(); i++) {
res.getConformsTo().add(parseDeviceConformsToComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseDevicePropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("mode"))
res.setMode(parseCodeableConcept(getJObject(json, "mode")));
if (json.has("cycle"))
res.setCycle(parseCount(getJObject(json, "cycle")));
if (json.has("duration"))
res.setDuration(parseDuration(getJObject(json, "duration")));
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("gateway")) {
JsonArray array = getJArray(json, "gateway");
for (int i = 0; i < array.size(); i++) {
res.getGateway().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("safety")) {
JsonArray array = getJArray(json, "safety");
for (int i = 0; i < array.size(); i++) {
res.getSafety().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("parent"))
res.setParent(parseReference(getJObject(json, "parent")));
}
protected Device.DeviceUdiCarrierComponent parseDeviceUdiCarrierComponent(JsonObject json) throws IOException, FHIRFormatError {
Device.DeviceUdiCarrierComponent res = new Device.DeviceUdiCarrierComponent();
parseDeviceUdiCarrierComponentProperties(json, res);
return res;
}
protected void parseDeviceUdiCarrierComponentProperties(JsonObject json, Device.DeviceUdiCarrierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("deviceIdentifier"))
res.setDeviceIdentifierElement(parseString(json.get("deviceIdentifier").getAsString()));
if (json.has("_deviceIdentifier"))
parseElementProperties(getJObject(json, "_deviceIdentifier"), res.getDeviceIdentifierElement());
if (json.has("issuer"))
res.setIssuerElement(parseUri(json.get("issuer").getAsString()));
if (json.has("_issuer"))
parseElementProperties(getJObject(json, "_issuer"), res.getIssuerElement());
if (json.has("jurisdiction"))
res.setJurisdictionElement(parseUri(json.get("jurisdiction").getAsString()));
if (json.has("_jurisdiction"))
parseElementProperties(getJObject(json, "_jurisdiction"), res.getJurisdictionElement());
if (json.has("carrierAIDC"))
res.setCarrierAIDCElement(parseBase64Binary(json.get("carrierAIDC").getAsString()));
if (json.has("_carrierAIDC"))
parseElementProperties(getJObject(json, "_carrierAIDC"), res.getCarrierAIDCElement());
if (json.has("carrierHRF"))
res.setCarrierHRFElement(parseString(json.get("carrierHRF").getAsString()));
if (json.has("_carrierHRF"))
parseElementProperties(getJObject(json, "_carrierHRF"), res.getCarrierHRFElement());
if (json.has("entryType"))
res.setEntryTypeElement(parseEnumeration(json.get("entryType").getAsString(), Device.UDIEntryType.NULL, new Device.UDIEntryTypeEnumFactory()));
if (json.has("_entryType"))
parseElementProperties(getJObject(json, "_entryType"), res.getEntryTypeElement());
}
protected Device.DeviceNameComponent parseDeviceNameComponent(JsonObject json) throws IOException, FHIRFormatError {
Device.DeviceNameComponent res = new Device.DeviceNameComponent();
parseDeviceNameComponentProperties(json, res);
return res;
}
protected void parseDeviceNameComponentProperties(JsonObject json, Device.DeviceNameComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.DeviceNameType.NULL, new Enumerations.DeviceNameTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("display"))
res.setDisplayElement(parseBoolean(json.get("display").getAsBoolean()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
}
protected Device.DeviceVersionComponent parseDeviceVersionComponent(JsonObject json) throws IOException, FHIRFormatError {
Device.DeviceVersionComponent res = new Device.DeviceVersionComponent();
parseDeviceVersionComponentProperties(json, res);
return res;
}
protected void parseDeviceVersionComponentProperties(JsonObject json, Device.DeviceVersionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("component"))
res.setComponent(parseIdentifier(getJObject(json, "component")));
if (json.has("installDate"))
res.setInstallDateElement(parseDateTime(json.get("installDate").getAsString()));
if (json.has("_installDate"))
parseElementProperties(getJObject(json, "_installDate"), res.getInstallDateElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected Device.DeviceConformsToComponent parseDeviceConformsToComponent(JsonObject json) throws IOException, FHIRFormatError {
Device.DeviceConformsToComponent res = new Device.DeviceConformsToComponent();
parseDeviceConformsToComponentProperties(json, res);
return res;
}
protected void parseDeviceConformsToComponentProperties(JsonObject json, Device.DeviceConformsToComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("specification"))
res.setSpecification(parseCodeableConcept(getJObject(json, "specification")));
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
}
protected Device.DevicePropertyComponent parseDevicePropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
Device.DevicePropertyComponent res = new Device.DevicePropertyComponent();
parseDevicePropertyComponentProperties(json, res);
return res;
}
protected void parseDevicePropertyComponentProperties(JsonObject json, Device.DevicePropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DeviceAssociation parseDeviceAssociation(JsonObject json) throws IOException, FHIRFormatError {
DeviceAssociation res = new DeviceAssociation();
parseDeviceAssociationProperties(json, res);
return res;
}
protected void parseDeviceAssociationProperties(JsonObject json, DeviceAssociation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("statusReason")) {
JsonArray array = getJArray(json, "statusReason");
for (int i = 0; i < array.size(); i++) {
res.getStatusReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("bodyStructure"))
res.setBodyStructure(parseReference(getJObject(json, "bodyStructure")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("operation")) {
JsonArray array = getJArray(json, "operation");
for (int i = 0; i < array.size(); i++) {
res.getOperation().add(parseDeviceAssociationOperationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceAssociation.DeviceAssociationOperationComponent parseDeviceAssociationOperationComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceAssociation.DeviceAssociationOperationComponent res = new DeviceAssociation.DeviceAssociationOperationComponent();
parseDeviceAssociationOperationComponentProperties(json, res);
return res;
}
protected void parseDeviceAssociationOperationComponentProperties(JsonObject json, DeviceAssociation.DeviceAssociationOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("operator")) {
JsonArray array = getJArray(json, "operator");
for (int i = 0; i < array.size(); i++) {
res.getOperator().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected DeviceDefinition parseDeviceDefinition(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition res = new DeviceDefinition();
parseDeviceDefinitionProperties(json, res);
return res;
}
protected void parseDeviceDefinitionProperties(JsonObject json, DeviceDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("udiDeviceIdentifier")) {
JsonArray array = getJArray(json, "udiDeviceIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getUdiDeviceIdentifier().add(parseDeviceDefinitionUdiDeviceIdentifierComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("regulatoryIdentifier")) {
JsonArray array = getJArray(json, "regulatoryIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getRegulatoryIdentifier().add(parseDeviceDefinitionRegulatoryIdentifierComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partNumber"))
res.setPartNumberElement(parseString(json.get("partNumber").getAsString()));
if (json.has("_partNumber"))
parseElementProperties(getJObject(json, "_partNumber"), res.getPartNumberElement());
if (json.has("manufacturer"))
res.setManufacturer(parseReference(getJObject(json, "manufacturer")));
if (json.has("deviceName")) {
JsonArray array = getJArray(json, "deviceName");
for (int i = 0; i < array.size(); i++) {
res.getDeviceName().add(parseDeviceDefinitionDeviceNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modelNumber"))
res.setModelNumberElement(parseString(json.get("modelNumber").getAsString()));
if (json.has("_modelNumber"))
parseElementProperties(getJObject(json, "_modelNumber"), res.getModelNumberElement());
if (json.has("classification")) {
JsonArray array = getJArray(json, "classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseDeviceDefinitionClassificationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("conformsTo")) {
JsonArray array = getJArray(json, "conformsTo");
for (int i = 0; i < array.size(); i++) {
res.getConformsTo().add(parseDeviceDefinitionConformsToComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("hasPart")) {
JsonArray array = getJArray(json, "hasPart");
for (int i = 0; i < array.size(); i++) {
res.getHasPart().add(parseDeviceDefinitionHasPartComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packaging")) {
JsonArray array = getJArray(json, "packaging");
for (int i = 0; i < array.size(); i++) {
res.getPackaging().add(parseDeviceDefinitionPackagingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version")) {
JsonArray array = getJArray(json, "version");
for (int i = 0; i < array.size(); i++) {
res.getVersion().add(parseDeviceDefinitionVersionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("safety")) {
JsonArray array = getJArray(json, "safety");
for (int i = 0; i < array.size(); i++) {
res.getSafety().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("shelfLifeStorage")) {
JsonArray array = getJArray(json, "shelfLifeStorage");
for (int i = 0; i < array.size(); i++) {
res.getShelfLifeStorage().add(parseProductShelfLife(getJsonObjectFromArray(array, i)));
}
};
if (json.has("languageCode")) {
JsonArray array = getJArray(json, "languageCode");
for (int i = 0; i < array.size(); i++) {
res.getLanguageCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseDeviceDefinitionPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseDeviceDefinitionLinkComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("material")) {
JsonArray array = getJArray(json, "material");
for (int i = 0; i < array.size(); i++) {
res.getMaterial().add(parseDeviceDefinitionMaterialComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("productionIdentifierInUDI")) {
JsonArray array = getJArray(json, "productionIdentifierInUDI");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProductionIdentifierInUDI().add(new Enumeration(new DeviceDefinition.DeviceProductionIdentifierInUDIEnumFactory(), DeviceDefinition.DeviceProductionIdentifierInUDI.NULL));
} else {;
res.getProductionIdentifierInUDI().add(parseEnumeration(array.get(i).getAsString(), DeviceDefinition.DeviceProductionIdentifierInUDI.NULL, new DeviceDefinition.DeviceProductionIdentifierInUDIEnumFactory()));
}
}
};
if (json.has("_productionIdentifierInUDI")) {
JsonArray array = getJArray(json, "_productionIdentifierInUDI");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProductionIdentifierInUDI().size())
res.getProductionIdentifierInUDI().add(parseEnumeration(null, DeviceDefinition.DeviceProductionIdentifierInUDI.NULL, new DeviceDefinition.DeviceProductionIdentifierInUDIEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProductionIdentifierInUDI().get(i));
}
};
if (json.has("guideline"))
res.setGuideline(parseDeviceDefinitionGuidelineComponent(getJObject(json, "guideline")));
if (json.has("correctiveAction"))
res.setCorrectiveAction(parseDeviceDefinitionCorrectiveActionComponent(getJObject(json, "correctiveAction")));
if (json.has("chargeItem")) {
JsonArray array = getJArray(json, "chargeItem");
for (int i = 0; i < array.size(); i++) {
res.getChargeItem().add(parseDeviceDefinitionChargeItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent parseDeviceDefinitionUdiDeviceIdentifierComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent res = new DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent();
parseDeviceDefinitionUdiDeviceIdentifierComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionUdiDeviceIdentifierComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("deviceIdentifier"))
res.setDeviceIdentifierElement(parseString(json.get("deviceIdentifier").getAsString()));
if (json.has("_deviceIdentifier"))
parseElementProperties(getJObject(json, "_deviceIdentifier"), res.getDeviceIdentifierElement());
if (json.has("issuer"))
res.setIssuerElement(parseUri(json.get("issuer").getAsString()));
if (json.has("_issuer"))
parseElementProperties(getJObject(json, "_issuer"), res.getIssuerElement());
if (json.has("jurisdiction"))
res.setJurisdictionElement(parseUri(json.get("jurisdiction").getAsString()));
if (json.has("_jurisdiction"))
parseElementProperties(getJObject(json, "_jurisdiction"), res.getJurisdictionElement());
if (json.has("marketDistribution")) {
JsonArray array = getJArray(json, "marketDistribution");
for (int i = 0; i < array.size(); i++) {
res.getMarketDistribution().add(parseDeviceDefinitionUdiDeviceIdentifierMarketDistributionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent parseDeviceDefinitionUdiDeviceIdentifierMarketDistributionComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent res = new DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent();
parseDeviceDefinitionUdiDeviceIdentifierMarketDistributionComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionUdiDeviceIdentifierMarketDistributionComponentProperties(JsonObject json, DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("marketPeriod"))
res.setMarketPeriod(parsePeriod(getJObject(json, "marketPeriod")));
if (json.has("subJurisdiction"))
res.setSubJurisdictionElement(parseUri(json.get("subJurisdiction").getAsString()));
if (json.has("_subJurisdiction"))
parseElementProperties(getJObject(json, "_subJurisdiction"), res.getSubJurisdictionElement());
}
protected DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent parseDeviceDefinitionRegulatoryIdentifierComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent res = new DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent();
parseDeviceDefinitionRegulatoryIdentifierComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionRegulatoryIdentifierComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), DeviceDefinition.DeviceDefinitionRegulatoryIdentifierType.NULL, new DeviceDefinition.DeviceDefinitionRegulatoryIdentifierTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("deviceIdentifier"))
res.setDeviceIdentifierElement(parseString(json.get("deviceIdentifier").getAsString()));
if (json.has("_deviceIdentifier"))
parseElementProperties(getJObject(json, "_deviceIdentifier"), res.getDeviceIdentifierElement());
if (json.has("issuer"))
res.setIssuerElement(parseUri(json.get("issuer").getAsString()));
if (json.has("_issuer"))
parseElementProperties(getJObject(json, "_issuer"), res.getIssuerElement());
if (json.has("jurisdiction"))
res.setJurisdictionElement(parseUri(json.get("jurisdiction").getAsString()));
if (json.has("_jurisdiction"))
parseElementProperties(getJObject(json, "_jurisdiction"), res.getJurisdictionElement());
}
protected DeviceDefinition.DeviceDefinitionDeviceNameComponent parseDeviceDefinitionDeviceNameComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionDeviceNameComponent res = new DeviceDefinition.DeviceDefinitionDeviceNameComponent();
parseDeviceDefinitionDeviceNameComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionDeviceNameComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionDeviceNameComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.DeviceNameType.NULL, new Enumerations.DeviceNameTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected DeviceDefinition.DeviceDefinitionClassificationComponent parseDeviceDefinitionClassificationComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionClassificationComponent res = new DeviceDefinition.DeviceDefinitionClassificationComponent();
parseDeviceDefinitionClassificationComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionClassificationComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionClassificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("justification")) {
JsonArray array = getJArray(json, "justification");
for (int i = 0; i < array.size(); i++) {
res.getJustification().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDefinition.DeviceDefinitionConformsToComponent parseDeviceDefinitionConformsToComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionConformsToComponent res = new DeviceDefinition.DeviceDefinitionConformsToComponent();
parseDeviceDefinitionConformsToComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionConformsToComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionConformsToComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("specification"))
res.setSpecification(parseCodeableConcept(getJObject(json, "specification")));
if (json.has("version")) {
JsonArray array = getJArray(json, "version");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getVersion().add(new StringType());
} else {;
res.getVersion().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_version")) {
JsonArray array = getJArray(json, "_version");
for (int i = 0; i < array.size(); i++) {
if (i == res.getVersion().size())
res.getVersion().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getVersion().get(i));
}
};
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDefinition.DeviceDefinitionHasPartComponent parseDeviceDefinitionHasPartComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionHasPartComponent res = new DeviceDefinition.DeviceDefinitionHasPartComponent();
parseDeviceDefinitionHasPartComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionHasPartComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionHasPartComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
if (json.has("count"))
res.setCountElement(parseInteger(json.get("count").getAsLong()));
if (json.has("_count"))
parseElementProperties(getJObject(json, "_count"), res.getCountElement());
}
protected DeviceDefinition.DeviceDefinitionPackagingComponent parseDeviceDefinitionPackagingComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionPackagingComponent res = new DeviceDefinition.DeviceDefinitionPackagingComponent();
parseDeviceDefinitionPackagingComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionPackagingComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionPackagingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("count"))
res.setCountElement(parseInteger(json.get("count").getAsLong()));
if (json.has("_count"))
parseElementProperties(getJObject(json, "_count"), res.getCountElement());
if (json.has("distributor")) {
JsonArray array = getJArray(json, "distributor");
for (int i = 0; i < array.size(); i++) {
res.getDistributor().add(parseDeviceDefinitionPackagingDistributorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("udiDeviceIdentifier")) {
JsonArray array = getJArray(json, "udiDeviceIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getUdiDeviceIdentifier().add(parseDeviceDefinitionUdiDeviceIdentifierComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packaging")) {
JsonArray array = getJArray(json, "packaging");
for (int i = 0; i < array.size(); i++) {
res.getPackaging().add(parseDeviceDefinitionPackagingComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDefinition.PackagingDistributorComponent parseDeviceDefinitionPackagingDistributorComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.PackagingDistributorComponent res = new DeviceDefinition.PackagingDistributorComponent();
parseDeviceDefinitionPackagingDistributorComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionPackagingDistributorComponentProperties(JsonObject json, DeviceDefinition.PackagingDistributorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("organizationReference")) {
JsonArray array = getJArray(json, "organizationReference");
for (int i = 0; i < array.size(); i++) {
res.getOrganizationReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDefinition.DeviceDefinitionVersionComponent parseDeviceDefinitionVersionComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionVersionComponent res = new DeviceDefinition.DeviceDefinitionVersionComponent();
parseDeviceDefinitionVersionComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionVersionComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionVersionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("component"))
res.setComponent(parseIdentifier(getJObject(json, "component")));
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected DeviceDefinition.DeviceDefinitionPropertyComponent parseDeviceDefinitionPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionPropertyComponent res = new DeviceDefinition.DeviceDefinitionPropertyComponent();
parseDeviceDefinitionPropertyComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionPropertyComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DeviceDefinition.DeviceDefinitionLinkComponent parseDeviceDefinitionLinkComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionLinkComponent res = new DeviceDefinition.DeviceDefinitionLinkComponent();
parseDeviceDefinitionLinkComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionLinkComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionLinkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relation"))
res.setRelation(parseCoding(getJObject(json, "relation")));
if (json.has("relatedDevice"))
res.setRelatedDevice(parseCodeableReference(getJObject(json, "relatedDevice")));
}
protected DeviceDefinition.DeviceDefinitionMaterialComponent parseDeviceDefinitionMaterialComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionMaterialComponent res = new DeviceDefinition.DeviceDefinitionMaterialComponent();
parseDeviceDefinitionMaterialComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionMaterialComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionMaterialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("substance"))
res.setSubstance(parseCodeableConcept(getJObject(json, "substance")));
if (json.has("alternate"))
res.setAlternateElement(parseBoolean(json.get("alternate").getAsBoolean()));
if (json.has("_alternate"))
parseElementProperties(getJObject(json, "_alternate"), res.getAlternateElement());
if (json.has("allergenicIndicator"))
res.setAllergenicIndicatorElement(parseBoolean(json.get("allergenicIndicator").getAsBoolean()));
if (json.has("_allergenicIndicator"))
parseElementProperties(getJObject(json, "_allergenicIndicator"), res.getAllergenicIndicatorElement());
}
protected DeviceDefinition.DeviceDefinitionGuidelineComponent parseDeviceDefinitionGuidelineComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionGuidelineComponent res = new DeviceDefinition.DeviceDefinitionGuidelineComponent();
parseDeviceDefinitionGuidelineComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionGuidelineComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionGuidelineComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("usageInstruction"))
res.setUsageInstructionElement(parseMarkdown(json.get("usageInstruction").getAsString()));
if (json.has("_usageInstruction"))
parseElementProperties(getJObject(json, "_usageInstruction"), res.getUsageInstructionElement());
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("indication")) {
JsonArray array = getJArray(json, "indication");
for (int i = 0; i < array.size(); i++) {
res.getIndication().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contraindication")) {
JsonArray array = getJArray(json, "contraindication");
for (int i = 0; i < array.size(); i++) {
res.getContraindication().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("warning")) {
JsonArray array = getJArray(json, "warning");
for (int i = 0; i < array.size(); i++) {
res.getWarning().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("intendedUse"))
res.setIntendedUseElement(parseString(json.get("intendedUse").getAsString()));
if (json.has("_intendedUse"))
parseElementProperties(getJObject(json, "_intendedUse"), res.getIntendedUseElement());
}
protected DeviceDefinition.DeviceDefinitionCorrectiveActionComponent parseDeviceDefinitionCorrectiveActionComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionCorrectiveActionComponent res = new DeviceDefinition.DeviceDefinitionCorrectiveActionComponent();
parseDeviceDefinitionCorrectiveActionComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionCorrectiveActionComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionCorrectiveActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("recall"))
res.setRecallElement(parseBoolean(json.get("recall").getAsBoolean()));
if (json.has("_recall"))
parseElementProperties(getJObject(json, "_recall"), res.getRecallElement());
if (json.has("scope"))
res.setScopeElement(parseEnumeration(json.get("scope").getAsString(), DeviceDefinition.DeviceCorrectiveActionScope.NULL, new DeviceDefinition.DeviceCorrectiveActionScopeEnumFactory()));
if (json.has("_scope"))
parseElementProperties(getJObject(json, "_scope"), res.getScopeElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected DeviceDefinition.DeviceDefinitionChargeItemComponent parseDeviceDefinitionChargeItemComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionChargeItemComponent res = new DeviceDefinition.DeviceDefinitionChargeItemComponent();
parseDeviceDefinitionChargeItemComponentProperties(json, res);
return res;
}
protected void parseDeviceDefinitionChargeItemComponentProperties(JsonObject json, DeviceDefinition.DeviceDefinitionChargeItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("chargeItemCode"))
res.setChargeItemCode(parseCodeableReference(getJObject(json, "chargeItemCode")));
if (json.has("count"))
res.setCount(parseQuantity(getJObject(json, "count")));
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDispense parseDeviceDispense(JsonObject json) throws IOException, FHIRFormatError {
DeviceDispense res = new DeviceDispense();
parseDeviceDispenseProperties(json, res);
return res;
}
protected void parseDeviceDispenseProperties(JsonObject json, DeviceDispense res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceDispense.DeviceDispenseStatusCodes.NULL, new DeviceDispense.DeviceDispenseStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableReference(getJObject(json, "statusReason")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device"))
res.setDevice(parseCodeableReference(getJObject(json, "device")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("receiver"))
res.setReceiver(parseReference(getJObject(json, "receiver")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseDeviceDispensePerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("preparedDate"))
res.setPreparedDateElement(parseDateTime(json.get("preparedDate").getAsString()));
if (json.has("_preparedDate"))
parseElementProperties(getJObject(json, "_preparedDate"), res.getPreparedDateElement());
if (json.has("whenHandedOver"))
res.setWhenHandedOverElement(parseDateTime(json.get("whenHandedOver").getAsString()));
if (json.has("_whenHandedOver"))
parseElementProperties(getJObject(json, "_whenHandedOver"), res.getWhenHandedOverElement());
if (json.has("destination"))
res.setDestination(parseReference(getJObject(json, "destination")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("usageInstruction"))
res.setUsageInstructionElement(parseMarkdown(json.get("usageInstruction").getAsString()));
if (json.has("_usageInstruction"))
parseElementProperties(getJObject(json, "_usageInstruction"), res.getUsageInstructionElement());
if (json.has("eventHistory")) {
JsonArray array = getJArray(json, "eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceDispense.DeviceDispensePerformerComponent parseDeviceDispensePerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceDispense.DeviceDispensePerformerComponent res = new DeviceDispense.DeviceDispensePerformerComponent();
parseDeviceDispensePerformerComponentProperties(json, res);
return res;
}
protected void parseDeviceDispensePerformerComponentProperties(JsonObject json, DeviceDispense.DeviceDispensePerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected DeviceMetric parseDeviceMetric(JsonObject json) throws IOException, FHIRFormatError {
DeviceMetric res = new DeviceMetric();
parseDeviceMetricProperties(json, res);
return res;
}
protected void parseDeviceMetricProperties(JsonObject json, DeviceMetric res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("unit"))
res.setUnit(parseCodeableConcept(getJObject(json, "unit")));
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("operationalStatus"))
res.setOperationalStatusElement(parseEnumeration(json.get("operationalStatus").getAsString(), DeviceMetric.DeviceMetricOperationalStatus.NULL, new DeviceMetric.DeviceMetricOperationalStatusEnumFactory()));
if (json.has("_operationalStatus"))
parseElementProperties(getJObject(json, "_operationalStatus"), res.getOperationalStatusElement());
if (json.has("color"))
res.setColorElement(parseCode(json.get("color").getAsString()));
if (json.has("_color"))
parseElementProperties(getJObject(json, "_color"), res.getColorElement());
if (json.has("category"))
res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), DeviceMetric.DeviceMetricCategory.NULL, new DeviceMetric.DeviceMetricCategoryEnumFactory()));
if (json.has("_category"))
parseElementProperties(getJObject(json, "_category"), res.getCategoryElement());
if (json.has("measurementFrequency"))
res.setMeasurementFrequency(parseQuantity(getJObject(json, "measurementFrequency")));
if (json.has("calibration")) {
JsonArray array = getJArray(json, "calibration");
for (int i = 0; i < array.size(); i++) {
res.getCalibration().add(parseDeviceMetricCalibrationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricCalibrationComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent();
parseDeviceMetricCalibrationComponentProperties(json, res);
return res;
}
protected void parseDeviceMetricCalibrationComponentProperties(JsonObject json, DeviceMetric.DeviceMetricCalibrationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), DeviceMetric.DeviceMetricCalibrationType.NULL, new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("state"))
res.setStateElement(parseEnumeration(json.get("state").getAsString(), DeviceMetric.DeviceMetricCalibrationState.NULL, new DeviceMetric.DeviceMetricCalibrationStateEnumFactory()));
if (json.has("_state"))
parseElementProperties(getJObject(json, "_state"), res.getStateElement());
if (json.has("time"))
res.setTimeElement(parseInstant(json.get("time").getAsString()));
if (json.has("_time"))
parseElementProperties(getJObject(json, "_time"), res.getTimeElement());
}
protected DeviceRequest parseDeviceRequest(JsonObject json) throws IOException, FHIRFormatError {
DeviceRequest res = new DeviceRequest();
parseDeviceRequestProperties(json, res);
return res;
}
protected void parseDeviceRequestProperties(JsonObject json, DeviceRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.RequestStatus.NULL, new Enumerations.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Enumerations.RequestIntent.NULL, new Enumerations.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
if (json.has("code"))
res.setCode(parseCodeableReference(getJObject(json, "code")));
if (json.has("quantity"))
res.setQuantityElement(parseInteger(json.get("quantity").getAsLong()));
if (json.has("_quantity"))
parseElementProperties(getJObject(json, "_quantity"), res.getQuantityElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseDeviceRequestParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("performer"))
res.setPerformer(parseCodeableReference(getJObject(json, "performer")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("asNeeded"))
res.setAsNeededElement(parseBoolean(json.get("asNeeded").getAsBoolean()));
if (json.has("_asNeeded"))
parseElementProperties(getJObject(json, "_asNeeded"), res.getAsNeededElement());
if (json.has("asNeededFor"))
res.setAsNeededFor(parseCodeableConcept(getJObject(json, "asNeededFor")));
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relevantHistory")) {
JsonArray array = getJArray(json, "relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceRequest.DeviceRequestParameterComponent parseDeviceRequestParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceRequest.DeviceRequestParameterComponent res = new DeviceRequest.DeviceRequestParameterComponent();
parseDeviceRequestParameterComponentProperties(json, res);
return res;
}
protected void parseDeviceRequestParameterComponentProperties(JsonObject json, DeviceRequest.DeviceRequestParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DeviceUsage parseDeviceUsage(JsonObject json) throws IOException, FHIRFormatError {
DeviceUsage res = new DeviceUsage();
parseDeviceUsageProperties(json, res);
return res;
}
protected void parseDeviceUsageProperties(JsonObject json, DeviceUsage res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceUsage.DeviceUsageStatus.NULL, new DeviceUsage.DeviceUsageStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("context"))
res.setContext(parseReference(getJObject(json, "context")));
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("dateAsserted"))
res.setDateAssertedElement(parseDateTime(json.get("dateAsserted").getAsString()));
if (json.has("_dateAsserted"))
parseElementProperties(getJObject(json, "_dateAsserted"), res.getDateAssertedElement());
if (json.has("usageStatus"))
res.setUsageStatus(parseCodeableConcept(getJObject(json, "usageStatus")));
if (json.has("usageReason")) {
JsonArray array = getJArray(json, "usageReason");
for (int i = 0; i < array.size(); i++) {
res.getUsageReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("adherence"))
res.setAdherence(parseDeviceUsageAdherenceComponent(getJObject(json, "adherence")));
if (json.has("informationSource"))
res.setInformationSource(parseReference(getJObject(json, "informationSource")));
if (json.has("device"))
res.setDevice(parseCodeableReference(getJObject(json, "device")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite"))
res.setBodySite(parseCodeableReference(getJObject(json, "bodySite")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected DeviceUsage.DeviceUsageAdherenceComponent parseDeviceUsageAdherenceComponent(JsonObject json) throws IOException, FHIRFormatError {
DeviceUsage.DeviceUsageAdherenceComponent res = new DeviceUsage.DeviceUsageAdherenceComponent();
parseDeviceUsageAdherenceComponentProperties(json, res);
return res;
}
protected void parseDeviceUsageAdherenceComponentProperties(JsonObject json, DeviceUsage.DeviceUsageAdherenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected DiagnosticReport parseDiagnosticReport(JsonObject json) throws IOException, FHIRFormatError {
DiagnosticReport res = new DiagnosticReport();
parseDiagnosticReportProperties(json, res);
return res;
}
protected void parseDiagnosticReportProperties(JsonObject json, DiagnosticReport res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DiagnosticReport.DiagnosticReportStatus.NULL, new DiagnosticReport.DiagnosticReportStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType effective = parseType("effective", json);
if (effective != null)
res.setEffective(effective);
if (json.has("issued"))
res.setIssuedElement(parseInstant(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("resultsInterpreter")) {
JsonArray array = getJArray(json, "resultsInterpreter");
for (int i = 0; i < array.size(); i++) {
res.getResultsInterpreter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specimen")) {
JsonArray array = getJArray(json, "specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("result")) {
JsonArray array = getJArray(json, "result");
for (int i = 0; i < array.size(); i++) {
res.getResult().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("study")) {
JsonArray array = getJArray(json, "study");
for (int i = 0; i < array.size(); i++) {
res.getStudy().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseDiagnosticReportSupportingInfoComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("media")) {
JsonArray array = getJArray(json, "media");
for (int i = 0; i < array.size(); i++) {
res.getMedia().add(parseDiagnosticReportMediaComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("composition"))
res.setComposition(parseReference(getJObject(json, "composition")));
if (json.has("conclusion"))
res.setConclusionElement(parseMarkdown(json.get("conclusion").getAsString()));
if (json.has("_conclusion"))
parseElementProperties(getJObject(json, "_conclusion"), res.getConclusionElement());
if (json.has("conclusionCode")) {
JsonArray array = getJArray(json, "conclusionCode");
for (int i = 0; i < array.size(); i++) {
res.getConclusionCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("presentedForm")) {
JsonArray array = getJArray(json, "presentedForm");
for (int i = 0; i < array.size(); i++) {
res.getPresentedForm().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
}
protected DiagnosticReport.DiagnosticReportSupportingInfoComponent parseDiagnosticReportSupportingInfoComponent(JsonObject json) throws IOException, FHIRFormatError {
DiagnosticReport.DiagnosticReportSupportingInfoComponent res = new DiagnosticReport.DiagnosticReportSupportingInfoComponent();
parseDiagnosticReportSupportingInfoComponentProperties(json, res);
return res;
}
protected void parseDiagnosticReportSupportingInfoComponentProperties(JsonObject json, DiagnosticReport.DiagnosticReportSupportingInfoComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected DiagnosticReport.DiagnosticReportMediaComponent parseDiagnosticReportMediaComponent(JsonObject json) throws IOException, FHIRFormatError {
DiagnosticReport.DiagnosticReportMediaComponent res = new DiagnosticReport.DiagnosticReportMediaComponent();
parseDiagnosticReportMediaComponentProperties(json, res);
return res;
}
protected void parseDiagnosticReportMediaComponentProperties(JsonObject json, DiagnosticReport.DiagnosticReportMediaComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("link"))
res.setLink(parseReference(getJObject(json, "link")));
}
protected DocumentReference parseDocumentReference(JsonObject json) throws IOException, FHIRFormatError {
DocumentReference res = new DocumentReference();
parseDocumentReferenceProperties(json, res);
return res;
}
protected void parseDocumentReferenceProperties(JsonObject json, DocumentReference res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DocumentReference.DocumentReferenceStatus.NULL, new DocumentReference.DocumentReferenceStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("docStatus"))
res.setDocStatusElement(parseEnumeration(json.get("docStatus").getAsString(), Enumerations.CompositionStatus.NULL, new Enumerations.CompositionStatusEnumFactory()));
if (json.has("_docStatus"))
parseElementProperties(getJObject(json, "_docStatus"), res.getDocStatusElement());
if (json.has("modality")) {
JsonArray array = getJArray(json, "modality");
for (int i = 0; i < array.size(); i++) {
res.getModality().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("context")) {
JsonArray array = getJArray(json, "context");
for (int i = 0; i < array.size(); i++) {
res.getContext().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("facilityType"))
res.setFacilityType(parseCodeableConcept(getJObject(json, "facilityType")));
if (json.has("practiceSetting"))
res.setPracticeSetting(parseCodeableConcept(getJObject(json, "practiceSetting")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("date"))
res.setDateElement(parseInstant(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("attester")) {
JsonArray array = getJArray(json, "attester");
for (int i = 0; i < array.size(); i++) {
res.getAttester().add(parseDocumentReferenceAttesterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
if (json.has("relatesTo")) {
JsonArray array = getJArray(json, "relatesTo");
for (int i = 0; i < array.size(); i++) {
res.getRelatesTo().add(parseDocumentReferenceRelatesToComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("securityLabel")) {
JsonArray array = getJArray(json, "securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("content")) {
JsonArray array = getJArray(json, "content");
for (int i = 0; i < array.size(); i++) {
res.getContent().add(parseDocumentReferenceContentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DocumentReference.DocumentReferenceAttesterComponent parseDocumentReferenceAttesterComponent(JsonObject json) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceAttesterComponent res = new DocumentReference.DocumentReferenceAttesterComponent();
parseDocumentReferenceAttesterComponentProperties(json, res);
return res;
}
protected void parseDocumentReferenceAttesterComponentProperties(JsonObject json, DocumentReference.DocumentReferenceAttesterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setMode(parseCodeableConcept(getJObject(json, "mode")));
if (json.has("time"))
res.setTimeElement(parseDateTime(json.get("time").getAsString()));
if (json.has("_time"))
parseElementProperties(getJObject(json, "_time"), res.getTimeElement());
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
}
protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceRelatesToComponent(JsonObject json) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent();
parseDocumentReferenceRelatesToComponentProperties(json, res);
return res;
}
protected void parseDocumentReferenceRelatesToComponentProperties(JsonObject json, DocumentReference.DocumentReferenceRelatesToComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("target"))
res.setTarget(parseReference(getJObject(json, "target")));
}
protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceContentComponent(JsonObject json) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent();
parseDocumentReferenceContentComponentProperties(json, res);
return res;
}
protected void parseDocumentReferenceContentComponentProperties(JsonObject json, DocumentReference.DocumentReferenceContentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("attachment"))
res.setAttachment(parseAttachment(getJObject(json, "attachment")));
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
res.getProfile().add(parseDocumentReferenceContentProfileComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected DocumentReference.DocumentReferenceContentProfileComponent parseDocumentReferenceContentProfileComponent(JsonObject json) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceContentProfileComponent res = new DocumentReference.DocumentReferenceContentProfileComponent();
parseDocumentReferenceContentProfileComponentProperties(json, res);
return res;
}
protected void parseDocumentReferenceContentProfileComponentProperties(JsonObject json, DocumentReference.DocumentReferenceContentProfileComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Encounter parseEncounter(JsonObject json) throws IOException, FHIRFormatError {
Encounter res = new Encounter();
parseEncounterProperties(json, res);
return res;
}
protected void parseEncounterProperties(JsonObject json, Encounter res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.EncounterStatus.NULL, new Enumerations.EncounterStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("class")) {
JsonArray array = getJArray(json, "class");
for (int i = 0; i < array.size(); i++) {
res.getClass_().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceType")) {
JsonArray array = getJArray(json, "serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("subjectStatus"))
res.setSubjectStatus(parseCodeableConcept(getJObject(json, "subjectStatus")));
if (json.has("episodeOfCare")) {
JsonArray array = getJArray(json, "episodeOfCare");
for (int i = 0; i < array.size(); i++) {
res.getEpisodeOfCare().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("careTeam")) {
JsonArray array = getJArray(json, "careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
if (json.has("serviceProvider"))
res.setServiceProvider(parseReference(getJObject(json, "serviceProvider")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseEncounterParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("appointment")) {
JsonArray array = getJArray(json, "appointment");
for (int i = 0; i < array.size(); i++) {
res.getAppointment().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("virtualService")) {
JsonArray array = getJArray(json, "virtualService");
for (int i = 0; i < array.size(); i++) {
res.getVirtualService().add(parseVirtualServiceDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("actualPeriod"))
res.setActualPeriod(parsePeriod(getJObject(json, "actualPeriod")));
if (json.has("plannedStartDate"))
res.setPlannedStartDateElement(parseDateTime(json.get("plannedStartDate").getAsString()));
if (json.has("_plannedStartDate"))
parseElementProperties(getJObject(json, "_plannedStartDate"), res.getPlannedStartDateElement());
if (json.has("plannedEndDate"))
res.setPlannedEndDateElement(parseDateTime(json.get("plannedEndDate").getAsString()));
if (json.has("_plannedEndDate"))
parseElementProperties(getJObject(json, "_plannedEndDate"), res.getPlannedEndDateElement());
if (json.has("length"))
res.setLength(parseDuration(getJObject(json, "length")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseEncounterReasonComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosis")) {
JsonArray array = getJArray(json, "diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseEncounterDiagnosisComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("account")) {
JsonArray array = getJArray(json, "account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dietPreference")) {
JsonArray array = getJArray(json, "dietPreference");
for (int i = 0; i < array.size(); i++) {
res.getDietPreference().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialArrangement")) {
JsonArray array = getJArray(json, "specialArrangement");
for (int i = 0; i < array.size(); i++) {
res.getSpecialArrangement().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialCourtesy")) {
JsonArray array = getJArray(json, "specialCourtesy");
for (int i = 0; i < array.size(); i++) {
res.getSpecialCourtesy().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("admission"))
res.setAdmission(parseEncounterAdmissionComponent(getJObject(json, "admission")));
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseEncounterLocationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Encounter.EncounterParticipantComponent parseEncounterParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent();
parseEncounterParticipantComponentProperties(json, res);
return res;
}
protected void parseEncounterParticipantComponentProperties(JsonObject json, Encounter.EncounterParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected Encounter.ReasonComponent parseEncounterReasonComponent(JsonObject json) throws IOException, FHIRFormatError {
Encounter.ReasonComponent res = new Encounter.ReasonComponent();
parseEncounterReasonComponentProperties(json, res);
return res;
}
protected void parseEncounterReasonComponentProperties(JsonObject json, Encounter.ReasonComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("use")) {
JsonArray array = getJArray(json, "use");
for (int i = 0; i < array.size(); i++) {
res.getUse().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("value")) {
JsonArray array = getJArray(json, "value");
for (int i = 0; i < array.size(); i++) {
res.getValue().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(JsonObject json) throws IOException, FHIRFormatError {
Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent();
parseEncounterDiagnosisComponentProperties(json, res);
return res;
}
protected void parseEncounterDiagnosisComponentProperties(JsonObject json, Encounter.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("use")) {
JsonArray array = getJArray(json, "use");
for (int i = 0; i < array.size(); i++) {
res.getUse().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Encounter.EncounterAdmissionComponent parseEncounterAdmissionComponent(JsonObject json) throws IOException, FHIRFormatError {
Encounter.EncounterAdmissionComponent res = new Encounter.EncounterAdmissionComponent();
parseEncounterAdmissionComponentProperties(json, res);
return res;
}
protected void parseEncounterAdmissionComponentProperties(JsonObject json, Encounter.EncounterAdmissionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("preAdmissionIdentifier"))
res.setPreAdmissionIdentifier(parseIdentifier(getJObject(json, "preAdmissionIdentifier")));
if (json.has("origin"))
res.setOrigin(parseReference(getJObject(json, "origin")));
if (json.has("admitSource"))
res.setAdmitSource(parseCodeableConcept(getJObject(json, "admitSource")));
if (json.has("reAdmission"))
res.setReAdmission(parseCodeableConcept(getJObject(json, "reAdmission")));
if (json.has("destination"))
res.setDestination(parseReference(getJObject(json, "destination")));
if (json.has("dischargeDisposition"))
res.setDischargeDisposition(parseCodeableConcept(getJObject(json, "dischargeDisposition")));
}
protected Encounter.EncounterLocationComponent parseEncounterLocationComponent(JsonObject json) throws IOException, FHIRFormatError {
Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent();
parseEncounterLocationComponentProperties(json, res);
return res;
}
protected void parseEncounterLocationComponentProperties(JsonObject json, Encounter.EncounterLocationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterLocationStatus.NULL, new Encounter.EncounterLocationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("form"))
res.setForm(parseCodeableConcept(getJObject(json, "form")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected EncounterHistory parseEncounterHistory(JsonObject json) throws IOException, FHIRFormatError {
EncounterHistory res = new EncounterHistory();
parseEncounterHistoryProperties(json, res);
return res;
}
protected void parseEncounterHistoryProperties(JsonObject json, EncounterHistory res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.EncounterStatus.NULL, new Enumerations.EncounterStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("class"))
res.setClass_(parseCodeableConcept(getJObject(json, "class")));
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceType")) {
JsonArray array = getJArray(json, "serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("subjectStatus"))
res.setSubjectStatus(parseCodeableConcept(getJObject(json, "subjectStatus")));
if (json.has("actualPeriod"))
res.setActualPeriod(parsePeriod(getJObject(json, "actualPeriod")));
if (json.has("plannedStartDate"))
res.setPlannedStartDateElement(parseDateTime(json.get("plannedStartDate").getAsString()));
if (json.has("_plannedStartDate"))
parseElementProperties(getJObject(json, "_plannedStartDate"), res.getPlannedStartDateElement());
if (json.has("plannedEndDate"))
res.setPlannedEndDateElement(parseDateTime(json.get("plannedEndDate").getAsString()));
if (json.has("_plannedEndDate"))
parseElementProperties(getJObject(json, "_plannedEndDate"), res.getPlannedEndDateElement());
if (json.has("length"))
res.setLength(parseDuration(getJObject(json, "length")));
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseEncounterHistoryLocationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EncounterHistory.EncounterHistoryLocationComponent parseEncounterHistoryLocationComponent(JsonObject json) throws IOException, FHIRFormatError {
EncounterHistory.EncounterHistoryLocationComponent res = new EncounterHistory.EncounterHistoryLocationComponent();
parseEncounterHistoryLocationComponentProperties(json, res);
return res;
}
protected void parseEncounterHistoryLocationComponentProperties(JsonObject json, EncounterHistory.EncounterHistoryLocationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("form"))
res.setForm(parseCodeableConcept(getJObject(json, "form")));
}
protected Endpoint parseEndpoint(JsonObject json) throws IOException, FHIRFormatError {
Endpoint res = new Endpoint();
parseEndpointProperties(json, res);
return res;
}
protected void parseEndpointProperties(JsonObject json, Endpoint res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Endpoint.EndpointStatus.NULL, new Endpoint.EndpointStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("connectionType")) {
JsonArray array = getJArray(json, "connectionType");
for (int i = 0; i < array.size(); i++) {
res.getConnectionType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("environmentType")) {
JsonArray array = getJArray(json, "environmentType");
for (int i = 0; i < array.size(); i++) {
res.getEnvironmentType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("payload")) {
JsonArray array = getJArray(json, "payload");
for (int i = 0; i < array.size(); i++) {
res.getPayload().add(parseEndpointPayloadComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("address"))
res.setAddressElement(parseUrl(json.get("address").getAsString()));
if (json.has("_address"))
parseElementProperties(getJObject(json, "_address"), res.getAddressElement());
if (json.has("header")) {
JsonArray array = getJArray(json, "header");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getHeader().add(new StringType());
} else {;
res.getHeader().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_header")) {
JsonArray array = getJArray(json, "_header");
for (int i = 0; i < array.size(); i++) {
if (i == res.getHeader().size())
res.getHeader().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getHeader().get(i));
}
};
}
protected Endpoint.EndpointPayloadComponent parseEndpointPayloadComponent(JsonObject json) throws IOException, FHIRFormatError {
Endpoint.EndpointPayloadComponent res = new Endpoint.EndpointPayloadComponent();
parseEndpointPayloadComponentProperties(json, res);
return res;
}
protected void parseEndpointPayloadComponentProperties(JsonObject json, Endpoint.EndpointPayloadComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("mimeType")) {
JsonArray array = getJArray(json, "mimeType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getMimeType().add(new CodeType());
} else {;
res.getMimeType().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_mimeType")) {
JsonArray array = getJArray(json, "_mimeType");
for (int i = 0; i < array.size(); i++) {
if (i == res.getMimeType().size())
res.getMimeType().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getMimeType().get(i));
}
};
}
protected EnrollmentRequest parseEnrollmentRequest(JsonObject json) throws IOException, FHIRFormatError {
EnrollmentRequest res = new EnrollmentRequest();
parseEnrollmentRequestProperties(json, res);
return res;
}
protected void parseEnrollmentRequestProperties(JsonObject json, EnrollmentRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("candidate"))
res.setCandidate(parseReference(getJObject(json, "candidate")));
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
}
protected EnrollmentResponse parseEnrollmentResponse(JsonObject json) throws IOException, FHIRFormatError {
EnrollmentResponse res = new EnrollmentResponse();
parseEnrollmentResponseProperties(json, res);
return res;
}
protected void parseEnrollmentResponseProperties(JsonObject json, EnrollmentResponse res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("outcome"))
res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), EnrollmentResponse.EnrollmentOutcome.NULL, new EnrollmentResponse.EnrollmentOutcomeEnumFactory()));
if (json.has("_outcome"))
parseElementProperties(getJObject(json, "_outcome"), res.getOutcomeElement());
if (json.has("disposition"))
res.setDispositionElement(parseString(json.get("disposition").getAsString()));
if (json.has("_disposition"))
parseElementProperties(getJObject(json, "_disposition"), res.getDispositionElement());
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
if (json.has("requestProvider"))
res.setRequestProvider(parseReference(getJObject(json, "requestProvider")));
}
protected EpisodeOfCare parseEpisodeOfCare(JsonObject json) throws IOException, FHIRFormatError {
EpisodeOfCare res = new EpisodeOfCare();
parseEpisodeOfCareProperties(json, res);
return res;
}
protected void parseEpisodeOfCareProperties(JsonObject json, EpisodeOfCare res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusHistory")) {
JsonArray array = getJArray(json, "statusHistory");
for (int i = 0; i < array.size(); i++) {
res.getStatusHistory().add(parseEpisodeOfCareStatusHistoryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseEpisodeOfCareReasonComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosis")) {
JsonArray array = getJArray(json, "diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("referralRequest")) {
JsonArray array = getJArray(json, "referralRequest");
for (int i = 0; i < array.size(); i++) {
res.getReferralRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("careManager"))
res.setCareManager(parseReference(getJObject(json, "careManager")));
if (json.has("careTeam")) {
JsonArray array = getJArray(json, "careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("account")) {
JsonArray array = getJArray(json, "account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareStatusHistoryComponent(JsonObject json) throws IOException, FHIRFormatError {
EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent();
parseEpisodeOfCareStatusHistoryComponentProperties(json, res);
return res;
}
protected void parseEpisodeOfCareStatusHistoryComponentProperties(JsonObject json, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected EpisodeOfCare.ReasonComponent parseEpisodeOfCareReasonComponent(JsonObject json) throws IOException, FHIRFormatError {
EpisodeOfCare.ReasonComponent res = new EpisodeOfCare.ReasonComponent();
parseEpisodeOfCareReasonComponentProperties(json, res);
return res;
}
protected void parseEpisodeOfCareReasonComponentProperties(JsonObject json, EpisodeOfCare.ReasonComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("use"))
res.setUse(parseCodeableConcept(getJObject(json, "use")));
if (json.has("value")) {
JsonArray array = getJArray(json, "value");
for (int i = 0; i < array.size(); i++) {
res.getValue().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
}
protected EpisodeOfCare.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(JsonObject json) throws IOException, FHIRFormatError {
EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent();
parseEpisodeOfCareDiagnosisComponentProperties(json, res);
return res;
}
protected void parseEpisodeOfCareDiagnosisComponentProperties(JsonObject json, EpisodeOfCare.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("use"))
res.setUse(parseCodeableConcept(getJObject(json, "use")));
}
protected EventDefinition parseEventDefinition(JsonObject json) throws IOException, FHIRFormatError {
EventDefinition res = new EventDefinition();
parseEventDefinitionProperties(json, res);
return res;
}
protected void parseEventDefinitionProperties(JsonObject json, EventDefinition res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("usage"))
res.setUsageElement(parseMarkdown(json.get("usage").getAsString()));
if (json.has("_usage"))
parseElementProperties(getJObject(json, "_usage"), res.getUsageElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("trigger")) {
JsonArray array = getJArray(json, "trigger");
for (int i = 0; i < array.size(); i++) {
res.getTrigger().add(parseTriggerDefinition(getJsonObjectFromArray(array, i)));
}
};
}
protected Evidence parseEvidence(JsonObject json) throws IOException, FHIRFormatError {
Evidence res = new Evidence();
parseEvidenceProperties(json, res);
return res;
}
protected void parseEvidenceProperties(JsonObject json, Evidence res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
DataType citeAs = parseType("citeAs", json);
if (citeAs != null)
res.setCiteAs(citeAs);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("assertion"))
res.setAssertionElement(parseMarkdown(json.get("assertion").getAsString()));
if (json.has("_assertion"))
parseElementProperties(getJObject(json, "_assertion"), res.getAssertionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("variableDefinition")) {
JsonArray array = getJArray(json, "variableDefinition");
for (int i = 0; i < array.size(); i++) {
res.getVariableDefinition().add(parseEvidenceVariableDefinitionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("synthesisType"))
res.setSynthesisType(parseCodeableConcept(getJObject(json, "synthesisType")));
if (json.has("studyDesign")) {
JsonArray array = getJArray(json, "studyDesign");
for (int i = 0; i < array.size(); i++) {
res.getStudyDesign().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("statistic")) {
JsonArray array = getJArray(json, "statistic");
for (int i = 0; i < array.size(); i++) {
res.getStatistic().add(parseEvidenceStatisticComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("certainty")) {
JsonArray array = getJArray(json, "certainty");
for (int i = 0; i < array.size(); i++) {
res.getCertainty().add(parseEvidenceCertaintyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Evidence.EvidenceVariableDefinitionComponent parseEvidenceVariableDefinitionComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceVariableDefinitionComponent res = new Evidence.EvidenceVariableDefinitionComponent();
parseEvidenceVariableDefinitionComponentProperties(json, res);
return res;
}
protected void parseEvidenceVariableDefinitionComponentProperties(JsonObject json, Evidence.EvidenceVariableDefinitionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("variableRole"))
res.setVariableRole(parseCodeableConcept(getJObject(json, "variableRole")));
if (json.has("observed"))
res.setObserved(parseReference(getJObject(json, "observed")));
if (json.has("intended"))
res.setIntended(parseReference(getJObject(json, "intended")));
if (json.has("directnessMatch"))
res.setDirectnessMatch(parseCodeableConcept(getJObject(json, "directnessMatch")));
}
protected Evidence.EvidenceStatisticComponent parseEvidenceStatisticComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceStatisticComponent res = new Evidence.EvidenceStatisticComponent();
parseEvidenceStatisticComponentProperties(json, res);
return res;
}
protected void parseEvidenceStatisticComponentProperties(JsonObject json, Evidence.EvidenceStatisticComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("statisticType"))
res.setStatisticType(parseCodeableConcept(getJObject(json, "statisticType")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("numberOfEvents"))
res.setNumberOfEventsElement(parseUnsignedInt(json.get("numberOfEvents").getAsString()));
if (json.has("_numberOfEvents"))
parseElementProperties(getJObject(json, "_numberOfEvents"), res.getNumberOfEventsElement());
if (json.has("numberAffected"))
res.setNumberAffectedElement(parseUnsignedInt(json.get("numberAffected").getAsString()));
if (json.has("_numberAffected"))
parseElementProperties(getJObject(json, "_numberAffected"), res.getNumberAffectedElement());
if (json.has("sampleSize"))
res.setSampleSize(parseEvidenceStatisticSampleSizeComponent(getJObject(json, "sampleSize")));
if (json.has("attributeEstimate")) {
JsonArray array = getJArray(json, "attributeEstimate");
for (int i = 0; i < array.size(); i++) {
res.getAttributeEstimate().add(parseEvidenceStatisticAttributeEstimateComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modelCharacteristic")) {
JsonArray array = getJArray(json, "modelCharacteristic");
for (int i = 0; i < array.size(); i++) {
res.getModelCharacteristic().add(parseEvidenceStatisticModelCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Evidence.EvidenceStatisticSampleSizeComponent parseEvidenceStatisticSampleSizeComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceStatisticSampleSizeComponent res = new Evidence.EvidenceStatisticSampleSizeComponent();
parseEvidenceStatisticSampleSizeComponentProperties(json, res);
return res;
}
protected void parseEvidenceStatisticSampleSizeComponentProperties(JsonObject json, Evidence.EvidenceStatisticSampleSizeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("numberOfStudies"))
res.setNumberOfStudiesElement(parseUnsignedInt(json.get("numberOfStudies").getAsString()));
if (json.has("_numberOfStudies"))
parseElementProperties(getJObject(json, "_numberOfStudies"), res.getNumberOfStudiesElement());
if (json.has("numberOfParticipants"))
res.setNumberOfParticipantsElement(parseUnsignedInt(json.get("numberOfParticipants").getAsString()));
if (json.has("_numberOfParticipants"))
parseElementProperties(getJObject(json, "_numberOfParticipants"), res.getNumberOfParticipantsElement());
if (json.has("knownDataCount"))
res.setKnownDataCountElement(parseUnsignedInt(json.get("knownDataCount").getAsString()));
if (json.has("_knownDataCount"))
parseElementProperties(getJObject(json, "_knownDataCount"), res.getKnownDataCountElement());
}
protected Evidence.EvidenceStatisticAttributeEstimateComponent parseEvidenceStatisticAttributeEstimateComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceStatisticAttributeEstimateComponent res = new Evidence.EvidenceStatisticAttributeEstimateComponent();
parseEvidenceStatisticAttributeEstimateComponentProperties(json, res);
return res;
}
protected void parseEvidenceStatisticAttributeEstimateComponentProperties(JsonObject json, Evidence.EvidenceStatisticAttributeEstimateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("level"))
res.setLevelElement(parseDecimal(json.get("level").getAsBigDecimal()));
if (json.has("_level"))
parseElementProperties(getJObject(json, "_level"), res.getLevelElement());
if (json.has("range"))
res.setRange(parseRange(getJObject(json, "range")));
if (json.has("attributeEstimate")) {
JsonArray array = getJArray(json, "attributeEstimate");
for (int i = 0; i < array.size(); i++) {
res.getAttributeEstimate().add(parseEvidenceStatisticAttributeEstimateComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Evidence.EvidenceStatisticModelCharacteristicComponent parseEvidenceStatisticModelCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceStatisticModelCharacteristicComponent res = new Evidence.EvidenceStatisticModelCharacteristicComponent();
parseEvidenceStatisticModelCharacteristicComponentProperties(json, res);
return res;
}
protected void parseEvidenceStatisticModelCharacteristicComponentProperties(JsonObject json, Evidence.EvidenceStatisticModelCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("value"))
res.setValue(parseQuantity(getJObject(json, "value")));
if (json.has("variable")) {
JsonArray array = getJArray(json, "variable");
for (int i = 0; i < array.size(); i++) {
res.getVariable().add(parseEvidenceStatisticModelCharacteristicVariableComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("attributeEstimate")) {
JsonArray array = getJArray(json, "attributeEstimate");
for (int i = 0; i < array.size(); i++) {
res.getAttributeEstimate().add(parseEvidenceStatisticAttributeEstimateComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Evidence.EvidenceStatisticModelCharacteristicVariableComponent parseEvidenceStatisticModelCharacteristicVariableComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceStatisticModelCharacteristicVariableComponent res = new Evidence.EvidenceStatisticModelCharacteristicVariableComponent();
parseEvidenceStatisticModelCharacteristicVariableComponentProperties(json, res);
return res;
}
protected void parseEvidenceStatisticModelCharacteristicVariableComponentProperties(JsonObject json, Evidence.EvidenceStatisticModelCharacteristicVariableComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("variableDefinition"))
res.setVariableDefinition(parseReference(getJObject(json, "variableDefinition")));
if (json.has("handling"))
res.setHandlingElement(parseEnumeration(json.get("handling").getAsString(), Enumerations.EvidenceVariableHandling.NULL, new Enumerations.EvidenceVariableHandlingEnumFactory()));
if (json.has("_handling"))
parseElementProperties(getJObject(json, "_handling"), res.getHandlingElement());
if (json.has("valueCategory")) {
JsonArray array = getJArray(json, "valueCategory");
for (int i = 0; i < array.size(); i++) {
res.getValueCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("valueQuantity")) {
JsonArray array = getJArray(json, "valueQuantity");
for (int i = 0; i < array.size(); i++) {
res.getValueQuantity().add(parseQuantity(getJsonObjectFromArray(array, i)));
}
};
if (json.has("valueRange")) {
JsonArray array = getJArray(json, "valueRange");
for (int i = 0; i < array.size(); i++) {
res.getValueRange().add(parseRange(getJsonObjectFromArray(array, i)));
}
};
}
protected Evidence.EvidenceCertaintyComponent parseEvidenceCertaintyComponent(JsonObject json) throws IOException, FHIRFormatError {
Evidence.EvidenceCertaintyComponent res = new Evidence.EvidenceCertaintyComponent();
parseEvidenceCertaintyComponentProperties(json, res);
return res;
}
protected void parseEvidenceCertaintyComponentProperties(JsonObject json, Evidence.EvidenceCertaintyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("rating"))
res.setRating(parseCodeableConcept(getJObject(json, "rating")));
if (json.has("rater"))
res.setRaterElement(parseString(json.get("rater").getAsString()));
if (json.has("_rater"))
parseElementProperties(getJObject(json, "_rater"), res.getRaterElement());
if (json.has("subcomponent")) {
JsonArray array = getJArray(json, "subcomponent");
for (int i = 0; i < array.size(); i++) {
res.getSubcomponent().add(parseEvidenceCertaintyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceReport parseEvidenceReport(JsonObject json) throws IOException, FHIRFormatError {
EvidenceReport res = new EvidenceReport();
parseEvidenceReportProperties(json, res);
return res;
}
protected void parseEvidenceReportProperties(JsonObject json, EvidenceReport res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedIdentifier")) {
JsonArray array = getJArray(json, "relatedIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getRelatedIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
DataType citeAs = parseType("citeAs", json);
if (citeAs != null)
res.setCiteAs(citeAs);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseEvidenceReportSubjectComponent(getJObject(json, "subject")));
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatesTo")) {
JsonArray array = getJArray(json, "relatesTo");
for (int i = 0; i < array.size(); i++) {
res.getRelatesTo().add(parseEvidenceReportRelatesToComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("section")) {
JsonArray array = getJArray(json, "section");
for (int i = 0; i < array.size(); i++) {
res.getSection().add(parseEvidenceReportSectionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceReport.EvidenceReportSubjectComponent parseEvidenceReportSubjectComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceReport.EvidenceReportSubjectComponent res = new EvidenceReport.EvidenceReportSubjectComponent();
parseEvidenceReportSubjectComponentProperties(json, res);
return res;
}
protected void parseEvidenceReportSubjectComponentProperties(JsonObject json, EvidenceReport.EvidenceReportSubjectComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseEvidenceReportSubjectCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceReport.EvidenceReportSubjectCharacteristicComponent parseEvidenceReportSubjectCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceReport.EvidenceReportSubjectCharacteristicComponent res = new EvidenceReport.EvidenceReportSubjectCharacteristicComponent();
parseEvidenceReportSubjectCharacteristicComponentProperties(json, res);
return res;
}
protected void parseEvidenceReportSubjectCharacteristicComponentProperties(JsonObject json, EvidenceReport.EvidenceReportSubjectCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("exclude"))
res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean()));
if (json.has("_exclude"))
parseElementProperties(getJObject(json, "_exclude"), res.getExcludeElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected EvidenceReport.EvidenceReportRelatesToComponent parseEvidenceReportRelatesToComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceReport.EvidenceReportRelatesToComponent res = new EvidenceReport.EvidenceReportRelatesToComponent();
parseEvidenceReportRelatesToComponentProperties(json, res);
return res;
}
protected void parseEvidenceReportRelatesToComponentProperties(JsonObject json, EvidenceReport.EvidenceReportRelatesToComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), EvidenceReport.ReportRelationshipType.NULL, new EvidenceReport.ReportRelationshipTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("target"))
res.setTarget(parseEvidenceReportRelatesToTargetComponent(getJObject(json, "target")));
}
protected EvidenceReport.EvidenceReportRelatesToTargetComponent parseEvidenceReportRelatesToTargetComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceReport.EvidenceReportRelatesToTargetComponent res = new EvidenceReport.EvidenceReportRelatesToTargetComponent();
parseEvidenceReportRelatesToTargetComponentProperties(json, res);
return res;
}
protected void parseEvidenceReportRelatesToTargetComponentProperties(JsonObject json, EvidenceReport.EvidenceReportRelatesToTargetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("display"))
res.setDisplayElement(parseMarkdown(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("resource"))
res.setResource(parseReference(getJObject(json, "resource")));
}
protected EvidenceReport.SectionComponent parseEvidenceReportSectionComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceReport.SectionComponent res = new EvidenceReport.SectionComponent();
parseEvidenceReportSectionComponentProperties(json, res);
return res;
}
protected void parseEvidenceReportSectionComponentProperties(JsonObject json, EvidenceReport.SectionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("focus"))
res.setFocus(parseCodeableConcept(getJObject(json, "focus")));
if (json.has("focusReference"))
res.setFocusReference(parseReference(getJObject(json, "focusReference")));
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("text"))
res.setText(parseNarrative(getJObject(json, "text")));
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Enumerations.ListMode.NULL, new Enumerations.ListModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("orderedBy"))
res.setOrderedBy(parseCodeableConcept(getJObject(json, "orderedBy")));
if (json.has("entryClassifier")) {
JsonArray array = getJArray(json, "entryClassifier");
for (int i = 0; i < array.size(); i++) {
res.getEntryClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("entryReference")) {
JsonArray array = getJArray(json, "entryReference");
for (int i = 0; i < array.size(); i++) {
res.getEntryReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("entryQuantity")) {
JsonArray array = getJArray(json, "entryQuantity");
for (int i = 0; i < array.size(); i++) {
res.getEntryQuantity().add(parseQuantity(getJsonObjectFromArray(array, i)));
}
};
if (json.has("emptyReason"))
res.setEmptyReason(parseCodeableConcept(getJObject(json, "emptyReason")));
if (json.has("section")) {
JsonArray array = getJArray(json, "section");
for (int i = 0; i < array.size(); i++) {
res.getSection().add(parseEvidenceReportSectionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceVariable parseEvidenceVariable(JsonObject json) throws IOException, FHIRFormatError {
EvidenceVariable res = new EvidenceVariable();
parseEvidenceVariableProperties(json, res);
return res;
}
protected void parseEvidenceVariableProperties(JsonObject json, EvidenceVariable res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("shortTitle"))
res.setShortTitleElement(parseString(json.get("shortTitle").getAsString()));
if (json.has("_shortTitle"))
parseElementProperties(getJObject(json, "_shortTitle"), res.getShortTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("actual"))
res.setActualElement(parseBoolean(json.get("actual").getAsBoolean()));
if (json.has("_actual"))
parseElementProperties(getJObject(json, "_actual"), res.getActualElement());
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseEvidenceVariableCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("handling"))
res.setHandlingElement(parseEnumeration(json.get("handling").getAsString(), Enumerations.EvidenceVariableHandling.NULL, new Enumerations.EvidenceVariableHandlingEnumFactory()));
if (json.has("_handling"))
parseElementProperties(getJObject(json, "_handling"), res.getHandlingElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseEvidenceVariableCategoryComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceVariable.EvidenceVariableCharacteristicComponent parseEvidenceVariableCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceVariable.EvidenceVariableCharacteristicComponent res = new EvidenceVariable.EvidenceVariableCharacteristicComponent();
parseEvidenceVariableCharacteristicComponentProperties(json, res);
return res;
}
protected void parseEvidenceVariableCharacteristicComponentProperties(JsonObject json, EvidenceVariable.EvidenceVariableCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseId(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("exclude"))
res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean()));
if (json.has("_exclude"))
parseElementProperties(getJObject(json, "_exclude"), res.getExcludeElement());
if (json.has("definitionReference"))
res.setDefinitionReference(parseReference(getJObject(json, "definitionReference")));
if (json.has("definitionCanonical"))
res.setDefinitionCanonicalElement(parseCanonical(json.get("definitionCanonical").getAsString()));
if (json.has("_definitionCanonical"))
parseElementProperties(getJObject(json, "_definitionCanonical"), res.getDefinitionCanonicalElement());
if (json.has("definitionCodeableConcept"))
res.setDefinitionCodeableConcept(parseCodeableConcept(getJObject(json, "definitionCodeableConcept")));
if (json.has("definitionExpression"))
res.setDefinitionExpression(parseExpression(getJObject(json, "definitionExpression")));
if (json.has("definitionId"))
res.setDefinitionIdElement(parseId(json.get("definitionId").getAsString()));
if (json.has("_definitionId"))
parseElementProperties(getJObject(json, "_definitionId"), res.getDefinitionIdElement());
if (json.has("definitionByTypeAndValue"))
res.setDefinitionByTypeAndValue(parseEvidenceVariableCharacteristicDefinitionByTypeAndValueComponent(getJObject(json, "definitionByTypeAndValue")));
if (json.has("definitionByCombination"))
res.setDefinitionByCombination(parseEvidenceVariableCharacteristicDefinitionByCombinationComponent(getJObject(json, "definitionByCombination")));
DataType instances = parseType("instances", json);
if (instances != null)
res.setInstances(instances);
DataType duration = parseType("duration", json);
if (duration != null)
res.setDuration(duration);
if (json.has("timeFromEvent")) {
JsonArray array = getJArray(json, "timeFromEvent");
for (int i = 0; i < array.size(); i++) {
res.getTimeFromEvent().add(parseEvidenceVariableCharacteristicTimeFromEventComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceVariable.EvidenceVariableCharacteristicDefinitionByTypeAndValueComponent parseEvidenceVariableCharacteristicDefinitionByTypeAndValueComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceVariable.EvidenceVariableCharacteristicDefinitionByTypeAndValueComponent res = new EvidenceVariable.EvidenceVariableCharacteristicDefinitionByTypeAndValueComponent();
parseEvidenceVariableCharacteristicDefinitionByTypeAndValueComponentProperties(json, res);
return res;
}
protected void parseEvidenceVariableCharacteristicDefinitionByTypeAndValueComponentProperties(JsonObject json, EvidenceVariable.EvidenceVariableCharacteristicDefinitionByTypeAndValueComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("method")) {
JsonArray array = getJArray(json, "method");
for (int i = 0; i < array.size(); i++) {
res.getMethod().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("offset"))
res.setOffset(parseCodeableConcept(getJObject(json, "offset")));
}
protected EvidenceVariable.EvidenceVariableCharacteristicDefinitionByCombinationComponent parseEvidenceVariableCharacteristicDefinitionByCombinationComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceVariable.EvidenceVariableCharacteristicDefinitionByCombinationComponent res = new EvidenceVariable.EvidenceVariableCharacteristicDefinitionByCombinationComponent();
parseEvidenceVariableCharacteristicDefinitionByCombinationComponentProperties(json, res);
return res;
}
protected void parseEvidenceVariableCharacteristicDefinitionByCombinationComponentProperties(JsonObject json, EvidenceVariable.EvidenceVariableCharacteristicDefinitionByCombinationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), EvidenceVariable.CharacteristicCombination.NULL, new EvidenceVariable.CharacteristicCombinationEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("threshold"))
res.setThresholdElement(parsePositiveInt(json.get("threshold").getAsString()));
if (json.has("_threshold"))
parseElementProperties(getJObject(json, "_threshold"), res.getThresholdElement());
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseEvidenceVariableCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent parseEvidenceVariableCharacteristicTimeFromEventComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent res = new EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent();
parseEvidenceVariableCharacteristicTimeFromEventComponentProperties(json, res);
return res;
}
protected void parseEvidenceVariableCharacteristicTimeFromEventComponentProperties(JsonObject json, EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
DataType event = parseType("event", json);
if (event != null)
res.setEvent(event);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("range"))
res.setRange(parseRange(getJObject(json, "range")));
}
protected EvidenceVariable.EvidenceVariableCategoryComponent parseEvidenceVariableCategoryComponent(JsonObject json) throws IOException, FHIRFormatError {
EvidenceVariable.EvidenceVariableCategoryComponent res = new EvidenceVariable.EvidenceVariableCategoryComponent();
parseEvidenceVariableCategoryComponentProperties(json, res);
return res;
}
protected void parseEvidenceVariableCategoryComponentProperties(JsonObject json, EvidenceVariable.EvidenceVariableCategoryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ExampleScenario parseExampleScenario(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario res = new ExampleScenario();
parseExampleScenarioProperties(json, res);
return res;
}
protected void parseExampleScenarioProperties(JsonObject json, ExampleScenario res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("actor")) {
JsonArray array = getJArray(json, "actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseExampleScenarioActorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instance")) {
JsonArray array = getJArray(json, "instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseExampleScenarioInstanceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("process")) {
JsonArray array = getJArray(json, "process");
for (int i = 0; i < array.size(); i++) {
res.getProcess().add(parseExampleScenarioProcessComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExampleScenario.ExampleScenarioActorComponent parseExampleScenarioActorComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioActorComponent res = new ExampleScenario.ExampleScenarioActorComponent();
parseExampleScenarioActorComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioActorComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioActorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("key"))
res.setKeyElement(parseString(json.get("key").getAsString()));
if (json.has("_key"))
parseElementProperties(getJObject(json, "_key"), res.getKeyElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ExampleScenarioActorType.NULL, new Enumerations.ExampleScenarioActorTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ExampleScenario.ExampleScenarioInstanceComponent parseExampleScenarioInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceComponent();
parseExampleScenarioInstanceComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioInstanceComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("key"))
res.setKeyElement(parseString(json.get("key").getAsString()));
if (json.has("_key"))
parseElementProperties(getJObject(json, "_key"), res.getKeyElement());
if (json.has("structureType"))
res.setStructureType(parseCoding(getJObject(json, "structureType")));
if (json.has("structureVersion"))
res.setStructureVersionElement(parseString(json.get("structureVersion").getAsString()));
if (json.has("_structureVersion"))
parseElementProperties(getJObject(json, "_structureVersion"), res.getStructureVersionElement());
DataType structureProfile = parseType("structureProfile", json);
if (structureProfile != null)
res.setStructureProfile(structureProfile);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("content"))
res.setContent(parseReference(getJObject(json, "content")));
if (json.has("version")) {
JsonArray array = getJArray(json, "version");
for (int i = 0; i < array.size(); i++) {
res.getVersion().add(parseExampleScenarioInstanceVersionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("containedInstance")) {
JsonArray array = getJArray(json, "containedInstance");
for (int i = 0; i < array.size(); i++) {
res.getContainedInstance().add(parseExampleScenarioInstanceContainedInstanceComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExampleScenario.ExampleScenarioInstanceVersionComponent parseExampleScenarioInstanceVersionComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioInstanceVersionComponent res = new ExampleScenario.ExampleScenarioInstanceVersionComponent();
parseExampleScenarioInstanceVersionComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioInstanceVersionComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioInstanceVersionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("key"))
res.setKeyElement(parseString(json.get("key").getAsString()));
if (json.has("_key"))
parseElementProperties(getJObject(json, "_key"), res.getKeyElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("content"))
res.setContent(parseReference(getJObject(json, "content")));
}
protected ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent parseExampleScenarioInstanceContainedInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent();
parseExampleScenarioInstanceContainedInstanceComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioInstanceContainedInstanceComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("instanceReference"))
res.setInstanceReferenceElement(parseString(json.get("instanceReference").getAsString()));
if (json.has("_instanceReference"))
parseElementProperties(getJObject(json, "_instanceReference"), res.getInstanceReferenceElement());
if (json.has("versionReference"))
res.setVersionReferenceElement(parseString(json.get("versionReference").getAsString()));
if (json.has("_versionReference"))
parseElementProperties(getJObject(json, "_versionReference"), res.getVersionReferenceElement());
}
protected ExampleScenario.ExampleScenarioProcessComponent parseExampleScenarioProcessComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessComponent res = new ExampleScenario.ExampleScenarioProcessComponent();
parseExampleScenarioProcessComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioProcessComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioProcessComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("preConditions"))
res.setPreConditionsElement(parseMarkdown(json.get("preConditions").getAsString()));
if (json.has("_preConditions"))
parseElementProperties(getJObject(json, "_preConditions"), res.getPreConditionsElement());
if (json.has("postConditions"))
res.setPostConditionsElement(parseMarkdown(json.get("postConditions").getAsString()));
if (json.has("_postConditions"))
parseElementProperties(getJObject(json, "_postConditions"), res.getPostConditionsElement());
if (json.has("step")) {
JsonArray array = getJArray(json, "step");
for (int i = 0; i < array.size(); i++) {
res.getStep().add(parseExampleScenarioProcessStepComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExampleScenario.ExampleScenarioProcessStepComponent parseExampleScenarioProcessStepComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessStepComponent res = new ExampleScenario.ExampleScenarioProcessStepComponent();
parseExampleScenarioProcessStepComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioProcessStepComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioProcessStepComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("number"))
res.setNumberElement(parseString(json.get("number").getAsString()));
if (json.has("_number"))
parseElementProperties(getJObject(json, "_number"), res.getNumberElement());
if (json.has("process"))
res.setProcess(parseExampleScenarioProcessComponent(getJObject(json, "process")));
if (json.has("workflow"))
res.setWorkflowElement(parseCanonical(json.get("workflow").getAsString()));
if (json.has("_workflow"))
parseElementProperties(getJObject(json, "_workflow"), res.getWorkflowElement());
if (json.has("operation"))
res.setOperation(parseExampleScenarioProcessStepOperationComponent(getJObject(json, "operation")));
if (json.has("alternative")) {
JsonArray array = getJArray(json, "alternative");
for (int i = 0; i < array.size(); i++) {
res.getAlternative().add(parseExampleScenarioProcessStepAlternativeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("pause"))
res.setPauseElement(parseBoolean(json.get("pause").getAsBoolean()));
if (json.has("_pause"))
parseElementProperties(getJObject(json, "_pause"), res.getPauseElement());
}
protected ExampleScenario.ExampleScenarioProcessStepOperationComponent parseExampleScenarioProcessStepOperationComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessStepOperationComponent res = new ExampleScenario.ExampleScenarioProcessStepOperationComponent();
parseExampleScenarioProcessStepOperationComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioProcessStepOperationComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioProcessStepOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCoding(getJObject(json, "type")));
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("initiator"))
res.setInitiatorElement(parseString(json.get("initiator").getAsString()));
if (json.has("_initiator"))
parseElementProperties(getJObject(json, "_initiator"), res.getInitiatorElement());
if (json.has("receiver"))
res.setReceiverElement(parseString(json.get("receiver").getAsString()));
if (json.has("_receiver"))
parseElementProperties(getJObject(json, "_receiver"), res.getReceiverElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("initiatorActive"))
res.setInitiatorActiveElement(parseBoolean(json.get("initiatorActive").getAsBoolean()));
if (json.has("_initiatorActive"))
parseElementProperties(getJObject(json, "_initiatorActive"), res.getInitiatorActiveElement());
if (json.has("receiverActive"))
res.setReceiverActiveElement(parseBoolean(json.get("receiverActive").getAsBoolean()));
if (json.has("_receiverActive"))
parseElementProperties(getJObject(json, "_receiverActive"), res.getReceiverActiveElement());
if (json.has("request"))
res.setRequest(parseExampleScenarioInstanceContainedInstanceComponent(getJObject(json, "request")));
if (json.has("response"))
res.setResponse(parseExampleScenarioInstanceContainedInstanceComponent(getJObject(json, "response")));
}
protected ExampleScenario.ExampleScenarioProcessStepAlternativeComponent parseExampleScenarioProcessStepAlternativeComponent(JsonObject json) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeComponent();
parseExampleScenarioProcessStepAlternativeComponentProperties(json, res);
return res;
}
protected void parseExampleScenarioProcessStepAlternativeComponentProperties(JsonObject json, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("step")) {
JsonArray array = getJArray(json, "step");
for (int i = 0; i < array.size(); i++) {
res.getStep().add(parseExampleScenarioProcessStepComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit parseExplanationOfBenefit(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit res = new ExplanationOfBenefit();
parseExplanationOfBenefitProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitProperties(JsonObject json, ExplanationOfBenefit res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL, new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subType"))
res.setSubType(parseCodeableConcept(getJObject(json, "subType")));
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Enumerations.Use.NULL, new Enumerations.UseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("billablePeriod"))
res.setBillablePeriod(parsePeriod(getJObject(json, "billablePeriod")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("enterer"))
res.setEnterer(parseReference(getJObject(json, "enterer")));
if (json.has("insurer"))
res.setInsurer(parseReference(getJObject(json, "insurer")));
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("fundsReserveRequested"))
res.setFundsReserveRequested(parseCodeableConcept(getJObject(json, "fundsReserveRequested")));
if (json.has("fundsReserve"))
res.setFundsReserve(parseCodeableConcept(getJObject(json, "fundsReserve")));
if (json.has("related")) {
JsonArray array = getJArray(json, "related");
for (int i = 0; i < array.size(); i++) {
res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("prescription"))
res.setPrescription(parseReference(getJObject(json, "prescription")));
if (json.has("originalPrescription"))
res.setOriginalPrescription(parseReference(getJObject(json, "originalPrescription")));
if (json.has("event")) {
JsonArray array = getJArray(json, "event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseExplanationOfBenefitEventComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("payee"))
res.setPayee(parseExplanationOfBenefitPayeeComponent(getJObject(json, "payee")));
if (json.has("referral"))
res.setReferral(parseReference(getJObject(json, "referral")));
if (json.has("encounter")) {
JsonArray array = getJArray(json, "encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("facility"))
res.setFacility(parseReference(getJObject(json, "facility")));
if (json.has("claim"))
res.setClaim(parseReference(getJObject(json, "claim")));
if (json.has("claimResponse"))
res.setClaimResponse(parseReference(getJObject(json, "claimResponse")));
if (json.has("outcome"))
res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), Enumerations.ClaimProcessingCodes.NULL, new Enumerations.ClaimProcessingCodesEnumFactory()));
if (json.has("_outcome"))
parseElementProperties(getJObject(json, "_outcome"), res.getOutcomeElement());
if (json.has("decision"))
res.setDecision(parseCodeableConcept(getJObject(json, "decision")));
if (json.has("disposition"))
res.setDispositionElement(parseString(json.get("disposition").getAsString()));
if (json.has("_disposition"))
parseElementProperties(getJObject(json, "_disposition"), res.getDispositionElement());
if (json.has("preAuthRef")) {
JsonArray array = getJArray(json, "preAuthRef");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPreAuthRef().add(new StringType());
} else {;
res.getPreAuthRef().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_preAuthRef")) {
JsonArray array = getJArray(json, "_preAuthRef");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPreAuthRef().size())
res.getPreAuthRef().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPreAuthRef().get(i));
}
};
if (json.has("preAuthRefPeriod")) {
JsonArray array = getJArray(json, "preAuthRefPeriod");
for (int i = 0; i < array.size(); i++) {
res.getPreAuthRefPeriod().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosisRelatedGroup"))
res.setDiagnosisRelatedGroup(parseCodeableConcept(getJObject(json, "diagnosisRelatedGroup")));
if (json.has("careTeam")) {
JsonArray array = getJArray(json, "careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseExplanationOfBenefitSupportingInformationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("diagnosis")) {
JsonArray array = getJArray(json, "diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("procedure")) {
JsonArray array = getJArray(json, "procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("precedence"))
res.setPrecedenceElement(parsePositiveInt(json.get("precedence").getAsString()));
if (json.has("_precedence"))
parseElementProperties(getJObject(json, "_precedence"), res.getPrecedenceElement());
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseExplanationOfBenefitInsuranceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("accident"))
res.setAccident(parseExplanationOfBenefitAccidentComponent(getJObject(json, "accident")));
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseExplanationOfBenefitItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("addItem")) {
JsonArray array = getJArray(json, "addItem");
for (int i = 0; i < array.size(); i++) {
res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("total")) {
JsonArray array = getJArray(json, "total");
for (int i = 0; i < array.size(); i++) {
res.getTotal().add(parseExplanationOfBenefitTotalComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("payment"))
res.setPayment(parseExplanationOfBenefitPaymentComponent(getJObject(json, "payment")));
if (json.has("formCode"))
res.setFormCode(parseCodeableConcept(getJObject(json, "formCode")));
if (json.has("form"))
res.setForm(parseAttachment(getJObject(json, "form")));
if (json.has("processNote")) {
JsonArray array = getJArray(json, "processNote");
for (int i = 0; i < array.size(); i++) {
res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("benefitPeriod"))
res.setBenefitPeriod(parsePeriod(getJObject(json, "benefitPeriod")));
if (json.has("benefitBalance")) {
JsonArray array = getJArray(json, "benefitBalance");
for (int i = 0; i < array.size(); i++) {
res.getBenefitBalance().add(parseExplanationOfBenefitBenefitBalanceComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent();
parseExplanationOfBenefitRelatedClaimComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitRelatedClaimComponentProperties(JsonObject json, ExplanationOfBenefit.RelatedClaimComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("claim"))
res.setClaim(parseReference(getJObject(json, "claim")));
if (json.has("relationship"))
res.setRelationship(parseCodeableConcept(getJObject(json, "relationship")));
if (json.has("reference"))
res.setReference(parseIdentifier(getJObject(json, "reference")));
}
protected ExplanationOfBenefit.ExplanationOfBenefitEventComponent parseExplanationOfBenefitEventComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ExplanationOfBenefitEventComponent res = new ExplanationOfBenefit.ExplanationOfBenefitEventComponent();
parseExplanationOfBenefitEventComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitEventComponentProperties(JsonObject json, ExplanationOfBenefit.ExplanationOfBenefitEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType when = parseType("when", json);
if (when != null)
res.setWhen(when);
}
protected ExplanationOfBenefit.PayeeComponent parseExplanationOfBenefitPayeeComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent();
parseExplanationOfBenefitPayeeComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitPayeeComponentProperties(JsonObject json, ExplanationOfBenefit.PayeeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
}
protected ExplanationOfBenefit.CareTeamComponent parseExplanationOfBenefitCareTeamComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent();
parseExplanationOfBenefitCareTeamComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitCareTeamComponentProperties(JsonObject json, ExplanationOfBenefit.CareTeamComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
if (json.has("responsible"))
res.setResponsibleElement(parseBoolean(json.get("responsible").getAsBoolean()));
if (json.has("_responsible"))
parseElementProperties(getJObject(json, "_responsible"), res.getResponsibleElement());
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("specialty"))
res.setSpecialty(parseCodeableConcept(getJObject(json, "specialty")));
}
protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent();
parseExplanationOfBenefitSupportingInformationComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitSupportingInformationComponentProperties(JsonObject json, ExplanationOfBenefit.SupportingInformationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("reason"))
res.setReason(parseCoding(getJObject(json, "reason")));
}
protected ExplanationOfBenefit.DiagnosisComponent parseExplanationOfBenefitDiagnosisComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent();
parseExplanationOfBenefitDiagnosisComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitDiagnosisComponentProperties(JsonObject json, ExplanationOfBenefit.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
DataType diagnosis = parseType("diagnosis", json);
if (diagnosis != null)
res.setDiagnosis(diagnosis);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("onAdmission"))
res.setOnAdmission(parseCodeableConcept(getJObject(json, "onAdmission")));
}
protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent();
parseExplanationOfBenefitProcedureComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitProcedureComponentProperties(JsonObject json, ExplanationOfBenefit.ProcedureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
DataType procedure = parseType("procedure", json);
if (procedure != null)
res.setProcedure(procedure);
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent();
parseExplanationOfBenefitInsuranceComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitInsuranceComponentProperties(JsonObject json, ExplanationOfBenefit.InsuranceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("focal"))
res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean()));
if (json.has("_focal"))
parseElementProperties(getJObject(json, "_focal"), res.getFocalElement());
if (json.has("coverage"))
res.setCoverage(parseReference(getJObject(json, "coverage")));
if (json.has("preAuthRef")) {
JsonArray array = getJArray(json, "preAuthRef");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPreAuthRef().add(new StringType());
} else {;
res.getPreAuthRef().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_preAuthRef")) {
JsonArray array = getJArray(json, "_preAuthRef");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPreAuthRef().size())
res.getPreAuthRef().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPreAuthRef().get(i));
}
};
}
protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent();
parseExplanationOfBenefitAccidentComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitAccidentComponentProperties(JsonObject json, ExplanationOfBenefit.AccidentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType location = parseType("location", json);
if (location != null)
res.setLocation(location);
}
protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent();
parseExplanationOfBenefitItemComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitItemComponentProperties(JsonObject json, ExplanationOfBenefit.ItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("careTeamSequence")) {
JsonArray array = getJArray(json, "careTeamSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCareTeamSequence().add(new PositiveIntType());
} else {;
res.getCareTeamSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_careTeamSequence")) {
JsonArray array = getJArray(json, "_careTeamSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCareTeamSequence().size())
res.getCareTeamSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCareTeamSequence().get(i));
}
};
if (json.has("diagnosisSequence")) {
JsonArray array = getJArray(json, "diagnosisSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDiagnosisSequence().add(new PositiveIntType());
} else {;
res.getDiagnosisSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_diagnosisSequence")) {
JsonArray array = getJArray(json, "_diagnosisSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDiagnosisSequence().size())
res.getDiagnosisSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDiagnosisSequence().get(i));
}
};
if (json.has("procedureSequence")) {
JsonArray array = getJArray(json, "procedureSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProcedureSequence().add(new PositiveIntType());
} else {;
res.getProcedureSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_procedureSequence")) {
JsonArray array = getJArray(json, "_procedureSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProcedureSequence().size())
res.getProcedureSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProcedureSequence().get(i));
}
};
if (json.has("informationSequence")) {
JsonArray array = getJArray(json, "informationSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInformationSequence().add(new PositiveIntType());
} else {;
res.getInformationSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_informationSequence")) {
JsonArray array = getJArray(json, "_informationSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInformationSequence().size())
res.getInformationSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInformationSequence().get(i));
}
};
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("request")) {
JsonArray array = getJArray(json, "request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
DataType location = parseType("location", json);
if (location != null)
res.setLocation(location);
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseExplanationOfBenefitItemBodySiteComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter")) {
JsonArray array = getJArray(json, "encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseExplanationOfBenefitItemReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseExplanationOfBenefitDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.ItemBodySiteComponent parseExplanationOfBenefitItemBodySiteComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ItemBodySiteComponent res = new ExplanationOfBenefit.ItemBodySiteComponent();
parseExplanationOfBenefitItemBodySiteComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitItemBodySiteComponentProperties(JsonObject json, ExplanationOfBenefit.ItemBodySiteComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("site")) {
JsonArray array = getJArray(json, "site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subSite")) {
JsonArray array = getJArray(json, "subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.ItemReviewOutcomeComponent parseExplanationOfBenefitItemReviewOutcomeComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ItemReviewOutcomeComponent res = new ExplanationOfBenefit.ItemReviewOutcomeComponent();
parseExplanationOfBenefitItemReviewOutcomeComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitItemReviewOutcomeComponentProperties(JsonObject json, ExplanationOfBenefit.ItemReviewOutcomeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("decision"))
res.setDecision(parseCodeableConcept(getJObject(json, "decision")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preAuthRef"))
res.setPreAuthRefElement(parseString(json.get("preAuthRef").getAsString()));
if (json.has("_preAuthRef"))
parseElementProperties(getJObject(json, "_preAuthRef"), res.getPreAuthRefElement());
if (json.has("preAuthPeriod"))
res.setPreAuthPeriod(parsePeriod(getJObject(json, "preAuthPeriod")));
}
protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent();
parseExplanationOfBenefitAdjudicationComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitAdjudicationComponentProperties(JsonObject json, ExplanationOfBenefit.AdjudicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
}
protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent();
parseExplanationOfBenefitDetailComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitDetailComponentProperties(JsonObject json, ExplanationOfBenefit.DetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseExplanationOfBenefitItemReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subDetail")) {
JsonArray array = getJArray(json, "subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent();
parseExplanationOfBenefitSubDetailComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitSubDetailComponentProperties(JsonObject json, ExplanationOfBenefit.SubDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = getJArray(json, "udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseExplanationOfBenefitItemReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent();
parseExplanationOfBenefitAddedItemComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemComponentProperties(JsonObject json, ExplanationOfBenefit.AddedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemSequence")) {
JsonArray array = getJArray(json, "itemSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getItemSequence().add(new PositiveIntType());
} else {;
res.getItemSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_itemSequence")) {
JsonArray array = getJArray(json, "_itemSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getItemSequence().size())
res.getItemSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getItemSequence().get(i));
}
};
if (json.has("detailSequence")) {
JsonArray array = getJArray(json, "detailSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDetailSequence().add(new PositiveIntType());
} else {;
res.getDetailSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_detailSequence")) {
JsonArray array = getJArray(json, "_detailSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDetailSequence().size())
res.getDetailSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDetailSequence().get(i));
}
};
if (json.has("subDetailSequence")) {
JsonArray array = getJArray(json, "subDetailSequence");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSubDetailSequence().add(new PositiveIntType());
} else {;
res.getSubDetailSequence().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_subDetailSequence")) {
JsonArray array = getJArray(json, "_subDetailSequence");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSubDetailSequence().size())
res.getSubDetailSequence().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSubDetailSequence().get(i));
}
};
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("provider")) {
JsonArray array = getJArray(json, "provider");
for (int i = 0; i < array.size(); i++) {
res.getProvider().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("request")) {
JsonArray array = getJArray(json, "request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programCode")) {
JsonArray array = getJArray(json, "programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
DataType location = parseType("location", json);
if (location != null)
res.setLocation(location);
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseExplanationOfBenefitAddedItemBodySiteComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseExplanationOfBenefitItemReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("detail")) {
JsonArray array = getJArray(json, "detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseExplanationOfBenefitAddedItemDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.AddedItemBodySiteComponent parseExplanationOfBenefitAddedItemBodySiteComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemBodySiteComponent res = new ExplanationOfBenefit.AddedItemBodySiteComponent();
parseExplanationOfBenefitAddedItemBodySiteComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemBodySiteComponentProperties(JsonObject json, ExplanationOfBenefit.AddedItemBodySiteComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("site")) {
JsonArray array = getJArray(json, "site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subSite")) {
JsonArray array = getJArray(json, "subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.AddedItemDetailComponent parseExplanationOfBenefitAddedItemDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemDetailComponent res = new ExplanationOfBenefit.AddedItemDetailComponent();
parseExplanationOfBenefitAddedItemDetailComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemDetailComponentProperties(JsonObject json, ExplanationOfBenefit.AddedItemDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseExplanationOfBenefitItemReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subDetail")) {
JsonArray array = getJArray(json, "subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseExplanationOfBenefitAddedItemDetailSubDetailComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.AddedItemDetailSubDetailComponent parseExplanationOfBenefitAddedItemDetailSubDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemDetailSubDetailComponent res = new ExplanationOfBenefit.AddedItemDetailSubDetailComponent();
parseExplanationOfBenefitAddedItemDetailSubDetailComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemDetailSubDetailComponentProperties(JsonObject json, ExplanationOfBenefit.AddedItemDetailSubDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("traceNumber")) {
JsonArray array = getJArray(json, "traceNumber");
for (int i = 0; i < array.size(); i++) {
res.getTraceNumber().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("revenue"))
res.setRevenue(parseCodeableConcept(getJObject(json, "revenue")));
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("productOrServiceEnd"))
res.setProductOrServiceEnd(parseCodeableConcept(getJObject(json, "productOrServiceEnd")));
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientPaid"))
res.setPatientPaid(parseMoney(getJObject(json, "patientPaid")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("unitPrice"))
res.setUnitPrice(parseMoney(getJObject(json, "unitPrice")));
if (json.has("factor"))
res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal()));
if (json.has("_factor"))
parseElementProperties(getJObject(json, "_factor"), res.getFactorElement());
if (json.has("tax"))
res.setTax(parseMoney(getJObject(json, "tax")));
if (json.has("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = getJArray(json, "noteNumber");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNoteNumber().add(new PositiveIntType());
} else {;
res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString()));
}
}
};
if (json.has("_noteNumber")) {
JsonArray array = getJArray(json, "_noteNumber");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNoteNumber().size())
res.getNoteNumber().add(parsePositiveInt(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getNoteNumber().get(i));
}
};
if (json.has("reviewOutcome"))
res.setReviewOutcome(parseExplanationOfBenefitItemReviewOutcomeComponent(getJObject(json, "reviewOutcome")));
if (json.has("adjudication")) {
JsonArray array = getJArray(json, "adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.TotalComponent parseExplanationOfBenefitTotalComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.TotalComponent res = new ExplanationOfBenefit.TotalComponent();
parseExplanationOfBenefitTotalComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitTotalComponentProperties(JsonObject json, ExplanationOfBenefit.TotalComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
}
protected ExplanationOfBenefit.PaymentComponent parseExplanationOfBenefitPaymentComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent();
parseExplanationOfBenefitPaymentComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitPaymentComponentProperties(JsonObject json, ExplanationOfBenefit.PaymentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("adjustment"))
res.setAdjustment(parseMoney(getJObject(json, "adjustment")));
if (json.has("adjustmentReason"))
res.setAdjustmentReason(parseCodeableConcept(getJObject(json, "adjustmentReason")));
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
}
protected ExplanationOfBenefit.NoteComponent parseExplanationOfBenefitNoteComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent();
parseExplanationOfBenefitNoteComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitNoteComponentProperties(JsonObject json, ExplanationOfBenefit.NoteComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("number"))
res.setNumberElement(parsePositiveInt(json.get("number").getAsString()));
if (json.has("_number"))
parseElementProperties(getJObject(json, "_number"), res.getNumberElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
}
protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent();
parseExplanationOfBenefitBenefitBalanceComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitBenefitBalanceComponentProperties(JsonObject json, ExplanationOfBenefit.BenefitBalanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("excluded"))
res.setExcludedElement(parseBoolean(json.get("excluded").getAsBoolean()));
if (json.has("_excluded"))
parseElementProperties(getJObject(json, "_excluded"), res.getExcludedElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("network"))
res.setNetwork(parseCodeableConcept(getJObject(json, "network")));
if (json.has("unit"))
res.setUnit(parseCodeableConcept(getJObject(json, "unit")));
if (json.has("term"))
res.setTerm(parseCodeableConcept(getJObject(json, "term")));
if (json.has("financial")) {
JsonArray array = getJArray(json, "financial");
for (int i = 0; i < array.size(); i++) {
res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(JsonObject json) throws IOException, FHIRFormatError {
ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent();
parseExplanationOfBenefitBenefitComponentProperties(json, res);
return res;
}
protected void parseExplanationOfBenefitBenefitComponentProperties(JsonObject json, ExplanationOfBenefit.BenefitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType allowed = parseType("allowed", json);
if (allowed != null)
res.setAllowed(allowed);
DataType used = parseType("used", json);
if (used != null)
res.setUsed(used);
}
protected FamilyMemberHistory parseFamilyMemberHistory(JsonObject json) throws IOException, FHIRFormatError {
FamilyMemberHistory res = new FamilyMemberHistory();
parseFamilyMemberHistoryProperties(json, res);
return res;
}
protected void parseFamilyMemberHistoryProperties(JsonObject json, FamilyMemberHistory res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), FamilyMemberHistory.FamilyHistoryStatus.NULL, new FamilyMemberHistory.FamilyHistoryStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("dataAbsentReason"))
res.setDataAbsentReason(parseCodeableConcept(getJObject(json, "dataAbsentReason")));
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseFamilyMemberHistoryParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("relationship"))
res.setRelationship(parseCodeableConcept(getJObject(json, "relationship")));
if (json.has("sex"))
res.setSex(parseCodeableConcept(getJObject(json, "sex")));
DataType born = parseType("born", json);
if (born != null)
res.setBorn(born);
DataType age = parseType("age", json);
if (age != null)
res.setAge(age);
if (json.has("estimatedAge"))
res.setEstimatedAgeElement(parseBoolean(json.get("estimatedAge").getAsBoolean()));
if (json.has("_estimatedAge"))
parseElementProperties(getJObject(json, "_estimatedAge"), res.getEstimatedAgeElement());
DataType deceased = parseType("deceased", json);
if (deceased != null)
res.setDeceased(deceased);
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseFamilyMemberHistoryConditionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("procedure")) {
JsonArray array = getJArray(json, "procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseFamilyMemberHistoryProcedureComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected FamilyMemberHistory.FamilyMemberHistoryParticipantComponent parseFamilyMemberHistoryParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
FamilyMemberHistory.FamilyMemberHistoryParticipantComponent res = new FamilyMemberHistory.FamilyMemberHistoryParticipantComponent();
parseFamilyMemberHistoryParticipantComponentProperties(json, res);
return res;
}
protected void parseFamilyMemberHistoryParticipantComponentProperties(JsonObject json, FamilyMemberHistory.FamilyMemberHistoryParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryConditionComponent(JsonObject json) throws IOException, FHIRFormatError {
FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent();
parseFamilyMemberHistoryConditionComponentProperties(json, res);
return res;
}
protected void parseFamilyMemberHistoryConditionComponentProperties(JsonObject json, FamilyMemberHistory.FamilyMemberHistoryConditionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
if (json.has("contributedToDeath"))
res.setContributedToDeathElement(parseBoolean(json.get("contributedToDeath").getAsBoolean()));
if (json.has("_contributedToDeath"))
parseElementProperties(getJObject(json, "_contributedToDeath"), res.getContributedToDeathElement());
DataType onset = parseType("onset", json);
if (onset != null)
res.setOnset(onset);
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected FamilyMemberHistory.FamilyMemberHistoryProcedureComponent parseFamilyMemberHistoryProcedureComponent(JsonObject json) throws IOException, FHIRFormatError {
FamilyMemberHistory.FamilyMemberHistoryProcedureComponent res = new FamilyMemberHistory.FamilyMemberHistoryProcedureComponent();
parseFamilyMemberHistoryProcedureComponentProperties(json, res);
return res;
}
protected void parseFamilyMemberHistoryProcedureComponentProperties(JsonObject json, FamilyMemberHistory.FamilyMemberHistoryProcedureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
if (json.has("contributedToDeath"))
res.setContributedToDeathElement(parseBoolean(json.get("contributedToDeath").getAsBoolean()));
if (json.has("_contributedToDeath"))
parseElementProperties(getJObject(json, "_contributedToDeath"), res.getContributedToDeathElement());
DataType performed = parseType("performed", json);
if (performed != null)
res.setPerformed(performed);
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Flag parseFlag(JsonObject json) throws IOException, FHIRFormatError {
Flag res = new Flag();
parseFlagProperties(json, res);
return res;
}
protected void parseFlagProperties(JsonObject json, Flag res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Flag.FlagStatus.NULL, new Flag.FlagStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
}
protected FormularyItem parseFormularyItem(JsonObject json) throws IOException, FHIRFormatError {
FormularyItem res = new FormularyItem();
parseFormularyItemProperties(json, res);
return res;
}
protected void parseFormularyItemProperties(JsonObject json, FormularyItem res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), FormularyItem.FormularyItemStatusCodes.NULL, new FormularyItem.FormularyItemStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
}
protected GenomicStudy parseGenomicStudy(JsonObject json) throws IOException, FHIRFormatError {
GenomicStudy res = new GenomicStudy();
parseGenomicStudyProperties(json, res);
return res;
}
protected void parseGenomicStudyProperties(JsonObject json, GenomicStudy res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), GenomicStudy.GenomicStudyStatus.NULL, new GenomicStudy.GenomicStudyStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("startDate"))
res.setStartDateElement(parseDateTime(json.get("startDate").getAsString()));
if (json.has("_startDate"))
parseElementProperties(getJObject(json, "_startDate"), res.getStartDateElement());
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("referrer"))
res.setReferrer(parseReference(getJObject(json, "referrer")));
if (json.has("interpreter")) {
JsonArray array = getJArray(json, "interpreter");
for (int i = 0; i < array.size(); i++) {
res.getInterpreter().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical"))
res.setInstantiatesCanonicalElement(parseCanonical(json.get("instantiatesCanonical").getAsString()));
if (json.has("_instantiatesCanonical"))
parseElementProperties(getJObject(json, "_instantiatesCanonical"), res.getInstantiatesCanonicalElement());
if (json.has("instantiatesUri"))
res.setInstantiatesUriElement(parseUri(json.get("instantiatesUri").getAsString()));
if (json.has("_instantiatesUri"))
parseElementProperties(getJObject(json, "_instantiatesUri"), res.getInstantiatesUriElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("analysis")) {
JsonArray array = getJArray(json, "analysis");
for (int i = 0; i < array.size(); i++) {
res.getAnalysis().add(parseGenomicStudyAnalysisComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected GenomicStudy.GenomicStudyAnalysisComponent parseGenomicStudyAnalysisComponent(JsonObject json) throws IOException, FHIRFormatError {
GenomicStudy.GenomicStudyAnalysisComponent res = new GenomicStudy.GenomicStudyAnalysisComponent();
parseGenomicStudyAnalysisComponentProperties(json, res);
return res;
}
protected void parseGenomicStudyAnalysisComponentProperties(JsonObject json, GenomicStudy.GenomicStudyAnalysisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("methodType")) {
JsonArray array = getJArray(json, "methodType");
for (int i = 0; i < array.size(); i++) {
res.getMethodType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("changeType")) {
JsonArray array = getJArray(json, "changeType");
for (int i = 0; i < array.size(); i++) {
res.getChangeType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("genomeBuild"))
res.setGenomeBuild(parseCodeableConcept(getJObject(json, "genomeBuild")));
if (json.has("instantiatesCanonical"))
res.setInstantiatesCanonicalElement(parseCanonical(json.get("instantiatesCanonical").getAsString()));
if (json.has("_instantiatesCanonical"))
parseElementProperties(getJObject(json, "_instantiatesCanonical"), res.getInstantiatesCanonicalElement());
if (json.has("instantiatesUri"))
res.setInstantiatesUriElement(parseUri(json.get("instantiatesUri").getAsString()));
if (json.has("_instantiatesUri"))
parseElementProperties(getJObject(json, "_instantiatesUri"), res.getInstantiatesUriElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specimen")) {
JsonArray array = getJArray(json, "specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("protocolPerformed"))
res.setProtocolPerformed(parseReference(getJObject(json, "protocolPerformed")));
if (json.has("regionsStudied")) {
JsonArray array = getJArray(json, "regionsStudied");
for (int i = 0; i < array.size(); i++) {
res.getRegionsStudied().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("regionsCalled")) {
JsonArray array = getJArray(json, "regionsCalled");
for (int i = 0; i < array.size(); i++) {
res.getRegionsCalled().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("input")) {
JsonArray array = getJArray(json, "input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseGenomicStudyAnalysisInputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("output")) {
JsonArray array = getJArray(json, "output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parseGenomicStudyAnalysisOutputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseGenomicStudyAnalysisPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device")) {
JsonArray array = getJArray(json, "device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseGenomicStudyAnalysisDeviceComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected GenomicStudy.GenomicStudyAnalysisInputComponent parseGenomicStudyAnalysisInputComponent(JsonObject json) throws IOException, FHIRFormatError {
GenomicStudy.GenomicStudyAnalysisInputComponent res = new GenomicStudy.GenomicStudyAnalysisInputComponent();
parseGenomicStudyAnalysisInputComponentProperties(json, res);
return res;
}
protected void parseGenomicStudyAnalysisInputComponentProperties(JsonObject json, GenomicStudy.GenomicStudyAnalysisInputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("file"))
res.setFile(parseReference(getJObject(json, "file")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType generatedBy = parseType("generatedBy", json);
if (generatedBy != null)
res.setGeneratedBy(generatedBy);
}
protected GenomicStudy.GenomicStudyAnalysisOutputComponent parseGenomicStudyAnalysisOutputComponent(JsonObject json) throws IOException, FHIRFormatError {
GenomicStudy.GenomicStudyAnalysisOutputComponent res = new GenomicStudy.GenomicStudyAnalysisOutputComponent();
parseGenomicStudyAnalysisOutputComponentProperties(json, res);
return res;
}
protected void parseGenomicStudyAnalysisOutputComponentProperties(JsonObject json, GenomicStudy.GenomicStudyAnalysisOutputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("file"))
res.setFile(parseReference(getJObject(json, "file")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
}
protected GenomicStudy.GenomicStudyAnalysisPerformerComponent parseGenomicStudyAnalysisPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
GenomicStudy.GenomicStudyAnalysisPerformerComponent res = new GenomicStudy.GenomicStudyAnalysisPerformerComponent();
parseGenomicStudyAnalysisPerformerComponentProperties(json, res);
return res;
}
protected void parseGenomicStudyAnalysisPerformerComponentProperties(JsonObject json, GenomicStudy.GenomicStudyAnalysisPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected GenomicStudy.GenomicStudyAnalysisDeviceComponent parseGenomicStudyAnalysisDeviceComponent(JsonObject json) throws IOException, FHIRFormatError {
GenomicStudy.GenomicStudyAnalysisDeviceComponent res = new GenomicStudy.GenomicStudyAnalysisDeviceComponent();
parseGenomicStudyAnalysisDeviceComponentProperties(json, res);
return res;
}
protected void parseGenomicStudyAnalysisDeviceComponentProperties(JsonObject json, GenomicStudy.GenomicStudyAnalysisDeviceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
}
protected Goal parseGoal(JsonObject json) throws IOException, FHIRFormatError {
Goal res = new Goal();
parseGoalProperties(json, res);
return res;
}
protected void parseGoalProperties(JsonObject json, Goal res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("lifecycleStatus"))
res.setLifecycleStatusElement(parseEnumeration(json.get("lifecycleStatus").getAsString(), Goal.GoalLifecycleStatus.NULL, new Goal.GoalLifecycleStatusEnumFactory()));
if (json.has("_lifecycleStatus"))
parseElementProperties(getJObject(json, "_lifecycleStatus"), res.getLifecycleStatusElement());
if (json.has("achievementStatus"))
res.setAchievementStatus(parseCodeableConcept(getJObject(json, "achievementStatus")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("continuous"))
res.setContinuousElement(parseBoolean(json.get("continuous").getAsBoolean()));
if (json.has("_continuous"))
parseElementProperties(getJObject(json, "_continuous"), res.getContinuousElement());
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("description"))
res.setDescription(parseCodeableConcept(getJObject(json, "description")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
DataType start = parseType("start", json);
if (start != null)
res.setStart(start);
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseGoalTargetComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("statusDate"))
res.setStatusDateElement(parseDate(json.get("statusDate").getAsString()));
if (json.has("_statusDate"))
parseElementProperties(getJObject(json, "_statusDate"), res.getStatusDateElement());
if (json.has("statusReason"))
res.setStatusReasonElement(parseString(json.get("statusReason").getAsString()));
if (json.has("_statusReason"))
parseElementProperties(getJObject(json, "_statusReason"), res.getStatusReasonElement());
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
if (json.has("addresses")) {
JsonArray array = getJArray(json, "addresses");
for (int i = 0; i < array.size(); i++) {
res.getAddresses().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("outcome")) {
JsonArray array = getJArray(json, "outcome");
for (int i = 0; i < array.size(); i++) {
res.getOutcome().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Goal.GoalTargetComponent parseGoalTargetComponent(JsonObject json) throws IOException, FHIRFormatError {
Goal.GoalTargetComponent res = new Goal.GoalTargetComponent();
parseGoalTargetComponentProperties(json, res);
return res;
}
protected void parseGoalTargetComponentProperties(JsonObject json, Goal.GoalTargetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("measure"))
res.setMeasure(parseCodeableConcept(getJObject(json, "measure")));
DataType detail = parseType("detail", json);
if (detail != null)
res.setDetail(detail);
DataType due = parseType("due", json);
if (due != null)
res.setDue(due);
}
protected GraphDefinition parseGraphDefinition(JsonObject json) throws IOException, FHIRFormatError {
GraphDefinition res = new GraphDefinition();
parseGraphDefinitionProperties(json, res);
return res;
}
protected void parseGraphDefinitionProperties(JsonObject json, GraphDefinition res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("start"))
res.setStartElement(parseId(json.get("start").getAsString()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("node")) {
JsonArray array = getJArray(json, "node");
for (int i = 0; i < array.size(); i++) {
res.getNode().add(parseGraphDefinitionNodeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseGraphDefinitionLinkComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected GraphDefinition.GraphDefinitionNodeComponent parseGraphDefinitionNodeComponent(JsonObject json) throws IOException, FHIRFormatError {
GraphDefinition.GraphDefinitionNodeComponent res = new GraphDefinition.GraphDefinitionNodeComponent();
parseGraphDefinitionNodeComponentProperties(json, res);
return res;
}
protected void parseGraphDefinitionNodeComponentProperties(JsonObject json, GraphDefinition.GraphDefinitionNodeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("nodeId"))
res.setNodeIdElement(parseId(json.get("nodeId").getAsString()));
if (json.has("_nodeId"))
parseElementProperties(getJObject(json, "_nodeId"), res.getNodeIdElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
}
protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionLinkComponent(JsonObject json) throws IOException, FHIRFormatError {
GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent();
parseGraphDefinitionLinkComponentProperties(json, res);
return res;
}
protected void parseGraphDefinitionLinkComponentProperties(JsonObject json, GraphDefinition.GraphDefinitionLinkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("min"))
res.setMinElement(parseInteger(json.get("min").getAsLong()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
if (json.has("sourceId"))
res.setSourceIdElement(parseId(json.get("sourceId").getAsString()));
if (json.has("_sourceId"))
parseElementProperties(getJObject(json, "_sourceId"), res.getSourceIdElement());
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("sliceName"))
res.setSliceNameElement(parseString(json.get("sliceName").getAsString()));
if (json.has("_sliceName"))
parseElementProperties(getJObject(json, "_sliceName"), res.getSliceNameElement());
if (json.has("targetId"))
res.setTargetIdElement(parseId(json.get("targetId").getAsString()));
if (json.has("_targetId"))
parseElementProperties(getJObject(json, "_targetId"), res.getTargetIdElement());
if (json.has("params"))
res.setParamsElement(parseString(json.get("params").getAsString()));
if (json.has("_params"))
parseElementProperties(getJObject(json, "_params"), res.getParamsElement());
if (json.has("compartment")) {
JsonArray array = getJArray(json, "compartment");
for (int i = 0; i < array.size(); i++) {
res.getCompartment().add(parseGraphDefinitionLinkCompartmentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected GraphDefinition.GraphDefinitionLinkCompartmentComponent parseGraphDefinitionLinkCompartmentComponent(JsonObject json) throws IOException, FHIRFormatError {
GraphDefinition.GraphDefinitionLinkCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkCompartmentComponent();
parseGraphDefinitionLinkCompartmentComponentProperties(json, res);
return res;
}
protected void parseGraphDefinitionLinkCompartmentComponentProperties(JsonObject json, GraphDefinition.GraphDefinitionLinkCompartmentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), GraphDefinition.GraphCompartmentUse.NULL, new GraphDefinition.GraphCompartmentUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("rule"))
res.setRuleElement(parseEnumeration(json.get("rule").getAsString(), GraphDefinition.GraphCompartmentRule.NULL, new GraphDefinition.GraphCompartmentRuleEnumFactory()));
if (json.has("_rule"))
parseElementProperties(getJObject(json, "_rule"), res.getRuleElement());
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), Enumerations.CompartmentType.NULL, new Enumerations.CompartmentTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected Group parseGroup(JsonObject json) throws IOException, FHIRFormatError {
Group res = new Group();
parseGroupProperties(json, res);
return res;
}
protected void parseGroupProperties(JsonObject json, Group res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Group.GroupType.NULL, new Group.GroupTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("membership"))
res.setMembershipElement(parseEnumeration(json.get("membership").getAsString(), Group.GroupMembershipBasis.NULL, new Group.GroupMembershipBasisEnumFactory()));
if (json.has("_membership"))
parseElementProperties(getJObject(json, "_membership"), res.getMembershipElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("quantity"))
res.setQuantityElement(parseUnsignedInt(json.get("quantity").getAsString()));
if (json.has("_quantity"))
parseElementProperties(getJObject(json, "_quantity"), res.getQuantityElement());
if (json.has("managingEntity"))
res.setManagingEntity(parseReference(getJObject(json, "managingEntity")));
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseGroupCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("member")) {
JsonArray array = getJArray(json, "member");
for (int i = 0; i < array.size(); i++) {
res.getMember().add(parseGroupMemberComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Group.GroupCharacteristicComponent parseGroupCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent();
parseGroupCharacteristicComponentProperties(json, res);
return res;
}
protected void parseGroupCharacteristicComponentProperties(JsonObject json, Group.GroupCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("exclude"))
res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean()));
if (json.has("_exclude"))
parseElementProperties(getJObject(json, "_exclude"), res.getExcludeElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Group.GroupMemberComponent parseGroupMemberComponent(JsonObject json) throws IOException, FHIRFormatError {
Group.GroupMemberComponent res = new Group.GroupMemberComponent();
parseGroupMemberComponentProperties(json, res);
return res;
}
protected void parseGroupMemberComponentProperties(JsonObject json, Group.GroupMemberComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("entity"))
res.setEntity(parseReference(getJObject(json, "entity")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("inactive"))
res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean()));
if (json.has("_inactive"))
parseElementProperties(getJObject(json, "_inactive"), res.getInactiveElement());
}
protected GuidanceResponse parseGuidanceResponse(JsonObject json) throws IOException, FHIRFormatError {
GuidanceResponse res = new GuidanceResponse();
parseGuidanceResponseProperties(json, res);
return res;
}
protected void parseGuidanceResponseProperties(JsonObject json, GuidanceResponse res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("requestIdentifier"))
res.setRequestIdentifier(parseIdentifier(getJObject(json, "requestIdentifier")));
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
DataType module = parseType("module", json);
if (module != null)
res.setModule(module);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), GuidanceResponse.GuidanceResponseStatus.NULL, new GuidanceResponse.GuidanceResponseStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("occurrenceDateTime"))
res.setOccurrenceDateTimeElement(parseDateTime(json.get("occurrenceDateTime").getAsString()));
if (json.has("_occurrenceDateTime"))
parseElementProperties(getJObject(json, "_occurrenceDateTime"), res.getOccurrenceDateTimeElement());
if (json.has("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("evaluationMessage"))
res.setEvaluationMessage(parseReference(getJObject(json, "evaluationMessage")));
if (json.has("outputParameters"))
res.setOutputParameters(parseReference(getJObject(json, "outputParameters")));
if (json.has("result")) {
JsonArray array = getJArray(json, "result");
for (int i = 0; i < array.size(); i++) {
res.getResult().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dataRequirement")) {
JsonArray array = getJArray(json, "dataRequirement");
for (int i = 0; i < array.size(); i++) {
res.getDataRequirement().add(parseDataRequirement(getJsonObjectFromArray(array, i)));
}
};
}
protected HealthcareService parseHealthcareService(JsonObject json) throws IOException, FHIRFormatError {
HealthcareService res = new HealthcareService();
parseHealthcareServiceProperties(json, res);
return res;
}
protected void parseHealthcareServiceProperties(JsonObject json, HealthcareService res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("providedBy"))
res.setProvidedBy(parseReference(getJObject(json, "providedBy")));
if (json.has("offeredIn")) {
JsonArray array = getJArray(json, "offeredIn");
for (int i = 0; i < array.size(); i++) {
res.getOfferedIn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialty")) {
JsonArray array = getJArray(json, "specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("extraDetails"))
res.setExtraDetailsElement(parseMarkdown(json.get("extraDetails").getAsString()));
if (json.has("_extraDetails"))
parseElementProperties(getJObject(json, "_extraDetails"), res.getExtraDetailsElement());
if (json.has("photo"))
res.setPhoto(parseAttachment(getJObject(json, "photo")));
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseExtendedContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("coverageArea")) {
JsonArray array = getJArray(json, "coverageArea");
for (int i = 0; i < array.size(); i++) {
res.getCoverageArea().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceProvisionCode")) {
JsonArray array = getJArray(json, "serviceProvisionCode");
for (int i = 0; i < array.size(); i++) {
res.getServiceProvisionCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("eligibility")) {
JsonArray array = getJArray(json, "eligibility");
for (int i = 0; i < array.size(); i++) {
res.getEligibility().add(parseHealthcareServiceEligibilityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("program")) {
JsonArray array = getJArray(json, "program");
for (int i = 0; i < array.size(); i++) {
res.getProgram().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communication")) {
JsonArray array = getJArray(json, "communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("referralMethod")) {
JsonArray array = getJArray(json, "referralMethod");
for (int i = 0; i < array.size(); i++) {
res.getReferralMethod().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("appointmentRequired"))
res.setAppointmentRequiredElement(parseBoolean(json.get("appointmentRequired").getAsBoolean()));
if (json.has("_appointmentRequired"))
parseElementProperties(getJObject(json, "_appointmentRequired"), res.getAppointmentRequiredElement());
if (json.has("availability")) {
JsonArray array = getJArray(json, "availability");
for (int i = 0; i < array.size(); i++) {
res.getAvailability().add(parseAvailability(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected HealthcareService.HealthcareServiceEligibilityComponent parseHealthcareServiceEligibilityComponent(JsonObject json) throws IOException, FHIRFormatError {
HealthcareService.HealthcareServiceEligibilityComponent res = new HealthcareService.HealthcareServiceEligibilityComponent();
parseHealthcareServiceEligibilityComponentProperties(json, res);
return res;
}
protected void parseHealthcareServiceEligibilityComponentProperties(JsonObject json, HealthcareService.HealthcareServiceEligibilityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected ImagingSelection parseImagingSelection(JsonObject json) throws IOException, FHIRFormatError {
ImagingSelection res = new ImagingSelection();
parseImagingSelectionProperties(json, res);
return res;
}
protected void parseImagingSelectionProperties(JsonObject json, ImagingSelection res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ImagingSelection.ImagingSelectionStatus.NULL, new ImagingSelection.ImagingSelectionStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("issued"))
res.setIssuedElement(parseInstant(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseImagingSelectionPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("studyUid"))
res.setStudyUidElement(parseId(json.get("studyUid").getAsString()));
if (json.has("_studyUid"))
parseElementProperties(getJObject(json, "_studyUid"), res.getStudyUidElement());
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("seriesUid"))
res.setSeriesUidElement(parseId(json.get("seriesUid").getAsString()));
if (json.has("_seriesUid"))
parseElementProperties(getJObject(json, "_seriesUid"), res.getSeriesUidElement());
if (json.has("seriesNumber"))
res.setSeriesNumberElement(parseUnsignedInt(json.get("seriesNumber").getAsString()));
if (json.has("_seriesNumber"))
parseElementProperties(getJObject(json, "_seriesNumber"), res.getSeriesNumberElement());
if (json.has("frameOfReferenceUid"))
res.setFrameOfReferenceUidElement(parseId(json.get("frameOfReferenceUid").getAsString()));
if (json.has("_frameOfReferenceUid"))
parseElementProperties(getJObject(json, "_frameOfReferenceUid"), res.getFrameOfReferenceUidElement());
if (json.has("bodySite"))
res.setBodySite(parseCodeableReference(getJObject(json, "bodySite")));
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instance")) {
JsonArray array = getJArray(json, "instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseImagingSelectionInstanceComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImagingSelection.ImagingSelectionPerformerComponent parseImagingSelectionPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingSelection.ImagingSelectionPerformerComponent res = new ImagingSelection.ImagingSelectionPerformerComponent();
parseImagingSelectionPerformerComponentProperties(json, res);
return res;
}
protected void parseImagingSelectionPerformerComponentProperties(JsonObject json, ImagingSelection.ImagingSelectionPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected ImagingSelection.ImagingSelectionInstanceComponent parseImagingSelectionInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingSelection.ImagingSelectionInstanceComponent res = new ImagingSelection.ImagingSelectionInstanceComponent();
parseImagingSelectionInstanceComponentProperties(json, res);
return res;
}
protected void parseImagingSelectionInstanceComponentProperties(JsonObject json, ImagingSelection.ImagingSelectionInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("uid"))
res.setUidElement(parseId(json.get("uid").getAsString()));
if (json.has("_uid"))
parseElementProperties(getJObject(json, "_uid"), res.getUidElement());
if (json.has("number"))
res.setNumberElement(parseUnsignedInt(json.get("number").getAsString()));
if (json.has("_number"))
parseElementProperties(getJObject(json, "_number"), res.getNumberElement());
if (json.has("sopClass"))
res.setSopClass(parseCoding(getJObject(json, "sopClass")));
if (json.has("subset")) {
JsonArray array = getJArray(json, "subset");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSubset().add(new StringType());
} else {;
res.getSubset().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_subset")) {
JsonArray array = getJArray(json, "_subset");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSubset().size())
res.getSubset().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSubset().get(i));
}
};
if (json.has("imageRegion2D")) {
JsonArray array = getJArray(json, "imageRegion2D");
for (int i = 0; i < array.size(); i++) {
res.getImageRegion2D().add(parseImagingSelectionImageRegion2DComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("imageRegion3D")) {
JsonArray array = getJArray(json, "imageRegion3D");
for (int i = 0; i < array.size(); i++) {
res.getImageRegion3D().add(parseImagingSelectionImageRegion3DComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImagingSelection.ImageRegion2DComponent parseImagingSelectionImageRegion2DComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingSelection.ImageRegion2DComponent res = new ImagingSelection.ImageRegion2DComponent();
parseImagingSelectionImageRegion2DComponentProperties(json, res);
return res;
}
protected void parseImagingSelectionImageRegion2DComponentProperties(JsonObject json, ImagingSelection.ImageRegion2DComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("regionType"))
res.setRegionTypeElement(parseEnumeration(json.get("regionType").getAsString(), ImagingSelection.ImagingSelection2DGraphicType.NULL, new ImagingSelection.ImagingSelection2DGraphicTypeEnumFactory()));
if (json.has("_regionType"))
parseElementProperties(getJObject(json, "_regionType"), res.getRegionTypeElement());
if (json.has("coordinate")) {
JsonArray array = getJArray(json, "coordinate");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCoordinate().add(new DecimalType());
} else {;
res.getCoordinate().add(parseDecimal(array.get(i).getAsBigDecimal()));
}
}
};
if (json.has("_coordinate")) {
JsonArray array = getJArray(json, "_coordinate");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCoordinate().size())
res.getCoordinate().add(parseDecimal(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCoordinate().get(i));
}
};
}
protected ImagingSelection.ImageRegion3DComponent parseImagingSelectionImageRegion3DComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingSelection.ImageRegion3DComponent res = new ImagingSelection.ImageRegion3DComponent();
parseImagingSelectionImageRegion3DComponentProperties(json, res);
return res;
}
protected void parseImagingSelectionImageRegion3DComponentProperties(JsonObject json, ImagingSelection.ImageRegion3DComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("regionType"))
res.setRegionTypeElement(parseEnumeration(json.get("regionType").getAsString(), ImagingSelection.ImagingSelection3DGraphicType.NULL, new ImagingSelection.ImagingSelection3DGraphicTypeEnumFactory()));
if (json.has("_regionType"))
parseElementProperties(getJObject(json, "_regionType"), res.getRegionTypeElement());
if (json.has("coordinate")) {
JsonArray array = getJArray(json, "coordinate");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCoordinate().add(new DecimalType());
} else {;
res.getCoordinate().add(parseDecimal(array.get(i).getAsBigDecimal()));
}
}
};
if (json.has("_coordinate")) {
JsonArray array = getJArray(json, "_coordinate");
for (int i = 0; i < array.size(); i++) {
if (i == res.getCoordinate().size())
res.getCoordinate().add(parseDecimal(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getCoordinate().get(i));
}
};
}
protected ImagingStudy parseImagingStudy(JsonObject json) throws IOException, FHIRFormatError {
ImagingStudy res = new ImagingStudy();
parseImagingStudyProperties(json, res);
return res;
}
protected void parseImagingStudyProperties(JsonObject json, ImagingStudy res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ImagingStudy.ImagingStudyStatus.NULL, new ImagingStudy.ImagingStudyStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("modality")) {
JsonArray array = getJArray(json, "modality");
for (int i = 0; i < array.size(); i++) {
res.getModality().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("started"))
res.setStartedElement(parseDateTime(json.get("started").getAsString()));
if (json.has("_started"))
parseElementProperties(getJObject(json, "_started"), res.getStartedElement());
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("referrer"))
res.setReferrer(parseReference(getJObject(json, "referrer")));
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("numberOfSeries"))
res.setNumberOfSeriesElement(parseUnsignedInt(json.get("numberOfSeries").getAsString()));
if (json.has("_numberOfSeries"))
parseElementProperties(getJObject(json, "_numberOfSeries"), res.getNumberOfSeriesElement());
if (json.has("numberOfInstances"))
res.setNumberOfInstancesElement(parseUnsignedInt(json.get("numberOfInstances").getAsString()));
if (json.has("_numberOfInstances"))
parseElementProperties(getJObject(json, "_numberOfInstances"), res.getNumberOfInstancesElement());
if (json.has("procedure")) {
JsonArray array = getJArray(json, "procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("series")) {
JsonArray array = getJArray(json, "series");
for (int i = 0; i < array.size(); i++) {
res.getSeries().add(parseImagingStudySeriesComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudySeriesComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent();
parseImagingStudySeriesComponentProperties(json, res);
return res;
}
protected void parseImagingStudySeriesComponentProperties(JsonObject json, ImagingStudy.ImagingStudySeriesComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("uid"))
res.setUidElement(parseId(json.get("uid").getAsString()));
if (json.has("_uid"))
parseElementProperties(getJObject(json, "_uid"), res.getUidElement());
if (json.has("number"))
res.setNumberElement(parseUnsignedInt(json.get("number").getAsString()));
if (json.has("_number"))
parseElementProperties(getJObject(json, "_number"), res.getNumberElement());
if (json.has("modality"))
res.setModality(parseCodeableConcept(getJObject(json, "modality")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("numberOfInstances"))
res.setNumberOfInstancesElement(parseUnsignedInt(json.get("numberOfInstances").getAsString()));
if (json.has("_numberOfInstances"))
parseElementProperties(getJObject(json, "_numberOfInstances"), res.getNumberOfInstancesElement());
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite"))
res.setBodySite(parseCodeableReference(getJObject(json, "bodySite")));
if (json.has("laterality"))
res.setLaterality(parseCodeableConcept(getJObject(json, "laterality")));
if (json.has("specimen")) {
JsonArray array = getJArray(json, "specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("started"))
res.setStartedElement(parseDateTime(json.get("started").getAsString()));
if (json.has("_started"))
parseElementProperties(getJObject(json, "_started"), res.getStartedElement());
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseImagingStudySeriesPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instance")) {
JsonArray array = getJArray(json, "instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseImagingStudySeriesInstanceComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImagingStudy.ImagingStudySeriesPerformerComponent parseImagingStudySeriesPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingStudy.ImagingStudySeriesPerformerComponent res = new ImagingStudy.ImagingStudySeriesPerformerComponent();
parseImagingStudySeriesPerformerComponentProperties(json, res);
return res;
}
protected void parseImagingStudySeriesPerformerComponentProperties(JsonObject json, ImagingStudy.ImagingStudySeriesPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected ImagingStudy.ImagingStudySeriesInstanceComponent parseImagingStudySeriesInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent();
parseImagingStudySeriesInstanceComponentProperties(json, res);
return res;
}
protected void parseImagingStudySeriesInstanceComponentProperties(JsonObject json, ImagingStudy.ImagingStudySeriesInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("uid"))
res.setUidElement(parseId(json.get("uid").getAsString()));
if (json.has("_uid"))
parseElementProperties(getJObject(json, "_uid"), res.getUidElement());
if (json.has("sopClass"))
res.setSopClass(parseCoding(getJObject(json, "sopClass")));
if (json.has("number"))
res.setNumberElement(parseUnsignedInt(json.get("number").getAsString()));
if (json.has("_number"))
parseElementProperties(getJObject(json, "_number"), res.getNumberElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
}
protected Immunization parseImmunization(JsonObject json) throws IOException, FHIRFormatError {
Immunization res = new Immunization();
parseImmunizationProperties(json, res);
return res;
}
protected void parseImmunizationProperties(JsonObject json, Immunization res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Immunization.ImmunizationStatusCodes.NULL, new Immunization.ImmunizationStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("vaccineCode"))
res.setVaccineCode(parseCodeableConcept(getJObject(json, "vaccineCode")));
if (json.has("administeredProduct"))
res.setAdministeredProduct(parseCodeableReference(getJObject(json, "administeredProduct")));
if (json.has("manufacturer"))
res.setManufacturer(parseCodeableReference(getJObject(json, "manufacturer")));
if (json.has("lotNumber"))
res.setLotNumberElement(parseString(json.get("lotNumber").getAsString()));
if (json.has("_lotNumber"))
parseElementProperties(getJObject(json, "_lotNumber"), res.getLotNumberElement());
if (json.has("expirationDate"))
res.setExpirationDateElement(parseDate(json.get("expirationDate").getAsString()));
if (json.has("_expirationDate"))
parseElementProperties(getJObject(json, "_expirationDate"), res.getExpirationDateElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("primarySource"))
res.setPrimarySourceElement(parseBoolean(json.get("primarySource").getAsBoolean()));
if (json.has("_primarySource"))
parseElementProperties(getJObject(json, "_primarySource"), res.getPrimarySourceElement());
if (json.has("informationSource"))
res.setInformationSource(parseCodeableReference(getJObject(json, "informationSource")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("site"))
res.setSite(parseCodeableConcept(getJObject(json, "site")));
if (json.has("route"))
res.setRoute(parseCodeableConcept(getJObject(json, "route")));
if (json.has("doseQuantity"))
res.setDoseQuantity(parseQuantity(getJObject(json, "doseQuantity")));
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseImmunizationPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("isSubpotent"))
res.setIsSubpotentElement(parseBoolean(json.get("isSubpotent").getAsBoolean()));
if (json.has("_isSubpotent"))
parseElementProperties(getJObject(json, "_isSubpotent"), res.getIsSubpotentElement());
if (json.has("subpotentReason")) {
JsonArray array = getJArray(json, "subpotentReason");
for (int i = 0; i < array.size(); i++) {
res.getSubpotentReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("programEligibility")) {
JsonArray array = getJArray(json, "programEligibility");
for (int i = 0; i < array.size(); i++) {
res.getProgramEligibility().add(parseImmunizationProgramEligibilityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("fundingSource"))
res.setFundingSource(parseCodeableConcept(getJObject(json, "fundingSource")));
if (json.has("reaction")) {
JsonArray array = getJArray(json, "reaction");
for (int i = 0; i < array.size(); i++) {
res.getReaction().add(parseImmunizationReactionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("protocolApplied")) {
JsonArray array = getJArray(json, "protocolApplied");
for (int i = 0; i < array.size(); i++) {
res.getProtocolApplied().add(parseImmunizationProtocolAppliedComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Immunization.ImmunizationPerformerComponent parseImmunizationPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
Immunization.ImmunizationPerformerComponent res = new Immunization.ImmunizationPerformerComponent();
parseImmunizationPerformerComponentProperties(json, res);
return res;
}
protected void parseImmunizationPerformerComponentProperties(JsonObject json, Immunization.ImmunizationPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected Immunization.ImmunizationProgramEligibilityComponent parseImmunizationProgramEligibilityComponent(JsonObject json) throws IOException, FHIRFormatError {
Immunization.ImmunizationProgramEligibilityComponent res = new Immunization.ImmunizationProgramEligibilityComponent();
parseImmunizationProgramEligibilityComponentProperties(json, res);
return res;
}
protected void parseImmunizationProgramEligibilityComponentProperties(JsonObject json, Immunization.ImmunizationProgramEligibilityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("program"))
res.setProgram(parseCodeableConcept(getJObject(json, "program")));
if (json.has("programStatus"))
res.setProgramStatus(parseCodeableConcept(getJObject(json, "programStatus")));
}
protected Immunization.ImmunizationReactionComponent parseImmunizationReactionComponent(JsonObject json) throws IOException, FHIRFormatError {
Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent();
parseImmunizationReactionComponentProperties(json, res);
return res;
}
protected void parseImmunizationReactionComponentProperties(JsonObject json, Immunization.ImmunizationReactionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("manifestation"))
res.setManifestation(parseCodeableReference(getJObject(json, "manifestation")));
if (json.has("reported"))
res.setReportedElement(parseBoolean(json.get("reported").getAsBoolean()));
if (json.has("_reported"))
parseElementProperties(getJObject(json, "_reported"), res.getReportedElement());
}
protected Immunization.ImmunizationProtocolAppliedComponent parseImmunizationProtocolAppliedComponent(JsonObject json) throws IOException, FHIRFormatError {
Immunization.ImmunizationProtocolAppliedComponent res = new Immunization.ImmunizationProtocolAppliedComponent();
parseImmunizationProtocolAppliedComponentProperties(json, res);
return res;
}
protected void parseImmunizationProtocolAppliedComponentProperties(JsonObject json, Immunization.ImmunizationProtocolAppliedComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("series"))
res.setSeriesElement(parseString(json.get("series").getAsString()));
if (json.has("_series"))
parseElementProperties(getJObject(json, "_series"), res.getSeriesElement());
if (json.has("authority"))
res.setAuthority(parseReference(getJObject(json, "authority")));
if (json.has("targetDisease")) {
JsonArray array = getJArray(json, "targetDisease");
for (int i = 0; i < array.size(); i++) {
res.getTargetDisease().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("doseNumber"))
res.setDoseNumberElement(parseString(json.get("doseNumber").getAsString()));
if (json.has("_doseNumber"))
parseElementProperties(getJObject(json, "_doseNumber"), res.getDoseNumberElement());
if (json.has("seriesDoses"))
res.setSeriesDosesElement(parseString(json.get("seriesDoses").getAsString()));
if (json.has("_seriesDoses"))
parseElementProperties(getJObject(json, "_seriesDoses"), res.getSeriesDosesElement());
}
protected ImmunizationEvaluation parseImmunizationEvaluation(JsonObject json) throws IOException, FHIRFormatError {
ImmunizationEvaluation res = new ImmunizationEvaluation();
parseImmunizationEvaluationProperties(json, res);
return res;
}
protected void parseImmunizationEvaluationProperties(JsonObject json, ImmunizationEvaluation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ImmunizationEvaluation.ImmunizationEvaluationStatusCodes.NULL, new ImmunizationEvaluation.ImmunizationEvaluationStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("authority"))
res.setAuthority(parseReference(getJObject(json, "authority")));
if (json.has("targetDisease"))
res.setTargetDisease(parseCodeableConcept(getJObject(json, "targetDisease")));
if (json.has("immunizationEvent"))
res.setImmunizationEvent(parseReference(getJObject(json, "immunizationEvent")));
if (json.has("doseStatus"))
res.setDoseStatus(parseCodeableConcept(getJObject(json, "doseStatus")));
if (json.has("doseStatusReason")) {
JsonArray array = getJArray(json, "doseStatusReason");
for (int i = 0; i < array.size(); i++) {
res.getDoseStatusReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("series"))
res.setSeriesElement(parseString(json.get("series").getAsString()));
if (json.has("_series"))
parseElementProperties(getJObject(json, "_series"), res.getSeriesElement());
if (json.has("doseNumber"))
res.setDoseNumberElement(parseString(json.get("doseNumber").getAsString()));
if (json.has("_doseNumber"))
parseElementProperties(getJObject(json, "_doseNumber"), res.getDoseNumberElement());
if (json.has("seriesDoses"))
res.setSeriesDosesElement(parseString(json.get("seriesDoses").getAsString()));
if (json.has("_seriesDoses"))
parseElementProperties(getJObject(json, "_seriesDoses"), res.getSeriesDosesElement());
}
protected ImmunizationRecommendation parseImmunizationRecommendation(JsonObject json) throws IOException, FHIRFormatError {
ImmunizationRecommendation res = new ImmunizationRecommendation();
parseImmunizationRecommendationProperties(json, res);
return res;
}
protected void parseImmunizationRecommendationProperties(JsonObject json, ImmunizationRecommendation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("authority"))
res.setAuthority(parseReference(getJObject(json, "authority")));
if (json.has("recommendation")) {
JsonArray array = getJArray(json, "recommendation");
for (int i = 0; i < array.size(); i++) {
res.getRecommendation().add(parseImmunizationRecommendationRecommendationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationRecommendationComponent(JsonObject json) throws IOException, FHIRFormatError {
ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent();
parseImmunizationRecommendationRecommendationComponentProperties(json, res);
return res;
}
protected void parseImmunizationRecommendationRecommendationComponentProperties(JsonObject json, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("vaccineCode")) {
JsonArray array = getJArray(json, "vaccineCode");
for (int i = 0; i < array.size(); i++) {
res.getVaccineCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("targetDisease")) {
JsonArray array = getJArray(json, "targetDisease");
for (int i = 0; i < array.size(); i++) {
res.getTargetDisease().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contraindicatedVaccineCode")) {
JsonArray array = getJArray(json, "contraindicatedVaccineCode");
for (int i = 0; i < array.size(); i++) {
res.getContraindicatedVaccineCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("forecastStatus"))
res.setForecastStatus(parseCodeableConcept(getJObject(json, "forecastStatus")));
if (json.has("forecastReason")) {
JsonArray array = getJArray(json, "forecastReason");
for (int i = 0; i < array.size(); i++) {
res.getForecastReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dateCriterion")) {
JsonArray array = getJArray(json, "dateCriterion");
for (int i = 0; i < array.size(); i++) {
res.getDateCriterion().add(parseImmunizationRecommendationRecommendationDateCriterionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("series"))
res.setSeriesElement(parseString(json.get("series").getAsString()));
if (json.has("_series"))
parseElementProperties(getJObject(json, "_series"), res.getSeriesElement());
if (json.has("doseNumber"))
res.setDoseNumberElement(parseString(json.get("doseNumber").getAsString()));
if (json.has("_doseNumber"))
parseElementProperties(getJObject(json, "_doseNumber"), res.getDoseNumberElement());
if (json.has("seriesDoses"))
res.setSeriesDosesElement(parseString(json.get("seriesDoses").getAsString()));
if (json.has("_seriesDoses"))
parseElementProperties(getJObject(json, "_seriesDoses"), res.getSeriesDosesElement());
if (json.has("supportingImmunization")) {
JsonArray array = getJArray(json, "supportingImmunization");
for (int i = 0; i < array.size(); i++) {
res.getSupportingImmunization().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingPatientInformation")) {
JsonArray array = getJArray(json, "supportingPatientInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingPatientInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationRecommendationDateCriterionComponent(JsonObject json) throws IOException, FHIRFormatError {
ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent();
parseImmunizationRecommendationRecommendationDateCriterionComponentProperties(json, res);
return res;
}
protected void parseImmunizationRecommendationRecommendationDateCriterionComponentProperties(JsonObject json, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("value"))
res.setValueElement(parseDateTime(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ImplementationGuide parseImplementationGuide(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide res = new ImplementationGuide();
parseImplementationGuideProperties(json, res);
return res;
}
protected void parseImplementationGuideProperties(JsonObject json, ImplementationGuide res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("packageId"))
res.setPackageIdElement(parseId(json.get("packageId").getAsString()));
if (json.has("_packageId"))
parseElementProperties(getJObject(json, "_packageId"), res.getPackageIdElement());
if (json.has("license"))
res.setLicenseElement(parseEnumeration(json.get("license").getAsString(), ImplementationGuide.SPDXLicense.NULL, new ImplementationGuide.SPDXLicenseEnumFactory()));
if (json.has("_license"))
parseElementProperties(getJObject(json, "_license"), res.getLicenseElement());
if (json.has("fhirVersion")) {
JsonArray array = getJArray(json, "fhirVersion");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getFhirVersion().add(new Enumeration(new Enumerations.FHIRVersionEnumFactory(), Enumerations.FHIRVersion.NULL));
} else {;
res.getFhirVersion().add(parseEnumeration(array.get(i).getAsString(), Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory()));
}
}
};
if (json.has("_fhirVersion")) {
JsonArray array = getJArray(json, "_fhirVersion");
for (int i = 0; i < array.size(); i++) {
if (i == res.getFhirVersion().size())
res.getFhirVersion().add(parseEnumeration(null, Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getFhirVersion().get(i));
}
};
if (json.has("dependsOn")) {
JsonArray array = getJArray(json, "dependsOn");
for (int i = 0; i < array.size(); i++) {
res.getDependsOn().add(parseImplementationGuideDependsOnComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("global")) {
JsonArray array = getJArray(json, "global");
for (int i = 0; i < array.size(); i++) {
res.getGlobal().add(parseImplementationGuideGlobalComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("definition"))
res.setDefinition(parseImplementationGuideDefinitionComponent(getJObject(json, "definition")));
if (json.has("manifest"))
res.setManifest(parseImplementationGuideManifestComponent(getJObject(json, "manifest")));
}
protected ImplementationGuide.ImplementationGuideDependsOnComponent parseImplementationGuideDependsOnComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDependsOnComponent res = new ImplementationGuide.ImplementationGuideDependsOnComponent();
parseImplementationGuideDependsOnComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDependsOnComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDependsOnComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("uri"))
res.setUriElement(parseCanonical(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("packageId"))
res.setPackageIdElement(parseId(json.get("packageId").getAsString()));
if (json.has("_packageId"))
parseElementProperties(getJObject(json, "_packageId"), res.getPackageIdElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("reason"))
res.setReasonElement(parseMarkdown(json.get("reason").getAsString()));
if (json.has("_reason"))
parseElementProperties(getJObject(json, "_reason"), res.getReasonElement());
}
protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideGlobalComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent();
parseImplementationGuideGlobalComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideGlobalComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideGlobalComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseCode(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionComponent parseImplementationGuideDefinitionComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionComponent res = new ImplementationGuide.ImplementationGuideDefinitionComponent();
parseImplementationGuideDefinitionComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDefinitionComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDefinitionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("grouping")) {
JsonArray array = getJArray(json, "grouping");
for (int i = 0; i < array.size(); i++) {
res.getGrouping().add(parseImplementationGuideDefinitionGroupingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("resource")) {
JsonArray array = getJArray(json, "resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parseImplementationGuideDefinitionResourceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("page"))
res.setPage(parseImplementationGuideDefinitionPageComponent(getJObject(json, "page")));
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseImplementationGuideDefinitionParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("template")) {
JsonArray array = getJArray(json, "template");
for (int i = 0; i < array.size(); i++) {
res.getTemplate().add(parseImplementationGuideDefinitionTemplateComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImplementationGuide.ImplementationGuideDefinitionGroupingComponent parseImplementationGuideDefinitionGroupingComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionGroupingComponent res = new ImplementationGuide.ImplementationGuideDefinitionGroupingComponent();
parseImplementationGuideDefinitionGroupingComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDefinitionGroupingComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDefinitionGroupingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionResourceComponent parseImplementationGuideDefinitionResourceComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionResourceComponent res = new ImplementationGuide.ImplementationGuideDefinitionResourceComponent();
parseImplementationGuideDefinitionResourceComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDefinitionResourceComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDefinitionResourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
if (json.has("fhirVersion")) {
JsonArray array = getJArray(json, "fhirVersion");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getFhirVersion().add(new Enumeration(new Enumerations.FHIRVersionEnumFactory(), Enumerations.FHIRVersion.NULL));
} else {;
res.getFhirVersion().add(parseEnumeration(array.get(i).getAsString(), Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory()));
}
}
};
if (json.has("_fhirVersion")) {
JsonArray array = getJArray(json, "_fhirVersion");
for (int i = 0; i < array.size(); i++) {
if (i == res.getFhirVersion().size())
res.getFhirVersion().add(parseEnumeration(null, Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getFhirVersion().get(i));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("isExample"))
res.setIsExampleElement(parseBoolean(json.get("isExample").getAsBoolean()));
if (json.has("_isExample"))
parseElementProperties(getJObject(json, "_isExample"), res.getIsExampleElement());
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProfile().add(new CanonicalType());
} else {;
res.getProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_profile")) {
JsonArray array = getJArray(json, "_profile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProfile().size())
res.getProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProfile().get(i));
}
};
if (json.has("groupingId"))
res.setGroupingIdElement(parseId(json.get("groupingId").getAsString()));
if (json.has("_groupingId"))
parseElementProperties(getJObject(json, "_groupingId"), res.getGroupingIdElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionPageComponent parseImplementationGuideDefinitionPageComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionPageComponent res = new ImplementationGuide.ImplementationGuideDefinitionPageComponent();
parseImplementationGuideDefinitionPageComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDefinitionPageComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDefinitionPageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType source = parseType("source", json);
if (source != null)
res.setSource(source);
if (json.has("name"))
res.setNameElement(parseUrl(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("generation"))
res.setGenerationElement(parseEnumeration(json.get("generation").getAsString(), ImplementationGuide.GuidePageGeneration.NULL, new ImplementationGuide.GuidePageGenerationEnumFactory()));
if (json.has("_generation"))
parseElementProperties(getJObject(json, "_generation"), res.getGenerationElement());
if (json.has("page")) {
JsonArray array = getJArray(json, "page");
for (int i = 0; i < array.size(); i++) {
res.getPage().add(parseImplementationGuideDefinitionPageComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ImplementationGuide.ImplementationGuideDefinitionParameterComponent parseImplementationGuideDefinitionParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionParameterComponent res = new ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
parseImplementationGuideDefinitionParameterComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDefinitionParameterComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDefinitionParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCoding(getJObject(json, "code")));
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionTemplateComponent parseImplementationGuideDefinitionTemplateComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionTemplateComponent res = new ImplementationGuide.ImplementationGuideDefinitionTemplateComponent();
parseImplementationGuideDefinitionTemplateComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideDefinitionTemplateComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideDefinitionTemplateComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("source"))
res.setSourceElement(parseString(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
if (json.has("scope"))
res.setScopeElement(parseString(json.get("scope").getAsString()));
if (json.has("_scope"))
parseElementProperties(getJObject(json, "_scope"), res.getScopeElement());
}
protected ImplementationGuide.ImplementationGuideManifestComponent parseImplementationGuideManifestComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideManifestComponent res = new ImplementationGuide.ImplementationGuideManifestComponent();
parseImplementationGuideManifestComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideManifestComponentProperties(JsonObject json, ImplementationGuide.ImplementationGuideManifestComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("rendering"))
res.setRenderingElement(parseUrl(json.get("rendering").getAsString()));
if (json.has("_rendering"))
parseElementProperties(getJObject(json, "_rendering"), res.getRenderingElement());
if (json.has("resource")) {
JsonArray array = getJArray(json, "resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parseImplementationGuideManifestResourceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("page")) {
JsonArray array = getJArray(json, "page");
for (int i = 0; i < array.size(); i++) {
res.getPage().add(parseImplementationGuideManifestPageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("image")) {
JsonArray array = getJArray(json, "image");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getImage().add(new StringType());
} else {;
res.getImage().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_image")) {
JsonArray array = getJArray(json, "_image");
for (int i = 0; i < array.size(); i++) {
if (i == res.getImage().size())
res.getImage().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getImage().get(i));
}
};
if (json.has("other")) {
JsonArray array = getJArray(json, "other");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getOther().add(new StringType());
} else {;
res.getOther().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_other")) {
JsonArray array = getJArray(json, "_other");
for (int i = 0; i < array.size(); i++) {
if (i == res.getOther().size())
res.getOther().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getOther().get(i));
}
};
}
protected ImplementationGuide.ManifestResourceComponent parseImplementationGuideManifestResourceComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ManifestResourceComponent res = new ImplementationGuide.ManifestResourceComponent();
parseImplementationGuideManifestResourceComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideManifestResourceComponentProperties(JsonObject json, ImplementationGuide.ManifestResourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
if (json.has("isExample"))
res.setIsExampleElement(parseBoolean(json.get("isExample").getAsBoolean()));
if (json.has("_isExample"))
parseElementProperties(getJObject(json, "_isExample"), res.getIsExampleElement());
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProfile().add(new CanonicalType());
} else {;
res.getProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_profile")) {
JsonArray array = getJArray(json, "_profile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProfile().size())
res.getProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProfile().get(i));
}
};
if (json.has("relativePath"))
res.setRelativePathElement(parseUrl(json.get("relativePath").getAsString()));
if (json.has("_relativePath"))
parseElementProperties(getJObject(json, "_relativePath"), res.getRelativePathElement());
}
protected ImplementationGuide.ManifestPageComponent parseImplementationGuideManifestPageComponent(JsonObject json) throws IOException, FHIRFormatError {
ImplementationGuide.ManifestPageComponent res = new ImplementationGuide.ManifestPageComponent();
parseImplementationGuideManifestPageComponentProperties(json, res);
return res;
}
protected void parseImplementationGuideManifestPageComponentProperties(JsonObject json, ImplementationGuide.ManifestPageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("anchor")) {
JsonArray array = getJArray(json, "anchor");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAnchor().add(new StringType());
} else {;
res.getAnchor().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_anchor")) {
JsonArray array = getJArray(json, "_anchor");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAnchor().size())
res.getAnchor().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAnchor().get(i));
}
};
}
protected Ingredient parseIngredient(JsonObject json) throws IOException, FHIRFormatError {
Ingredient res = new Ingredient();
parseIngredientProperties(json, res);
return res;
}
protected void parseIngredientProperties(JsonObject json, Ingredient res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("for")) {
JsonArray array = getJArray(json, "for");
for (int i = 0; i < array.size(); i++) {
res.getFor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("function")) {
JsonArray array = getJArray(json, "function");
for (int i = 0; i < array.size(); i++) {
res.getFunction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("group"))
res.setGroup(parseCodeableConcept(getJObject(json, "group")));
if (json.has("allergenicIndicator"))
res.setAllergenicIndicatorElement(parseBoolean(json.get("allergenicIndicator").getAsBoolean()));
if (json.has("_allergenicIndicator"))
parseElementProperties(getJObject(json, "_allergenicIndicator"), res.getAllergenicIndicatorElement());
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("manufacturer")) {
JsonArray array = getJArray(json, "manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseIngredientManufacturerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("substance"))
res.setSubstance(parseIngredientSubstanceComponent(getJObject(json, "substance")));
}
protected Ingredient.IngredientManufacturerComponent parseIngredientManufacturerComponent(JsonObject json) throws IOException, FHIRFormatError {
Ingredient.IngredientManufacturerComponent res = new Ingredient.IngredientManufacturerComponent();
parseIngredientManufacturerComponentProperties(json, res);
return res;
}
protected void parseIngredientManufacturerComponentProperties(JsonObject json, Ingredient.IngredientManufacturerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRoleElement(parseEnumeration(json.get("role").getAsString(), Ingredient.IngredientManufacturerRole.NULL, new Ingredient.IngredientManufacturerRoleEnumFactory()));
if (json.has("_role"))
parseElementProperties(getJObject(json, "_role"), res.getRoleElement());
if (json.has("manufacturer"))
res.setManufacturer(parseReference(getJObject(json, "manufacturer")));
}
protected Ingredient.IngredientSubstanceComponent parseIngredientSubstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
Ingredient.IngredientSubstanceComponent res = new Ingredient.IngredientSubstanceComponent();
parseIngredientSubstanceComponentProperties(json, res);
return res;
}
protected void parseIngredientSubstanceComponentProperties(JsonObject json, Ingredient.IngredientSubstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableReference(getJObject(json, "code")));
if (json.has("strength")) {
JsonArray array = getJArray(json, "strength");
for (int i = 0; i < array.size(); i++) {
res.getStrength().add(parseIngredientSubstanceStrengthComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Ingredient.IngredientSubstanceStrengthComponent parseIngredientSubstanceStrengthComponent(JsonObject json) throws IOException, FHIRFormatError {
Ingredient.IngredientSubstanceStrengthComponent res = new Ingredient.IngredientSubstanceStrengthComponent();
parseIngredientSubstanceStrengthComponentProperties(json, res);
return res;
}
protected void parseIngredientSubstanceStrengthComponentProperties(JsonObject json, Ingredient.IngredientSubstanceStrengthComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType presentation = parseType("presentation", json);
if (presentation != null)
res.setPresentation(presentation);
if (json.has("textPresentation"))
res.setTextPresentationElement(parseString(json.get("textPresentation").getAsString()));
if (json.has("_textPresentation"))
parseElementProperties(getJObject(json, "_textPresentation"), res.getTextPresentationElement());
DataType concentration = parseType("concentration", json);
if (concentration != null)
res.setConcentration(concentration);
if (json.has("textConcentration"))
res.setTextConcentrationElement(parseString(json.get("textConcentration").getAsString()));
if (json.has("_textConcentration"))
parseElementProperties(getJObject(json, "_textConcentration"), res.getTextConcentrationElement());
if (json.has("basis"))
res.setBasis(parseCodeableConcept(getJObject(json, "basis")));
if (json.has("measurementPoint"))
res.setMeasurementPointElement(parseString(json.get("measurementPoint").getAsString()));
if (json.has("_measurementPoint"))
parseElementProperties(getJObject(json, "_measurementPoint"), res.getMeasurementPointElement());
if (json.has("country")) {
JsonArray array = getJArray(json, "country");
for (int i = 0; i < array.size(); i++) {
res.getCountry().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("referenceStrength")) {
JsonArray array = getJArray(json, "referenceStrength");
for (int i = 0; i < array.size(); i++) {
res.getReferenceStrength().add(parseIngredientSubstanceStrengthReferenceStrengthComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent parseIngredientSubstanceStrengthReferenceStrengthComponent(JsonObject json) throws IOException, FHIRFormatError {
Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent res = new Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent();
parseIngredientSubstanceStrengthReferenceStrengthComponentProperties(json, res);
return res;
}
protected void parseIngredientSubstanceStrengthReferenceStrengthComponentProperties(JsonObject json, Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("substance"))
res.setSubstance(parseCodeableReference(getJObject(json, "substance")));
DataType strength = parseType("strength", json);
if (strength != null)
res.setStrength(strength);
if (json.has("measurementPoint"))
res.setMeasurementPointElement(parseString(json.get("measurementPoint").getAsString()));
if (json.has("_measurementPoint"))
parseElementProperties(getJObject(json, "_measurementPoint"), res.getMeasurementPointElement());
if (json.has("country")) {
JsonArray array = getJArray(json, "country");
for (int i = 0; i < array.size(); i++) {
res.getCountry().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan parseInsurancePlan(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan res = new InsurancePlan();
parseInsurancePlanProperties(json, res);
return res;
}
protected void parseInsurancePlanProperties(JsonObject json, InsurancePlan res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("alias")) {
JsonArray array = getJArray(json, "alias");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAlias().add(new StringType());
} else {;
res.getAlias().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_alias")) {
JsonArray array = getJArray(json, "_alias");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAlias().size())
res.getAlias().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAlias().get(i));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("ownedBy"))
res.setOwnedBy(parseReference(getJObject(json, "ownedBy")));
if (json.has("administeredBy"))
res.setAdministeredBy(parseReference(getJObject(json, "administeredBy")));
if (json.has("coverageArea")) {
JsonArray array = getJArray(json, "coverageArea");
for (int i = 0; i < array.size(); i++) {
res.getCoverageArea().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseExtendedContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("network")) {
JsonArray array = getJArray(json, "network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("coverage")) {
JsonArray array = getJArray(json, "coverage");
for (int i = 0; i < array.size(); i++) {
res.getCoverage().add(parseInsurancePlanCoverageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("plan")) {
JsonArray array = getJArray(json, "plan");
for (int i = 0; i < array.size(); i++) {
res.getPlan().add(parseInsurancePlanPlanComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan.InsurancePlanCoverageComponent parseInsurancePlanCoverageComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanCoverageComponent res = new InsurancePlan.InsurancePlanCoverageComponent();
parseInsurancePlanCoverageComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanCoverageComponentProperties(JsonObject json, InsurancePlan.InsurancePlanCoverageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("network")) {
JsonArray array = getJArray(json, "network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("benefit")) {
JsonArray array = getJArray(json, "benefit");
for (int i = 0; i < array.size(); i++) {
res.getBenefit().add(parseInsurancePlanCoverageBenefitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan.CoverageBenefitComponent parseInsurancePlanCoverageBenefitComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.CoverageBenefitComponent res = new InsurancePlan.CoverageBenefitComponent();
parseInsurancePlanCoverageBenefitComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanCoverageBenefitComponentProperties(JsonObject json, InsurancePlan.CoverageBenefitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("requirement"))
res.setRequirementElement(parseString(json.get("requirement").getAsString()));
if (json.has("_requirement"))
parseElementProperties(getJObject(json, "_requirement"), res.getRequirementElement());
if (json.has("limit")) {
JsonArray array = getJArray(json, "limit");
for (int i = 0; i < array.size(); i++) {
res.getLimit().add(parseInsurancePlanCoverageBenefitLimitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan.CoverageBenefitLimitComponent parseInsurancePlanCoverageBenefitLimitComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.CoverageBenefitLimitComponent res = new InsurancePlan.CoverageBenefitLimitComponent();
parseInsurancePlanCoverageBenefitLimitComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanCoverageBenefitLimitComponentProperties(JsonObject json, InsurancePlan.CoverageBenefitLimitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("value"))
res.setValue(parseQuantity(getJObject(json, "value")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
protected InsurancePlan.InsurancePlanPlanComponent parseInsurancePlanPlanComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanPlanComponent res = new InsurancePlan.InsurancePlanPlanComponent();
parseInsurancePlanPlanComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanPlanComponentProperties(JsonObject json, InsurancePlan.InsurancePlanPlanComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("coverageArea")) {
JsonArray array = getJArray(json, "coverageArea");
for (int i = 0; i < array.size(); i++) {
res.getCoverageArea().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("network")) {
JsonArray array = getJArray(json, "network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("generalCost")) {
JsonArray array = getJArray(json, "generalCost");
for (int i = 0; i < array.size(); i++) {
res.getGeneralCost().add(parseInsurancePlanPlanGeneralCostComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specificCost")) {
JsonArray array = getJArray(json, "specificCost");
for (int i = 0; i < array.size(); i++) {
res.getSpecificCost().add(parseInsurancePlanPlanSpecificCostComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan.InsurancePlanPlanGeneralCostComponent parseInsurancePlanPlanGeneralCostComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanPlanGeneralCostComponent res = new InsurancePlan.InsurancePlanPlanGeneralCostComponent();
parseInsurancePlanPlanGeneralCostComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanPlanGeneralCostComponentProperties(JsonObject json, InsurancePlan.InsurancePlanPlanGeneralCostComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("groupSize"))
res.setGroupSizeElement(parsePositiveInt(json.get("groupSize").getAsString()));
if (json.has("_groupSize"))
parseElementProperties(getJObject(json, "_groupSize"), res.getGroupSizeElement());
if (json.has("cost"))
res.setCost(parseMoney(getJObject(json, "cost")));
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected InsurancePlan.InsurancePlanPlanSpecificCostComponent parseInsurancePlanPlanSpecificCostComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanPlanSpecificCostComponent res = new InsurancePlan.InsurancePlanPlanSpecificCostComponent();
parseInsurancePlanPlanSpecificCostComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanPlanSpecificCostComponentProperties(JsonObject json, InsurancePlan.InsurancePlanPlanSpecificCostComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("benefit")) {
JsonArray array = getJArray(json, "benefit");
for (int i = 0; i < array.size(); i++) {
res.getBenefit().add(parseInsurancePlanPlanBenefitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan.PlanBenefitComponent parseInsurancePlanPlanBenefitComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.PlanBenefitComponent res = new InsurancePlan.PlanBenefitComponent();
parseInsurancePlanPlanBenefitComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanPlanBenefitComponentProperties(JsonObject json, InsurancePlan.PlanBenefitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("cost")) {
JsonArray array = getJArray(json, "cost");
for (int i = 0; i < array.size(); i++) {
res.getCost().add(parseInsurancePlanPlanBenefitCostComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InsurancePlan.PlanBenefitCostComponent parseInsurancePlanPlanBenefitCostComponent(JsonObject json) throws IOException, FHIRFormatError {
InsurancePlan.PlanBenefitCostComponent res = new InsurancePlan.PlanBenefitCostComponent();
parseInsurancePlanPlanBenefitCostComponentProperties(json, res);
return res;
}
protected void parseInsurancePlanPlanBenefitCostComponentProperties(JsonObject json, InsurancePlan.PlanBenefitCostComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("applicability"))
res.setApplicability(parseCodeableConcept(getJObject(json, "applicability")));
if (json.has("qualifiers")) {
JsonArray array = getJArray(json, "qualifiers");
for (int i = 0; i < array.size(); i++) {
res.getQualifiers().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("value"))
res.setValue(parseQuantity(getJObject(json, "value")));
}
protected InventoryItem parseInventoryItem(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem res = new InventoryItem();
parseInventoryItemProperties(json, res);
return res;
}
protected void parseInventoryItemProperties(JsonObject json, InventoryItem res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), InventoryItem.InventoryItemStatusCodes.NULL, new InventoryItem.InventoryItemStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseInventoryItemNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("responsibleOrganization")) {
JsonArray array = getJArray(json, "responsibleOrganization");
for (int i = 0; i < array.size(); i++) {
res.getResponsibleOrganization().add(parseInventoryItemResponsibleOrganizationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescription(parseInventoryItemDescriptionComponent(getJObject(json, "description")));
if (json.has("inventoryStatus")) {
JsonArray array = getJArray(json, "inventoryStatus");
for (int i = 0; i < array.size(); i++) {
res.getInventoryStatus().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("baseUnit"))
res.setBaseUnit(parseCodeableConcept(getJObject(json, "baseUnit")));
if (json.has("netContent"))
res.setNetContent(parseQuantity(getJObject(json, "netContent")));
if (json.has("association")) {
JsonArray array = getJArray(json, "association");
for (int i = 0; i < array.size(); i++) {
res.getAssociation().add(parseInventoryItemAssociationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseInventoryItemCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instance"))
res.setInstance(parseInventoryItemInstanceComponent(getJObject(json, "instance")));
if (json.has("productReference"))
res.setProductReference(parseReference(getJObject(json, "productReference")));
}
protected InventoryItem.InventoryItemNameComponent parseInventoryItemNameComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem.InventoryItemNameComponent res = new InventoryItem.InventoryItemNameComponent();
parseInventoryItemNameComponentProperties(json, res);
return res;
}
protected void parseInventoryItemNameComponentProperties(JsonObject json, InventoryItem.InventoryItemNameComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("nameType"))
res.setNameType(parseCoding(getJObject(json, "nameType")));
if (json.has("language"))
res.setLanguageElement(parseEnumeration(json.get("language").getAsString(), Enumerations.CommonLanguages.NULL, new Enumerations.CommonLanguagesEnumFactory()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
}
protected InventoryItem.InventoryItemResponsibleOrganizationComponent parseInventoryItemResponsibleOrganizationComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem.InventoryItemResponsibleOrganizationComponent res = new InventoryItem.InventoryItemResponsibleOrganizationComponent();
parseInventoryItemResponsibleOrganizationComponentProperties(json, res);
return res;
}
protected void parseInventoryItemResponsibleOrganizationComponentProperties(JsonObject json, InventoryItem.InventoryItemResponsibleOrganizationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
}
protected InventoryItem.InventoryItemDescriptionComponent parseInventoryItemDescriptionComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem.InventoryItemDescriptionComponent res = new InventoryItem.InventoryItemDescriptionComponent();
parseInventoryItemDescriptionComponentProperties(json, res);
return res;
}
protected void parseInventoryItemDescriptionComponentProperties(JsonObject json, InventoryItem.InventoryItemDescriptionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguageElement(parseEnumeration(json.get("language").getAsString(), Enumerations.CommonLanguages.NULL, new Enumerations.CommonLanguagesEnumFactory()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected InventoryItem.InventoryItemAssociationComponent parseInventoryItemAssociationComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem.InventoryItemAssociationComponent res = new InventoryItem.InventoryItemAssociationComponent();
parseInventoryItemAssociationComponentProperties(json, res);
return res;
}
protected void parseInventoryItemAssociationComponentProperties(JsonObject json, InventoryItem.InventoryItemAssociationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("associationType"))
res.setAssociationType(parseCodeableConcept(getJObject(json, "associationType")));
if (json.has("relatedItem"))
res.setRelatedItem(parseReference(getJObject(json, "relatedItem")));
if (json.has("quantity"))
res.setQuantity(parseRatio(getJObject(json, "quantity")));
}
protected InventoryItem.InventoryItemCharacteristicComponent parseInventoryItemCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem.InventoryItemCharacteristicComponent res = new InventoryItem.InventoryItemCharacteristicComponent();
parseInventoryItemCharacteristicComponentProperties(json, res);
return res;
}
protected void parseInventoryItemCharacteristicComponentProperties(JsonObject json, InventoryItem.InventoryItemCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("characteristicType"))
res.setCharacteristicType(parseCodeableConcept(getJObject(json, "characteristicType")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected InventoryItem.InventoryItemInstanceComponent parseInventoryItemInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryItem.InventoryItemInstanceComponent res = new InventoryItem.InventoryItemInstanceComponent();
parseInventoryItemInstanceComponentProperties(json, res);
return res;
}
protected void parseInventoryItemInstanceComponentProperties(JsonObject json, InventoryItem.InventoryItemInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("lotNumber"))
res.setLotNumberElement(parseString(json.get("lotNumber").getAsString()));
if (json.has("_lotNumber"))
parseElementProperties(getJObject(json, "_lotNumber"), res.getLotNumberElement());
if (json.has("expiry"))
res.setExpiryElement(parseDateTime(json.get("expiry").getAsString()));
if (json.has("_expiry"))
parseElementProperties(getJObject(json, "_expiry"), res.getExpiryElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
}
protected InventoryReport parseInventoryReport(JsonObject json) throws IOException, FHIRFormatError {
InventoryReport res = new InventoryReport();
parseInventoryReportProperties(json, res);
return res;
}
protected void parseInventoryReportProperties(JsonObject json, InventoryReport res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), InventoryReport.InventoryReportStatus.NULL, new InventoryReport.InventoryReportStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("countType"))
res.setCountTypeElement(parseEnumeration(json.get("countType").getAsString(), InventoryReport.InventoryCountType.NULL, new InventoryReport.InventoryCountTypeEnumFactory()));
if (json.has("_countType"))
parseElementProperties(getJObject(json, "_countType"), res.getCountTypeElement());
if (json.has("operationType"))
res.setOperationType(parseCodeableConcept(getJObject(json, "operationType")));
if (json.has("operationTypeReason"))
res.setOperationTypeReason(parseCodeableConcept(getJObject(json, "operationTypeReason")));
if (json.has("reportedDateTime"))
res.setReportedDateTimeElement(parseDateTime(json.get("reportedDateTime").getAsString()));
if (json.has("_reportedDateTime"))
parseElementProperties(getJObject(json, "_reportedDateTime"), res.getReportedDateTimeElement());
if (json.has("reporter"))
res.setReporter(parseReference(getJObject(json, "reporter")));
if (json.has("reportingPeriod"))
res.setReportingPeriod(parsePeriod(getJObject(json, "reportingPeriod")));
if (json.has("inventoryListing")) {
JsonArray array = getJArray(json, "inventoryListing");
for (int i = 0; i < array.size(); i++) {
res.getInventoryListing().add(parseInventoryReportInventoryListingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected InventoryReport.InventoryReportInventoryListingComponent parseInventoryReportInventoryListingComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryReport.InventoryReportInventoryListingComponent res = new InventoryReport.InventoryReportInventoryListingComponent();
parseInventoryReportInventoryListingComponentProperties(json, res);
return res;
}
protected void parseInventoryReportInventoryListingComponentProperties(JsonObject json, InventoryReport.InventoryReportInventoryListingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("itemStatus"))
res.setItemStatus(parseCodeableConcept(getJObject(json, "itemStatus")));
if (json.has("countingDateTime"))
res.setCountingDateTimeElement(parseDateTime(json.get("countingDateTime").getAsString()));
if (json.has("_countingDateTime"))
parseElementProperties(getJObject(json, "_countingDateTime"), res.getCountingDateTimeElement());
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseInventoryReportInventoryListingItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected InventoryReport.InventoryReportInventoryListingItemComponent parseInventoryReportInventoryListingItemComponent(JsonObject json) throws IOException, FHIRFormatError {
InventoryReport.InventoryReportInventoryListingItemComponent res = new InventoryReport.InventoryReportInventoryListingItemComponent();
parseInventoryReportInventoryListingItemComponentProperties(json, res);
return res;
}
protected void parseInventoryReportInventoryListingItemComponentProperties(JsonObject json, InventoryReport.InventoryReportInventoryListingItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
}
protected Invoice parseInvoice(JsonObject json) throws IOException, FHIRFormatError {
Invoice res = new Invoice();
parseInvoiceProperties(json, res);
return res;
}
protected void parseInvoiceProperties(JsonObject json, Invoice res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Invoice.InvoiceStatus.NULL, new Invoice.InvoiceStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("cancelledReason"))
res.setCancelledReasonElement(parseString(json.get("cancelledReason").getAsString()));
if (json.has("_cancelledReason"))
parseElementProperties(getJObject(json, "_cancelledReason"), res.getCancelledReasonElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("recipient"))
res.setRecipient(parseReference(getJObject(json, "recipient")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("creation"))
res.setCreationElement(parseDateTime(json.get("creation").getAsString()));
if (json.has("_creation"))
parseElementProperties(getJObject(json, "_creation"), res.getCreationElement());
DataType period = parseType("period", json);
if (period != null)
res.setPeriod(period);
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseInvoiceParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("issuer"))
res.setIssuer(parseReference(getJObject(json, "issuer")));
if (json.has("account"))
res.setAccount(parseReference(getJObject(json, "account")));
if (json.has("lineItem")) {
JsonArray array = getJArray(json, "lineItem");
for (int i = 0; i < array.size(); i++) {
res.getLineItem().add(parseInvoiceLineItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("totalPriceComponent")) {
JsonArray array = getJArray(json, "totalPriceComponent");
for (int i = 0; i < array.size(); i++) {
res.getTotalPriceComponent().add(parseMonetaryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("totalNet"))
res.setTotalNet(parseMoney(getJObject(json, "totalNet")));
if (json.has("totalGross"))
res.setTotalGross(parseMoney(getJObject(json, "totalGross")));
if (json.has("paymentTerms"))
res.setPaymentTermsElement(parseMarkdown(json.get("paymentTerms").getAsString()));
if (json.has("_paymentTerms"))
parseElementProperties(getJObject(json, "_paymentTerms"), res.getPaymentTermsElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Invoice.InvoiceParticipantComponent parseInvoiceParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
Invoice.InvoiceParticipantComponent res = new Invoice.InvoiceParticipantComponent();
parseInvoiceParticipantComponentProperties(json, res);
return res;
}
protected void parseInvoiceParticipantComponentProperties(JsonObject json, Invoice.InvoiceParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected Invoice.InvoiceLineItemComponent parseInvoiceLineItemComponent(JsonObject json) throws IOException, FHIRFormatError {
Invoice.InvoiceLineItemComponent res = new Invoice.InvoiceLineItemComponent();
parseInvoiceLineItemComponentProperties(json, res);
return res;
}
protected void parseInvoiceLineItemComponentProperties(JsonObject json, Invoice.InvoiceLineItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
DataType serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
DataType chargeItem = parseType("chargeItem", json);
if (chargeItem != null)
res.setChargeItem(chargeItem);
if (json.has("priceComponent")) {
JsonArray array = getJArray(json, "priceComponent");
for (int i = 0; i < array.size(); i++) {
res.getPriceComponent().add(parseMonetaryComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Library parseLibrary(JsonObject json) throws IOException, FHIRFormatError {
Library res = new Library();
parseLibraryProperties(json, res);
return res;
}
protected void parseLibraryProperties(JsonObject json, Library res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("usage"))
res.setUsageElement(parseMarkdown(json.get("usage").getAsString()));
if (json.has("_usage"))
parseElementProperties(getJObject(json, "_usage"), res.getUsageElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseParameterDefinition(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dataRequirement")) {
JsonArray array = getJArray(json, "dataRequirement");
for (int i = 0; i < array.size(); i++) {
res.getDataRequirement().add(parseDataRequirement(getJsonObjectFromArray(array, i)));
}
};
if (json.has("content")) {
JsonArray array = getJArray(json, "content");
for (int i = 0; i < array.size(); i++) {
res.getContent().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
}
protected Linkage parseLinkage(JsonObject json) throws IOException, FHIRFormatError {
Linkage res = new Linkage();
parseLinkageProperties(json, res);
return res;
}
protected void parseLinkageProperties(JsonObject json, Linkage res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseLinkageItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Linkage.LinkageItemComponent parseLinkageItemComponent(JsonObject json) throws IOException, FHIRFormatError {
Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent();
parseLinkageItemComponentProperties(json, res);
return res;
}
protected void parseLinkageItemComponentProperties(JsonObject json, Linkage.LinkageItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Linkage.LinkageType.NULL, new Linkage.LinkageTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("resource"))
res.setResource(parseReference(getJObject(json, "resource")));
}
protected ListResource parseListResource(JsonObject json) throws IOException, FHIRFormatError {
ListResource res = new ListResource();
parseListResourceProperties(json, res);
return res;
}
protected void parseListResourceProperties(JsonObject json, ListResource res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ListResource.ListStatus.NULL, new ListResource.ListStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Enumerations.ListMode.NULL, new Enumerations.ListModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
if (json.has("orderedBy"))
res.setOrderedBy(parseCodeableConcept(getJObject(json, "orderedBy")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("entry")) {
JsonArray array = getJArray(json, "entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseListResourceEntryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("emptyReason"))
res.setEmptyReason(parseCodeableConcept(getJObject(json, "emptyReason")));
}
protected ListResource.ListResourceEntryComponent parseListResourceEntryComponent(JsonObject json) throws IOException, FHIRFormatError {
ListResource.ListResourceEntryComponent res = new ListResource.ListResourceEntryComponent();
parseListResourceEntryComponentProperties(json, res);
return res;
}
protected void parseListResourceEntryComponentProperties(JsonObject json, ListResource.ListResourceEntryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("flag"))
res.setFlag(parseCodeableConcept(getJObject(json, "flag")));
if (json.has("deleted"))
res.setDeletedElement(parseBoolean(json.get("deleted").getAsBoolean()));
if (json.has("_deleted"))
parseElementProperties(getJObject(json, "_deleted"), res.getDeletedElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("item"))
res.setItem(parseReference(getJObject(json, "item")));
}
protected Location parseLocation(JsonObject json) throws IOException, FHIRFormatError {
Location res = new Location();
parseLocationProperties(json, res);
return res;
}
protected void parseLocationProperties(JsonObject json, Location res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Location.LocationStatus.NULL, new Location.LocationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("operationalStatus"))
res.setOperationalStatus(parseCoding(getJObject(json, "operationalStatus")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("alias")) {
JsonArray array = getJArray(json, "alias");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAlias().add(new StringType());
} else {;
res.getAlias().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_alias")) {
JsonArray array = getJArray(json, "_alias");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAlias().size())
res.getAlias().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAlias().get(i));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Location.LocationMode.NULL, new Location.LocationModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseExtendedContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("address"))
res.setAddress(parseAddress(getJObject(json, "address")));
if (json.has("form"))
res.setForm(parseCodeableConcept(getJObject(json, "form")));
if (json.has("position"))
res.setPosition(parseLocationPositionComponent(getJObject(json, "position")));
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("hoursOfOperation")) {
JsonArray array = getJArray(json, "hoursOfOperation");
for (int i = 0; i < array.size(); i++) {
res.getHoursOfOperation().add(parseAvailability(getJsonObjectFromArray(array, i)));
}
};
if (json.has("virtualService")) {
JsonArray array = getJArray(json, "virtualService");
for (int i = 0; i < array.size(); i++) {
res.getVirtualService().add(parseVirtualServiceDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Location.LocationPositionComponent parseLocationPositionComponent(JsonObject json) throws IOException, FHIRFormatError {
Location.LocationPositionComponent res = new Location.LocationPositionComponent();
parseLocationPositionComponentProperties(json, res);
return res;
}
protected void parseLocationPositionComponentProperties(JsonObject json, Location.LocationPositionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("longitude"))
res.setLongitudeElement(parseDecimal(json.get("longitude").getAsBigDecimal()));
if (json.has("_longitude"))
parseElementProperties(getJObject(json, "_longitude"), res.getLongitudeElement());
if (json.has("latitude"))
res.setLatitudeElement(parseDecimal(json.get("latitude").getAsBigDecimal()));
if (json.has("_latitude"))
parseElementProperties(getJObject(json, "_latitude"), res.getLatitudeElement());
if (json.has("altitude"))
res.setAltitudeElement(parseDecimal(json.get("altitude").getAsBigDecimal()));
if (json.has("_altitude"))
parseElementProperties(getJObject(json, "_altitude"), res.getAltitudeElement());
}
protected ManufacturedItemDefinition parseManufacturedItemDefinition(JsonObject json) throws IOException, FHIRFormatError {
ManufacturedItemDefinition res = new ManufacturedItemDefinition();
parseManufacturedItemDefinitionProperties(json, res);
return res;
}
protected void parseManufacturedItemDefinitionProperties(JsonObject json, ManufacturedItemDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("manufacturedDoseForm"))
res.setManufacturedDoseForm(parseCodeableConcept(getJObject(json, "manufacturedDoseForm")));
if (json.has("unitOfPresentation"))
res.setUnitOfPresentation(parseCodeableConcept(getJObject(json, "unitOfPresentation")));
if (json.has("manufacturer")) {
JsonArray array = getJArray(json, "manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("marketingStatus")) {
JsonArray array = getJArray(json, "marketingStatus");
for (int i = 0; i < array.size(); i++) {
res.getMarketingStatus().add(parseMarketingStatus(getJsonObjectFromArray(array, i)));
}
};
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseManufacturedItemDefinitionPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseManufacturedItemDefinitionComponentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent parseManufacturedItemDefinitionPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent res = new ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent();
parseManufacturedItemDefinitionPropertyComponentProperties(json, res);
return res;
}
protected void parseManufacturedItemDefinitionPropertyComponentProperties(JsonObject json, ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent parseManufacturedItemDefinitionComponentComponent(JsonObject json) throws IOException, FHIRFormatError {
ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent res = new ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent();
parseManufacturedItemDefinitionComponentComponentProperties(json, res);
return res;
}
protected void parseManufacturedItemDefinitionComponentComponentProperties(JsonObject json, ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("function")) {
JsonArray array = getJArray(json, "function");
for (int i = 0; i < array.size(); i++) {
res.getFunction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("amount")) {
JsonArray array = getJArray(json, "amount");
for (int i = 0; i < array.size(); i++) {
res.getAmount().add(parseQuantity(getJsonObjectFromArray(array, i)));
}
};
if (json.has("constituent")) {
JsonArray array = getJArray(json, "constituent");
for (int i = 0; i < array.size(); i++) {
res.getConstituent().add(parseManufacturedItemDefinitionComponentConstituentComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseManufacturedItemDefinitionPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseManufacturedItemDefinitionComponentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent parseManufacturedItemDefinitionComponentConstituentComponent(JsonObject json) throws IOException, FHIRFormatError {
ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent res = new ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent();
parseManufacturedItemDefinitionComponentConstituentComponentProperties(json, res);
return res;
}
protected void parseManufacturedItemDefinitionComponentConstituentComponentProperties(JsonObject json, ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("amount")) {
JsonArray array = getJArray(json, "amount");
for (int i = 0; i < array.size(); i++) {
res.getAmount().add(parseQuantity(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("function")) {
JsonArray array = getJArray(json, "function");
for (int i = 0; i < array.size(); i++) {
res.getFunction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("hasIngredient")) {
JsonArray array = getJArray(json, "hasIngredient");
for (int i = 0; i < array.size(); i++) {
res.getHasIngredient().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Measure parseMeasure(JsonObject json) throws IOException, FHIRFormatError {
Measure res = new Measure();
parseMeasureProperties(json, res);
return res;
}
protected void parseMeasureProperties(JsonObject json, Measure res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("basis"))
res.setBasisElement(parseEnumeration(json.get("basis").getAsString(), Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
if (json.has("_basis"))
parseElementProperties(getJObject(json, "_basis"), res.getBasisElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("usage"))
res.setUsageElement(parseMarkdown(json.get("usage").getAsString()));
if (json.has("_usage"))
parseElementProperties(getJObject(json, "_usage"), res.getUsageElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("library")) {
JsonArray array = getJArray(json, "library");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLibrary().add(new CanonicalType());
} else {;
res.getLibrary().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_library")) {
JsonArray array = getJArray(json, "_library");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLibrary().size())
res.getLibrary().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLibrary().get(i));
}
};
if (json.has("disclaimer"))
res.setDisclaimerElement(parseMarkdown(json.get("disclaimer").getAsString()));
if (json.has("_disclaimer"))
parseElementProperties(getJObject(json, "_disclaimer"), res.getDisclaimerElement());
if (json.has("scoring"))
res.setScoring(parseCodeableConcept(getJObject(json, "scoring")));
if (json.has("scoringUnit"))
res.setScoringUnit(parseCodeableConcept(getJObject(json, "scoringUnit")));
if (json.has("compositeScoring"))
res.setCompositeScoring(parseCodeableConcept(getJObject(json, "compositeScoring")));
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("riskAdjustment"))
res.setRiskAdjustmentElement(parseMarkdown(json.get("riskAdjustment").getAsString()));
if (json.has("_riskAdjustment"))
parseElementProperties(getJObject(json, "_riskAdjustment"), res.getRiskAdjustmentElement());
if (json.has("rateAggregation"))
res.setRateAggregationElement(parseMarkdown(json.get("rateAggregation").getAsString()));
if (json.has("_rateAggregation"))
parseElementProperties(getJObject(json, "_rateAggregation"), res.getRateAggregationElement());
if (json.has("rationale"))
res.setRationaleElement(parseMarkdown(json.get("rationale").getAsString()));
if (json.has("_rationale"))
parseElementProperties(getJObject(json, "_rationale"), res.getRationaleElement());
if (json.has("clinicalRecommendationStatement"))
res.setClinicalRecommendationStatementElement(parseMarkdown(json.get("clinicalRecommendationStatement").getAsString()));
if (json.has("_clinicalRecommendationStatement"))
parseElementProperties(getJObject(json, "_clinicalRecommendationStatement"), res.getClinicalRecommendationStatementElement());
if (json.has("improvementNotation"))
res.setImprovementNotation(parseCodeableConcept(getJObject(json, "improvementNotation")));
if (json.has("term")) {
JsonArray array = getJArray(json, "term");
for (int i = 0; i < array.size(); i++) {
res.getTerm().add(parseMeasureTermComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("guidance"))
res.setGuidanceElement(parseMarkdown(json.get("guidance").getAsString()));
if (json.has("_guidance"))
parseElementProperties(getJObject(json, "_guidance"), res.getGuidanceElement());
if (json.has("group")) {
JsonArray array = getJArray(json, "group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseMeasureGroupComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supplementalData")) {
JsonArray array = getJArray(json, "supplementalData");
for (int i = 0; i < array.size(); i++) {
res.getSupplementalData().add(parseMeasureSupplementalDataComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Measure.MeasureTermComponent parseMeasureTermComponent(JsonObject json) throws IOException, FHIRFormatError {
Measure.MeasureTermComponent res = new Measure.MeasureTermComponent();
parseMeasureTermComponentProperties(json, res);
return res;
}
protected void parseMeasureTermComponentProperties(JsonObject json, Measure.MeasureTermComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("definition"))
res.setDefinitionElement(parseMarkdown(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
}
protected Measure.MeasureGroupComponent parseMeasureGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent();
parseMeasureGroupComponentProperties(json, res);
return res;
}
protected void parseMeasureGroupComponentProperties(JsonObject json, Measure.MeasureGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("basis"))
res.setBasisElement(parseEnumeration(json.get("basis").getAsString(), Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
if (json.has("_basis"))
parseElementProperties(getJObject(json, "_basis"), res.getBasisElement());
if (json.has("scoring"))
res.setScoring(parseCodeableConcept(getJObject(json, "scoring")));
if (json.has("scoringUnit"))
res.setScoringUnit(parseCodeableConcept(getJObject(json, "scoringUnit")));
if (json.has("rateAggregation"))
res.setRateAggregationElement(parseMarkdown(json.get("rateAggregation").getAsString()));
if (json.has("_rateAggregation"))
parseElementProperties(getJObject(json, "_rateAggregation"), res.getRateAggregationElement());
if (json.has("improvementNotation"))
res.setImprovementNotation(parseCodeableConcept(getJObject(json, "improvementNotation")));
if (json.has("library")) {
JsonArray array = getJArray(json, "library");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLibrary().add(new CanonicalType());
} else {;
res.getLibrary().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_library")) {
JsonArray array = getJArray(json, "_library");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLibrary().size())
res.getLibrary().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLibrary().get(i));
}
};
if (json.has("population")) {
JsonArray array = getJArray(json, "population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parseMeasureGroupPopulationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("stratifier")) {
JsonArray array = getJArray(json, "stratifier");
for (int i = 0; i < array.size(); i++) {
res.getStratifier().add(parseMeasureGroupStratifierComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Measure.MeasureGroupPopulationComponent parseMeasureGroupPopulationComponent(JsonObject json) throws IOException, FHIRFormatError {
Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent();
parseMeasureGroupPopulationComponentProperties(json, res);
return res;
}
protected void parseMeasureGroupPopulationComponentProperties(JsonObject json, Measure.MeasureGroupPopulationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
if (json.has("groupDefinition"))
res.setGroupDefinition(parseReference(getJObject(json, "groupDefinition")));
if (json.has("inputPopulationId"))
res.setInputPopulationIdElement(parseString(json.get("inputPopulationId").getAsString()));
if (json.has("_inputPopulationId"))
parseElementProperties(getJObject(json, "_inputPopulationId"), res.getInputPopulationIdElement());
if (json.has("aggregateMethod"))
res.setAggregateMethod(parseCodeableConcept(getJObject(json, "aggregateMethod")));
}
protected Measure.MeasureGroupStratifierComponent parseMeasureGroupStratifierComponent(JsonObject json) throws IOException, FHIRFormatError {
Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent();
parseMeasureGroupStratifierComponentProperties(json, res);
return res;
}
protected void parseMeasureGroupStratifierComponentProperties(JsonObject json, Measure.MeasureGroupStratifierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
if (json.has("groupDefinition"))
res.setGroupDefinition(parseReference(getJObject(json, "groupDefinition")));
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseMeasureGroupStratifierComponentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Measure.MeasureGroupStratifierComponentComponent parseMeasureGroupStratifierComponentComponent(JsonObject json) throws IOException, FHIRFormatError {
Measure.MeasureGroupStratifierComponentComponent res = new Measure.MeasureGroupStratifierComponentComponent();
parseMeasureGroupStratifierComponentComponentProperties(json, res);
return res;
}
protected void parseMeasureGroupStratifierComponentComponentProperties(JsonObject json, Measure.MeasureGroupStratifierComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
if (json.has("groupDefinition"))
res.setGroupDefinition(parseReference(getJObject(json, "groupDefinition")));
}
protected Measure.MeasureSupplementalDataComponent parseMeasureSupplementalDataComponent(JsonObject json) throws IOException, FHIRFormatError {
Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent();
parseMeasureSupplementalDataComponentProperties(json, res);
return res;
}
protected void parseMeasureSupplementalDataComponentProperties(JsonObject json, Measure.MeasureSupplementalDataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("usage")) {
JsonArray array = getJArray(json, "usage");
for (int i = 0; i < array.size(); i++) {
res.getUsage().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
}
protected MeasureReport parseMeasureReport(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport res = new MeasureReport();
parseMeasureReportProperties(json, res);
return res;
}
protected void parseMeasureReportProperties(JsonObject json, MeasureReport res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MeasureReport.MeasureReportStatus.NULL, new MeasureReport.MeasureReportStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MeasureReport.MeasureReportType.NULL, new MeasureReport.MeasureReportTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("dataUpdateType"))
res.setDataUpdateTypeElement(parseEnumeration(json.get("dataUpdateType").getAsString(), MeasureReport.SubmitDataUpdateType.NULL, new MeasureReport.SubmitDataUpdateTypeEnumFactory()));
if (json.has("_dataUpdateType"))
parseElementProperties(getJObject(json, "_dataUpdateType"), res.getDataUpdateTypeElement());
if (json.has("measure"))
res.setMeasureElement(parseCanonical(json.get("measure").getAsString()));
if (json.has("_measure"))
parseElementProperties(getJObject(json, "_measure"), res.getMeasureElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("reporter"))
res.setReporter(parseReference(getJObject(json, "reporter")));
if (json.has("reportingVendor"))
res.setReportingVendor(parseReference(getJObject(json, "reportingVendor")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("inputParameters"))
res.setInputParameters(parseReference(getJObject(json, "inputParameters")));
if (json.has("scoring"))
res.setScoring(parseCodeableConcept(getJObject(json, "scoring")));
if (json.has("improvementNotation"))
res.setImprovementNotation(parseCodeableConcept(getJObject(json, "improvementNotation")));
if (json.has("group")) {
JsonArray array = getJArray(json, "group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseMeasureReportGroupComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supplementalData")) {
JsonArray array = getJArray(json, "supplementalData");
for (int i = 0; i < array.size(); i++) {
res.getSupplementalData().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("evaluatedResource")) {
JsonArray array = getJArray(json, "evaluatedResource");
for (int i = 0; i < array.size(); i++) {
res.getEvaluatedResource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected MeasureReport.MeasureReportGroupComponent parseMeasureReportGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent();
parseMeasureReportGroupComponentProperties(json, res);
return res;
}
protected void parseMeasureReportGroupComponentProperties(JsonObject json, MeasureReport.MeasureReportGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("population")) {
JsonArray array = getJArray(json, "population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parseMeasureReportGroupPopulationComponent(getJsonObjectFromArray(array, i)));
}
};
DataType measureScore = parseType("measureScore", json);
if (measureScore != null)
res.setMeasureScore(measureScore);
if (json.has("stratifier")) {
JsonArray array = getJArray(json, "stratifier");
for (int i = 0; i < array.size(); i++) {
res.getStratifier().add(parseMeasureReportGroupStratifierComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportGroupPopulationComponent(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent();
parseMeasureReportGroupPopulationComponentProperties(json, res);
return res;
}
protected void parseMeasureReportGroupPopulationComponentProperties(JsonObject json, MeasureReport.MeasureReportGroupPopulationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("count"))
res.setCountElement(parseInteger(json.get("count").getAsLong()));
if (json.has("_count"))
parseElementProperties(getJObject(json, "_count"), res.getCountElement());
if (json.has("subjectResults"))
res.setSubjectResults(parseReference(getJObject(json, "subjectResults")));
if (json.has("subjectReport")) {
JsonArray array = getJArray(json, "subjectReport");
for (int i = 0; i < array.size(); i++) {
res.getSubjectReport().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subjects"))
res.setSubjects(parseReference(getJObject(json, "subjects")));
}
protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportGroupStratifierComponent(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent();
parseMeasureReportGroupStratifierComponentProperties(json, res);
return res;
}
protected void parseMeasureReportGroupStratifierComponentProperties(JsonObject json, MeasureReport.MeasureReportGroupStratifierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("stratum")) {
JsonArray array = getJArray(json, "stratum");
for (int i = 0; i < array.size(); i++) {
res.getStratum().add(parseMeasureReportStratifierGroupComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent();
parseMeasureReportStratifierGroupComponentProperties(json, res);
return res;
}
protected void parseMeasureReportStratifierGroupComponentProperties(JsonObject json, MeasureReport.StratifierGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseMeasureReportStratifierGroupComponentComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("population")) {
JsonArray array = getJArray(json, "population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parseMeasureReportStratifierGroupPopulationComponent(getJsonObjectFromArray(array, i)));
}
};
DataType measureScore = parseType("measureScore", json);
if (measureScore != null)
res.setMeasureScore(measureScore);
}
protected MeasureReport.StratifierGroupComponentComponent parseMeasureReportStratifierGroupComponentComponent(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport.StratifierGroupComponentComponent res = new MeasureReport.StratifierGroupComponentComponent();
parseMeasureReportStratifierGroupComponentComponentProperties(json, res);
return res;
}
protected void parseMeasureReportStratifierGroupComponentComponentProperties(JsonObject json, MeasureReport.StratifierGroupComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent(JsonObject json) throws IOException, FHIRFormatError {
MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent();
parseMeasureReportStratifierGroupPopulationComponentProperties(json, res);
return res;
}
protected void parseMeasureReportStratifierGroupPopulationComponentProperties(JsonObject json, MeasureReport.StratifierGroupPopulationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("count"))
res.setCountElement(parseInteger(json.get("count").getAsLong()));
if (json.has("_count"))
parseElementProperties(getJObject(json, "_count"), res.getCountElement());
if (json.has("subjectResults"))
res.setSubjectResults(parseReference(getJObject(json, "subjectResults")));
if (json.has("subjectReport")) {
JsonArray array = getJArray(json, "subjectReport");
for (int i = 0; i < array.size(); i++) {
res.getSubjectReport().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subjects"))
res.setSubjects(parseReference(getJObject(json, "subjects")));
}
protected Medication parseMedication(JsonObject json) throws IOException, FHIRFormatError {
Medication res = new Medication();
parseMedicationProperties(json, res);
return res;
}
protected void parseMedicationProperties(JsonObject json, Medication res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Medication.MedicationStatusCodes.NULL, new Medication.MedicationStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("marketingAuthorizationHolder"))
res.setMarketingAuthorizationHolder(parseReference(getJObject(json, "marketingAuthorizationHolder")));
if (json.has("doseForm"))
res.setDoseForm(parseCodeableConcept(getJObject(json, "doseForm")));
if (json.has("totalVolume"))
res.setTotalVolume(parseQuantity(getJObject(json, "totalVolume")));
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseMedicationIngredientComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("batch"))
res.setBatch(parseMedicationBatchComponent(getJObject(json, "batch")));
if (json.has("definition"))
res.setDefinition(parseReference(getJObject(json, "definition")));
}
protected Medication.MedicationIngredientComponent parseMedicationIngredientComponent(JsonObject json) throws IOException, FHIRFormatError {
Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent();
parseMedicationIngredientComponentProperties(json, res);
return res;
}
protected void parseMedicationIngredientComponentProperties(JsonObject json, Medication.MedicationIngredientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("isActive"))
res.setIsActiveElement(parseBoolean(json.get("isActive").getAsBoolean()));
if (json.has("_isActive"))
parseElementProperties(getJObject(json, "_isActive"), res.getIsActiveElement());
DataType strength = parseType("strength", json);
if (strength != null)
res.setStrength(strength);
}
protected Medication.MedicationBatchComponent parseMedicationBatchComponent(JsonObject json) throws IOException, FHIRFormatError {
Medication.MedicationBatchComponent res = new Medication.MedicationBatchComponent();
parseMedicationBatchComponentProperties(json, res);
return res;
}
protected void parseMedicationBatchComponentProperties(JsonObject json, Medication.MedicationBatchComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("lotNumber"))
res.setLotNumberElement(parseString(json.get("lotNumber").getAsString()));
if (json.has("_lotNumber"))
parseElementProperties(getJObject(json, "_lotNumber"), res.getLotNumberElement());
if (json.has("expirationDate"))
res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString()));
if (json.has("_expirationDate"))
parseElementProperties(getJObject(json, "_expirationDate"), res.getExpirationDateElement());
}
protected MedicationAdministration parseMedicationAdministration(JsonObject json) throws IOException, FHIRFormatError {
MedicationAdministration res = new MedicationAdministration();
parseMedicationAdministrationProperties(json, res);
return res;
}
protected void parseMedicationAdministrationProperties(JsonObject json, MedicationAdministration res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationAdministration.MedicationAdministrationStatusCodes.NULL, new MedicationAdministration.MedicationAdministrationStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason")) {
JsonArray array = getJArray(json, "statusReason");
for (int i = 0; i < array.size(); i++) {
res.getStatusReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("medication"))
res.setMedication(parseCodeableReference(getJObject(json, "medication")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
DataType occurence = parseType("occurence", json);
if (occurence != null)
res.setOccurence(occurence);
if (json.has("recorded"))
res.setRecordedElement(parseDateTime(json.get("recorded").getAsString()));
if (json.has("_recorded"))
parseElementProperties(getJObject(json, "_recorded"), res.getRecordedElement());
if (json.has("isSubPotent"))
res.setIsSubPotentElement(parseBoolean(json.get("isSubPotent").getAsBoolean()));
if (json.has("_isSubPotent"))
parseElementProperties(getJObject(json, "_isSubPotent"), res.getIsSubPotentElement());
if (json.has("subPotentReason")) {
JsonArray array = getJArray(json, "subPotentReason");
for (int i = 0; i < array.size(); i++) {
res.getSubPotentReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseMedicationAdministrationPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("device")) {
JsonArray array = getJArray(json, "device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dosage"))
res.setDosage(parseMedicationAdministrationDosageComponent(getJObject(json, "dosage")));
if (json.has("eventHistory")) {
JsonArray array = getJArray(json, "eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent();
parseMedicationAdministrationPerformerComponentProperties(json, res);
return res;
}
protected void parseMedicationAdministrationPerformerComponentProperties(JsonObject json, MedicationAdministration.MedicationAdministrationPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseCodeableReference(getJObject(json, "actor")));
}
protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationDosageComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent();
parseMedicationAdministrationDosageComponentProperties(json, res);
return res;
}
protected void parseMedicationAdministrationDosageComponentProperties(JsonObject json, MedicationAdministration.MedicationAdministrationDosageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("site"))
res.setSite(parseCodeableConcept(getJObject(json, "site")));
if (json.has("route"))
res.setRoute(parseCodeableConcept(getJObject(json, "route")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("dose"))
res.setDose(parseQuantity(getJObject(json, "dose")));
DataType rate = parseType("rate", json);
if (rate != null)
res.setRate(rate);
}
protected MedicationDispense parseMedicationDispense(JsonObject json) throws IOException, FHIRFormatError {
MedicationDispense res = new MedicationDispense();
parseMedicationDispenseProperties(json, res);
return res;
}
protected void parseMedicationDispenseProperties(JsonObject json, MedicationDispense res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationDispense.MedicationDispenseStatusCodes.NULL, new MedicationDispense.MedicationDispenseStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("notPerformedReason"))
res.setNotPerformedReason(parseCodeableReference(getJObject(json, "notPerformedReason")));
if (json.has("statusChanged"))
res.setStatusChangedElement(parseDateTime(json.get("statusChanged").getAsString()));
if (json.has("_statusChanged"))
parseElementProperties(getJObject(json, "_statusChanged"), res.getStatusChangedElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("medication"))
res.setMedication(parseCodeableReference(getJObject(json, "medication")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseMedicationDispensePerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("authorizingPrescription")) {
JsonArray array = getJArray(json, "authorizingPrescription");
for (int i = 0; i < array.size(); i++) {
res.getAuthorizingPrescription().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("daysSupply"))
res.setDaysSupply(parseQuantity(getJObject(json, "daysSupply")));
if (json.has("recorded"))
res.setRecordedElement(parseDateTime(json.get("recorded").getAsString()));
if (json.has("_recorded"))
parseElementProperties(getJObject(json, "_recorded"), res.getRecordedElement());
if (json.has("whenPrepared"))
res.setWhenPreparedElement(parseDateTime(json.get("whenPrepared").getAsString()));
if (json.has("_whenPrepared"))
parseElementProperties(getJObject(json, "_whenPrepared"), res.getWhenPreparedElement());
if (json.has("whenHandedOver"))
res.setWhenHandedOverElement(parseDateTime(json.get("whenHandedOver").getAsString()));
if (json.has("_whenHandedOver"))
parseElementProperties(getJObject(json, "_whenHandedOver"), res.getWhenHandedOverElement());
if (json.has("destination"))
res.setDestination(parseReference(getJObject(json, "destination")));
if (json.has("receiver")) {
JsonArray array = getJArray(json, "receiver");
for (int i = 0; i < array.size(); i++) {
res.getReceiver().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("renderedDosageInstruction"))
res.setRenderedDosageInstructionElement(parseMarkdown(json.get("renderedDosageInstruction").getAsString()));
if (json.has("_renderedDosageInstruction"))
parseElementProperties(getJObject(json, "_renderedDosageInstruction"), res.getRenderedDosageInstructionElement());
if (json.has("dosageInstruction")) {
JsonArray array = getJArray(json, "dosageInstruction");
for (int i = 0; i < array.size(); i++) {
res.getDosageInstruction().add(parseDosage(getJsonObjectFromArray(array, i)));
}
};
if (json.has("substitution"))
res.setSubstitution(parseMedicationDispenseSubstitutionComponent(getJObject(json, "substitution")));
if (json.has("eventHistory")) {
JsonArray array = getJArray(json, "eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispensePerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent();
parseMedicationDispensePerformerComponentProperties(json, res);
return res;
}
protected void parseMedicationDispensePerformerComponentProperties(JsonObject json, MedicationDispense.MedicationDispensePerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected MedicationDispense.MedicationDispenseSubstitutionComponent parseMedicationDispenseSubstitutionComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent();
parseMedicationDispenseSubstitutionComponentProperties(json, res);
return res;
}
protected void parseMedicationDispenseSubstitutionComponentProperties(JsonObject json, MedicationDispense.MedicationDispenseSubstitutionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("wasSubstituted"))
res.setWasSubstitutedElement(parseBoolean(json.get("wasSubstituted").getAsBoolean()));
if (json.has("_wasSubstituted"))
parseElementProperties(getJObject(json, "_wasSubstituted"), res.getWasSubstitutedElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("responsibleParty"))
res.setResponsibleParty(parseReference(getJObject(json, "responsibleParty")));
}
protected MedicationKnowledge parseMedicationKnowledge(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge res = new MedicationKnowledge();
parseMedicationKnowledgeProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeProperties(JsonObject json, MedicationKnowledge res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationKnowledge.MedicationKnowledgeStatusCodes.NULL, new MedicationKnowledge.MedicationKnowledgeStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("intendedJurisdiction")) {
JsonArray array = getJArray(json, "intendedJurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getIntendedJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getName().add(new StringType());
} else {;
res.getName().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_name")) {
JsonArray array = getJArray(json, "_name");
for (int i = 0; i < array.size(); i++) {
if (i == res.getName().size())
res.getName().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getName().get(i));
}
};
if (json.has("relatedMedicationKnowledge")) {
JsonArray array = getJArray(json, "relatedMedicationKnowledge");
for (int i = 0; i < array.size(); i++) {
res.getRelatedMedicationKnowledge().add(parseMedicationKnowledgeRelatedMedicationKnowledgeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("associatedMedication")) {
JsonArray array = getJArray(json, "associatedMedication");
for (int i = 0; i < array.size(); i++) {
res.getAssociatedMedication().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("productType")) {
JsonArray array = getJArray(json, "productType");
for (int i = 0; i < array.size(); i++) {
res.getProductType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("monograph")) {
JsonArray array = getJArray(json, "monograph");
for (int i = 0; i < array.size(); i++) {
res.getMonograph().add(parseMedicationKnowledgeMonographComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preparationInstruction"))
res.setPreparationInstructionElement(parseMarkdown(json.get("preparationInstruction").getAsString()));
if (json.has("_preparationInstruction"))
parseElementProperties(getJObject(json, "_preparationInstruction"), res.getPreparationInstructionElement());
if (json.has("cost")) {
JsonArray array = getJArray(json, "cost");
for (int i = 0; i < array.size(); i++) {
res.getCost().add(parseMedicationKnowledgeCostComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("monitoringProgram")) {
JsonArray array = getJArray(json, "monitoringProgram");
for (int i = 0; i < array.size(); i++) {
res.getMonitoringProgram().add(parseMedicationKnowledgeMonitoringProgramComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("indicationGuideline")) {
JsonArray array = getJArray(json, "indicationGuideline");
for (int i = 0; i < array.size(); i++) {
res.getIndicationGuideline().add(parseMedicationKnowledgeIndicationGuidelineComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("medicineClassification")) {
JsonArray array = getJArray(json, "medicineClassification");
for (int i = 0; i < array.size(); i++) {
res.getMedicineClassification().add(parseMedicationKnowledgeMedicineClassificationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packaging")) {
JsonArray array = getJArray(json, "packaging");
for (int i = 0; i < array.size(); i++) {
res.getPackaging().add(parseMedicationKnowledgePackagingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("clinicalUseIssue")) {
JsonArray array = getJArray(json, "clinicalUseIssue");
for (int i = 0; i < array.size(); i++) {
res.getClinicalUseIssue().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("storageGuideline")) {
JsonArray array = getJArray(json, "storageGuideline");
for (int i = 0; i < array.size(); i++) {
res.getStorageGuideline().add(parseMedicationKnowledgeStorageGuidelineComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("regulatory")) {
JsonArray array = getJArray(json, "regulatory");
for (int i = 0; i < array.size(); i++) {
res.getRegulatory().add(parseMedicationKnowledgeRegulatoryComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("definitional"))
res.setDefinitional(parseMedicationKnowledgeDefinitionalComponent(getJObject(json, "definitional")));
}
protected MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent parseMedicationKnowledgeRelatedMedicationKnowledgeComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent res = new MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent();
parseMedicationKnowledgeRelatedMedicationKnowledgeComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeRelatedMedicationKnowledgeComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("reference")) {
JsonArray array = getJArray(json, "reference");
for (int i = 0; i < array.size(); i++) {
res.getReference().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgeMonographComponent parseMedicationKnowledgeMonographComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeMonographComponent res = new MedicationKnowledge.MedicationKnowledgeMonographComponent();
parseMedicationKnowledgeMonographComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeMonographComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeMonographComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
}
protected MedicationKnowledge.MedicationKnowledgeCostComponent parseMedicationKnowledgeCostComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeCostComponent res = new MedicationKnowledge.MedicationKnowledgeCostComponent();
parseMedicationKnowledgeCostComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeCostComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeCostComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("effectiveDate")) {
JsonArray array = getJArray(json, "effectiveDate");
for (int i = 0; i < array.size(); i++) {
res.getEffectiveDate().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("source"))
res.setSourceElement(parseString(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
DataType cost = parseType("cost", json);
if (cost != null)
res.setCost(cost);
}
protected MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent parseMedicationKnowledgeMonitoringProgramComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent res = new MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent();
parseMedicationKnowledgeMonitoringProgramComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeMonitoringProgramComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
}
protected MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent parseMedicationKnowledgeIndicationGuidelineComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent res = new MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent();
parseMedicationKnowledgeIndicationGuidelineComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeIndicationGuidelineComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("indication")) {
JsonArray array = getJArray(json, "indication");
for (int i = 0; i < array.size(); i++) {
res.getIndication().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dosingGuideline")) {
JsonArray array = getJArray(json, "dosingGuideline");
for (int i = 0; i < array.size(); i++) {
res.getDosingGuideline().add(parseMedicationKnowledgeIndicationGuidelineDosingGuidelineComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent parseMedicationKnowledgeIndicationGuidelineDosingGuidelineComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent res = new MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent();
parseMedicationKnowledgeIndicationGuidelineDosingGuidelineComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeIndicationGuidelineDosingGuidelineComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("treatmentIntent"))
res.setTreatmentIntent(parseCodeableConcept(getJObject(json, "treatmentIntent")));
if (json.has("dosage")) {
JsonArray array = getJArray(json, "dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("administrationTreatment"))
res.setAdministrationTreatment(parseCodeableConcept(getJObject(json, "administrationTreatment")));
if (json.has("patientCharacteristic")) {
JsonArray array = getJArray(json, "patientCharacteristic");
for (int i = 0; i < array.size(); i++) {
res.getPatientCharacteristic().add(parseMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent parseMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent res = new MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent();
parseMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("dosage")) {
JsonArray array = getJArray(json, "dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseDosage(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent parseMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent res = new MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent();
parseMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent parseMedicationKnowledgeMedicineClassificationComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent res = new MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent();
parseMedicationKnowledgeMedicineClassificationComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeMedicineClassificationComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType source = parseType("source", json);
if (source != null)
res.setSource(source);
if (json.has("classification")) {
JsonArray array = getJArray(json, "classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgePackagingComponent parseMedicationKnowledgePackagingComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgePackagingComponent res = new MedicationKnowledge.MedicationKnowledgePackagingComponent();
parseMedicationKnowledgePackagingComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgePackagingComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgePackagingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("cost")) {
JsonArray array = getJArray(json, "cost");
for (int i = 0; i < array.size(); i++) {
res.getCost().add(parseMedicationKnowledgeCostComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packagedProduct"))
res.setPackagedProduct(parseReference(getJObject(json, "packagedProduct")));
}
protected MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent parseMedicationKnowledgeStorageGuidelineComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent res = new MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent();
parseMedicationKnowledgeStorageGuidelineComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeStorageGuidelineComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReferenceElement(parseUri(json.get("reference").getAsString()));
if (json.has("_reference"))
parseElementProperties(getJObject(json, "_reference"), res.getReferenceElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("stabilityDuration"))
res.setStabilityDuration(parseDuration(getJObject(json, "stabilityDuration")));
if (json.has("environmentalSetting")) {
JsonArray array = getJArray(json, "environmentalSetting");
for (int i = 0; i < array.size(); i++) {
res.getEnvironmentalSetting().add(parseMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent parseMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent res = new MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent();
parseMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected MedicationKnowledge.MedicationKnowledgeRegulatoryComponent parseMedicationKnowledgeRegulatoryComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatoryComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryComponent();
parseMedicationKnowledgeRegulatoryComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeRegulatoryComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeRegulatoryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("regulatoryAuthority"))
res.setRegulatoryAuthority(parseReference(getJObject(json, "regulatoryAuthority")));
if (json.has("substitution")) {
JsonArray array = getJArray(json, "substitution");
for (int i = 0; i < array.size(); i++) {
res.getSubstitution().add(parseMedicationKnowledgeRegulatorySubstitutionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("schedule")) {
JsonArray array = getJArray(json, "schedule");
for (int i = 0; i < array.size(); i++) {
res.getSchedule().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("maxDispense"))
res.setMaxDispense(parseMedicationKnowledgeRegulatoryMaxDispenseComponent(getJObject(json, "maxDispense")));
}
protected MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent parseMedicationKnowledgeRegulatorySubstitutionComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent();
parseMedicationKnowledgeRegulatorySubstitutionComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeRegulatorySubstitutionComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("allowed"))
res.setAllowedElement(parseBoolean(json.get("allowed").getAsBoolean()));
if (json.has("_allowed"))
parseElementProperties(getJObject(json, "_allowed"), res.getAllowedElement());
}
protected MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent parseMedicationKnowledgeRegulatoryMaxDispenseComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent();
parseMedicationKnowledgeRegulatoryMaxDispenseComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeRegulatoryMaxDispenseComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("period"))
res.setPeriod(parseDuration(getJObject(json, "period")));
}
protected MedicationKnowledge.MedicationKnowledgeDefinitionalComponent parseMedicationKnowledgeDefinitionalComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeDefinitionalComponent res = new MedicationKnowledge.MedicationKnowledgeDefinitionalComponent();
parseMedicationKnowledgeDefinitionalComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeDefinitionalComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeDefinitionalComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("definition")) {
JsonArray array = getJArray(json, "definition");
for (int i = 0; i < array.size(); i++) {
res.getDefinition().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("doseForm"))
res.setDoseForm(parseCodeableConcept(getJObject(json, "doseForm")));
if (json.has("intendedRoute")) {
JsonArray array = getJArray(json, "intendedRoute");
for (int i = 0; i < array.size(); i++) {
res.getIntendedRoute().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseMedicationKnowledgeDefinitionalIngredientComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("drugCharacteristic")) {
JsonArray array = getJArray(json, "drugCharacteristic");
for (int i = 0; i < array.size(); i++) {
res.getDrugCharacteristic().add(parseMedicationKnowledgeDefinitionalDrugCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent parseMedicationKnowledgeDefinitionalIngredientComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent res = new MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent();
parseMedicationKnowledgeDefinitionalIngredientComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeDefinitionalIngredientComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType strength = parseType("strength", json);
if (strength != null)
res.setStrength(strength);
}
protected MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent parseMedicationKnowledgeDefinitionalDrugCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent res = new MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent();
parseMedicationKnowledgeDefinitionalDrugCharacteristicComponentProperties(json, res);
return res;
}
protected void parseMedicationKnowledgeDefinitionalDrugCharacteristicComponentProperties(JsonObject json, MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected MedicationRequest parseMedicationRequest(JsonObject json) throws IOException, FHIRFormatError {
MedicationRequest res = new MedicationRequest();
parseMedicationRequestProperties(json, res);
return res;
}
protected void parseMedicationRequestProperties(JsonObject json, MedicationRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priorPrescription"))
res.setPriorPrescription(parseReference(getJObject(json, "priorPrescription")));
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationRequest.MedicationrequestStatus.NULL, new MedicationRequest.MedicationrequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("statusChanged"))
res.setStatusChangedElement(parseDateTime(json.get("statusChanged").getAsString()));
if (json.has("_statusChanged"))
parseElementProperties(getJObject(json, "_statusChanged"), res.getStatusChangedElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), MedicationRequest.MedicationRequestIntent.NULL, new MedicationRequest.MedicationRequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
if (json.has("medication"))
res.setMedication(parseCodeableReference(getJObject(json, "medication")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("informationSource")) {
JsonArray array = getJArray(json, "informationSource");
for (int i = 0; i < array.size(); i++) {
res.getInformationSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("reported"))
res.setReportedElement(parseBoolean(json.get("reported").getAsBoolean()));
if (json.has("_reported"))
parseElementProperties(getJObject(json, "_reported"), res.getReportedElement());
if (json.has("performerType"))
res.setPerformerType(parseCodeableConcept(getJObject(json, "performerType")));
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device")) {
JsonArray array = getJArray(json, "device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("courseOfTherapyType"))
res.setCourseOfTherapyType(parseCodeableConcept(getJObject(json, "courseOfTherapyType")));
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("renderedDosageInstruction"))
res.setRenderedDosageInstructionElement(parseMarkdown(json.get("renderedDosageInstruction").getAsString()));
if (json.has("_renderedDosageInstruction"))
parseElementProperties(getJObject(json, "_renderedDosageInstruction"), res.getRenderedDosageInstructionElement());
if (json.has("effectiveDosePeriod"))
res.setEffectiveDosePeriod(parsePeriod(getJObject(json, "effectiveDosePeriod")));
if (json.has("dosageInstruction")) {
JsonArray array = getJArray(json, "dosageInstruction");
for (int i = 0; i < array.size(); i++) {
res.getDosageInstruction().add(parseDosage(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dispenseRequest"))
res.setDispenseRequest(parseMedicationRequestDispenseRequestComponent(getJObject(json, "dispenseRequest")));
if (json.has("substitution"))
res.setSubstitution(parseMedicationRequestSubstitutionComponent(getJObject(json, "substitution")));
if (json.has("eventHistory")) {
JsonArray array = getJArray(json, "eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestDispenseRequestComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent();
parseMedicationRequestDispenseRequestComponentProperties(json, res);
return res;
}
protected void parseMedicationRequestDispenseRequestComponentProperties(JsonObject json, MedicationRequest.MedicationRequestDispenseRequestComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("initialFill"))
res.setInitialFill(parseMedicationRequestDispenseRequestInitialFillComponent(getJObject(json, "initialFill")));
if (json.has("dispenseInterval"))
res.setDispenseInterval(parseDuration(getJObject(json, "dispenseInterval")));
if (json.has("validityPeriod"))
res.setValidityPeriod(parsePeriod(getJObject(json, "validityPeriod")));
if (json.has("numberOfRepeatsAllowed"))
res.setNumberOfRepeatsAllowedElement(parseUnsignedInt(json.get("numberOfRepeatsAllowed").getAsString()));
if (json.has("_numberOfRepeatsAllowed"))
parseElementProperties(getJObject(json, "_numberOfRepeatsAllowed"), res.getNumberOfRepeatsAllowedElement());
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("expectedSupplyDuration"))
res.setExpectedSupplyDuration(parseDuration(getJObject(json, "expectedSupplyDuration")));
if (json.has("dispenser"))
res.setDispenser(parseReference(getJObject(json, "dispenser")));
if (json.has("dispenserInstruction")) {
JsonArray array = getJArray(json, "dispenserInstruction");
for (int i = 0; i < array.size(); i++) {
res.getDispenserInstruction().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("doseAdministrationAid"))
res.setDoseAdministrationAid(parseCodeableConcept(getJObject(json, "doseAdministrationAid")));
}
protected MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent parseMedicationRequestDispenseRequestInitialFillComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent res = new MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent();
parseMedicationRequestDispenseRequestInitialFillComponentProperties(json, res);
return res;
}
protected void parseMedicationRequestDispenseRequestInitialFillComponentProperties(JsonObject json, MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("duration"))
res.setDuration(parseDuration(getJObject(json, "duration")));
}
protected MedicationRequest.MedicationRequestSubstitutionComponent parseMedicationRequestSubstitutionComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent();
parseMedicationRequestSubstitutionComponentProperties(json, res);
return res;
}
protected void parseMedicationRequestSubstitutionComponentProperties(JsonObject json, MedicationRequest.MedicationRequestSubstitutionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType allowed = parseType("allowed", json);
if (allowed != null)
res.setAllowed(allowed);
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
}
protected MedicationStatement parseMedicationStatement(JsonObject json) throws IOException, FHIRFormatError {
MedicationStatement res = new MedicationStatement();
parseMedicationStatementProperties(json, res);
return res;
}
protected void parseMedicationStatementProperties(JsonObject json, MedicationStatement res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationStatement.MedicationStatementStatusCodes.NULL, new MedicationStatement.MedicationStatementStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("medication"))
res.setMedication(parseCodeableReference(getJObject(json, "medication")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType effective = parseType("effective", json);
if (effective != null)
res.setEffective(effective);
if (json.has("dateAsserted"))
res.setDateAssertedElement(parseDateTime(json.get("dateAsserted").getAsString()));
if (json.has("_dateAsserted"))
parseElementProperties(getJObject(json, "_dateAsserted"), res.getDateAssertedElement());
if (json.has("informationSource")) {
JsonArray array = getJArray(json, "informationSource");
for (int i = 0; i < array.size(); i++) {
res.getInformationSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedClinicalInformation")) {
JsonArray array = getJArray(json, "relatedClinicalInformation");
for (int i = 0; i < array.size(); i++) {
res.getRelatedClinicalInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("renderedDosageInstruction"))
res.setRenderedDosageInstructionElement(parseMarkdown(json.get("renderedDosageInstruction").getAsString()));
if (json.has("_renderedDosageInstruction"))
parseElementProperties(getJObject(json, "_renderedDosageInstruction"), res.getRenderedDosageInstructionElement());
if (json.has("dosage")) {
JsonArray array = getJArray(json, "dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseDosage(getJsonObjectFromArray(array, i)));
}
};
if (json.has("adherence"))
res.setAdherence(parseMedicationStatementAdherenceComponent(getJObject(json, "adherence")));
}
protected MedicationStatement.MedicationStatementAdherenceComponent parseMedicationStatementAdherenceComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicationStatement.MedicationStatementAdherenceComponent res = new MedicationStatement.MedicationStatementAdherenceComponent();
parseMedicationStatementAdherenceComponentProperties(json, res);
return res;
}
protected void parseMedicationStatementAdherenceComponentProperties(JsonObject json, MedicationStatement.MedicationStatementAdherenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
}
protected MedicinalProductDefinition parseMedicinalProductDefinition(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition res = new MedicinalProductDefinition();
parseMedicinalProductDefinitionProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionProperties(JsonObject json, MedicinalProductDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("domain"))
res.setDomain(parseCodeableConcept(getJObject(json, "domain")));
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("statusDate"))
res.setStatusDateElement(parseDateTime(json.get("statusDate").getAsString()));
if (json.has("_statusDate"))
parseElementProperties(getJObject(json, "_statusDate"), res.getStatusDateElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("combinedPharmaceuticalDoseForm"))
res.setCombinedPharmaceuticalDoseForm(parseCodeableConcept(getJObject(json, "combinedPharmaceuticalDoseForm")));
if (json.has("route")) {
JsonArray array = getJArray(json, "route");
for (int i = 0; i < array.size(); i++) {
res.getRoute().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("indication"))
res.setIndicationElement(parseMarkdown(json.get("indication").getAsString()));
if (json.has("_indication"))
parseElementProperties(getJObject(json, "_indication"), res.getIndicationElement());
if (json.has("legalStatusOfSupply"))
res.setLegalStatusOfSupply(parseCodeableConcept(getJObject(json, "legalStatusOfSupply")));
if (json.has("additionalMonitoringIndicator"))
res.setAdditionalMonitoringIndicator(parseCodeableConcept(getJObject(json, "additionalMonitoringIndicator")));
if (json.has("specialMeasures")) {
JsonArray array = getJArray(json, "specialMeasures");
for (int i = 0; i < array.size(); i++) {
res.getSpecialMeasures().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("pediatricUseIndicator"))
res.setPediatricUseIndicator(parseCodeableConcept(getJObject(json, "pediatricUseIndicator")));
if (json.has("classification")) {
JsonArray array = getJArray(json, "classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("marketingStatus")) {
JsonArray array = getJArray(json, "marketingStatus");
for (int i = 0; i < array.size(); i++) {
res.getMarketingStatus().add(parseMarketingStatus(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packagedMedicinalProduct")) {
JsonArray array = getJArray(json, "packagedMedicinalProduct");
for (int i = 0; i < array.size(); i++) {
res.getPackagedMedicinalProduct().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("comprisedOf")) {
JsonArray array = getJArray(json, "comprisedOf");
for (int i = 0; i < array.size(); i++) {
res.getComprisedOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("impurity")) {
JsonArray array = getJArray(json, "impurity");
for (int i = 0; i < array.size(); i++) {
res.getImpurity().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("attachedDocument")) {
JsonArray array = getJArray(json, "attachedDocument");
for (int i = 0; i < array.size(); i++) {
res.getAttachedDocument().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("masterFile")) {
JsonArray array = getJArray(json, "masterFile");
for (int i = 0; i < array.size(); i++) {
res.getMasterFile().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseMedicinalProductDefinitionContactComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("clinicalTrial")) {
JsonArray array = getJArray(json, "clinicalTrial");
for (int i = 0; i < array.size(); i++) {
res.getClinicalTrial().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseMedicinalProductDefinitionNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("crossReference")) {
JsonArray array = getJArray(json, "crossReference");
for (int i = 0; i < array.size(); i++) {
res.getCrossReference().add(parseMedicinalProductDefinitionCrossReferenceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("operation")) {
JsonArray array = getJArray(json, "operation");
for (int i = 0; i < array.size(); i++) {
res.getOperation().add(parseMedicinalProductDefinitionOperationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseMedicinalProductDefinitionCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicinalProductDefinition.MedicinalProductDefinitionContactComponent parseMedicinalProductDefinitionContactComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionContactComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionContactComponent();
parseMedicinalProductDefinitionContactComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionContactComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionContactComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("contact"))
res.setContact(parseReference(getJObject(json, "contact")));
}
protected MedicinalProductDefinition.MedicinalProductDefinitionNameComponent parseMedicinalProductDefinitionNameComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionNameComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionNameComponent();
parseMedicinalProductDefinitionNameComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionNameComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionNameComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("productName"))
res.setProductNameElement(parseString(json.get("productName").getAsString()));
if (json.has("_productName"))
parseElementProperties(getJObject(json, "_productName"), res.getProductNameElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("part")) {
JsonArray array = getJArray(json, "part");
for (int i = 0; i < array.size(); i++) {
res.getPart().add(parseMedicinalProductDefinitionNamePartComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("usage")) {
JsonArray array = getJArray(json, "usage");
for (int i = 0; i < array.size(); i++) {
res.getUsage().add(parseMedicinalProductDefinitionNameUsageComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent parseMedicinalProductDefinitionNamePartComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent();
parseMedicinalProductDefinitionNamePartComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionNamePartComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("part"))
res.setPartElement(parseString(json.get("part").getAsString()));
if (json.has("_part"))
parseElementProperties(getJObject(json, "_part"), res.getPartElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
}
protected MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent parseMedicinalProductDefinitionNameUsageComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent();
parseMedicinalProductDefinitionNameUsageComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionNameUsageComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("country"))
res.setCountry(parseCodeableConcept(getJObject(json, "country")));
if (json.has("jurisdiction"))
res.setJurisdiction(parseCodeableConcept(getJObject(json, "jurisdiction")));
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
}
protected MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent parseMedicinalProductDefinitionCrossReferenceComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent();
parseMedicinalProductDefinitionCrossReferenceComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionCrossReferenceComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("product"))
res.setProduct(parseCodeableReference(getJObject(json, "product")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
}
protected MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent parseMedicinalProductDefinitionOperationComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent();
parseMedicinalProductDefinitionOperationComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionOperationComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableReference(getJObject(json, "type")));
if (json.has("effectiveDate"))
res.setEffectiveDate(parsePeriod(getJObject(json, "effectiveDate")));
if (json.has("organization")) {
JsonArray array = getJArray(json, "organization");
for (int i = 0; i < array.size(); i++) {
res.getOrganization().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("confidentialityIndicator"))
res.setConfidentialityIndicator(parseCodeableConcept(getJObject(json, "confidentialityIndicator")));
}
protected MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent parseMedicinalProductDefinitionCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent res = new MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent();
parseMedicinalProductDefinitionCharacteristicComponentProperties(json, res);
return res;
}
protected void parseMedicinalProductDefinitionCharacteristicComponentProperties(JsonObject json, MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected MessageDefinition parseMessageDefinition(JsonObject json) throws IOException, FHIRFormatError {
MessageDefinition res = new MessageDefinition();
parseMessageDefinitionProperties(json, res);
return res;
}
protected void parseMessageDefinitionProperties(JsonObject json, MessageDefinition res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReplaces().add(new CanonicalType());
} else {;
res.getReplaces().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_replaces")) {
JsonArray array = getJArray(json, "_replaces");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReplaces().size())
res.getReplaces().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReplaces().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("base"))
res.setBaseElement(parseCanonical(json.get("base").getAsString()));
if (json.has("_base"))
parseElementProperties(getJObject(json, "_base"), res.getBaseElement());
if (json.has("parent")) {
JsonArray array = getJArray(json, "parent");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getParent().add(new CanonicalType());
} else {;
res.getParent().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_parent")) {
JsonArray array = getJArray(json, "_parent");
for (int i = 0; i < array.size(); i++) {
if (i == res.getParent().size())
res.getParent().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getParent().get(i));
}
};
DataType event = parseType("event", json);
if (event != null)
res.setEvent(event);
if (json.has("category"))
res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), MessageDefinition.MessageSignificanceCategory.NULL, new MessageDefinition.MessageSignificanceCategoryEnumFactory()));
if (json.has("_category"))
parseElementProperties(getJObject(json, "_category"), res.getCategoryElement());
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseMessageDefinitionFocusComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("responseRequired"))
res.setResponseRequiredElement(parseEnumeration(json.get("responseRequired").getAsString(), MessageDefinition.MessageheaderResponseRequest.NULL, new MessageDefinition.MessageheaderResponseRequestEnumFactory()));
if (json.has("_responseRequired"))
parseElementProperties(getJObject(json, "_responseRequired"), res.getResponseRequiredElement());
if (json.has("allowedResponse")) {
JsonArray array = getJArray(json, "allowedResponse");
for (int i = 0; i < array.size(); i++) {
res.getAllowedResponse().add(parseMessageDefinitionAllowedResponseComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("graph"))
res.setGraphElement(parseCanonical(json.get("graph").getAsString()));
if (json.has("_graph"))
parseElementProperties(getJObject(json, "_graph"), res.getGraphElement());
}
protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionFocusComponent(JsonObject json) throws IOException, FHIRFormatError {
MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent();
parseMessageDefinitionFocusComponentProperties(json, res);
return res;
}
protected void parseMessageDefinitionFocusComponentProperties(JsonObject json, MessageDefinition.MessageDefinitionFocusComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
if (json.has("min"))
res.setMinElement(parseUnsignedInt(json.get("min").getAsString()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
}
protected MessageDefinition.MessageDefinitionAllowedResponseComponent parseMessageDefinitionAllowedResponseComponent(JsonObject json) throws IOException, FHIRFormatError {
MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent();
parseMessageDefinitionAllowedResponseComponentProperties(json, res);
return res;
}
protected void parseMessageDefinitionAllowedResponseComponentProperties(JsonObject json, MessageDefinition.MessageDefinitionAllowedResponseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("message"))
res.setMessageElement(parseCanonical(json.get("message").getAsString()));
if (json.has("_message"))
parseElementProperties(getJObject(json, "_message"), res.getMessageElement());
if (json.has("situation"))
res.setSituationElement(parseMarkdown(json.get("situation").getAsString()));
if (json.has("_situation"))
parseElementProperties(getJObject(json, "_situation"), res.getSituationElement());
}
protected MessageHeader parseMessageHeader(JsonObject json) throws IOException, FHIRFormatError {
MessageHeader res = new MessageHeader();
parseMessageHeaderProperties(json, res);
return res;
}
protected void parseMessageHeaderProperties(JsonObject json, MessageHeader res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
DataType event = parseType("event", json);
if (event != null)
res.setEvent(event);
if (json.has("destination")) {
JsonArray array = getJArray(json, "destination");
for (int i = 0; i < array.size(); i++) {
res.getDestination().add(parseMessageHeaderMessageDestinationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("sender"))
res.setSender(parseReference(getJObject(json, "sender")));
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("source"))
res.setSource(parseMessageHeaderMessageSourceComponent(getJObject(json, "source")));
if (json.has("responsible"))
res.setResponsible(parseReference(getJObject(json, "responsible")));
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
if (json.has("response"))
res.setResponse(parseMessageHeaderResponseComponent(getJObject(json, "response")));
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("definition"))
res.setDefinitionElement(parseCanonical(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
}
protected MessageHeader.MessageDestinationComponent parseMessageHeaderMessageDestinationComponent(JsonObject json) throws IOException, FHIRFormatError {
MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent();
parseMessageHeaderMessageDestinationComponentProperties(json, res);
return res;
}
protected void parseMessageHeaderMessageDestinationComponentProperties(JsonObject json, MessageHeader.MessageDestinationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType endpoint = parseType("endpoint", json);
if (endpoint != null)
res.setEndpoint(endpoint);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("target"))
res.setTarget(parseReference(getJObject(json, "target")));
if (json.has("receiver"))
res.setReceiver(parseReference(getJObject(json, "receiver")));
}
protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(JsonObject json) throws IOException, FHIRFormatError {
MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent();
parseMessageHeaderMessageSourceComponentProperties(json, res);
return res;
}
protected void parseMessageHeaderMessageSourceComponentProperties(JsonObject json, MessageHeader.MessageSourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType endpoint = parseType("endpoint", json);
if (endpoint != null)
res.setEndpoint(endpoint);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("software"))
res.setSoftwareElement(parseString(json.get("software").getAsString()));
if (json.has("_software"))
parseElementProperties(getJObject(json, "_software"), res.getSoftwareElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("contact"))
res.setContact(parseContactPoint(getJObject(json, "contact")));
}
protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderResponseComponent(JsonObject json) throws IOException, FHIRFormatError {
MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent();
parseMessageHeaderResponseComponentProperties(json, res);
return res;
}
protected void parseMessageHeaderResponseComponentProperties(JsonObject json, MessageHeader.MessageHeaderResponseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), MessageHeader.ResponseType.NULL, new MessageHeader.ResponseTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("details"))
res.setDetails(parseReference(getJObject(json, "details")));
}
protected MolecularSequence parseMolecularSequence(JsonObject json) throws IOException, FHIRFormatError {
MolecularSequence res = new MolecularSequence();
parseMolecularSequenceProperties(json, res);
return res;
}
protected void parseMolecularSequenceProperties(JsonObject json, MolecularSequence res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MolecularSequence.SequenceType.NULL, new MolecularSequence.SequenceTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specimen"))
res.setSpecimen(parseReference(getJObject(json, "specimen")));
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
if (json.has("literal"))
res.setLiteralElement(parseString(json.get("literal").getAsString()));
if (json.has("_literal"))
parseElementProperties(getJObject(json, "_literal"), res.getLiteralElement());
if (json.has("formatted")) {
JsonArray array = getJArray(json, "formatted");
for (int i = 0; i < array.size(); i++) {
res.getFormatted().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relative")) {
JsonArray array = getJArray(json, "relative");
for (int i = 0; i < array.size(); i++) {
res.getRelative().add(parseMolecularSequenceRelativeComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MolecularSequence.MolecularSequenceRelativeComponent parseMolecularSequenceRelativeComponent(JsonObject json) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceRelativeComponent res = new MolecularSequence.MolecularSequenceRelativeComponent();
parseMolecularSequenceRelativeComponentProperties(json, res);
return res;
}
protected void parseMolecularSequenceRelativeComponentProperties(JsonObject json, MolecularSequence.MolecularSequenceRelativeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("coordinateSystem"))
res.setCoordinateSystem(parseCodeableConcept(getJObject(json, "coordinateSystem")));
if (json.has("ordinalPosition"))
res.setOrdinalPositionElement(parseInteger(json.get("ordinalPosition").getAsLong()));
if (json.has("_ordinalPosition"))
parseElementProperties(getJObject(json, "_ordinalPosition"), res.getOrdinalPositionElement());
if (json.has("sequenceRange"))
res.setSequenceRange(parseRange(getJObject(json, "sequenceRange")));
if (json.has("startingSequence"))
res.setStartingSequence(parseMolecularSequenceRelativeStartingSequenceComponent(getJObject(json, "startingSequence")));
if (json.has("edit")) {
JsonArray array = getJArray(json, "edit");
for (int i = 0; i < array.size(); i++) {
res.getEdit().add(parseMolecularSequenceRelativeEditComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected MolecularSequence.MolecularSequenceRelativeStartingSequenceComponent parseMolecularSequenceRelativeStartingSequenceComponent(JsonObject json) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceRelativeStartingSequenceComponent res = new MolecularSequence.MolecularSequenceRelativeStartingSequenceComponent();
parseMolecularSequenceRelativeStartingSequenceComponentProperties(json, res);
return res;
}
protected void parseMolecularSequenceRelativeStartingSequenceComponentProperties(JsonObject json, MolecularSequence.MolecularSequenceRelativeStartingSequenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("genomeAssembly"))
res.setGenomeAssembly(parseCodeableConcept(getJObject(json, "genomeAssembly")));
if (json.has("chromosome"))
res.setChromosome(parseCodeableConcept(getJObject(json, "chromosome")));
DataType sequence = parseType("sequence", json);
if (sequence != null)
res.setSequence(sequence);
if (json.has("windowStart"))
res.setWindowStartElement(parseInteger(json.get("windowStart").getAsLong()));
if (json.has("_windowStart"))
parseElementProperties(getJObject(json, "_windowStart"), res.getWindowStartElement());
if (json.has("windowEnd"))
res.setWindowEndElement(parseInteger(json.get("windowEnd").getAsLong()));
if (json.has("_windowEnd"))
parseElementProperties(getJObject(json, "_windowEnd"), res.getWindowEndElement());
if (json.has("orientation"))
res.setOrientationElement(parseEnumeration(json.get("orientation").getAsString(), MolecularSequence.OrientationType.NULL, new MolecularSequence.OrientationTypeEnumFactory()));
if (json.has("_orientation"))
parseElementProperties(getJObject(json, "_orientation"), res.getOrientationElement());
if (json.has("strand"))
res.setStrandElement(parseEnumeration(json.get("strand").getAsString(), MolecularSequence.StrandType.NULL, new MolecularSequence.StrandTypeEnumFactory()));
if (json.has("_strand"))
parseElementProperties(getJObject(json, "_strand"), res.getStrandElement());
}
protected MolecularSequence.MolecularSequenceRelativeEditComponent parseMolecularSequenceRelativeEditComponent(JsonObject json) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceRelativeEditComponent res = new MolecularSequence.MolecularSequenceRelativeEditComponent();
parseMolecularSequenceRelativeEditComponentProperties(json, res);
return res;
}
protected void parseMolecularSequenceRelativeEditComponentProperties(JsonObject json, MolecularSequence.MolecularSequenceRelativeEditComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("start"))
res.setStartElement(parseInteger(json.get("start").getAsLong()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("end"))
res.setEndElement(parseInteger(json.get("end").getAsLong()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
if (json.has("replacementSequence"))
res.setReplacementSequenceElement(parseString(json.get("replacementSequence").getAsString()));
if (json.has("_replacementSequence"))
parseElementProperties(getJObject(json, "_replacementSequence"), res.getReplacementSequenceElement());
if (json.has("replacedSequence"))
res.setReplacedSequenceElement(parseString(json.get("replacedSequence").getAsString()));
if (json.has("_replacedSequence"))
parseElementProperties(getJObject(json, "_replacedSequence"), res.getReplacedSequenceElement());
}
protected NamingSystem parseNamingSystem(JsonObject json) throws IOException, FHIRFormatError {
NamingSystem res = new NamingSystem();
parseNamingSystemProperties(json, res);
return res;
}
protected void parseNamingSystemProperties(JsonObject json, NamingSystem res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), NamingSystem.NamingSystemType.NULL, new NamingSystem.NamingSystemTypeEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("responsible"))
res.setResponsibleElement(parseString(json.get("responsible").getAsString()));
if (json.has("_responsible"))
parseElementProperties(getJObject(json, "_responsible"), res.getResponsibleElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("usage"))
res.setUsageElement(parseString(json.get("usage").getAsString()));
if (json.has("_usage"))
parseElementProperties(getJObject(json, "_usage"), res.getUsageElement());
if (json.has("uniqueId")) {
JsonArray array = getJArray(json, "uniqueId");
for (int i = 0; i < array.size(); i++) {
res.getUniqueId().add(parseNamingSystemUniqueIdComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemUniqueIdComponent(JsonObject json) throws IOException, FHIRFormatError {
NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent();
parseNamingSystemUniqueIdComponentProperties(json, res);
return res;
}
protected void parseNamingSystemUniqueIdComponentProperties(JsonObject json, NamingSystem.NamingSystemUniqueIdComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), NamingSystem.NamingSystemIdentifierType.NULL, new NamingSystem.NamingSystemIdentifierTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("preferred"))
res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean()));
if (json.has("_preferred"))
parseElementProperties(getJObject(json, "_preferred"), res.getPreferredElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("authoritative"))
res.setAuthoritativeElement(parseBoolean(json.get("authoritative").getAsBoolean()));
if (json.has("_authoritative"))
parseElementProperties(getJObject(json, "_authoritative"), res.getAuthoritativeElement());
}
protected NutritionIntake parseNutritionIntake(JsonObject json) throws IOException, FHIRFormatError {
NutritionIntake res = new NutritionIntake();
parseNutritionIntakeProperties(json, res);
return res;
}
protected void parseNutritionIntakeProperties(JsonObject json, NutritionIntake res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.EventStatus.NULL, new Enumerations.EventStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason")) {
JsonArray array = getJArray(json, "statusReason");
for (int i = 0; i < array.size(); i++) {
res.getStatusReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("recorded"))
res.setRecordedElement(parseDateTime(json.get("recorded").getAsString()));
if (json.has("_recorded"))
parseElementProperties(getJObject(json, "_recorded"), res.getRecordedElement());
DataType reported = parseType("reported", json);
if (reported != null)
res.setReported(reported);
if (json.has("consumedItem")) {
JsonArray array = getJArray(json, "consumedItem");
for (int i = 0; i < array.size(); i++) {
res.getConsumedItem().add(parseNutritionIntakeConsumedItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("ingredientLabel")) {
JsonArray array = getJArray(json, "ingredientLabel");
for (int i = 0; i < array.size(); i++) {
res.getIngredientLabel().add(parseNutritionIntakeIngredientLabelComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseNutritionIntakePerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected NutritionIntake.NutritionIntakeConsumedItemComponent parseNutritionIntakeConsumedItemComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionIntake.NutritionIntakeConsumedItemComponent res = new NutritionIntake.NutritionIntakeConsumedItemComponent();
parseNutritionIntakeConsumedItemComponentProperties(json, res);
return res;
}
protected void parseNutritionIntakeConsumedItemComponentProperties(JsonObject json, NutritionIntake.NutritionIntakeConsumedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("nutritionProduct"))
res.setNutritionProduct(parseCodeableReference(getJObject(json, "nutritionProduct")));
if (json.has("schedule"))
res.setSchedule(parseTiming(getJObject(json, "schedule")));
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
if (json.has("rate"))
res.setRate(parseQuantity(getJObject(json, "rate")));
if (json.has("notConsumed"))
res.setNotConsumedElement(parseBoolean(json.get("notConsumed").getAsBoolean()));
if (json.has("_notConsumed"))
parseElementProperties(getJObject(json, "_notConsumed"), res.getNotConsumedElement());
if (json.has("notConsumedReason"))
res.setNotConsumedReason(parseCodeableConcept(getJObject(json, "notConsumedReason")));
}
protected NutritionIntake.NutritionIntakeIngredientLabelComponent parseNutritionIntakeIngredientLabelComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionIntake.NutritionIntakeIngredientLabelComponent res = new NutritionIntake.NutritionIntakeIngredientLabelComponent();
parseNutritionIntakeIngredientLabelComponentProperties(json, res);
return res;
}
protected void parseNutritionIntakeIngredientLabelComponentProperties(JsonObject json, NutritionIntake.NutritionIntakeIngredientLabelComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("nutrient"))
res.setNutrient(parseCodeableReference(getJObject(json, "nutrient")));
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
}
protected NutritionIntake.NutritionIntakePerformerComponent parseNutritionIntakePerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionIntake.NutritionIntakePerformerComponent res = new NutritionIntake.NutritionIntakePerformerComponent();
parseNutritionIntakePerformerComponentProperties(json, res);
return res;
}
protected void parseNutritionIntakePerformerComponentProperties(JsonObject json, NutritionIntake.NutritionIntakePerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected NutritionOrder parseNutritionOrder(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder res = new NutritionOrder();
parseNutritionOrderProperties(json, res);
return res;
}
protected void parseNutritionOrderProperties(JsonObject json, NutritionOrder res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("instantiates")) {
JsonArray array = getJArray(json, "instantiates");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiates().add(new UriType());
} else {;
res.getInstantiates().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiates")) {
JsonArray array = getJArray(json, "_instantiates");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiates().size())
res.getInstantiates().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiates().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.RequestStatus.NULL, new Enumerations.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Enumerations.RequestIntent.NULL, new Enumerations.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("supportingInformation")) {
JsonArray array = getJArray(json, "supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dateTime"))
res.setDateTimeElement(parseDateTime(json.get("dateTime").getAsString()));
if (json.has("_dateTime"))
parseElementProperties(getJObject(json, "_dateTime"), res.getDateTimeElement());
if (json.has("orderer"))
res.setOrderer(parseReference(getJObject(json, "orderer")));
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("allergyIntolerance")) {
JsonArray array = getJArray(json, "allergyIntolerance");
for (int i = 0; i < array.size(); i++) {
res.getAllergyIntolerance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("foodPreferenceModifier")) {
JsonArray array = getJArray(json, "foodPreferenceModifier");
for (int i = 0; i < array.size(); i++) {
res.getFoodPreferenceModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("excludeFoodModifier")) {
JsonArray array = getJArray(json, "excludeFoodModifier");
for (int i = 0; i < array.size(); i++) {
res.getExcludeFoodModifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("outsideFoodAllowed"))
res.setOutsideFoodAllowedElement(parseBoolean(json.get("outsideFoodAllowed").getAsBoolean()));
if (json.has("_outsideFoodAllowed"))
parseElementProperties(getJObject(json, "_outsideFoodAllowed"), res.getOutsideFoodAllowedElement());
if (json.has("oralDiet"))
res.setOralDiet(parseNutritionOrderOralDietComponent(getJObject(json, "oralDiet")));
if (json.has("supplement")) {
JsonArray array = getJArray(json, "supplement");
for (int i = 0; i < array.size(); i++) {
res.getSupplement().add(parseNutritionOrderSupplementComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("enteralFormula"))
res.setEnteralFormula(parseNutritionOrderEnteralFormulaComponent(getJObject(json, "enteralFormula")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderOralDietComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent();
parseNutritionOrderOralDietComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderOralDietComponentProperties(JsonObject json, NutritionOrder.NutritionOrderOralDietComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("schedule"))
res.setSchedule(parseNutritionOrderOralDietScheduleComponent(getJObject(json, "schedule")));
if (json.has("nutrient")) {
JsonArray array = getJArray(json, "nutrient");
for (int i = 0; i < array.size(); i++) {
res.getNutrient().add(parseNutritionOrderOralDietNutrientComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("texture")) {
JsonArray array = getJArray(json, "texture");
for (int i = 0; i < array.size(); i++) {
res.getTexture().add(parseNutritionOrderOralDietTextureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("fluidConsistencyType")) {
JsonArray array = getJArray(json, "fluidConsistencyType");
for (int i = 0; i < array.size(); i++) {
res.getFluidConsistencyType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instruction"))
res.setInstructionElement(parseString(json.get("instruction").getAsString()));
if (json.has("_instruction"))
parseElementProperties(getJObject(json, "_instruction"), res.getInstructionElement());
}
protected NutritionOrder.OralDietScheduleComponent parseNutritionOrderOralDietScheduleComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.OralDietScheduleComponent res = new NutritionOrder.OralDietScheduleComponent();
parseNutritionOrderOralDietScheduleComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderOralDietScheduleComponentProperties(JsonObject json, NutritionOrder.OralDietScheduleComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("timing")) {
JsonArray array = getJArray(json, "timing");
for (int i = 0; i < array.size(); i++) {
res.getTiming().add(parseTiming(getJsonObjectFromArray(array, i)));
}
};
if (json.has("asNeeded"))
res.setAsNeededElement(parseBoolean(json.get("asNeeded").getAsBoolean()));
if (json.has("_asNeeded"))
parseElementProperties(getJObject(json, "_asNeeded"), res.getAsNeededElement());
if (json.has("asNeededFor"))
res.setAsNeededFor(parseCodeableConcept(getJObject(json, "asNeededFor")));
}
protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderOralDietNutrientComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent();
parseNutritionOrderOralDietNutrientComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderOralDietNutrientComponentProperties(JsonObject json, NutritionOrder.NutritionOrderOralDietNutrientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("modifier"))
res.setModifier(parseCodeableConcept(getJObject(json, "modifier")));
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
}
protected NutritionOrder.NutritionOrderOralDietTextureComponent parseNutritionOrderOralDietTextureComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent();
parseNutritionOrderOralDietTextureComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderOralDietTextureComponentProperties(JsonObject json, NutritionOrder.NutritionOrderOralDietTextureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("modifier"))
res.setModifier(parseCodeableConcept(getJObject(json, "modifier")));
if (json.has("foodType"))
res.setFoodType(parseCodeableConcept(getJObject(json, "foodType")));
}
protected NutritionOrder.NutritionOrderSupplementComponent parseNutritionOrderSupplementComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent();
parseNutritionOrderSupplementComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderSupplementComponentProperties(JsonObject json, NutritionOrder.NutritionOrderSupplementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableReference(getJObject(json, "type")));
if (json.has("productName"))
res.setProductNameElement(parseString(json.get("productName").getAsString()));
if (json.has("_productName"))
parseElementProperties(getJObject(json, "_productName"), res.getProductNameElement());
if (json.has("schedule"))
res.setSchedule(parseNutritionOrderSupplementScheduleComponent(getJObject(json, "schedule")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("instruction"))
res.setInstructionElement(parseString(json.get("instruction").getAsString()));
if (json.has("_instruction"))
parseElementProperties(getJObject(json, "_instruction"), res.getInstructionElement());
}
protected NutritionOrder.SupplementScheduleComponent parseNutritionOrderSupplementScheduleComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.SupplementScheduleComponent res = new NutritionOrder.SupplementScheduleComponent();
parseNutritionOrderSupplementScheduleComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderSupplementScheduleComponentProperties(JsonObject json, NutritionOrder.SupplementScheduleComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("timing")) {
JsonArray array = getJArray(json, "timing");
for (int i = 0; i < array.size(); i++) {
res.getTiming().add(parseTiming(getJsonObjectFromArray(array, i)));
}
};
if (json.has("asNeeded"))
res.setAsNeededElement(parseBoolean(json.get("asNeeded").getAsBoolean()));
if (json.has("_asNeeded"))
parseElementProperties(getJObject(json, "_asNeeded"), res.getAsNeededElement());
if (json.has("asNeededFor"))
res.setAsNeededFor(parseCodeableConcept(getJObject(json, "asNeededFor")));
}
protected NutritionOrder.NutritionOrderEnteralFormulaComponent parseNutritionOrderEnteralFormulaComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent();
parseNutritionOrderEnteralFormulaComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderEnteralFormulaComponentProperties(JsonObject json, NutritionOrder.NutritionOrderEnteralFormulaComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("baseFormulaType"))
res.setBaseFormulaType(parseCodeableReference(getJObject(json, "baseFormulaType")));
if (json.has("baseFormulaProductName"))
res.setBaseFormulaProductNameElement(parseString(json.get("baseFormulaProductName").getAsString()));
if (json.has("_baseFormulaProductName"))
parseElementProperties(getJObject(json, "_baseFormulaProductName"), res.getBaseFormulaProductNameElement());
if (json.has("deliveryDevice")) {
JsonArray array = getJArray(json, "deliveryDevice");
for (int i = 0; i < array.size(); i++) {
res.getDeliveryDevice().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("additive")) {
JsonArray array = getJArray(json, "additive");
for (int i = 0; i < array.size(); i++) {
res.getAdditive().add(parseNutritionOrderEnteralFormulaAdditiveComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("caloricDensity"))
res.setCaloricDensity(parseQuantity(getJObject(json, "caloricDensity")));
if (json.has("routeOfAdministration"))
res.setRouteOfAdministration(parseCodeableConcept(getJObject(json, "routeOfAdministration")));
if (json.has("administration")) {
JsonArray array = getJArray(json, "administration");
for (int i = 0; i < array.size(); i++) {
res.getAdministration().add(parseNutritionOrderEnteralFormulaAdministrationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("maxVolumeToDeliver"))
res.setMaxVolumeToDeliver(parseQuantity(getJObject(json, "maxVolumeToDeliver")));
if (json.has("administrationInstruction"))
res.setAdministrationInstructionElement(parseMarkdown(json.get("administrationInstruction").getAsString()));
if (json.has("_administrationInstruction"))
parseElementProperties(getJObject(json, "_administrationInstruction"), res.getAdministrationInstructionElement());
}
protected NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent parseNutritionOrderEnteralFormulaAdditiveComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent();
parseNutritionOrderEnteralFormulaAdditiveComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderEnteralFormulaAdditiveComponentProperties(JsonObject json, NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableReference(getJObject(json, "type")));
if (json.has("productName"))
res.setProductNameElement(parseString(json.get("productName").getAsString()));
if (json.has("_productName"))
parseElementProperties(getJObject(json, "_productName"), res.getProductNameElement());
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
}
protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderEnteralFormulaAdministrationComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent();
parseNutritionOrderEnteralFormulaAdministrationComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderEnteralFormulaAdministrationComponentProperties(JsonObject json, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("schedule"))
res.setSchedule(parseNutritionOrderEnteralFormulaScheduleComponent(getJObject(json, "schedule")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
DataType rate = parseType("rate", json);
if (rate != null)
res.setRate(rate);
}
protected NutritionOrder.EnteralFormulaScheduleComponent parseNutritionOrderEnteralFormulaScheduleComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionOrder.EnteralFormulaScheduleComponent res = new NutritionOrder.EnteralFormulaScheduleComponent();
parseNutritionOrderEnteralFormulaScheduleComponentProperties(json, res);
return res;
}
protected void parseNutritionOrderEnteralFormulaScheduleComponentProperties(JsonObject json, NutritionOrder.EnteralFormulaScheduleComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("timing")) {
JsonArray array = getJArray(json, "timing");
for (int i = 0; i < array.size(); i++) {
res.getTiming().add(parseTiming(getJsonObjectFromArray(array, i)));
}
};
if (json.has("asNeeded"))
res.setAsNeededElement(parseBoolean(json.get("asNeeded").getAsBoolean()));
if (json.has("_asNeeded"))
parseElementProperties(getJObject(json, "_asNeeded"), res.getAsNeededElement());
if (json.has("asNeededFor"))
res.setAsNeededFor(parseCodeableConcept(getJObject(json, "asNeededFor")));
}
protected NutritionProduct parseNutritionProduct(JsonObject json) throws IOException, FHIRFormatError {
NutritionProduct res = new NutritionProduct();
parseNutritionProductProperties(json, res);
return res;
}
protected void parseNutritionProductProperties(JsonObject json, NutritionProduct res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), NutritionProduct.NutritionProductStatus.NULL, new NutritionProduct.NutritionProductStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("manufacturer")) {
JsonArray array = getJArray(json, "manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("nutrient")) {
JsonArray array = getJArray(json, "nutrient");
for (int i = 0; i < array.size(); i++) {
res.getNutrient().add(parseNutritionProductNutrientComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseNutritionProductIngredientComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("knownAllergen")) {
JsonArray array = getJArray(json, "knownAllergen");
for (int i = 0; i < array.size(); i++) {
res.getKnownAllergen().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseNutritionProductCharacteristicComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instance")) {
JsonArray array = getJArray(json, "instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseNutritionProductInstanceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected NutritionProduct.NutritionProductNutrientComponent parseNutritionProductNutrientComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionProduct.NutritionProductNutrientComponent res = new NutritionProduct.NutritionProductNutrientComponent();
parseNutritionProductNutrientComponentProperties(json, res);
return res;
}
protected void parseNutritionProductNutrientComponentProperties(JsonObject json, NutritionProduct.NutritionProductNutrientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("amount")) {
JsonArray array = getJArray(json, "amount");
for (int i = 0; i < array.size(); i++) {
res.getAmount().add(parseRatio(getJsonObjectFromArray(array, i)));
}
};
}
protected NutritionProduct.NutritionProductIngredientComponent parseNutritionProductIngredientComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionProduct.NutritionProductIngredientComponent res = new NutritionProduct.NutritionProductIngredientComponent();
parseNutritionProductIngredientComponentProperties(json, res);
return res;
}
protected void parseNutritionProductIngredientComponentProperties(JsonObject json, NutritionProduct.NutritionProductIngredientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("amount")) {
JsonArray array = getJArray(json, "amount");
for (int i = 0; i < array.size(); i++) {
res.getAmount().add(parseRatio(getJsonObjectFromArray(array, i)));
}
};
}
protected NutritionProduct.NutritionProductCharacteristicComponent parseNutritionProductCharacteristicComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionProduct.NutritionProductCharacteristicComponent res = new NutritionProduct.NutritionProductCharacteristicComponent();
parseNutritionProductCharacteristicComponentProperties(json, res);
return res;
}
protected void parseNutritionProductCharacteristicComponentProperties(JsonObject json, NutritionProduct.NutritionProductCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected NutritionProduct.NutritionProductInstanceComponent parseNutritionProductInstanceComponent(JsonObject json) throws IOException, FHIRFormatError {
NutritionProduct.NutritionProductInstanceComponent res = new NutritionProduct.NutritionProductInstanceComponent();
parseNutritionProductInstanceComponentProperties(json, res);
return res;
}
protected void parseNutritionProductInstanceComponentProperties(JsonObject json, NutritionProduct.NutritionProductInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("lotNumber"))
res.setLotNumberElement(parseString(json.get("lotNumber").getAsString()));
if (json.has("_lotNumber"))
parseElementProperties(getJObject(json, "_lotNumber"), res.getLotNumberElement());
if (json.has("expiry"))
res.setExpiryElement(parseDateTime(json.get("expiry").getAsString()));
if (json.has("_expiry"))
parseElementProperties(getJObject(json, "_expiry"), res.getExpiryElement());
if (json.has("useBy"))
res.setUseByElement(parseDateTime(json.get("useBy").getAsString()));
if (json.has("_useBy"))
parseElementProperties(getJObject(json, "_useBy"), res.getUseByElement());
if (json.has("biologicalSourceEvent"))
res.setBiologicalSourceEvent(parseIdentifier(getJObject(json, "biologicalSourceEvent")));
}
protected Observation parseObservation(JsonObject json) throws IOException, FHIRFormatError {
Observation res = new Observation();
parseObservationProperties(json, res);
return res;
}
protected void parseObservationProperties(JsonObject json, Observation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
DataType instantiates = parseType("instantiates", json);
if (instantiates != null)
res.setInstantiates(instantiates);
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("triggeredBy")) {
JsonArray array = getJArray(json, "triggeredBy");
for (int i = 0; i < array.size(); i++) {
res.getTriggeredBy().add(parseObservationTriggeredByComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.ObservationStatus.NULL, new Enumerations.ObservationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType effective = parseType("effective", json);
if (effective != null)
res.setEffective(effective);
if (json.has("issued"))
res.setIssuedElement(parseInstant(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("dataAbsentReason"))
res.setDataAbsentReason(parseCodeableConcept(getJObject(json, "dataAbsentReason")));
if (json.has("interpretation")) {
JsonArray array = getJArray(json, "interpretation");
for (int i = 0; i < array.size(); i++) {
res.getInterpretation().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("bodyStructure"))
res.setBodyStructure(parseReference(getJObject(json, "bodyStructure")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("specimen"))
res.setSpecimen(parseReference(getJObject(json, "specimen")));
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("referenceRange")) {
JsonArray array = getJArray(json, "referenceRange");
for (int i = 0; i < array.size(); i++) {
res.getReferenceRange().add(parseObservationReferenceRangeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("hasMember")) {
JsonArray array = getJArray(json, "hasMember");
for (int i = 0; i < array.size(); i++) {
res.getHasMember().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseObservationComponentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Observation.ObservationTriggeredByComponent parseObservationTriggeredByComponent(JsonObject json) throws IOException, FHIRFormatError {
Observation.ObservationTriggeredByComponent res = new Observation.ObservationTriggeredByComponent();
parseObservationTriggeredByComponentProperties(json, res);
return res;
}
protected void parseObservationTriggeredByComponentProperties(JsonObject json, Observation.ObservationTriggeredByComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("observation"))
res.setObservation(parseReference(getJObject(json, "observation")));
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Observation.TriggeredBytype.NULL, new Observation.TriggeredBytypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("reason"))
res.setReasonElement(parseString(json.get("reason").getAsString()));
if (json.has("_reason"))
parseElementProperties(getJObject(json, "_reason"), res.getReasonElement());
}
protected Observation.ObservationReferenceRangeComponent parseObservationReferenceRangeComponent(JsonObject json) throws IOException, FHIRFormatError {
Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent();
parseObservationReferenceRangeComponentProperties(json, res);
return res;
}
protected void parseObservationReferenceRangeComponentProperties(JsonObject json, Observation.ObservationReferenceRangeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("low"))
res.setLow(parseQuantity(getJObject(json, "low")));
if (json.has("high"))
res.setHigh(parseQuantity(getJObject(json, "high")));
if (json.has("normalValue"))
res.setNormalValue(parseCodeableConcept(getJObject(json, "normalValue")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("appliesTo")) {
JsonArray array = getJArray(json, "appliesTo");
for (int i = 0; i < array.size(); i++) {
res.getAppliesTo().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("age"))
res.setAge(parseRange(getJObject(json, "age")));
if (json.has("text"))
res.setTextElement(parseMarkdown(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Observation.ObservationComponentComponent parseObservationComponentComponent(JsonObject json) throws IOException, FHIRFormatError {
Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent();
parseObservationComponentComponentProperties(json, res);
return res;
}
protected void parseObservationComponentComponentProperties(JsonObject json, Observation.ObservationComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("dataAbsentReason"))
res.setDataAbsentReason(parseCodeableConcept(getJObject(json, "dataAbsentReason")));
if (json.has("interpretation")) {
JsonArray array = getJArray(json, "interpretation");
for (int i = 0; i < array.size(); i++) {
res.getInterpretation().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("referenceRange")) {
JsonArray array = getJArray(json, "referenceRange");
for (int i = 0; i < array.size(); i++) {
res.getReferenceRange().add(parseObservationReferenceRangeComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ObservationDefinition parseObservationDefinition(JsonObject json) throws IOException, FHIRFormatError {
ObservationDefinition res = new ObservationDefinition();
parseObservationDefinitionProperties(json, res);
return res;
}
protected void parseObservationDefinitionProperties(JsonObject json, ObservationDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("derivedFromCanonical")) {
JsonArray array = getJArray(json, "derivedFromCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFromCanonical().add(new CanonicalType());
} else {;
res.getDerivedFromCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFromCanonical")) {
JsonArray array = getJArray(json, "_derivedFromCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFromCanonical().size())
res.getDerivedFromCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFromCanonical().get(i));
}
};
if (json.has("derivedFromUri")) {
JsonArray array = getJArray(json, "derivedFromUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFromUri().add(new UriType());
} else {;
res.getDerivedFromUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFromUri")) {
JsonArray array = getJArray(json, "_derivedFromUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFromUri().size())
res.getDerivedFromUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFromUri().get(i));
}
};
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("performerType"))
res.setPerformerType(parseCodeableConcept(getJObject(json, "performerType")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("permittedDataType")) {
JsonArray array = getJArray(json, "permittedDataType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPermittedDataType().add(new Enumeration(new ObservationDefinition.ObservationDataTypeEnumFactory(), ObservationDefinition.ObservationDataType.NULL));
} else {;
res.getPermittedDataType().add(parseEnumeration(array.get(i).getAsString(), ObservationDefinition.ObservationDataType.NULL, new ObservationDefinition.ObservationDataTypeEnumFactory()));
}
}
};
if (json.has("_permittedDataType")) {
JsonArray array = getJArray(json, "_permittedDataType");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPermittedDataType().size())
res.getPermittedDataType().add(parseEnumeration(null, ObservationDefinition.ObservationDataType.NULL, new ObservationDefinition.ObservationDataTypeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPermittedDataType().get(i));
}
};
if (json.has("multipleResultsAllowed"))
res.setMultipleResultsAllowedElement(parseBoolean(json.get("multipleResultsAllowed").getAsBoolean()));
if (json.has("_multipleResultsAllowed"))
parseElementProperties(getJObject(json, "_multipleResultsAllowed"), res.getMultipleResultsAllowedElement());
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("specimen")) {
JsonArray array = getJArray(json, "specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("device")) {
JsonArray array = getJArray(json, "device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preferredReportName"))
res.setPreferredReportNameElement(parseString(json.get("preferredReportName").getAsString()));
if (json.has("_preferredReportName"))
parseElementProperties(getJObject(json, "_preferredReportName"), res.getPreferredReportNameElement());
if (json.has("permittedUnit")) {
JsonArray array = getJArray(json, "permittedUnit");
for (int i = 0; i < array.size(); i++) {
res.getPermittedUnit().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("qualifiedValue")) {
JsonArray array = getJArray(json, "qualifiedValue");
for (int i = 0; i < array.size(); i++) {
res.getQualifiedValue().add(parseObservationDefinitionQualifiedValueComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("hasMember")) {
JsonArray array = getJArray(json, "hasMember");
for (int i = 0; i < array.size(); i++) {
res.getHasMember().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseObservationDefinitionComponentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ObservationDefinition.ObservationDefinitionQualifiedValueComponent parseObservationDefinitionQualifiedValueComponent(JsonObject json) throws IOException, FHIRFormatError {
ObservationDefinition.ObservationDefinitionQualifiedValueComponent res = new ObservationDefinition.ObservationDefinitionQualifiedValueComponent();
parseObservationDefinitionQualifiedValueComponentProperties(json, res);
return res;
}
protected void parseObservationDefinitionQualifiedValueComponentProperties(JsonObject json, ObservationDefinition.ObservationDefinitionQualifiedValueComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("context"))
res.setContext(parseCodeableConcept(getJObject(json, "context")));
if (json.has("appliesTo")) {
JsonArray array = getJArray(json, "appliesTo");
for (int i = 0; i < array.size(); i++) {
res.getAppliesTo().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("gender"))
res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory()));
if (json.has("_gender"))
parseElementProperties(getJObject(json, "_gender"), res.getGenderElement());
if (json.has("age"))
res.setAge(parseRange(getJObject(json, "age")));
if (json.has("gestationalAge"))
res.setGestationalAge(parseRange(getJObject(json, "gestationalAge")));
if (json.has("condition"))
res.setConditionElement(parseString(json.get("condition").getAsString()));
if (json.has("_condition"))
parseElementProperties(getJObject(json, "_condition"), res.getConditionElement());
if (json.has("rangeCategory"))
res.setRangeCategoryElement(parseEnumeration(json.get("rangeCategory").getAsString(), ObservationDefinition.ObservationRangeCategory.NULL, new ObservationDefinition.ObservationRangeCategoryEnumFactory()));
if (json.has("_rangeCategory"))
parseElementProperties(getJObject(json, "_rangeCategory"), res.getRangeCategoryElement());
if (json.has("range"))
res.setRange(parseRange(getJObject(json, "range")));
if (json.has("validCodedValueSet"))
res.setValidCodedValueSetElement(parseCanonical(json.get("validCodedValueSet").getAsString()));
if (json.has("_validCodedValueSet"))
parseElementProperties(getJObject(json, "_validCodedValueSet"), res.getValidCodedValueSetElement());
if (json.has("normalCodedValueSet"))
res.setNormalCodedValueSetElement(parseCanonical(json.get("normalCodedValueSet").getAsString()));
if (json.has("_normalCodedValueSet"))
parseElementProperties(getJObject(json, "_normalCodedValueSet"), res.getNormalCodedValueSetElement());
if (json.has("abnormalCodedValueSet"))
res.setAbnormalCodedValueSetElement(parseCanonical(json.get("abnormalCodedValueSet").getAsString()));
if (json.has("_abnormalCodedValueSet"))
parseElementProperties(getJObject(json, "_abnormalCodedValueSet"), res.getAbnormalCodedValueSetElement());
if (json.has("criticalCodedValueSet"))
res.setCriticalCodedValueSetElement(parseCanonical(json.get("criticalCodedValueSet").getAsString()));
if (json.has("_criticalCodedValueSet"))
parseElementProperties(getJObject(json, "_criticalCodedValueSet"), res.getCriticalCodedValueSetElement());
}
protected ObservationDefinition.ObservationDefinitionComponentComponent parseObservationDefinitionComponentComponent(JsonObject json) throws IOException, FHIRFormatError {
ObservationDefinition.ObservationDefinitionComponentComponent res = new ObservationDefinition.ObservationDefinitionComponentComponent();
parseObservationDefinitionComponentComponentProperties(json, res);
return res;
}
protected void parseObservationDefinitionComponentComponentProperties(JsonObject json, ObservationDefinition.ObservationDefinitionComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("permittedDataType")) {
JsonArray array = getJArray(json, "permittedDataType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPermittedDataType().add(new Enumeration(new ObservationDefinition.ObservationDataTypeEnumFactory(), ObservationDefinition.ObservationDataType.NULL));
} else {;
res.getPermittedDataType().add(parseEnumeration(array.get(i).getAsString(), ObservationDefinition.ObservationDataType.NULL, new ObservationDefinition.ObservationDataTypeEnumFactory()));
}
}
};
if (json.has("_permittedDataType")) {
JsonArray array = getJArray(json, "_permittedDataType");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPermittedDataType().size())
res.getPermittedDataType().add(parseEnumeration(null, ObservationDefinition.ObservationDataType.NULL, new ObservationDefinition.ObservationDataTypeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPermittedDataType().get(i));
}
};
if (json.has("permittedUnit")) {
JsonArray array = getJArray(json, "permittedUnit");
for (int i = 0; i < array.size(); i++) {
res.getPermittedUnit().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("qualifiedValue")) {
JsonArray array = getJArray(json, "qualifiedValue");
for (int i = 0; i < array.size(); i++) {
res.getQualifiedValue().add(parseObservationDefinitionQualifiedValueComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected OperationDefinition parseOperationDefinition(JsonObject json) throws IOException, FHIRFormatError {
OperationDefinition res = new OperationDefinition();
parseOperationDefinitionProperties(json, res);
return res;
}
protected void parseOperationDefinitionProperties(JsonObject json, OperationDefinition res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), OperationDefinition.OperationKind.NULL, new OperationDefinition.OperationKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("affectsState"))
res.setAffectsStateElement(parseBoolean(json.get("affectsState").getAsBoolean()));
if (json.has("_affectsState"))
parseElementProperties(getJObject(json, "_affectsState"), res.getAffectsStateElement());
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("base"))
res.setBaseElement(parseCanonical(json.get("base").getAsString()));
if (json.has("_base"))
parseElementProperties(getJObject(json, "_base"), res.getBaseElement());
if (json.has("resource")) {
JsonArray array = getJArray(json, "resource");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getResource().add(new Enumeration(new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), Enumerations.VersionIndependentResourceTypesAll.NULL));
} else {;
res.getResource().add(parseEnumeration(array.get(i).getAsString(), Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
}
}
};
if (json.has("_resource")) {
JsonArray array = getJArray(json, "_resource");
for (int i = 0; i < array.size(); i++) {
if (i == res.getResource().size())
res.getResource().add(parseEnumeration(null, Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getResource().get(i));
}
};
if (json.has("system"))
res.setSystemElement(parseBoolean(json.get("system").getAsBoolean()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("type"))
res.setTypeElement(parseBoolean(json.get("type").getAsBoolean()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("instance"))
res.setInstanceElement(parseBoolean(json.get("instance").getAsBoolean()));
if (json.has("_instance"))
parseElementProperties(getJObject(json, "_instance"), res.getInstanceElement());
if (json.has("inputProfile"))
res.setInputProfileElement(parseCanonical(json.get("inputProfile").getAsString()));
if (json.has("_inputProfile"))
parseElementProperties(getJObject(json, "_inputProfile"), res.getInputProfileElement());
if (json.has("outputProfile"))
res.setOutputProfileElement(parseCanonical(json.get("outputProfile").getAsString()));
if (json.has("_outputProfile"))
parseElementProperties(getJObject(json, "_outputProfile"), res.getOutputProfileElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseOperationDefinitionParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("overload")) {
JsonArray array = getJArray(json, "overload");
for (int i = 0; i < array.size(); i++) {
res.getOverload().add(parseOperationDefinitionOverloadComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent();
parseOperationDefinitionParameterComponentProperties(json, res);
return res;
}
protected void parseOperationDefinitionParameterComponentProperties(JsonObject json, OperationDefinition.OperationDefinitionParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseCode(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("use"))
res.setUseElement(parseEnumeration(json.get("use").getAsString(), Enumerations.OperationParameterUse.NULL, new Enumerations.OperationParameterUseEnumFactory()));
if (json.has("_use"))
parseElementProperties(getJObject(json, "_use"), res.getUseElement());
if (json.has("scope")) {
JsonArray array = getJArray(json, "scope");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getScope().add(new Enumeration(new OperationDefinition.OperationParameterScopeEnumFactory(), OperationDefinition.OperationParameterScope.NULL));
} else {;
res.getScope().add(parseEnumeration(array.get(i).getAsString(), OperationDefinition.OperationParameterScope.NULL, new OperationDefinition.OperationParameterScopeEnumFactory()));
}
}
};
if (json.has("_scope")) {
JsonArray array = getJArray(json, "_scope");
for (int i = 0; i < array.size(); i++) {
if (i == res.getScope().size())
res.getScope().add(parseEnumeration(null, OperationDefinition.OperationParameterScope.NULL, new OperationDefinition.OperationParameterScopeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getScope().get(i));
}
};
if (json.has("min"))
res.setMinElement(parseInteger(json.get("min").getAsLong()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
if (json.has("documentation"))
res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("allowedType")) {
JsonArray array = getJArray(json, "allowedType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAllowedType().add(new Enumeration(new Enumerations.FHIRTypesEnumFactory(), Enumerations.FHIRTypes.NULL));
} else {;
res.getAllowedType().add(parseEnumeration(array.get(i).getAsString(), Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
}
}
};
if (json.has("_allowedType")) {
JsonArray array = getJArray(json, "_allowedType");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAllowedType().size())
res.getAllowedType().add(parseEnumeration(null, Enumerations.FHIRTypes.NULL, new Enumerations.FHIRTypesEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAllowedType().get(i));
}
};
if (json.has("targetProfile")) {
JsonArray array = getJArray(json, "targetProfile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getTargetProfile().add(new CanonicalType());
} else {;
res.getTargetProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_targetProfile")) {
JsonArray array = getJArray(json, "_targetProfile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getTargetProfile().size())
res.getTargetProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getTargetProfile().get(i));
}
};
if (json.has("searchType"))
res.setSearchTypeElement(parseEnumeration(json.get("searchType").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory()));
if (json.has("_searchType"))
parseElementProperties(getJObject(json, "_searchType"), res.getSearchTypeElement());
if (json.has("binding"))
res.setBinding(parseOperationDefinitionParameterBindingComponent(getJObject(json, "binding")));
if (json.has("referencedFrom")) {
JsonArray array = getJArray(json, "referencedFrom");
for (int i = 0; i < array.size(); i++) {
res.getReferencedFrom().add(parseOperationDefinitionParameterReferencedFromComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("part")) {
JsonArray array = getJArray(json, "part");
for (int i = 0; i < array.size(); i++) {
res.getPart().add(parseOperationDefinitionParameterComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionParameterBindingComponent(JsonObject json) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent();
parseOperationDefinitionParameterBindingComponentProperties(json, res);
return res;
}
protected void parseOperationDefinitionParameterBindingComponentProperties(JsonObject json, OperationDefinition.OperationDefinitionParameterBindingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("strength"))
res.setStrengthElement(parseEnumeration(json.get("strength").getAsString(), Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory()));
if (json.has("_strength"))
parseElementProperties(getJObject(json, "_strength"), res.getStrengthElement());
if (json.has("valueSet"))
res.setValueSetElement(parseCanonical(json.get("valueSet").getAsString()));
if (json.has("_valueSet"))
parseElementProperties(getJObject(json, "_valueSet"), res.getValueSetElement());
}
protected OperationDefinition.OperationDefinitionParameterReferencedFromComponent parseOperationDefinitionParameterReferencedFromComponent(JsonObject json) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionParameterReferencedFromComponent res = new OperationDefinition.OperationDefinitionParameterReferencedFromComponent();
parseOperationDefinitionParameterReferencedFromComponentProperties(json, res);
return res;
}
protected void parseOperationDefinitionParameterReferencedFromComponentProperties(JsonObject json, OperationDefinition.OperationDefinitionParameterReferencedFromComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("source"))
res.setSourceElement(parseString(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
if (json.has("sourceId"))
res.setSourceIdElement(parseString(json.get("sourceId").getAsString()));
if (json.has("_sourceId"))
parseElementProperties(getJObject(json, "_sourceId"), res.getSourceIdElement());
}
protected OperationDefinition.OperationDefinitionOverloadComponent parseOperationDefinitionOverloadComponent(JsonObject json) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent();
parseOperationDefinitionOverloadComponentProperties(json, res);
return res;
}
protected void parseOperationDefinitionOverloadComponentProperties(JsonObject json, OperationDefinition.OperationDefinitionOverloadComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("parameterName")) {
JsonArray array = getJArray(json, "parameterName");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getParameterName().add(new StringType());
} else {;
res.getParameterName().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_parameterName")) {
JsonArray array = getJArray(json, "_parameterName");
for (int i = 0; i < array.size(); i++) {
if (i == res.getParameterName().size())
res.getParameterName().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getParameterName().get(i));
}
};
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected OperationOutcome parseOperationOutcome(JsonObject json) throws IOException, FHIRFormatError {
OperationOutcome res = new OperationOutcome();
parseOperationOutcomeProperties(json, res);
return res;
}
protected void parseOperationOutcomeProperties(JsonObject json, OperationOutcome res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("issue")) {
JsonArray array = getJArray(json, "issue");
for (int i = 0; i < array.size(); i++) {
res.getIssue().add(parseOperationOutcomeIssueComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeIssueComponent(JsonObject json) throws IOException, FHIRFormatError {
OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent();
parseOperationOutcomeIssueComponentProperties(json, res);
return res;
}
protected void parseOperationOutcomeIssueComponentProperties(JsonObject json, OperationOutcome.OperationOutcomeIssueComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("severity"))
res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), OperationOutcome.IssueSeverity.NULL, new OperationOutcome.IssueSeverityEnumFactory()));
if (json.has("_severity"))
parseElementProperties(getJObject(json, "_severity"), res.getSeverityElement());
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), OperationOutcome.IssueType.NULL, new OperationOutcome.IssueTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("details"))
res.setDetails(parseCodeableConcept(getJObject(json, "details")));
if (json.has("diagnostics"))
res.setDiagnosticsElement(parseString(json.get("diagnostics").getAsString()));
if (json.has("_diagnostics"))
parseElementProperties(getJObject(json, "_diagnostics"), res.getDiagnosticsElement());
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLocation().add(new StringType());
} else {;
res.getLocation().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_location")) {
JsonArray array = getJArray(json, "_location");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLocation().size())
res.getLocation().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLocation().get(i));
}
};
if (json.has("expression")) {
JsonArray array = getJArray(json, "expression");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getExpression().add(new StringType());
} else {;
res.getExpression().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_expression")) {
JsonArray array = getJArray(json, "_expression");
for (int i = 0; i < array.size(); i++) {
if (i == res.getExpression().size())
res.getExpression().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getExpression().get(i));
}
};
}
protected Organization parseOrganization(JsonObject json) throws IOException, FHIRFormatError {
Organization res = new Organization();
parseOrganizationProperties(json, res);
return res;
}
protected void parseOrganizationProperties(JsonObject json, Organization res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("alias")) {
JsonArray array = getJArray(json, "alias");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAlias().add(new StringType());
} else {;
res.getAlias().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_alias")) {
JsonArray array = getJArray(json, "_alias");
for (int i = 0; i < array.size(); i++) {
if (i == res.getAlias().size())
res.getAlias().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getAlias().get(i));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseExtendedContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("qualification")) {
JsonArray array = getJArray(json, "qualification");
for (int i = 0; i < array.size(); i++) {
res.getQualification().add(parseOrganizationQualificationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Organization.OrganizationQualificationComponent parseOrganizationQualificationComponent(JsonObject json) throws IOException, FHIRFormatError {
Organization.OrganizationQualificationComponent res = new Organization.OrganizationQualificationComponent();
parseOrganizationQualificationComponentProperties(json, res);
return res;
}
protected void parseOrganizationQualificationComponentProperties(JsonObject json, Organization.OrganizationQualificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("issuer"))
res.setIssuer(parseReference(getJObject(json, "issuer")));
}
protected OrganizationAffiliation parseOrganizationAffiliation(JsonObject json) throws IOException, FHIRFormatError {
OrganizationAffiliation res = new OrganizationAffiliation();
parseOrganizationAffiliationProperties(json, res);
return res;
}
protected void parseOrganizationAffiliationProperties(JsonObject json, OrganizationAffiliation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
if (json.has("participatingOrganization"))
res.setParticipatingOrganization(parseReference(getJObject(json, "participatingOrganization")));
if (json.has("network")) {
JsonArray array = getJArray(json, "network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialty")) {
JsonArray array = getJArray(json, "specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("healthcareService")) {
JsonArray array = getJArray(json, "healthcareService");
for (int i = 0; i < array.size(); i++) {
res.getHealthcareService().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseExtendedContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected PackagedProductDefinition parsePackagedProductDefinition(JsonObject json) throws IOException, FHIRFormatError {
PackagedProductDefinition res = new PackagedProductDefinition();
parsePackagedProductDefinitionProperties(json, res);
return res;
}
protected void parsePackagedProductDefinitionProperties(JsonObject json, PackagedProductDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("packageFor")) {
JsonArray array = getJArray(json, "packageFor");
for (int i = 0; i < array.size(); i++) {
res.getPackageFor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("statusDate"))
res.setStatusDateElement(parseDateTime(json.get("statusDate").getAsString()));
if (json.has("_statusDate"))
parseElementProperties(getJObject(json, "_statusDate"), res.getStatusDateElement());
if (json.has("containedItemQuantity")) {
JsonArray array = getJArray(json, "containedItemQuantity");
for (int i = 0; i < array.size(); i++) {
res.getContainedItemQuantity().add(parseQuantity(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("legalStatusOfSupply")) {
JsonArray array = getJArray(json, "legalStatusOfSupply");
for (int i = 0; i < array.size(); i++) {
res.getLegalStatusOfSupply().add(parsePackagedProductDefinitionLegalStatusOfSupplyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("marketingStatus")) {
JsonArray array = getJArray(json, "marketingStatus");
for (int i = 0; i < array.size(); i++) {
res.getMarketingStatus().add(parseMarketingStatus(getJsonObjectFromArray(array, i)));
}
};
if (json.has("copackagedIndicator"))
res.setCopackagedIndicatorElement(parseBoolean(json.get("copackagedIndicator").getAsBoolean()));
if (json.has("_copackagedIndicator"))
parseElementProperties(getJObject(json, "_copackagedIndicator"), res.getCopackagedIndicatorElement());
if (json.has("manufacturer")) {
JsonArray array = getJArray(json, "manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("attachedDocument")) {
JsonArray array = getJArray(json, "attachedDocument");
for (int i = 0; i < array.size(); i++) {
res.getAttachedDocument().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packaging"))
res.setPackaging(parsePackagedProductDefinitionPackagingComponent(getJObject(json, "packaging")));
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parsePackagedProductDefinitionPackagingPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent parsePackagedProductDefinitionLegalStatusOfSupplyComponent(JsonObject json) throws IOException, FHIRFormatError {
PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent res = new PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent();
parsePackagedProductDefinitionLegalStatusOfSupplyComponentProperties(json, res);
return res;
}
protected void parsePackagedProductDefinitionLegalStatusOfSupplyComponentProperties(JsonObject json, PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("jurisdiction"))
res.setJurisdiction(parseCodeableConcept(getJObject(json, "jurisdiction")));
}
protected PackagedProductDefinition.PackagedProductDefinitionPackagingComponent parsePackagedProductDefinitionPackagingComponent(JsonObject json) throws IOException, FHIRFormatError {
PackagedProductDefinition.PackagedProductDefinitionPackagingComponent res = new PackagedProductDefinition.PackagedProductDefinitionPackagingComponent();
parsePackagedProductDefinitionPackagingComponentProperties(json, res);
return res;
}
protected void parsePackagedProductDefinitionPackagingComponentProperties(JsonObject json, PackagedProductDefinition.PackagedProductDefinitionPackagingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("componentPart"))
res.setComponentPartElement(parseBoolean(json.get("componentPart").getAsBoolean()));
if (json.has("_componentPart"))
parseElementProperties(getJObject(json, "_componentPart"), res.getComponentPartElement());
if (json.has("quantity"))
res.setQuantityElement(parseInteger(json.get("quantity").getAsLong()));
if (json.has("_quantity"))
parseElementProperties(getJObject(json, "_quantity"), res.getQuantityElement());
if (json.has("material")) {
JsonArray array = getJArray(json, "material");
for (int i = 0; i < array.size(); i++) {
res.getMaterial().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("alternateMaterial")) {
JsonArray array = getJArray(json, "alternateMaterial");
for (int i = 0; i < array.size(); i++) {
res.getAlternateMaterial().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("shelfLifeStorage")) {
JsonArray array = getJArray(json, "shelfLifeStorage");
for (int i = 0; i < array.size(); i++) {
res.getShelfLifeStorage().add(parseProductShelfLife(getJsonObjectFromArray(array, i)));
}
};
if (json.has("manufacturer")) {
JsonArray array = getJArray(json, "manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parsePackagedProductDefinitionPackagingPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("containedItem")) {
JsonArray array = getJArray(json, "containedItem");
for (int i = 0; i < array.size(); i++) {
res.getContainedItem().add(parsePackagedProductDefinitionPackagingContainedItemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("packaging")) {
JsonArray array = getJArray(json, "packaging");
for (int i = 0; i < array.size(); i++) {
res.getPackaging().add(parsePackagedProductDefinitionPackagingComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent parsePackagedProductDefinitionPackagingPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent res = new PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent();
parsePackagedProductDefinitionPackagingPropertyComponentProperties(json, res);
return res;
}
protected void parsePackagedProductDefinitionPackagingPropertyComponentProperties(JsonObject json, PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent parsePackagedProductDefinitionPackagingContainedItemComponent(JsonObject json) throws IOException, FHIRFormatError {
PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent res = new PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent();
parsePackagedProductDefinitionPackagingContainedItemComponentProperties(json, res);
return res;
}
protected void parsePackagedProductDefinitionPackagingContainedItemComponentProperties(JsonObject json, PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
}
protected Parameters parseParameters(JsonObject json) throws IOException, FHIRFormatError {
Parameters res = new Parameters();
parseParametersProperties(json, res);
return res;
}
protected void parseParametersProperties(JsonObject json, Parameters res) throws IOException, FHIRFormatError {
parseResourceProperties(json, res);
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseParametersParameterComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Parameters.ParametersParameterComponent parseParametersParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent();
parseParametersParameterComponentProperties(json, res);
return res;
}
protected void parseParametersParameterComponentProperties(JsonObject json, Parameters.ParametersParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("resource"))
res.setResource(parseResource(getJObject(json, "resource")));
if (json.has("part")) {
JsonArray array = getJArray(json, "part");
for (int i = 0; i < array.size(); i++) {
res.getPart().add(parseParametersParameterComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Patient parsePatient(JsonObject json) throws IOException, FHIRFormatError {
Patient res = new Patient();
parsePatientProperties(json, res);
return res;
}
protected void parsePatientProperties(JsonObject json, Patient res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(getJsonObjectFromArray(array, i)));
}
};
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("gender"))
res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory()));
if (json.has("_gender"))
parseElementProperties(getJObject(json, "_gender"), res.getGenderElement());
if (json.has("birthDate"))
res.setBirthDateElement(parseDate(json.get("birthDate").getAsString()));
if (json.has("_birthDate"))
parseElementProperties(getJObject(json, "_birthDate"), res.getBirthDateElement());
DataType deceased = parseType("deceased", json);
if (deceased != null)
res.setDeceased(deceased);
if (json.has("address")) {
JsonArray array = getJArray(json, "address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(getJsonObjectFromArray(array, i)));
}
};
if (json.has("maritalStatus"))
res.setMaritalStatus(parseCodeableConcept(getJObject(json, "maritalStatus")));
DataType multipleBirth = parseType("multipleBirth", json);
if (multipleBirth != null)
res.setMultipleBirth(multipleBirth);
if (json.has("photo")) {
JsonArray array = getJArray(json, "photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parsePatientContactComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communication")) {
JsonArray array = getJArray(json, "communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parsePatientCommunicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("generalPractitioner")) {
JsonArray array = getJArray(json, "generalPractitioner");
for (int i = 0; i < array.size(); i++) {
res.getGeneralPractitioner().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parsePatientLinkComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Patient.ContactComponent parsePatientContactComponent(JsonObject json) throws IOException, FHIRFormatError {
Patient.ContactComponent res = new Patient.ContactComponent();
parsePatientContactComponentProperties(json, res);
return res;
}
protected void parsePatientContactComponentProperties(JsonObject json, Patient.ContactComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relationship")) {
JsonArray array = getJArray(json, "relationship");
for (int i = 0; i < array.size(); i++) {
res.getRelationship().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setName(parseHumanName(getJObject(json, "name")));
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("address"))
res.setAddress(parseAddress(getJObject(json, "address")));
if (json.has("gender"))
res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory()));
if (json.has("_gender"))
parseElementProperties(getJObject(json, "_gender"), res.getGenderElement());
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Patient.PatientCommunicationComponent parsePatientCommunicationComponent(JsonObject json) throws IOException, FHIRFormatError {
Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent();
parsePatientCommunicationComponentProperties(json, res);
return res;
}
protected void parsePatientCommunicationComponentProperties(JsonObject json, Patient.PatientCommunicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
if (json.has("preferred"))
res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean()));
if (json.has("_preferred"))
parseElementProperties(getJObject(json, "_preferred"), res.getPreferredElement());
}
protected Patient.PatientLinkComponent parsePatientLinkComponent(JsonObject json) throws IOException, FHIRFormatError {
Patient.PatientLinkComponent res = new Patient.PatientLinkComponent();
parsePatientLinkComponentProperties(json, res);
return res;
}
protected void parsePatientLinkComponentProperties(JsonObject json, Patient.PatientLinkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("other"))
res.setOther(parseReference(getJObject(json, "other")));
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Patient.LinkType.NULL, new Patient.LinkTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected PaymentNotice parsePaymentNotice(JsonObject json) throws IOException, FHIRFormatError {
PaymentNotice res = new PaymentNotice();
parsePaymentNoticeProperties(json, res);
return res;
}
protected void parsePaymentNoticeProperties(JsonObject json, PaymentNotice res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("response"))
res.setResponse(parseReference(getJObject(json, "response")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("reporter"))
res.setReporter(parseReference(getJObject(json, "reporter")));
if (json.has("payment"))
res.setPayment(parseReference(getJObject(json, "payment")));
if (json.has("paymentDate"))
res.setPaymentDateElement(parseDate(json.get("paymentDate").getAsString()));
if (json.has("_paymentDate"))
parseElementProperties(getJObject(json, "_paymentDate"), res.getPaymentDateElement());
if (json.has("payee"))
res.setPayee(parseReference(getJObject(json, "payee")));
if (json.has("recipient"))
res.setRecipient(parseReference(getJObject(json, "recipient")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
if (json.has("paymentStatus"))
res.setPaymentStatus(parseCodeableConcept(getJObject(json, "paymentStatus")));
}
protected PaymentReconciliation parsePaymentReconciliation(JsonObject json) throws IOException, FHIRFormatError {
PaymentReconciliation res = new PaymentReconciliation();
parsePaymentReconciliationProperties(json, res);
return res;
}
protected void parsePaymentReconciliationProperties(JsonObject json, PaymentReconciliation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("kind"))
res.setKind(parseCodeableConcept(getJObject(json, "kind")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("enterer"))
res.setEnterer(parseReference(getJObject(json, "enterer")));
if (json.has("issuerType"))
res.setIssuerType(parseCodeableConcept(getJObject(json, "issuerType")));
if (json.has("paymentIssuer"))
res.setPaymentIssuer(parseReference(getJObject(json, "paymentIssuer")));
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("requestor"))
res.setRequestor(parseReference(getJObject(json, "requestor")));
if (json.has("outcome"))
res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), PaymentReconciliation.PaymentOutcome.NULL, new PaymentReconciliation.PaymentOutcomeEnumFactory()));
if (json.has("_outcome"))
parseElementProperties(getJObject(json, "_outcome"), res.getOutcomeElement());
if (json.has("disposition"))
res.setDispositionElement(parseString(json.get("disposition").getAsString()));
if (json.has("_disposition"))
parseElementProperties(getJObject(json, "_disposition"), res.getDispositionElement());
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("cardBrand"))
res.setCardBrandElement(parseString(json.get("cardBrand").getAsString()));
if (json.has("_cardBrand"))
parseElementProperties(getJObject(json, "_cardBrand"), res.getCardBrandElement());
if (json.has("accountNumber"))
res.setAccountNumberElement(parseString(json.get("accountNumber").getAsString()));
if (json.has("_accountNumber"))
parseElementProperties(getJObject(json, "_accountNumber"), res.getAccountNumberElement());
if (json.has("expirationDate"))
res.setExpirationDateElement(parseDate(json.get("expirationDate").getAsString()));
if (json.has("_expirationDate"))
parseElementProperties(getJObject(json, "_expirationDate"), res.getExpirationDateElement());
if (json.has("processor"))
res.setProcessorElement(parseString(json.get("processor").getAsString()));
if (json.has("_processor"))
parseElementProperties(getJObject(json, "_processor"), res.getProcessorElement());
if (json.has("referenceNumber"))
res.setReferenceNumberElement(parseString(json.get("referenceNumber").getAsString()));
if (json.has("_referenceNumber"))
parseElementProperties(getJObject(json, "_referenceNumber"), res.getReferenceNumberElement());
if (json.has("authorization"))
res.setAuthorizationElement(parseString(json.get("authorization").getAsString()));
if (json.has("_authorization"))
parseElementProperties(getJObject(json, "_authorization"), res.getAuthorizationElement());
if (json.has("tenderedAmount"))
res.setTenderedAmount(parseMoney(getJObject(json, "tenderedAmount")));
if (json.has("returnedAmount"))
res.setReturnedAmount(parseMoney(getJObject(json, "returnedAmount")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
if (json.has("paymentIdentifier"))
res.setPaymentIdentifier(parseIdentifier(getJObject(json, "paymentIdentifier")));
if (json.has("allocation")) {
JsonArray array = getJArray(json, "allocation");
for (int i = 0; i < array.size(); i++) {
res.getAllocation().add(parsePaymentReconciliationAllocationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("formCode"))
res.setFormCode(parseCodeableConcept(getJObject(json, "formCode")));
if (json.has("processNote")) {
JsonArray array = getJArray(json, "processNote");
for (int i = 0; i < array.size(); i++) {
res.getProcessNote().add(parsePaymentReconciliationNotesComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected PaymentReconciliation.PaymentReconciliationAllocationComponent parsePaymentReconciliationAllocationComponent(JsonObject json) throws IOException, FHIRFormatError {
PaymentReconciliation.PaymentReconciliationAllocationComponent res = new PaymentReconciliation.PaymentReconciliationAllocationComponent();
parsePaymentReconciliationAllocationComponentProperties(json, res);
return res;
}
protected void parsePaymentReconciliationAllocationComponentProperties(JsonObject json, PaymentReconciliation.PaymentReconciliationAllocationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("predecessor"))
res.setPredecessor(parseIdentifier(getJObject(json, "predecessor")));
if (json.has("target"))
res.setTarget(parseReference(getJObject(json, "target")));
DataType targetItem = parseType("targetItem", json);
if (targetItem != null)
res.setTargetItem(targetItem);
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("account"))
res.setAccount(parseReference(getJObject(json, "account")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("submitter"))
res.setSubmitter(parseReference(getJObject(json, "submitter")));
if (json.has("response"))
res.setResponse(parseReference(getJObject(json, "response")));
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("responsible"))
res.setResponsible(parseReference(getJObject(json, "responsible")));
if (json.has("payee"))
res.setPayee(parseReference(getJObject(json, "payee")));
if (json.has("amount"))
res.setAmount(parseMoney(getJObject(json, "amount")));
}
protected PaymentReconciliation.NotesComponent parsePaymentReconciliationNotesComponent(JsonObject json) throws IOException, FHIRFormatError {
PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent();
parsePaymentReconciliationNotesComponentProperties(json, res);
return res;
}
protected void parsePaymentReconciliationNotesComponentProperties(JsonObject json, PaymentReconciliation.NotesComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), PaymentReconciliation.NoteType.NULL, new PaymentReconciliation.NoteTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Permission parsePermission(JsonObject json) throws IOException, FHIRFormatError {
Permission res = new Permission();
parsePermissionProperties(json, res);
return res;
}
protected void parsePermissionProperties(JsonObject json, Permission res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Permission.PermissionStatus.NULL, new Permission.PermissionStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("asserter"))
res.setAsserter(parseReference(getJObject(json, "asserter")));
if (json.has("date")) {
JsonArray array = getJArray(json, "date");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDate().add(new DateTimeType());
} else {;
res.getDate().add(parseDateTime(array.get(i).getAsString()));
}
}
};
if (json.has("_date")) {
JsonArray array = getJArray(json, "_date");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDate().size())
res.getDate().add(parseDateTime(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDate().get(i));
}
};
if (json.has("validity"))
res.setValidity(parsePeriod(getJObject(json, "validity")));
if (json.has("justification"))
res.setJustification(parsePermissionJustificationComponent(getJObject(json, "justification")));
if (json.has("combining"))
res.setCombiningElement(parseEnumeration(json.get("combining").getAsString(), Permission.PermissionRuleCombining.NULL, new Permission.PermissionRuleCombiningEnumFactory()));
if (json.has("_combining"))
parseElementProperties(getJObject(json, "_combining"), res.getCombiningElement());
if (json.has("rule")) {
JsonArray array = getJArray(json, "rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parsePermissionRuleComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Permission.PermissionJustificationComponent parsePermissionJustificationComponent(JsonObject json) throws IOException, FHIRFormatError {
Permission.PermissionJustificationComponent res = new Permission.PermissionJustificationComponent();
parsePermissionJustificationComponentProperties(json, res);
return res;
}
protected void parsePermissionJustificationComponentProperties(JsonObject json, Permission.PermissionJustificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("basis")) {
JsonArray array = getJArray(json, "basis");
for (int i = 0; i < array.size(); i++) {
res.getBasis().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("evidence")) {
JsonArray array = getJArray(json, "evidence");
for (int i = 0; i < array.size(); i++) {
res.getEvidence().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Permission.RuleComponent parsePermissionRuleComponent(JsonObject json) throws IOException, FHIRFormatError {
Permission.RuleComponent res = new Permission.RuleComponent();
parsePermissionRuleComponentProperties(json, res);
return res;
}
protected void parsePermissionRuleComponentProperties(JsonObject json, Permission.RuleComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ConsentProvisionType.NULL, new Enumerations.ConsentProvisionTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("data")) {
JsonArray array = getJArray(json, "data");
for (int i = 0; i < array.size(); i++) {
res.getData().add(parsePermissionRuleDataComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("activity")) {
JsonArray array = getJArray(json, "activity");
for (int i = 0; i < array.size(); i++) {
res.getActivity().add(parsePermissionRuleActivityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("limit")) {
JsonArray array = getJArray(json, "limit");
for (int i = 0; i < array.size(); i++) {
res.getLimit().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Permission.RuleDataComponent parsePermissionRuleDataComponent(JsonObject json) throws IOException, FHIRFormatError {
Permission.RuleDataComponent res = new Permission.RuleDataComponent();
parsePermissionRuleDataComponentProperties(json, res);
return res;
}
protected void parsePermissionRuleDataComponentProperties(JsonObject json, Permission.RuleDataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("resource")) {
JsonArray array = getJArray(json, "resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parsePermissionRuleDataResourceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("security")) {
JsonArray array = getJArray(json, "security");
for (int i = 0; i < array.size(); i++) {
res.getSecurity().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period")) {
JsonArray array = getJArray(json, "period");
for (int i = 0; i < array.size(); i++) {
res.getPeriod().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected Permission.RuleDataResourceComponent parsePermissionRuleDataResourceComponent(JsonObject json) throws IOException, FHIRFormatError {
Permission.RuleDataResourceComponent res = new Permission.RuleDataResourceComponent();
parsePermissionRuleDataResourceComponentProperties(json, res);
return res;
}
protected void parsePermissionRuleDataResourceComponentProperties(JsonObject json, Permission.RuleDataResourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("meaning"))
res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Enumerations.ConsentDataMeaning.NULL, new Enumerations.ConsentDataMeaningEnumFactory()));
if (json.has("_meaning"))
parseElementProperties(getJObject(json, "_meaning"), res.getMeaningElement());
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected Permission.RuleActivityComponent parsePermissionRuleActivityComponent(JsonObject json) throws IOException, FHIRFormatError {
Permission.RuleActivityComponent res = new Permission.RuleActivityComponent();
parsePermissionRuleActivityComponentProperties(json, res);
return res;
}
protected void parsePermissionRuleActivityComponentProperties(JsonObject json, Permission.RuleActivityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("actor")) {
JsonArray array = getJArray(json, "actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose")) {
JsonArray array = getJArray(json, "purpose");
for (int i = 0; i < array.size(); i++) {
res.getPurpose().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected Person parsePerson(JsonObject json) throws IOException, FHIRFormatError {
Person res = new Person();
parsePersonProperties(json, res);
return res;
}
protected void parsePersonProperties(JsonObject json, Person res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(getJsonObjectFromArray(array, i)));
}
};
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("gender"))
res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory()));
if (json.has("_gender"))
parseElementProperties(getJObject(json, "_gender"), res.getGenderElement());
if (json.has("birthDate"))
res.setBirthDateElement(parseDate(json.get("birthDate").getAsString()));
if (json.has("_birthDate"))
parseElementProperties(getJObject(json, "_birthDate"), res.getBirthDateElement());
DataType deceased = parseType("deceased", json);
if (deceased != null)
res.setDeceased(deceased);
if (json.has("address")) {
JsonArray array = getJArray(json, "address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(getJsonObjectFromArray(array, i)));
}
};
if (json.has("maritalStatus"))
res.setMaritalStatus(parseCodeableConcept(getJObject(json, "maritalStatus")));
if (json.has("photo")) {
JsonArray array = getJArray(json, "photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communication")) {
JsonArray array = getJArray(json, "communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parsePersonCommunicationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parsePersonLinkComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Person.PersonCommunicationComponent parsePersonCommunicationComponent(JsonObject json) throws IOException, FHIRFormatError {
Person.PersonCommunicationComponent res = new Person.PersonCommunicationComponent();
parsePersonCommunicationComponentProperties(json, res);
return res;
}
protected void parsePersonCommunicationComponentProperties(JsonObject json, Person.PersonCommunicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
if (json.has("preferred"))
res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean()));
if (json.has("_preferred"))
parseElementProperties(getJObject(json, "_preferred"), res.getPreferredElement());
}
protected Person.PersonLinkComponent parsePersonLinkComponent(JsonObject json) throws IOException, FHIRFormatError {
Person.PersonLinkComponent res = new Person.PersonLinkComponent();
parsePersonLinkComponentProperties(json, res);
return res;
}
protected void parsePersonLinkComponentProperties(JsonObject json, Person.PersonLinkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("target"))
res.setTarget(parseReference(getJObject(json, "target")));
if (json.has("assurance"))
res.setAssuranceElement(parseEnumeration(json.get("assurance").getAsString(), Person.IdentityAssuranceLevel.NULL, new Person.IdentityAssuranceLevelEnumFactory()));
if (json.has("_assurance"))
parseElementProperties(getJObject(json, "_assurance"), res.getAssuranceElement());
}
protected PlanDefinition parsePlanDefinition(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition res = new PlanDefinition();
parsePlanDefinitionProperties(json, res);
return res;
}
protected void parsePlanDefinitionProperties(JsonObject json, PlanDefinition res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("subtitle"))
res.setSubtitleElement(parseString(json.get("subtitle").getAsString()));
if (json.has("_subtitle"))
parseElementProperties(getJObject(json, "_subtitle"), res.getSubtitleElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("usage"))
res.setUsageElement(parseMarkdown(json.get("usage").getAsString()));
if (json.has("_usage"))
parseElementProperties(getJObject(json, "_usage"), res.getUsageElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("library")) {
JsonArray array = getJArray(json, "library");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLibrary().add(new CanonicalType());
} else {;
res.getLibrary().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_library")) {
JsonArray array = getJArray(json, "_library");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLibrary().size())
res.getLibrary().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLibrary().get(i));
}
};
if (json.has("goal")) {
JsonArray array = getJArray(json, "goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parsePlanDefinitionGoalComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("actor")) {
JsonArray array = getJArray(json, "actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parsePlanDefinitionActorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parsePlanDefinitionActionComponent(getJsonObjectFromArray(array, i)));
}
};
DataType asNeeded = parseType("asNeeded", json);
if (asNeeded != null)
res.setAsNeeded(asNeeded);
}
protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionGoalComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent();
parsePlanDefinitionGoalComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionGoalComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionGoalComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("description"))
res.setDescription(parseCodeableConcept(getJObject(json, "description")));
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("start"))
res.setStart(parseCodeableConcept(getJObject(json, "start")));
if (json.has("addresses")) {
JsonArray array = getJArray(json, "addresses");
for (int i = 0; i < array.size(); i++) {
res.getAddresses().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("documentation")) {
JsonArray array = getJArray(json, "documentation");
for (int i = 0; i < array.size(); i++) {
res.getDocumentation().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parsePlanDefinitionGoalTargetComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionGoalTargetComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent();
parsePlanDefinitionGoalTargetComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionGoalTargetComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionGoalTargetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("measure"))
res.setMeasure(parseCodeableConcept(getJObject(json, "measure")));
DataType detail = parseType("detail", json);
if (detail != null)
res.setDetail(detail);
if (json.has("due"))
res.setDue(parseDuration(getJObject(json, "due")));
}
protected PlanDefinition.PlanDefinitionActorComponent parsePlanDefinitionActorComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActorComponent res = new PlanDefinition.PlanDefinitionActorComponent();
parsePlanDefinitionActorComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActorComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("option")) {
JsonArray array = getJArray(json, "option");
for (int i = 0; i < array.size(); i++) {
res.getOption().add(parsePlanDefinitionActorOptionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected PlanDefinition.PlanDefinitionActorOptionComponent parsePlanDefinitionActorOptionComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActorOptionComponent res = new PlanDefinition.PlanDefinitionActorOptionComponent();
parsePlanDefinitionActorOptionComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActorOptionComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActorOptionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ActionParticipantType.NULL, new Enumerations.ActionParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("typeCanonical"))
res.setTypeCanonicalElement(parseCanonical(json.get("typeCanonical").getAsString()));
if (json.has("_typeCanonical"))
parseElementProperties(getJObject(json, "_typeCanonical"), res.getTypeCanonicalElement());
if (json.has("typeReference"))
res.setTypeReference(parseReference(getJObject(json, "typeReference")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionActionComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent();
parsePlanDefinitionActionComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("prefix"))
res.setPrefixElement(parseString(json.get("prefix").getAsString()));
if (json.has("_prefix"))
parseElementProperties(getJObject(json, "_prefix"), res.getPrefixElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("textEquivalent"))
res.setTextEquivalentElement(parseMarkdown(json.get("textEquivalent").getAsString()));
if (json.has("_textEquivalent"))
parseElementProperties(getJObject(json, "_textEquivalent"), res.getTextEquivalentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("documentation")) {
JsonArray array = getJArray(json, "documentation");
for (int i = 0; i < array.size(); i++) {
res.getDocumentation().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("goalId")) {
JsonArray array = getJArray(json, "goalId");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getGoalId().add(new IdType());
} else {;
res.getGoalId().add(parseId(array.get(i).getAsString()));
}
}
};
if (json.has("_goalId")) {
JsonArray array = getJArray(json, "_goalId");
for (int i = 0; i < array.size(); i++) {
if (i == res.getGoalId().size())
res.getGoalId().add(parseId(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getGoalId().get(i));
}
};
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("trigger")) {
JsonArray array = getJArray(json, "trigger");
for (int i = 0; i < array.size(); i++) {
res.getTrigger().add(parseTriggerDefinition(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parsePlanDefinitionActionConditionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("input")) {
JsonArray array = getJArray(json, "input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parsePlanDefinitionActionInputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("output")) {
JsonArray array = getJArray(json, "output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parsePlanDefinitionActionOutputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedAction")) {
JsonArray array = getJArray(json, "relatedAction");
for (int i = 0; i < array.size(); i++) {
res.getRelatedAction().add(parsePlanDefinitionActionRelatedActionComponent(getJsonObjectFromArray(array, i)));
}
};
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("location"))
res.setLocation(parseCodeableReference(getJObject(json, "location")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parsePlanDefinitionActionParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("groupingBehavior"))
res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(), Enumerations.ActionGroupingBehavior.NULL, new Enumerations.ActionGroupingBehaviorEnumFactory()));
if (json.has("_groupingBehavior"))
parseElementProperties(getJObject(json, "_groupingBehavior"), res.getGroupingBehaviorElement());
if (json.has("selectionBehavior"))
res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(), Enumerations.ActionSelectionBehavior.NULL, new Enumerations.ActionSelectionBehaviorEnumFactory()));
if (json.has("_selectionBehavior"))
parseElementProperties(getJObject(json, "_selectionBehavior"), res.getSelectionBehaviorElement());
if (json.has("requiredBehavior"))
res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(), Enumerations.ActionRequiredBehavior.NULL, new Enumerations.ActionRequiredBehaviorEnumFactory()));
if (json.has("_requiredBehavior"))
parseElementProperties(getJObject(json, "_requiredBehavior"), res.getRequiredBehaviorElement());
if (json.has("precheckBehavior"))
res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(), Enumerations.ActionPrecheckBehavior.NULL, new Enumerations.ActionPrecheckBehaviorEnumFactory()));
if (json.has("_precheckBehavior"))
parseElementProperties(getJObject(json, "_precheckBehavior"), res.getPrecheckBehaviorElement());
if (json.has("cardinalityBehavior"))
res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(), Enumerations.ActionCardinalityBehavior.NULL, new Enumerations.ActionCardinalityBehaviorEnumFactory()));
if (json.has("_cardinalityBehavior"))
parseElementProperties(getJObject(json, "_cardinalityBehavior"), res.getCardinalityBehaviorElement());
DataType definition = parseType("definition", json);
if (definition != null)
res.setDefinition(definition);
if (json.has("transform"))
res.setTransformElement(parseCanonical(json.get("transform").getAsString()));
if (json.has("_transform"))
parseElementProperties(getJObject(json, "_transform"), res.getTransformElement());
if (json.has("dynamicValue")) {
JsonArray array = getJArray(json, "dynamicValue");
for (int i = 0; i < array.size(); i++) {
res.getDynamicValue().add(parsePlanDefinitionActionDynamicValueComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parsePlanDefinitionActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionActionConditionComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent();
parsePlanDefinitionActionConditionComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionConditionComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionConditionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), Enumerations.ActionConditionKind.NULL, new Enumerations.ActionConditionKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected PlanDefinition.PlanDefinitionActionInputComponent parsePlanDefinitionActionInputComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionInputComponent res = new PlanDefinition.PlanDefinitionActionInputComponent();
parsePlanDefinitionActionInputComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionInputComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionInputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("requirement"))
res.setRequirement(parseDataRequirement(getJObject(json, "requirement")));
if (json.has("relatedData"))
res.setRelatedDataElement(parseId(json.get("relatedData").getAsString()));
if (json.has("_relatedData"))
parseElementProperties(getJObject(json, "_relatedData"), res.getRelatedDataElement());
}
protected PlanDefinition.PlanDefinitionActionOutputComponent parsePlanDefinitionActionOutputComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionOutputComponent res = new PlanDefinition.PlanDefinitionActionOutputComponent();
parsePlanDefinitionActionOutputComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionOutputComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionOutputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("requirement"))
res.setRequirement(parseDataRequirement(getJObject(json, "requirement")));
if (json.has("relatedData"))
res.setRelatedDataElement(parseString(json.get("relatedData").getAsString()));
if (json.has("_relatedData"))
parseElementProperties(getJObject(json, "_relatedData"), res.getRelatedDataElement());
}
protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionActionRelatedActionComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent();
parsePlanDefinitionActionRelatedActionComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionRelatedActionComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionRelatedActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("targetId"))
res.setTargetIdElement(parseId(json.get("targetId").getAsString()));
if (json.has("_targetId"))
parseElementProperties(getJObject(json, "_targetId"), res.getTargetIdElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), Enumerations.ActionRelationshipType.NULL, new Enumerations.ActionRelationshipTypeEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(getJObject(json, "_relationship"), res.getRelationshipElement());
if (json.has("endRelationship"))
res.setEndRelationshipElement(parseEnumeration(json.get("endRelationship").getAsString(), Enumerations.ActionRelationshipType.NULL, new Enumerations.ActionRelationshipTypeEnumFactory()));
if (json.has("_endRelationship"))
parseElementProperties(getJObject(json, "_endRelationship"), res.getEndRelationshipElement());
DataType offset = parseType("offset", json);
if (offset != null)
res.setOffset(offset);
}
protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionActionParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent();
parsePlanDefinitionActionParticipantComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionParticipantComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("actorId"))
res.setActorIdElement(parseString(json.get("actorId").getAsString()));
if (json.has("_actorId"))
parseElementProperties(getJObject(json, "_actorId"), res.getActorIdElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ActionParticipantType.NULL, new Enumerations.ActionParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("typeCanonical"))
res.setTypeCanonicalElement(parseCanonical(json.get("typeCanonical").getAsString()));
if (json.has("_typeCanonical"))
parseElementProperties(getJObject(json, "_typeCanonical"), res.getTypeCanonicalElement());
if (json.has("typeReference"))
res.setTypeReference(parseReference(getJObject(json, "typeReference")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
}
protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionActionDynamicValueComponent(JsonObject json) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent();
parsePlanDefinitionActionDynamicValueComponentProperties(json, res);
return res;
}
protected void parsePlanDefinitionActionDynamicValueComponentProperties(JsonObject json, PlanDefinition.PlanDefinitionActionDynamicValueComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected Practitioner parsePractitioner(JsonObject json) throws IOException, FHIRFormatError {
Practitioner res = new Practitioner();
parsePractitionerProperties(json, res);
return res;
}
protected void parsePractitionerProperties(JsonObject json, Practitioner res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(getJsonObjectFromArray(array, i)));
}
};
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("gender"))
res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory()));
if (json.has("_gender"))
parseElementProperties(getJObject(json, "_gender"), res.getGenderElement());
if (json.has("birthDate"))
res.setBirthDateElement(parseDate(json.get("birthDate").getAsString()));
if (json.has("_birthDate"))
parseElementProperties(getJObject(json, "_birthDate"), res.getBirthDateElement());
DataType deceased = parseType("deceased", json);
if (deceased != null)
res.setDeceased(deceased);
if (json.has("address")) {
JsonArray array = getJArray(json, "address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(getJsonObjectFromArray(array, i)));
}
};
if (json.has("photo")) {
JsonArray array = getJArray(json, "photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("qualification")) {
JsonArray array = getJArray(json, "qualification");
for (int i = 0; i < array.size(); i++) {
res.getQualification().add(parsePractitionerQualificationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communication")) {
JsonArray array = getJArray(json, "communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parsePractitionerCommunicationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Practitioner.PractitionerQualificationComponent parsePractitionerQualificationComponent(JsonObject json) throws IOException, FHIRFormatError {
Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent();
parsePractitionerQualificationComponentProperties(json, res);
return res;
}
protected void parsePractitionerQualificationComponentProperties(JsonObject json, Practitioner.PractitionerQualificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("issuer"))
res.setIssuer(parseReference(getJObject(json, "issuer")));
}
protected Practitioner.PractitionerCommunicationComponent parsePractitionerCommunicationComponent(JsonObject json) throws IOException, FHIRFormatError {
Practitioner.PractitionerCommunicationComponent res = new Practitioner.PractitionerCommunicationComponent();
parsePractitionerCommunicationComponentProperties(json, res);
return res;
}
protected void parsePractitionerCommunicationComponentProperties(JsonObject json, Practitioner.PractitionerCommunicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
if (json.has("preferred"))
res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean()));
if (json.has("_preferred"))
parseElementProperties(getJObject(json, "_preferred"), res.getPreferredElement());
}
protected PractitionerRole parsePractitionerRole(JsonObject json) throws IOException, FHIRFormatError {
PractitionerRole res = new PractitionerRole();
parsePractitionerRoleProperties(json, res);
return res;
}
protected void parsePractitionerRoleProperties(JsonObject json, PractitionerRole res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("practitioner"))
res.setPractitioner(parseReference(getJObject(json, "practitioner")));
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialty")) {
JsonArray array = getJArray(json, "specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("healthcareService")) {
JsonArray array = getJArray(json, "healthcareService");
for (int i = 0; i < array.size(); i++) {
res.getHealthcareService().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseExtendedContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("characteristic")) {
JsonArray array = getJArray(json, "characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communication")) {
JsonArray array = getJArray(json, "communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("availability")) {
JsonArray array = getJArray(json, "availability");
for (int i = 0; i < array.size(); i++) {
res.getAvailability().add(parseAvailability(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endpoint")) {
JsonArray array = getJArray(json, "endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Procedure parseProcedure(JsonObject json) throws IOException, FHIRFormatError {
Procedure res = new Procedure();
parseProcedureProperties(json, res);
return res;
}
protected void parseProcedureProperties(JsonObject json, Procedure res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.EventStatus.NULL, new Enumerations.EventStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("focus"))
res.setFocus(parseReference(getJObject(json, "focus")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("recorded"))
res.setRecordedElement(parseDateTime(json.get("recorded").getAsString()));
if (json.has("_recorded"))
parseElementProperties(getJObject(json, "_recorded"), res.getRecordedElement());
if (json.has("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
DataType reported = parseType("reported", json);
if (reported != null)
res.setReported(reported);
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseProcedurePerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
if (json.has("report")) {
JsonArray array = getJArray(json, "report");
for (int i = 0; i < array.size(); i++) {
res.getReport().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("complication")) {
JsonArray array = getJArray(json, "complication");
for (int i = 0; i < array.size(); i++) {
res.getComplication().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("followUp")) {
JsonArray array = getJArray(json, "followUp");
for (int i = 0; i < array.size(); i++) {
res.getFollowUp().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("focalDevice")) {
JsonArray array = getJArray(json, "focalDevice");
for (int i = 0; i < array.size(); i++) {
res.getFocalDevice().add(parseProcedureFocalDeviceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("used")) {
JsonArray array = getJArray(json, "used");
for (int i = 0; i < array.size(); i++) {
res.getUsed().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Procedure.ProcedurePerformerComponent parseProcedurePerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent();
parseProcedurePerformerComponentProperties(json, res);
return res;
}
protected void parseProcedurePerformerComponentProperties(JsonObject json, Procedure.ProcedurePerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Procedure.ProcedureFocalDeviceComponent parseProcedureFocalDeviceComponent(JsonObject json) throws IOException, FHIRFormatError {
Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent();
parseProcedureFocalDeviceComponentProperties(json, res);
return res;
}
protected void parseProcedureFocalDeviceComponentProperties(JsonObject json, Procedure.ProcedureFocalDeviceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action"))
res.setAction(parseCodeableConcept(getJObject(json, "action")));
if (json.has("manipulated"))
res.setManipulated(parseReference(getJObject(json, "manipulated")));
}
protected Provenance parseProvenance(JsonObject json) throws IOException, FHIRFormatError {
Provenance res = new Provenance();
parseProvenanceProperties(json, res);
return res;
}
protected void parseProvenanceProperties(JsonObject json, Provenance res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
DataType occurred = parseType("occurred", json);
if (occurred != null)
res.setOccurred(occurred);
if (json.has("recorded"))
res.setRecordedElement(parseInstant(json.get("recorded").getAsString()));
if (json.has("_recorded"))
parseElementProperties(getJObject(json, "_recorded"), res.getRecordedElement());
if (json.has("policy")) {
JsonArray array = getJArray(json, "policy");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPolicy().add(new UriType());
} else {;
res.getPolicy().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_policy")) {
JsonArray array = getJArray(json, "_policy");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPolicy().size())
res.getPolicy().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getPolicy().get(i));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("authorization")) {
JsonArray array = getJArray(json, "authorization");
for (int i = 0; i < array.size(); i++) {
res.getAuthorization().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("activity"))
res.setActivity(parseCodeableConcept(getJObject(json, "activity")));
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("agent")) {
JsonArray array = getJArray(json, "agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseProvenanceAgentComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("entity")) {
JsonArray array = getJArray(json, "entity");
for (int i = 0; i < array.size(); i++) {
res.getEntity().add(parseProvenanceEntityComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("signature")) {
JsonArray array = getJArray(json, "signature");
for (int i = 0; i < array.size(); i++) {
res.getSignature().add(parseSignature(getJsonObjectFromArray(array, i)));
}
};
}
protected Provenance.ProvenanceAgentComponent parseProvenanceAgentComponent(JsonObject json) throws IOException, FHIRFormatError {
Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent();
parseProvenanceAgentComponentProperties(json, res);
return res;
}
protected void parseProvenanceAgentComponentProperties(JsonObject json, Provenance.ProvenanceAgentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("role")) {
JsonArray array = getJArray(json, "role");
for (int i = 0; i < array.size(); i++) {
res.getRole().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
}
protected Provenance.ProvenanceEntityComponent parseProvenanceEntityComponent(JsonObject json) throws IOException, FHIRFormatError {
Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent();
parseProvenanceEntityComponentProperties(json, res);
return res;
}
protected void parseProvenanceEntityComponentProperties(JsonObject json, Provenance.ProvenanceEntityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRoleElement(parseEnumeration(json.get("role").getAsString(), Provenance.ProvenanceEntityRole.NULL, new Provenance.ProvenanceEntityRoleEnumFactory()));
if (json.has("_role"))
parseElementProperties(getJObject(json, "_role"), res.getRoleElement());
if (json.has("what"))
res.setWhat(parseReference(getJObject(json, "what")));
if (json.has("agent")) {
JsonArray array = getJArray(json, "agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseProvenanceAgentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Questionnaire parseQuestionnaire(JsonObject json) throws IOException, FHIRFormatError {
Questionnaire res = new Questionnaire();
parseQuestionnaireProperties(json, res);
return res;
}
protected void parseQuestionnaireProperties(JsonObject json, Questionnaire res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFrom().add(new CanonicalType());
} else {;
res.getDerivedFrom().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFrom")) {
JsonArray array = getJArray(json, "_derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFrom().size())
res.getDerivedFrom().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFrom().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("subjectType")) {
JsonArray array = getJArray(json, "subjectType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSubjectType().add(new CodeType());
} else {;
res.getSubjectType().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_subjectType")) {
JsonArray array = getJArray(json, "_subjectType");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSubjectType().size())
res.getSubjectType().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSubjectType().get(i));
}
};
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireItemComponent(JsonObject json) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent();
parseQuestionnaireItemComponentProperties(json, res);
return res;
}
protected void parseQuestionnaireItemComponentProperties(JsonObject json, Questionnaire.QuestionnaireItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("definition"))
res.setDefinitionElement(parseUri(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("prefix"))
res.setPrefixElement(parseString(json.get("prefix").getAsString()));
if (json.has("_prefix"))
parseElementProperties(getJObject(json, "_prefix"), res.getPrefixElement());
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Questionnaire.QuestionnaireItemType.NULL, new Questionnaire.QuestionnaireItemTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("enableWhen")) {
JsonArray array = getJArray(json, "enableWhen");
for (int i = 0; i < array.size(); i++) {
res.getEnableWhen().add(parseQuestionnaireItemEnableWhenComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("enableBehavior"))
res.setEnableBehaviorElement(parseEnumeration(json.get("enableBehavior").getAsString(), Questionnaire.EnableWhenBehavior.NULL, new Questionnaire.EnableWhenBehaviorEnumFactory()));
if (json.has("_enableBehavior"))
parseElementProperties(getJObject(json, "_enableBehavior"), res.getEnableBehaviorElement());
if (json.has("disabledDisplay"))
res.setDisabledDisplayElement(parseEnumeration(json.get("disabledDisplay").getAsString(), Questionnaire.QuestionnaireItemDisabledDisplay.NULL, new Questionnaire.QuestionnaireItemDisabledDisplayEnumFactory()));
if (json.has("_disabledDisplay"))
parseElementProperties(getJObject(json, "_disabledDisplay"), res.getDisabledDisplayElement());
if (json.has("required"))
res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean()));
if (json.has("_required"))
parseElementProperties(getJObject(json, "_required"), res.getRequiredElement());
if (json.has("repeats"))
res.setRepeatsElement(parseBoolean(json.get("repeats").getAsBoolean()));
if (json.has("_repeats"))
parseElementProperties(getJObject(json, "_repeats"), res.getRepeatsElement());
if (json.has("readOnly"))
res.setReadOnlyElement(parseBoolean(json.get("readOnly").getAsBoolean()));
if (json.has("_readOnly"))
parseElementProperties(getJObject(json, "_readOnly"), res.getReadOnlyElement());
if (json.has("maxLength"))
res.setMaxLengthElement(parseInteger(json.get("maxLength").getAsLong()));
if (json.has("_maxLength"))
parseElementProperties(getJObject(json, "_maxLength"), res.getMaxLengthElement());
if (json.has("answerConstraint"))
res.setAnswerConstraintElement(parseEnumeration(json.get("answerConstraint").getAsString(), Questionnaire.QuestionnaireAnswerConstraint.NULL, new Questionnaire.QuestionnaireAnswerConstraintEnumFactory()));
if (json.has("_answerConstraint"))
parseElementProperties(getJObject(json, "_answerConstraint"), res.getAnswerConstraintElement());
if (json.has("answerValueSet"))
res.setAnswerValueSetElement(parseCanonical(json.get("answerValueSet").getAsString()));
if (json.has("_answerValueSet"))
parseElementProperties(getJObject(json, "_answerValueSet"), res.getAnswerValueSetElement());
if (json.has("answerOption")) {
JsonArray array = getJArray(json, "answerOption");
for (int i = 0; i < array.size(); i++) {
res.getAnswerOption().add(parseQuestionnaireItemAnswerOptionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("initial")) {
JsonArray array = getJArray(json, "initial");
for (int i = 0; i < array.size(); i++) {
res.getInitial().add(parseQuestionnaireItemInitialComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireItemEnableWhenComponent(JsonObject json) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent();
parseQuestionnaireItemEnableWhenComponentProperties(json, res);
return res;
}
protected void parseQuestionnaireItemEnableWhenComponentProperties(JsonObject json, Questionnaire.QuestionnaireItemEnableWhenComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("question"))
res.setQuestionElement(parseString(json.get("question").getAsString()));
if (json.has("_question"))
parseElementProperties(getJObject(json, "_question"), res.getQuestionElement());
if (json.has("operator"))
res.setOperatorElement(parseEnumeration(json.get("operator").getAsString(), Questionnaire.QuestionnaireItemOperator.NULL, new Questionnaire.QuestionnaireItemOperatorEnumFactory()));
if (json.has("_operator"))
parseElementProperties(getJObject(json, "_operator"), res.getOperatorElement());
DataType answer = parseType("answer", json);
if (answer != null)
res.setAnswer(answer);
}
protected Questionnaire.QuestionnaireItemAnswerOptionComponent parseQuestionnaireItemAnswerOptionComponent(JsonObject json) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemAnswerOptionComponent res = new Questionnaire.QuestionnaireItemAnswerOptionComponent();
parseQuestionnaireItemAnswerOptionComponentProperties(json, res);
return res;
}
protected void parseQuestionnaireItemAnswerOptionComponentProperties(JsonObject json, Questionnaire.QuestionnaireItemAnswerOptionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("initialSelected"))
res.setInitialSelectedElement(parseBoolean(json.get("initialSelected").getAsBoolean()));
if (json.has("_initialSelected"))
parseElementProperties(getJObject(json, "_initialSelected"), res.getInitialSelectedElement());
}
protected Questionnaire.QuestionnaireItemInitialComponent parseQuestionnaireItemInitialComponent(JsonObject json) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemInitialComponent res = new Questionnaire.QuestionnaireItemInitialComponent();
parseQuestionnaireItemInitialComponentProperties(json, res);
return res;
}
protected void parseQuestionnaireItemInitialComponentProperties(JsonObject json, Questionnaire.QuestionnaireItemInitialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected QuestionnaireResponse parseQuestionnaireResponse(JsonObject json) throws IOException, FHIRFormatError {
QuestionnaireResponse res = new QuestionnaireResponse();
parseQuestionnaireResponseProperties(json, res);
return res;
}
protected void parseQuestionnaireResponseProperties(JsonObject json, QuestionnaireResponse res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("questionnaire"))
res.setQuestionnaireElement(parseCanonical(json.get("questionnaire").getAsString()));
if (json.has("_questionnaire"))
parseElementProperties(getJObject(json, "_questionnaire"), res.getQuestionnaireElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), QuestionnaireResponse.QuestionnaireResponseStatus.NULL, new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("authored"))
res.setAuthoredElement(parseDateTime(json.get("authored").getAsString()));
if (json.has("_authored"))
parseElementProperties(getJObject(json, "_authored"), res.getAuthoredElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireResponseItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseItemComponent(JsonObject json) throws IOException, FHIRFormatError {
QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent();
parseQuestionnaireResponseItemComponentProperties(json, res);
return res;
}
protected void parseQuestionnaireResponseItemComponentProperties(JsonObject json, QuestionnaireResponse.QuestionnaireResponseItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("definition"))
res.setDefinitionElement(parseUri(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("answer")) {
JsonArray array = getJArray(json, "answer");
for (int i = 0; i < array.size(); i++) {
res.getAnswer().add(parseQuestionnaireResponseItemAnswerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireResponseItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseItemAnswerComponent(JsonObject json) throws IOException, FHIRFormatError {
QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent();
parseQuestionnaireResponseItemAnswerComponentProperties(json, res);
return res;
}
protected void parseQuestionnaireResponseItemAnswerComponentProperties(JsonObject json, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("item")) {
JsonArray array = getJArray(json, "item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireResponseItemComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected RegulatedAuthorization parseRegulatedAuthorization(JsonObject json) throws IOException, FHIRFormatError {
RegulatedAuthorization res = new RegulatedAuthorization();
parseRegulatedAuthorizationProperties(json, res);
return res;
}
protected void parseRegulatedAuthorizationProperties(JsonObject json, RegulatedAuthorization res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subject")) {
JsonArray array = getJArray(json, "subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("region")) {
JsonArray array = getJArray(json, "region");
for (int i = 0; i < array.size(); i++) {
res.getRegion().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("statusDate"))
res.setStatusDateElement(parseDateTime(json.get("statusDate").getAsString()));
if (json.has("_statusDate"))
parseElementProperties(getJObject(json, "_statusDate"), res.getStatusDateElement());
if (json.has("validityPeriod"))
res.setValidityPeriod(parsePeriod(getJObject(json, "validityPeriod")));
if (json.has("indication")) {
JsonArray array = getJArray(json, "indication");
for (int i = 0; i < array.size(); i++) {
res.getIndication().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("intendedUse"))
res.setIntendedUse(parseCodeableConcept(getJObject(json, "intendedUse")));
if (json.has("basis")) {
JsonArray array = getJArray(json, "basis");
for (int i = 0; i < array.size(); i++) {
res.getBasis().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("holder"))
res.setHolder(parseReference(getJObject(json, "holder")));
if (json.has("regulator"))
res.setRegulator(parseReference(getJObject(json, "regulator")));
if (json.has("attachedDocument")) {
JsonArray array = getJArray(json, "attachedDocument");
for (int i = 0; i < array.size(); i++) {
res.getAttachedDocument().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("case"))
res.setCase(parseRegulatedAuthorizationCaseComponent(getJObject(json, "case")));
}
protected RegulatedAuthorization.RegulatedAuthorizationCaseComponent parseRegulatedAuthorizationCaseComponent(JsonObject json) throws IOException, FHIRFormatError {
RegulatedAuthorization.RegulatedAuthorizationCaseComponent res = new RegulatedAuthorization.RegulatedAuthorizationCaseComponent();
parseRegulatedAuthorizationCaseComponentProperties(json, res);
return res;
}
protected void parseRegulatedAuthorizationCaseComponentProperties(JsonObject json, RegulatedAuthorization.RegulatedAuthorizationCaseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
DataType date = parseType("date", json);
if (date != null)
res.setDate(date);
if (json.has("application")) {
JsonArray array = getJArray(json, "application");
for (int i = 0; i < array.size(); i++) {
res.getApplication().add(parseRegulatedAuthorizationCaseComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected RelatedPerson parseRelatedPerson(JsonObject json) throws IOException, FHIRFormatError {
RelatedPerson res = new RelatedPerson();
parseRelatedPersonProperties(json, res);
return res;
}
protected void parseRelatedPersonProperties(JsonObject json, RelatedPerson res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("relationship")) {
JsonArray array = getJArray(json, "relationship");
for (int i = 0; i < array.size(); i++) {
res.getRelationship().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(getJsonObjectFromArray(array, i)));
}
};
if (json.has("telecom")) {
JsonArray array = getJArray(json, "telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("gender"))
res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory()));
if (json.has("_gender"))
parseElementProperties(getJObject(json, "_gender"), res.getGenderElement());
if (json.has("birthDate"))
res.setBirthDateElement(parseDate(json.get("birthDate").getAsString()));
if (json.has("_birthDate"))
parseElementProperties(getJObject(json, "_birthDate"), res.getBirthDateElement());
if (json.has("address")) {
JsonArray array = getJArray(json, "address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(getJsonObjectFromArray(array, i)));
}
};
if (json.has("photo")) {
JsonArray array = getJArray(json, "photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("communication")) {
JsonArray array = getJArray(json, "communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parseRelatedPersonCommunicationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected RelatedPerson.RelatedPersonCommunicationComponent parseRelatedPersonCommunicationComponent(JsonObject json) throws IOException, FHIRFormatError {
RelatedPerson.RelatedPersonCommunicationComponent res = new RelatedPerson.RelatedPersonCommunicationComponent();
parseRelatedPersonCommunicationComponentProperties(json, res);
return res;
}
protected void parseRelatedPersonCommunicationComponentProperties(JsonObject json, RelatedPerson.RelatedPersonCommunicationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
if (json.has("preferred"))
res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean()));
if (json.has("_preferred"))
parseElementProperties(getJObject(json, "_preferred"), res.getPreferredElement());
}
protected RequestOrchestration parseRequestOrchestration(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration res = new RequestOrchestration();
parseRequestOrchestrationProperties(json, res);
return res;
}
protected void parseRequestOrchestrationProperties(JsonObject json, RequestOrchestration res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.RequestStatus.NULL, new Enumerations.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Enumerations.RequestIntent.NULL, new Enumerations.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("goal")) {
JsonArray array = getJArray(json, "goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseRequestOrchestrationActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected RequestOrchestration.RequestOrchestrationActionComponent parseRequestOrchestrationActionComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionComponent res = new RequestOrchestration.RequestOrchestrationActionComponent();
parseRequestOrchestrationActionComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseString(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("prefix"))
res.setPrefixElement(parseString(json.get("prefix").getAsString()));
if (json.has("_prefix"))
parseElementProperties(getJObject(json, "_prefix"), res.getPrefixElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("textEquivalent"))
res.setTextEquivalentElement(parseMarkdown(json.get("textEquivalent").getAsString()));
if (json.has("_textEquivalent"))
parseElementProperties(getJObject(json, "_textEquivalent"), res.getTextEquivalentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("documentation")) {
JsonArray array = getJArray(json, "documentation");
for (int i = 0; i < array.size(); i++) {
res.getDocumentation().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("goal")) {
JsonArray array = getJArray(json, "goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseRequestOrchestrationActionConditionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("input")) {
JsonArray array = getJArray(json, "input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseRequestOrchestrationActionInputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("output")) {
JsonArray array = getJArray(json, "output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parseRequestOrchestrationActionOutputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedAction")) {
JsonArray array = getJArray(json, "relatedAction");
for (int i = 0; i < array.size(); i++) {
res.getRelatedAction().add(parseRequestOrchestrationActionRelatedActionComponent(getJsonObjectFromArray(array, i)));
}
};
DataType timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("location"))
res.setLocation(parseCodeableReference(getJObject(json, "location")));
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseRequestOrchestrationActionParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("groupingBehavior"))
res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(), Enumerations.ActionGroupingBehavior.NULL, new Enumerations.ActionGroupingBehaviorEnumFactory()));
if (json.has("_groupingBehavior"))
parseElementProperties(getJObject(json, "_groupingBehavior"), res.getGroupingBehaviorElement());
if (json.has("selectionBehavior"))
res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(), Enumerations.ActionSelectionBehavior.NULL, new Enumerations.ActionSelectionBehaviorEnumFactory()));
if (json.has("_selectionBehavior"))
parseElementProperties(getJObject(json, "_selectionBehavior"), res.getSelectionBehaviorElement());
if (json.has("requiredBehavior"))
res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(), Enumerations.ActionRequiredBehavior.NULL, new Enumerations.ActionRequiredBehaviorEnumFactory()));
if (json.has("_requiredBehavior"))
parseElementProperties(getJObject(json, "_requiredBehavior"), res.getRequiredBehaviorElement());
if (json.has("precheckBehavior"))
res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(), Enumerations.ActionPrecheckBehavior.NULL, new Enumerations.ActionPrecheckBehaviorEnumFactory()));
if (json.has("_precheckBehavior"))
parseElementProperties(getJObject(json, "_precheckBehavior"), res.getPrecheckBehaviorElement());
if (json.has("cardinalityBehavior"))
res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(), Enumerations.ActionCardinalityBehavior.NULL, new Enumerations.ActionCardinalityBehaviorEnumFactory()));
if (json.has("_cardinalityBehavior"))
parseElementProperties(getJObject(json, "_cardinalityBehavior"), res.getCardinalityBehaviorElement());
if (json.has("resource"))
res.setResource(parseReference(getJObject(json, "resource")));
DataType definition = parseType("definition", json);
if (definition != null)
res.setDefinition(definition);
if (json.has("transform"))
res.setTransformElement(parseCanonical(json.get("transform").getAsString()));
if (json.has("_transform"))
parseElementProperties(getJObject(json, "_transform"), res.getTransformElement());
if (json.has("dynamicValue")) {
JsonArray array = getJArray(json, "dynamicValue");
for (int i = 0; i < array.size(); i++) {
res.getDynamicValue().add(parseRequestOrchestrationActionDynamicValueComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseRequestOrchestrationActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected RequestOrchestration.RequestOrchestrationActionConditionComponent parseRequestOrchestrationActionConditionComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionConditionComponent res = new RequestOrchestration.RequestOrchestrationActionConditionComponent();
parseRequestOrchestrationActionConditionComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionConditionComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionConditionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), Enumerations.ActionConditionKind.NULL, new Enumerations.ActionConditionKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected RequestOrchestration.RequestOrchestrationActionInputComponent parseRequestOrchestrationActionInputComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionInputComponent res = new RequestOrchestration.RequestOrchestrationActionInputComponent();
parseRequestOrchestrationActionInputComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionInputComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionInputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("requirement"))
res.setRequirement(parseDataRequirement(getJObject(json, "requirement")));
if (json.has("relatedData"))
res.setRelatedDataElement(parseId(json.get("relatedData").getAsString()));
if (json.has("_relatedData"))
parseElementProperties(getJObject(json, "_relatedData"), res.getRelatedDataElement());
}
protected RequestOrchestration.RequestOrchestrationActionOutputComponent parseRequestOrchestrationActionOutputComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionOutputComponent res = new RequestOrchestration.RequestOrchestrationActionOutputComponent();
parseRequestOrchestrationActionOutputComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionOutputComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionOutputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("requirement"))
res.setRequirement(parseDataRequirement(getJObject(json, "requirement")));
if (json.has("relatedData"))
res.setRelatedDataElement(parseString(json.get("relatedData").getAsString()));
if (json.has("_relatedData"))
parseElementProperties(getJObject(json, "_relatedData"), res.getRelatedDataElement());
}
protected RequestOrchestration.RequestOrchestrationActionRelatedActionComponent parseRequestOrchestrationActionRelatedActionComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionRelatedActionComponent res = new RequestOrchestration.RequestOrchestrationActionRelatedActionComponent();
parseRequestOrchestrationActionRelatedActionComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionRelatedActionComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionRelatedActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("targetId"))
res.setTargetIdElement(parseId(json.get("targetId").getAsString()));
if (json.has("_targetId"))
parseElementProperties(getJObject(json, "_targetId"), res.getTargetIdElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), Enumerations.ActionRelationshipType.NULL, new Enumerations.ActionRelationshipTypeEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(getJObject(json, "_relationship"), res.getRelationshipElement());
if (json.has("endRelationship"))
res.setEndRelationshipElement(parseEnumeration(json.get("endRelationship").getAsString(), Enumerations.ActionRelationshipType.NULL, new Enumerations.ActionRelationshipTypeEnumFactory()));
if (json.has("_endRelationship"))
parseElementProperties(getJObject(json, "_endRelationship"), res.getEndRelationshipElement());
DataType offset = parseType("offset", json);
if (offset != null)
res.setOffset(offset);
}
protected RequestOrchestration.RequestOrchestrationActionParticipantComponent parseRequestOrchestrationActionParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionParticipantComponent res = new RequestOrchestration.RequestOrchestrationActionParticipantComponent();
parseRequestOrchestrationActionParticipantComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionParticipantComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.ActionParticipantType.NULL, new Enumerations.ActionParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("typeCanonical"))
res.setTypeCanonicalElement(parseCanonical(json.get("typeCanonical").getAsString()));
if (json.has("_typeCanonical"))
parseElementProperties(getJObject(json, "_typeCanonical"), res.getTypeCanonicalElement());
if (json.has("typeReference"))
res.setTypeReference(parseReference(getJObject(json, "typeReference")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
DataType actor = parseType("actor", json);
if (actor != null)
res.setActor(actor);
}
protected RequestOrchestration.RequestOrchestrationActionDynamicValueComponent parseRequestOrchestrationActionDynamicValueComponent(JsonObject json) throws IOException, FHIRFormatError {
RequestOrchestration.RequestOrchestrationActionDynamicValueComponent res = new RequestOrchestration.RequestOrchestrationActionDynamicValueComponent();
parseRequestOrchestrationActionDynamicValueComponentProperties(json, res);
return res;
}
protected void parseRequestOrchestrationActionDynamicValueComponentProperties(JsonObject json, RequestOrchestration.RequestOrchestrationActionDynamicValueComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected Requirements parseRequirements(JsonObject json) throws IOException, FHIRFormatError {
Requirements res = new Requirements();
parseRequirementsProperties(json, res);
return res;
}
protected void parseRequirementsProperties(JsonObject json, Requirements res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFrom().add(new CanonicalType());
} else {;
res.getDerivedFrom().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFrom")) {
JsonArray array = getJArray(json, "_derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFrom().size())
res.getDerivedFrom().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFrom().get(i));
}
};
if (json.has("reference")) {
JsonArray array = getJArray(json, "reference");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReference().add(new UrlType());
} else {;
res.getReference().add(parseUrl(array.get(i).getAsString()));
}
}
};
if (json.has("_reference")) {
JsonArray array = getJArray(json, "_reference");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReference().size())
res.getReference().add(parseUrl(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReference().get(i));
}
};
if (json.has("actor")) {
JsonArray array = getJArray(json, "actor");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getActor().add(new CanonicalType());
} else {;
res.getActor().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_actor")) {
JsonArray array = getJArray(json, "_actor");
for (int i = 0; i < array.size(); i++) {
if (i == res.getActor().size())
res.getActor().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getActor().get(i));
}
};
if (json.has("statement")) {
JsonArray array = getJArray(json, "statement");
for (int i = 0; i < array.size(); i++) {
res.getStatement().add(parseRequirementsStatementComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Requirements.RequirementsStatementComponent parseRequirementsStatementComponent(JsonObject json) throws IOException, FHIRFormatError {
Requirements.RequirementsStatementComponent res = new Requirements.RequirementsStatementComponent();
parseRequirementsStatementComponentProperties(json, res);
return res;
}
protected void parseRequirementsStatementComponentProperties(JsonObject json, Requirements.RequirementsStatementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("key"))
res.setKeyElement(parseId(json.get("key").getAsString()));
if (json.has("_key"))
parseElementProperties(getJObject(json, "_key"), res.getKeyElement());
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
if (json.has("conformance")) {
JsonArray array = getJArray(json, "conformance");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getConformance().add(new Enumeration(new Requirements.ConformanceExpectationEnumFactory(), Requirements.ConformanceExpectation.NULL));
} else {;
res.getConformance().add(parseEnumeration(array.get(i).getAsString(), Requirements.ConformanceExpectation.NULL, new Requirements.ConformanceExpectationEnumFactory()));
}
}
};
if (json.has("_conformance")) {
JsonArray array = getJArray(json, "_conformance");
for (int i = 0; i < array.size(); i++) {
if (i == res.getConformance().size())
res.getConformance().add(parseEnumeration(null, Requirements.ConformanceExpectation.NULL, new Requirements.ConformanceExpectationEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getConformance().get(i));
}
};
if (json.has("conditionality"))
res.setConditionalityElement(parseBoolean(json.get("conditionality").getAsBoolean()));
if (json.has("_conditionality"))
parseElementProperties(getJObject(json, "_conditionality"), res.getConditionalityElement());
if (json.has("requirement"))
res.setRequirementElement(parseMarkdown(json.get("requirement").getAsString()));
if (json.has("_requirement"))
parseElementProperties(getJObject(json, "_requirement"), res.getRequirementElement());
if (json.has("derivedFrom"))
res.setDerivedFromElement(parseString(json.get("derivedFrom").getAsString()));
if (json.has("_derivedFrom"))
parseElementProperties(getJObject(json, "_derivedFrom"), res.getDerivedFromElement());
if (json.has("parent"))
res.setParentElement(parseString(json.get("parent").getAsString()));
if (json.has("_parent"))
parseElementProperties(getJObject(json, "_parent"), res.getParentElement());
if (json.has("satisfiedBy")) {
JsonArray array = getJArray(json, "satisfiedBy");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSatisfiedBy().add(new UrlType());
} else {;
res.getSatisfiedBy().add(parseUrl(array.get(i).getAsString()));
}
}
};
if (json.has("_satisfiedBy")) {
JsonArray array = getJArray(json, "_satisfiedBy");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSatisfiedBy().size())
res.getSatisfiedBy().add(parseUrl(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSatisfiedBy().get(i));
}
};
if (json.has("reference")) {
JsonArray array = getJArray(json, "reference");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReference().add(new UrlType());
} else {;
res.getReference().add(parseUrl(array.get(i).getAsString()));
}
}
};
if (json.has("_reference")) {
JsonArray array = getJArray(json, "_reference");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReference().size())
res.getReference().add(parseUrl(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getReference().get(i));
}
};
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ResearchStudy parseResearchStudy(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy res = new ResearchStudy();
parseResearchStudyProperties(json, res);
return res;
}
protected void parseResearchStudyProperties(JsonObject json, ResearchStudy res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("label")) {
JsonArray array = getJArray(json, "label");
for (int i = 0; i < array.size(); i++) {
res.getLabel().add(parseResearchStudyLabelComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("protocol")) {
JsonArray array = getJArray(json, "protocol");
for (int i = 0; i < array.size(); i++) {
res.getProtocol().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("primaryPurposeType"))
res.setPrimaryPurposeType(parseCodeableConcept(getJObject(json, "primaryPurposeType")));
if (json.has("phase"))
res.setPhase(parseCodeableConcept(getJObject(json, "phase")));
if (json.has("studyDesign")) {
JsonArray array = getJArray(json, "studyDesign");
for (int i = 0; i < array.size(); i++) {
res.getStudyDesign().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("keyword")) {
JsonArray array = getJArray(json, "keyword");
for (int i = 0; i < array.size(); i++) {
res.getKeyword().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("region")) {
JsonArray array = getJArray(json, "region");
for (int i = 0; i < array.size(); i++) {
res.getRegion().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("descriptionSummary"))
res.setDescriptionSummaryElement(parseMarkdown(json.get("descriptionSummary").getAsString()));
if (json.has("_descriptionSummary"))
parseElementProperties(getJObject(json, "_descriptionSummary"), res.getDescriptionSummaryElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("site")) {
JsonArray array = getJArray(json, "site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("associatedParty")) {
JsonArray array = getJArray(json, "associatedParty");
for (int i = 0; i < array.size(); i++) {
res.getAssociatedParty().add(parseResearchStudyAssociatedPartyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("progressStatus")) {
JsonArray array = getJArray(json, "progressStatus");
for (int i = 0; i < array.size(); i++) {
res.getProgressStatus().add(parseResearchStudyProgressStatusComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("whyStopped"))
res.setWhyStopped(parseCodeableConcept(getJObject(json, "whyStopped")));
if (json.has("recruitment"))
res.setRecruitment(parseResearchStudyRecruitmentComponent(getJObject(json, "recruitment")));
if (json.has("comparisonGroup")) {
JsonArray array = getJArray(json, "comparisonGroup");
for (int i = 0; i < array.size(); i++) {
res.getComparisonGroup().add(parseResearchStudyComparisonGroupComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("objective")) {
JsonArray array = getJArray(json, "objective");
for (int i = 0; i < array.size(); i++) {
res.getObjective().add(parseResearchStudyObjectiveComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("outcomeMeasure")) {
JsonArray array = getJArray(json, "outcomeMeasure");
for (int i = 0; i < array.size(); i++) {
res.getOutcomeMeasure().add(parseResearchStudyOutcomeMeasureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("result")) {
JsonArray array = getJArray(json, "result");
for (int i = 0; i < array.size(); i++) {
res.getResult().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ResearchStudy.ResearchStudyLabelComponent parseResearchStudyLabelComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyLabelComponent res = new ResearchStudy.ResearchStudyLabelComponent();
parseResearchStudyLabelComponentProperties(json, res);
return res;
}
protected void parseResearchStudyLabelComponentProperties(JsonObject json, ResearchStudy.ResearchStudyLabelComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ResearchStudy.ResearchStudyAssociatedPartyComponent parseResearchStudyAssociatedPartyComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyAssociatedPartyComponent res = new ResearchStudy.ResearchStudyAssociatedPartyComponent();
parseResearchStudyAssociatedPartyComponentProperties(json, res);
return res;
}
protected void parseResearchStudyAssociatedPartyComponentProperties(JsonObject json, ResearchStudy.ResearchStudyAssociatedPartyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("period")) {
JsonArray array = getJArray(json, "period");
for (int i = 0; i < array.size(); i++) {
res.getPeriod().add(parsePeriod(getJsonObjectFromArray(array, i)));
}
};
if (json.has("classifier")) {
JsonArray array = getJArray(json, "classifier");
for (int i = 0; i < array.size(); i++) {
res.getClassifier().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("party"))
res.setParty(parseReference(getJObject(json, "party")));
}
protected ResearchStudy.ResearchStudyProgressStatusComponent parseResearchStudyProgressStatusComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyProgressStatusComponent res = new ResearchStudy.ResearchStudyProgressStatusComponent();
parseResearchStudyProgressStatusComponentProperties(json, res);
return res;
}
protected void parseResearchStudyProgressStatusComponentProperties(JsonObject json, ResearchStudy.ResearchStudyProgressStatusComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("state"))
res.setState(parseCodeableConcept(getJObject(json, "state")));
if (json.has("actual"))
res.setActualElement(parseBoolean(json.get("actual").getAsBoolean()));
if (json.has("_actual"))
parseElementProperties(getJObject(json, "_actual"), res.getActualElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected ResearchStudy.ResearchStudyRecruitmentComponent parseResearchStudyRecruitmentComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyRecruitmentComponent res = new ResearchStudy.ResearchStudyRecruitmentComponent();
parseResearchStudyRecruitmentComponentProperties(json, res);
return res;
}
protected void parseResearchStudyRecruitmentComponentProperties(JsonObject json, ResearchStudy.ResearchStudyRecruitmentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("targetNumber"))
res.setTargetNumberElement(parseUnsignedInt(json.get("targetNumber").getAsString()));
if (json.has("_targetNumber"))
parseElementProperties(getJObject(json, "_targetNumber"), res.getTargetNumberElement());
if (json.has("actualNumber"))
res.setActualNumberElement(parseUnsignedInt(json.get("actualNumber").getAsString()));
if (json.has("_actualNumber"))
parseElementProperties(getJObject(json, "_actualNumber"), res.getActualNumberElement());
if (json.has("eligibility"))
res.setEligibility(parseReference(getJObject(json, "eligibility")));
if (json.has("actualGroup"))
res.setActualGroup(parseReference(getJObject(json, "actualGroup")));
}
protected ResearchStudy.ResearchStudyComparisonGroupComponent parseResearchStudyComparisonGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyComparisonGroupComponent res = new ResearchStudy.ResearchStudyComparisonGroupComponent();
parseResearchStudyComparisonGroupComponentProperties(json, res);
return res;
}
protected void parseResearchStudyComparisonGroupComponentProperties(JsonObject json, ResearchStudy.ResearchStudyComparisonGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("linkId"))
res.setLinkIdElement(parseId(json.get("linkId").getAsString()));
if (json.has("_linkId"))
parseElementProperties(getJObject(json, "_linkId"), res.getLinkIdElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("intendedExposure")) {
JsonArray array = getJArray(json, "intendedExposure");
for (int i = 0; i < array.size(); i++) {
res.getIntendedExposure().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("observedGroup"))
res.setObservedGroup(parseReference(getJObject(json, "observedGroup")));
}
protected ResearchStudy.ResearchStudyObjectiveComponent parseResearchStudyObjectiveComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyObjectiveComponent res = new ResearchStudy.ResearchStudyObjectiveComponent();
parseResearchStudyObjectiveComponentProperties(json, res);
return res;
}
protected void parseResearchStudyObjectiveComponentProperties(JsonObject json, ResearchStudy.ResearchStudyObjectiveComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ResearchStudy.ResearchStudyOutcomeMeasureComponent parseResearchStudyOutcomeMeasureComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyOutcomeMeasureComponent res = new ResearchStudy.ResearchStudyOutcomeMeasureComponent();
parseResearchStudyOutcomeMeasureComponentProperties(json, res);
return res;
}
protected void parseResearchStudyOutcomeMeasureComponentProperties(JsonObject json, ResearchStudy.ResearchStudyOutcomeMeasureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
}
protected ResearchSubject parseResearchSubject(JsonObject json) throws IOException, FHIRFormatError {
ResearchSubject res = new ResearchSubject();
parseResearchSubjectProperties(json, res);
return res;
}
protected void parseResearchSubjectProperties(JsonObject json, ResearchSubject res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("progress")) {
JsonArray array = getJArray(json, "progress");
for (int i = 0; i < array.size(); i++) {
res.getProgress().add(parseResearchSubjectProgressComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("study"))
res.setStudy(parseReference(getJObject(json, "study")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("assignedComparisonGroup"))
res.setAssignedComparisonGroupElement(parseId(json.get("assignedComparisonGroup").getAsString()));
if (json.has("_assignedComparisonGroup"))
parseElementProperties(getJObject(json, "_assignedComparisonGroup"), res.getAssignedComparisonGroupElement());
if (json.has("actualComparisonGroup"))
res.setActualComparisonGroupElement(parseId(json.get("actualComparisonGroup").getAsString()));
if (json.has("_actualComparisonGroup"))
parseElementProperties(getJObject(json, "_actualComparisonGroup"), res.getActualComparisonGroupElement());
if (json.has("consent")) {
JsonArray array = getJArray(json, "consent");
for (int i = 0; i < array.size(); i++) {
res.getConsent().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ResearchSubject.ResearchSubjectProgressComponent parseResearchSubjectProgressComponent(JsonObject json) throws IOException, FHIRFormatError {
ResearchSubject.ResearchSubjectProgressComponent res = new ResearchSubject.ResearchSubjectProgressComponent();
parseResearchSubjectProgressComponentProperties(json, res);
return res;
}
protected void parseResearchSubjectProgressComponentProperties(JsonObject json, ResearchSubject.ResearchSubjectProgressComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subjectState"))
res.setSubjectState(parseCodeableConcept(getJObject(json, "subjectState")));
if (json.has("milestone"))
res.setMilestone(parseCodeableConcept(getJObject(json, "milestone")));
if (json.has("reason"))
res.setReason(parseCodeableConcept(getJObject(json, "reason")));
if (json.has("startDate"))
res.setStartDateElement(parseDateTime(json.get("startDate").getAsString()));
if (json.has("_startDate"))
parseElementProperties(getJObject(json, "_startDate"), res.getStartDateElement());
if (json.has("endDate"))
res.setEndDateElement(parseDateTime(json.get("endDate").getAsString()));
if (json.has("_endDate"))
parseElementProperties(getJObject(json, "_endDate"), res.getEndDateElement());
}
protected RiskAssessment parseRiskAssessment(JsonObject json) throws IOException, FHIRFormatError {
RiskAssessment res = new RiskAssessment();
parseRiskAssessmentProperties(json, res);
return res;
}
protected void parseRiskAssessmentProperties(JsonObject json, RiskAssessment res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn"))
res.setBasedOn(parseReference(getJObject(json, "basedOn")));
if (json.has("parent"))
res.setParent(parseReference(getJObject(json, "parent")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.ObservationStatus.NULL, new Enumerations.ObservationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("condition"))
res.setCondition(parseReference(getJObject(json, "condition")));
if (json.has("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basis")) {
JsonArray array = getJArray(json, "basis");
for (int i = 0; i < array.size(); i++) {
res.getBasis().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("prediction")) {
JsonArray array = getJArray(json, "prediction");
for (int i = 0; i < array.size(); i++) {
res.getPrediction().add(parseRiskAssessmentPredictionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("mitigation"))
res.setMitigationElement(parseString(json.get("mitigation").getAsString()));
if (json.has("_mitigation"))
parseElementProperties(getJObject(json, "_mitigation"), res.getMitigationElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentPredictionComponent(JsonObject json) throws IOException, FHIRFormatError {
RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent();
parseRiskAssessmentPredictionComponentProperties(json, res);
return res;
}
protected void parseRiskAssessmentPredictionComponentProperties(JsonObject json, RiskAssessment.RiskAssessmentPredictionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
DataType probability = parseType("probability", json);
if (probability != null)
res.setProbability(probability);
if (json.has("qualitativeRisk"))
res.setQualitativeRisk(parseCodeableConcept(getJObject(json, "qualitativeRisk")));
if (json.has("relativeRisk"))
res.setRelativeRiskElement(parseDecimal(json.get("relativeRisk").getAsBigDecimal()));
if (json.has("_relativeRisk"))
parseElementProperties(getJObject(json, "_relativeRisk"), res.getRelativeRiskElement());
DataType when = parseType("when", json);
if (when != null)
res.setWhen(when);
if (json.has("rationale"))
res.setRationaleElement(parseString(json.get("rationale").getAsString()));
if (json.has("_rationale"))
parseElementProperties(getJObject(json, "_rationale"), res.getRationaleElement());
}
protected Schedule parseSchedule(JsonObject json) throws IOException, FHIRFormatError {
Schedule res = new Schedule();
parseScheduleProperties(json, res);
return res;
}
protected void parseScheduleProperties(JsonObject json, Schedule res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("serviceCategory")) {
JsonArray array = getJArray(json, "serviceCategory");
for (int i = 0; i < array.size(); i++) {
res.getServiceCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceType")) {
JsonArray array = getJArray(json, "serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialty")) {
JsonArray array = getJArray(json, "specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("actor")) {
JsonArray array = getJArray(json, "actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("planningHorizon"))
res.setPlanningHorizon(parsePeriod(getJObject(json, "planningHorizon")));
if (json.has("comment"))
res.setCommentElement(parseMarkdown(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected SearchParameter parseSearchParameter(JsonObject json) throws IOException, FHIRFormatError {
SearchParameter res = new SearchParameter();
parseSearchParameterProperties(json, res);
return res;
}
protected void parseSearchParameterProperties(JsonObject json, SearchParameter res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("derivedFrom"))
res.setDerivedFromElement(parseCanonical(json.get("derivedFrom").getAsString()));
if (json.has("_derivedFrom"))
parseElementProperties(getJObject(json, "_derivedFrom"), res.getDerivedFromElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("base")) {
JsonArray array = getJArray(json, "base");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getBase().add(new Enumeration(new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), Enumerations.VersionIndependentResourceTypesAll.NULL));
} else {;
res.getBase().add(parseEnumeration(array.get(i).getAsString(), Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
}
}
};
if (json.has("_base")) {
JsonArray array = getJArray(json, "_base");
for (int i = 0; i < array.size(); i++) {
if (i == res.getBase().size())
res.getBase().add(parseEnumeration(null, Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getBase().get(i));
}
};
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
if (json.has("processingMode"))
res.setProcessingModeElement(parseEnumeration(json.get("processingMode").getAsString(), SearchParameter.SearchProcessingModeType.NULL, new SearchParameter.SearchProcessingModeTypeEnumFactory()));
if (json.has("_processingMode"))
parseElementProperties(getJObject(json, "_processingMode"), res.getProcessingModeElement());
if (json.has("constraint"))
res.setConstraintElement(parseString(json.get("constraint").getAsString()));
if (json.has("_constraint"))
parseElementProperties(getJObject(json, "_constraint"), res.getConstraintElement());
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getTarget().add(new Enumeration(new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), Enumerations.VersionIndependentResourceTypesAll.NULL));
} else {;
res.getTarget().add(parseEnumeration(array.get(i).getAsString(), Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
}
}
};
if (json.has("_target")) {
JsonArray array = getJArray(json, "_target");
for (int i = 0; i < array.size(); i++) {
if (i == res.getTarget().size())
res.getTarget().add(parseEnumeration(null, Enumerations.VersionIndependentResourceTypesAll.NULL, new Enumerations.VersionIndependentResourceTypesAllEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getTarget().get(i));
}
};
if (json.has("multipleOr"))
res.setMultipleOrElement(parseBoolean(json.get("multipleOr").getAsBoolean()));
if (json.has("_multipleOr"))
parseElementProperties(getJObject(json, "_multipleOr"), res.getMultipleOrElement());
if (json.has("multipleAnd"))
res.setMultipleAndElement(parseBoolean(json.get("multipleAnd").getAsBoolean()));
if (json.has("_multipleAnd"))
parseElementProperties(getJObject(json, "_multipleAnd"), res.getMultipleAndElement());
if (json.has("comparator")) {
JsonArray array = getJArray(json, "comparator");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getComparator().add(new Enumeration(new Enumerations.SearchComparatorEnumFactory(), Enumerations.SearchComparator.NULL));
} else {;
res.getComparator().add(parseEnumeration(array.get(i).getAsString(), Enumerations.SearchComparator.NULL, new Enumerations.SearchComparatorEnumFactory()));
}
}
};
if (json.has("_comparator")) {
JsonArray array = getJArray(json, "_comparator");
for (int i = 0; i < array.size(); i++) {
if (i == res.getComparator().size())
res.getComparator().add(parseEnumeration(null, Enumerations.SearchComparator.NULL, new Enumerations.SearchComparatorEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getComparator().get(i));
}
};
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getModifier().add(new Enumeration(new Enumerations.SearchModifierCodeEnumFactory(), Enumerations.SearchModifierCode.NULL));
} else {;
res.getModifier().add(parseEnumeration(array.get(i).getAsString(), Enumerations.SearchModifierCode.NULL, new Enumerations.SearchModifierCodeEnumFactory()));
}
}
};
if (json.has("_modifier")) {
JsonArray array = getJArray(json, "_modifier");
for (int i = 0; i < array.size(); i++) {
if (i == res.getModifier().size())
res.getModifier().add(parseEnumeration(null, Enumerations.SearchModifierCode.NULL, new Enumerations.SearchModifierCodeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getModifier().get(i));
}
};
if (json.has("chain")) {
JsonArray array = getJArray(json, "chain");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getChain().add(new StringType());
} else {;
res.getChain().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_chain")) {
JsonArray array = getJArray(json, "_chain");
for (int i = 0; i < array.size(); i++) {
if (i == res.getChain().size())
res.getChain().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getChain().get(i));
}
};
if (json.has("component")) {
JsonArray array = getJArray(json, "component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseSearchParameterComponentComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SearchParameter.SearchParameterComponentComponent parseSearchParameterComponentComponent(JsonObject json) throws IOException, FHIRFormatError {
SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent();
parseSearchParameterComponentComponentProperties(json, res);
return res;
}
protected void parseSearchParameterComponentComponentProperties(JsonObject json, SearchParameter.SearchParameterComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("definition"))
res.setDefinitionElement(parseCanonical(json.get("definition").getAsString()));
if (json.has("_definition"))
parseElementProperties(getJObject(json, "_definition"), res.getDefinitionElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
}
protected ServiceRequest parseServiceRequest(JsonObject json) throws IOException, FHIRFormatError {
ServiceRequest res = new ServiceRequest();
parseServiceRequestProperties(json, res);
return res;
}
protected void parseServiceRequestProperties(JsonObject json, ServiceRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical")) {
JsonArray array = getJArray(json, "instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesCanonical().add(new CanonicalType());
} else {;
res.getInstantiatesCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesCanonical")) {
JsonArray array = getJArray(json, "_instantiatesCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesCanonical().size())
res.getInstantiatesCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesCanonical().get(i));
}
};
if (json.has("instantiatesUri")) {
JsonArray array = getJArray(json, "instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInstantiatesUri().add(new UriType());
} else {;
res.getInstantiatesUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_instantiatesUri")) {
JsonArray array = getJArray(json, "_instantiatesUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInstantiatesUri().size())
res.getInstantiatesUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInstantiatesUri().get(i));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("replaces")) {
JsonArray array = getJArray(json, "replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("requisition"))
res.setRequisition(parseIdentifier(getJObject(json, "requisition")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.RequestStatus.NULL, new Enumerations.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Enumerations.RequestIntent.NULL, new Enumerations.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
if (json.has("code"))
res.setCode(parseCodeableReference(getJObject(json, "code")));
if (json.has("orderDetail")) {
JsonArray array = getJArray(json, "orderDetail");
for (int i = 0; i < array.size(); i++) {
res.getOrderDetail().add(parseServiceRequestOrderDetailComponent(getJsonObjectFromArray(array, i)));
}
};
DataType quantity = parseType("quantity", json);
if (quantity != null)
res.setQuantity(quantity);
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("focus")) {
JsonArray array = getJArray(json, "focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
DataType asNeeded = parseType("asNeeded", json);
if (asNeeded != null)
res.setAsNeeded(asNeeded);
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("performerType"))
res.setPerformerType(parseCodeableConcept(getJObject(json, "performerType")));
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location")) {
JsonArray array = getJArray(json, "location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supportingInfo")) {
JsonArray array = getJArray(json, "supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specimen")) {
JsonArray array = getJArray(json, "specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodySite")) {
JsonArray array = getJArray(json, "bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("bodyStructure"))
res.setBodyStructure(parseReference(getJObject(json, "bodyStructure")));
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("patientInstruction")) {
JsonArray array = getJArray(json, "patientInstruction");
for (int i = 0; i < array.size(); i++) {
res.getPatientInstruction().add(parseServiceRequestPatientInstructionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relevantHistory")) {
JsonArray array = getJArray(json, "relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected ServiceRequest.ServiceRequestOrderDetailComponent parseServiceRequestOrderDetailComponent(JsonObject json) throws IOException, FHIRFormatError {
ServiceRequest.ServiceRequestOrderDetailComponent res = new ServiceRequest.ServiceRequestOrderDetailComponent();
parseServiceRequestOrderDetailComponentProperties(json, res);
return res;
}
protected void parseServiceRequestOrderDetailComponentProperties(JsonObject json, ServiceRequest.ServiceRequestOrderDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("parameterFocus"))
res.setParameterFocus(parseCodeableReference(getJObject(json, "parameterFocus")));
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseServiceRequestOrderDetailParameterComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ServiceRequest.ServiceRequestOrderDetailParameterComponent parseServiceRequestOrderDetailParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
ServiceRequest.ServiceRequestOrderDetailParameterComponent res = new ServiceRequest.ServiceRequestOrderDetailParameterComponent();
parseServiceRequestOrderDetailParameterComponentProperties(json, res);
return res;
}
protected void parseServiceRequestOrderDetailParameterComponentProperties(JsonObject json, ServiceRequest.ServiceRequestOrderDetailParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ServiceRequest.ServiceRequestPatientInstructionComponent parseServiceRequestPatientInstructionComponent(JsonObject json) throws IOException, FHIRFormatError {
ServiceRequest.ServiceRequestPatientInstructionComponent res = new ServiceRequest.ServiceRequestPatientInstructionComponent();
parseServiceRequestPatientInstructionComponentProperties(json, res);
return res;
}
protected void parseServiceRequestPatientInstructionComponentProperties(JsonObject json, ServiceRequest.ServiceRequestPatientInstructionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType instruction = parseType("instruction", json);
if (instruction != null)
res.setInstruction(instruction);
}
protected Slot parseSlot(JsonObject json) throws IOException, FHIRFormatError {
Slot res = new Slot();
parseSlotProperties(json, res);
return res;
}
protected void parseSlotProperties(JsonObject json, Slot res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceCategory")) {
JsonArray array = getJArray(json, "serviceCategory");
for (int i = 0; i < array.size(); i++) {
res.getServiceCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("serviceType")) {
JsonArray array = getJArray(json, "serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("specialty")) {
JsonArray array = getJArray(json, "specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("appointmentType")) {
JsonArray array = getJArray(json, "appointmentType");
for (int i = 0; i < array.size(); i++) {
res.getAppointmentType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("schedule"))
res.setSchedule(parseReference(getJObject(json, "schedule")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Slot.SlotStatus.NULL, new Slot.SlotStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("start"))
res.setStartElement(parseInstant(json.get("start").getAsString()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("end"))
res.setEndElement(parseInstant(json.get("end").getAsString()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
if (json.has("overbooked"))
res.setOverbookedElement(parseBoolean(json.get("overbooked").getAsBoolean()));
if (json.has("_overbooked"))
parseElementProperties(getJObject(json, "_overbooked"), res.getOverbookedElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected Specimen parseSpecimen(JsonObject json) throws IOException, FHIRFormatError {
Specimen res = new Specimen();
parseSpecimenProperties(json, res);
return res;
}
protected void parseSpecimenProperties(JsonObject json, Specimen res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("accessionIdentifier"))
res.setAccessionIdentifier(parseIdentifier(getJObject(json, "accessionIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Specimen.SpecimenStatus.NULL, new Specimen.SpecimenStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("receivedTime"))
res.setReceivedTimeElement(parseDateTime(json.get("receivedTime").getAsString()));
if (json.has("_receivedTime"))
parseElementProperties(getJObject(json, "_receivedTime"), res.getReceivedTimeElement());
if (json.has("parent")) {
JsonArray array = getJArray(json, "parent");
for (int i = 0; i < array.size(); i++) {
res.getParent().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("request")) {
JsonArray array = getJArray(json, "request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("combined"))
res.setCombinedElement(parseEnumeration(json.get("combined").getAsString(), Specimen.SpecimenCombined.NULL, new Specimen.SpecimenCombinedEnumFactory()));
if (json.has("_combined"))
parseElementProperties(getJObject(json, "_combined"), res.getCombinedElement());
if (json.has("role")) {
JsonArray array = getJArray(json, "role");
for (int i = 0; i < array.size(); i++) {
res.getRole().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("feature")) {
JsonArray array = getJArray(json, "feature");
for (int i = 0; i < array.size(); i++) {
res.getFeature().add(parseSpecimenFeatureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("collection"))
res.setCollection(parseSpecimenCollectionComponent(getJObject(json, "collection")));
if (json.has("processing")) {
JsonArray array = getJArray(json, "processing");
for (int i = 0; i < array.size(); i++) {
res.getProcessing().add(parseSpecimenProcessingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("container")) {
JsonArray array = getJArray(json, "container");
for (int i = 0; i < array.size(); i++) {
res.getContainer().add(parseSpecimenContainerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("condition")) {
JsonArray array = getJArray(json, "condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected Specimen.SpecimenFeatureComponent parseSpecimenFeatureComponent(JsonObject json) throws IOException, FHIRFormatError {
Specimen.SpecimenFeatureComponent res = new Specimen.SpecimenFeatureComponent();
parseSpecimenFeatureComponentProperties(json, res);
return res;
}
protected void parseSpecimenFeatureComponentProperties(JsonObject json, Specimen.SpecimenFeatureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected Specimen.SpecimenCollectionComponent parseSpecimenCollectionComponent(JsonObject json) throws IOException, FHIRFormatError {
Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent();
parseSpecimenCollectionComponentProperties(json, res);
return res;
}
protected void parseSpecimenCollectionComponentProperties(JsonObject json, Specimen.SpecimenCollectionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("collector"))
res.setCollector(parseReference(getJObject(json, "collector")));
DataType collected = parseType("collected", json);
if (collected != null)
res.setCollected(collected);
if (json.has("duration"))
res.setDuration(parseDuration(getJObject(json, "duration")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("device"))
res.setDevice(parseCodeableReference(getJObject(json, "device")));
if (json.has("procedure"))
res.setProcedure(parseReference(getJObject(json, "procedure")));
if (json.has("bodySite"))
res.setBodySite(parseCodeableReference(getJObject(json, "bodySite")));
DataType fastingStatus = parseType("fastingStatus", json);
if (fastingStatus != null)
res.setFastingStatus(fastingStatus);
}
protected Specimen.SpecimenProcessingComponent parseSpecimenProcessingComponent(JsonObject json) throws IOException, FHIRFormatError {
Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent();
parseSpecimenProcessingComponentProperties(json, res);
return res;
}
protected void parseSpecimenProcessingComponentProperties(JsonObject json, Specimen.SpecimenProcessingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("additive")) {
JsonArray array = getJArray(json, "additive");
for (int i = 0; i < array.size(); i++) {
res.getAdditive().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
DataType time = parseType("time", json);
if (time != null)
res.setTime(time);
}
protected Specimen.SpecimenContainerComponent parseSpecimenContainerComponent(JsonObject json) throws IOException, FHIRFormatError {
Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent();
parseSpecimenContainerComponentProperties(json, res);
return res;
}
protected void parseSpecimenContainerComponentProperties(JsonObject json, Specimen.SpecimenContainerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("specimenQuantity"))
res.setSpecimenQuantity(parseQuantity(getJObject(json, "specimenQuantity")));
}
protected SpecimenDefinition parseSpecimenDefinition(JsonObject json) throws IOException, FHIRFormatError {
SpecimenDefinition res = new SpecimenDefinition();
parseSpecimenDefinitionProperties(json, res);
return res;
}
protected void parseSpecimenDefinitionProperties(JsonObject json, SpecimenDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("derivedFromCanonical")) {
JsonArray array = getJArray(json, "derivedFromCanonical");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFromCanonical().add(new CanonicalType());
} else {;
res.getDerivedFromCanonical().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFromCanonical")) {
JsonArray array = getJArray(json, "_derivedFromCanonical");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFromCanonical().size())
res.getDerivedFromCanonical().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFromCanonical().get(i));
}
};
if (json.has("derivedFromUri")) {
JsonArray array = getJArray(json, "derivedFromUri");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFromUri().add(new UriType());
} else {;
res.getDerivedFromUri().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFromUri")) {
JsonArray array = getJArray(json, "_derivedFromUri");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFromUri().size())
res.getDerivedFromUri().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFromUri().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
DataType subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("typeCollected"))
res.setTypeCollected(parseCodeableConcept(getJObject(json, "typeCollected")));
if (json.has("patientPreparation")) {
JsonArray array = getJArray(json, "patientPreparation");
for (int i = 0; i < array.size(); i++) {
res.getPatientPreparation().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("timeAspect"))
res.setTimeAspectElement(parseString(json.get("timeAspect").getAsString()));
if (json.has("_timeAspect"))
parseElementProperties(getJObject(json, "_timeAspect"), res.getTimeAspectElement());
if (json.has("collection")) {
JsonArray array = getJArray(json, "collection");
for (int i = 0; i < array.size(); i++) {
res.getCollection().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("typeTested")) {
JsonArray array = getJArray(json, "typeTested");
for (int i = 0; i < array.size(); i++) {
res.getTypeTested().add(parseSpecimenDefinitionTypeTestedComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedComponent parseSpecimenDefinitionTypeTestedComponent(JsonObject json) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedComponent();
parseSpecimenDefinitionTypeTestedComponentProperties(json, res);
return res;
}
protected void parseSpecimenDefinitionTypeTestedComponentProperties(JsonObject json, SpecimenDefinition.SpecimenDefinitionTypeTestedComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("isDerived"))
res.setIsDerivedElement(parseBoolean(json.get("isDerived").getAsBoolean()));
if (json.has("_isDerived"))
parseElementProperties(getJObject(json, "_isDerived"), res.getIsDerivedElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("preference"))
res.setPreferenceElement(parseEnumeration(json.get("preference").getAsString(), SpecimenDefinition.SpecimenContainedPreference.NULL, new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory()));
if (json.has("_preference"))
parseElementProperties(getJObject(json, "_preference"), res.getPreferenceElement());
if (json.has("container"))
res.setContainer(parseSpecimenDefinitionTypeTestedContainerComponent(getJObject(json, "container")));
if (json.has("requirement"))
res.setRequirementElement(parseMarkdown(json.get("requirement").getAsString()));
if (json.has("_requirement"))
parseElementProperties(getJObject(json, "_requirement"), res.getRequirementElement());
if (json.has("retentionTime"))
res.setRetentionTime(parseDuration(getJObject(json, "retentionTime")));
if (json.has("singleUse"))
res.setSingleUseElement(parseBoolean(json.get("singleUse").getAsBoolean()));
if (json.has("_singleUse"))
parseElementProperties(getJObject(json, "_singleUse"), res.getSingleUseElement());
if (json.has("rejectionCriterion")) {
JsonArray array = getJArray(json, "rejectionCriterion");
for (int i = 0; i < array.size(); i++) {
res.getRejectionCriterion().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("handling")) {
JsonArray array = getJArray(json, "handling");
for (int i = 0; i < array.size(); i++) {
res.getHandling().add(parseSpecimenDefinitionTypeTestedHandlingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("testingDestination")) {
JsonArray array = getJArray(json, "testingDestination");
for (int i = 0; i < array.size(); i++) {
res.getTestingDestination().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent parseSpecimenDefinitionTypeTestedContainerComponent(JsonObject json) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent();
parseSpecimenDefinitionTypeTestedContainerComponentProperties(json, res);
return res;
}
protected void parseSpecimenDefinitionTypeTestedContainerComponentProperties(JsonObject json, SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("material"))
res.setMaterial(parseCodeableConcept(getJObject(json, "material")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("cap"))
res.setCap(parseCodeableConcept(getJObject(json, "cap")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("capacity"))
res.setCapacity(parseQuantity(getJObject(json, "capacity")));
DataType minimumVolume = parseType("minimumVolume", json);
if (minimumVolume != null)
res.setMinimumVolume(minimumVolume);
if (json.has("additive")) {
JsonArray array = getJArray(json, "additive");
for (int i = 0; i < array.size(); i++) {
res.getAdditive().add(parseSpecimenDefinitionTypeTestedContainerAdditiveComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("preparation"))
res.setPreparationElement(parseMarkdown(json.get("preparation").getAsString()));
if (json.has("_preparation"))
parseElementProperties(getJObject(json, "_preparation"), res.getPreparationElement());
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent parseSpecimenDefinitionTypeTestedContainerAdditiveComponent(JsonObject json) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent();
parseSpecimenDefinitionTypeTestedContainerAdditiveComponentProperties(json, res);
return res;
}
protected void parseSpecimenDefinitionTypeTestedContainerAdditiveComponentProperties(JsonObject json, SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType additive = parseType("additive", json);
if (additive != null)
res.setAdditive(additive);
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent parseSpecimenDefinitionTypeTestedHandlingComponent(JsonObject json) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent();
parseSpecimenDefinitionTypeTestedHandlingComponentProperties(json, res);
return res;
}
protected void parseSpecimenDefinitionTypeTestedHandlingComponentProperties(JsonObject json, SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("temperatureQualifier"))
res.setTemperatureQualifier(parseCodeableConcept(getJObject(json, "temperatureQualifier")));
if (json.has("temperatureRange"))
res.setTemperatureRange(parseRange(getJObject(json, "temperatureRange")));
if (json.has("maxDuration"))
res.setMaxDuration(parseDuration(getJObject(json, "maxDuration")));
if (json.has("instruction"))
res.setInstructionElement(parseMarkdown(json.get("instruction").getAsString()));
if (json.has("_instruction"))
parseElementProperties(getJObject(json, "_instruction"), res.getInstructionElement());
}
protected StructureDefinition parseStructureDefinition(JsonObject json) throws IOException, FHIRFormatError {
StructureDefinition res = new StructureDefinition();
parseStructureDefinitionProperties(json, res);
return res;
}
protected void parseStructureDefinitionProperties(JsonObject json, StructureDefinition res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("keyword")) {
JsonArray array = getJArray(json, "keyword");
for (int i = 0; i < array.size(); i++) {
res.getKeyword().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("fhirVersion"))
res.setFhirVersionElement(parseEnumeration(json.get("fhirVersion").getAsString(), Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory()));
if (json.has("_fhirVersion"))
parseElementProperties(getJObject(json, "_fhirVersion"), res.getFhirVersionElement());
if (json.has("mapping")) {
JsonArray array = getJArray(json, "mapping");
for (int i = 0; i < array.size(); i++) {
res.getMapping().add(parseStructureDefinitionMappingComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), StructureDefinition.StructureDefinitionKind.NULL, new StructureDefinition.StructureDefinitionKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("abstract"))
res.setAbstractElement(parseBoolean(json.get("abstract").getAsBoolean()));
if (json.has("_abstract"))
parseElementProperties(getJObject(json, "_abstract"), res.getAbstractElement());
if (json.has("context")) {
JsonArray array = getJArray(json, "context");
for (int i = 0; i < array.size(); i++) {
res.getContext().add(parseStructureDefinitionContextComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contextInvariant")) {
JsonArray array = getJArray(json, "contextInvariant");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getContextInvariant().add(new StringType());
} else {;
res.getContextInvariant().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_contextInvariant")) {
JsonArray array = getJArray(json, "_contextInvariant");
for (int i = 0; i < array.size(); i++) {
if (i == res.getContextInvariant().size())
res.getContextInvariant().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getContextInvariant().get(i));
}
};
if (json.has("type"))
res.setTypeElement(parseUri(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("baseDefinition"))
res.setBaseDefinitionElement(parseCanonical(json.get("baseDefinition").getAsString()));
if (json.has("_baseDefinition"))
parseElementProperties(getJObject(json, "_baseDefinition"), res.getBaseDefinitionElement());
if (json.has("derivation"))
res.setDerivationElement(parseEnumeration(json.get("derivation").getAsString(), StructureDefinition.TypeDerivationRule.NULL, new StructureDefinition.TypeDerivationRuleEnumFactory()));
if (json.has("_derivation"))
parseElementProperties(getJObject(json, "_derivation"), res.getDerivationElement());
if (json.has("snapshot"))
res.setSnapshot(parseStructureDefinitionSnapshotComponent(getJObject(json, "snapshot")));
if (json.has("differential"))
res.setDifferential(parseStructureDefinitionDifferentialComponent(getJObject(json, "differential")));
}
protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionMappingComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent();
parseStructureDefinitionMappingComponentProperties(json, res);
return res;
}
protected void parseStructureDefinitionMappingComponentProperties(JsonObject json, StructureDefinition.StructureDefinitionMappingComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identity"))
res.setIdentityElement(parseId(json.get("identity").getAsString()));
if (json.has("_identity"))
parseElementProperties(getJObject(json, "_identity"), res.getIdentityElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
protected StructureDefinition.StructureDefinitionContextComponent parseStructureDefinitionContextComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionContextComponent res = new StructureDefinition.StructureDefinitionContextComponent();
parseStructureDefinitionContextComponentProperties(json, res);
return res;
}
protected void parseStructureDefinitionContextComponentProperties(JsonObject json, StructureDefinition.StructureDefinitionContextComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), StructureDefinition.ExtensionContextType.NULL, new StructureDefinition.ExtensionContextTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
}
protected StructureDefinition.StructureDefinitionSnapshotComponent parseStructureDefinitionSnapshotComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent();
parseStructureDefinitionSnapshotComponentProperties(json, res);
return res;
}
protected void parseStructureDefinitionSnapshotComponentProperties(JsonObject json, StructureDefinition.StructureDefinitionSnapshotComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("element")) {
JsonArray array = getJArray(json, "element");
for (int i = 0; i < array.size(); i++) {
res.getElement().add(parseElementDefinition(getJsonObjectFromArray(array, i)));
}
};
}
protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionDifferentialComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent();
parseStructureDefinitionDifferentialComponentProperties(json, res);
return res;
}
protected void parseStructureDefinitionDifferentialComponentProperties(JsonObject json, StructureDefinition.StructureDefinitionDifferentialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("element")) {
JsonArray array = getJArray(json, "element");
for (int i = 0; i < array.size(); i++) {
res.getElement().add(parseElementDefinition(getJsonObjectFromArray(array, i)));
}
};
}
protected StructureMap parseStructureMap(JsonObject json) throws IOException, FHIRFormatError {
StructureMap res = new StructureMap();
parseStructureMapProperties(json, res);
return res;
}
protected void parseStructureMapProperties(JsonObject json, StructureMap res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("structure")) {
JsonArray array = getJArray(json, "structure");
for (int i = 0; i < array.size(); i++) {
res.getStructure().add(parseStructureMapStructureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("import")) {
JsonArray array = getJArray(json, "import");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getImport().add(new CanonicalType());
} else {;
res.getImport().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_import")) {
JsonArray array = getJArray(json, "_import");
for (int i = 0; i < array.size(); i++) {
if (i == res.getImport().size())
res.getImport().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getImport().get(i));
}
};
if (json.has("const")) {
JsonArray array = getJArray(json, "const");
for (int i = 0; i < array.size(); i++) {
res.getConst().add(parseStructureMapConstComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("group")) {
JsonArray array = getJArray(json, "group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseStructureMapGroupComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected StructureMap.StructureMapStructureComponent parseStructureMapStructureComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent();
parseStructureMapStructureComponentProperties(json, res);
return res;
}
protected void parseStructureMapStructureComponentProperties(JsonObject json, StructureMap.StructureMapStructureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseCanonical(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), StructureMap.StructureMapModelMode.NULL, new StructureMap.StructureMapModelModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("alias"))
res.setAliasElement(parseString(json.get("alias").getAsString()));
if (json.has("_alias"))
parseElementProperties(getJObject(json, "_alias"), res.getAliasElement());
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected StructureMap.StructureMapConstComponent parseStructureMapConstComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapConstComponent res = new StructureMap.StructureMapConstComponent();
parseStructureMapConstComponentProperties(json, res);
return res;
}
protected void parseStructureMapConstComponentProperties(JsonObject json, StructureMap.StructureMapConstComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseId(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected StructureMap.StructureMapGroupComponent parseStructureMapGroupComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent();
parseStructureMapGroupComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupComponentProperties(JsonObject json, StructureMap.StructureMapGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseId(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("extends"))
res.setExtendsElement(parseId(json.get("extends").getAsString()));
if (json.has("_extends"))
parseElementProperties(getJObject(json, "_extends"), res.getExtendsElement());
if (json.has("typeMode"))
res.setTypeModeElement(parseEnumeration(json.get("typeMode").getAsString(), StructureMap.StructureMapGroupTypeMode.NULL, new StructureMap.StructureMapGroupTypeModeEnumFactory()));
if (json.has("_typeMode"))
parseElementProperties(getJObject(json, "_typeMode"), res.getTypeModeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
if (json.has("input")) {
JsonArray array = getJArray(json, "input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseStructureMapGroupInputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("rule")) {
JsonArray array = getJArray(json, "rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parseStructureMapGroupRuleComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected StructureMap.StructureMapGroupInputComponent parseStructureMapGroupInputComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent();
parseStructureMapGroupInputComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupInputComponentProperties(JsonObject json, StructureMap.StructureMapGroupInputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseId(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type"))
res.setTypeElement(parseString(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), StructureMap.StructureMapInputMode.NULL, new StructureMap.StructureMapInputModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected StructureMap.StructureMapGroupRuleComponent parseStructureMapGroupRuleComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent();
parseStructureMapGroupRuleComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupRuleComponentProperties(JsonObject json, StructureMap.StructureMapGroupRuleComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseId(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseStructureMapGroupRuleSourceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseStructureMapGroupRuleTargetComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("rule")) {
JsonArray array = getJArray(json, "rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parseStructureMapGroupRuleComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dependent")) {
JsonArray array = getJArray(json, "dependent");
for (int i = 0; i < array.size(); i++) {
res.getDependent().add(parseStructureMapGroupRuleDependentComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapGroupRuleSourceComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent();
parseStructureMapGroupRuleSourceComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupRuleSourceComponentProperties(JsonObject json, StructureMap.StructureMapGroupRuleSourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("context"))
res.setContextElement(parseId(json.get("context").getAsString()));
if (json.has("_context"))
parseElementProperties(getJObject(json, "_context"), res.getContextElement());
if (json.has("min"))
res.setMinElement(parseInteger(json.get("min").getAsLong()));
if (json.has("_min"))
parseElementProperties(getJObject(json, "_min"), res.getMinElement());
if (json.has("max"))
res.setMaxElement(parseString(json.get("max").getAsString()));
if (json.has("_max"))
parseElementProperties(getJObject(json, "_max"), res.getMaxElement());
if (json.has("type"))
res.setTypeElement(parseString(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("defaultValue"))
res.setDefaultValueElement(parseString(json.get("defaultValue").getAsString()));
if (json.has("_defaultValue"))
parseElementProperties(getJObject(json, "_defaultValue"), res.getDefaultValueElement());
if (json.has("element"))
res.setElementElement(parseString(json.get("element").getAsString()));
if (json.has("_element"))
parseElementProperties(getJObject(json, "_element"), res.getElementElement());
if (json.has("listMode"))
res.setListModeElement(parseEnumeration(json.get("listMode").getAsString(), StructureMap.StructureMapSourceListMode.NULL, new StructureMap.StructureMapSourceListModeEnumFactory()));
if (json.has("_listMode"))
parseElementProperties(getJObject(json, "_listMode"), res.getListModeElement());
if (json.has("variable"))
res.setVariableElement(parseId(json.get("variable").getAsString()));
if (json.has("_variable"))
parseElementProperties(getJObject(json, "_variable"), res.getVariableElement());
if (json.has("condition"))
res.setConditionElement(parseString(json.get("condition").getAsString()));
if (json.has("_condition"))
parseElementProperties(getJObject(json, "_condition"), res.getConditionElement());
if (json.has("check"))
res.setCheckElement(parseString(json.get("check").getAsString()));
if (json.has("_check"))
parseElementProperties(getJObject(json, "_check"), res.getCheckElement());
if (json.has("logMessage"))
res.setLogMessageElement(parseString(json.get("logMessage").getAsString()));
if (json.has("_logMessage"))
parseElementProperties(getJObject(json, "_logMessage"), res.getLogMessageElement());
}
protected StructureMap.StructureMapGroupRuleTargetComponent parseStructureMapGroupRuleTargetComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent();
parseStructureMapGroupRuleTargetComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupRuleTargetComponentProperties(JsonObject json, StructureMap.StructureMapGroupRuleTargetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("context"))
res.setContextElement(parseString(json.get("context").getAsString()));
if (json.has("_context"))
parseElementProperties(getJObject(json, "_context"), res.getContextElement());
if (json.has("element"))
res.setElementElement(parseString(json.get("element").getAsString()));
if (json.has("_element"))
parseElementProperties(getJObject(json, "_element"), res.getElementElement());
if (json.has("variable"))
res.setVariableElement(parseId(json.get("variable").getAsString()));
if (json.has("_variable"))
parseElementProperties(getJObject(json, "_variable"), res.getVariableElement());
if (json.has("listMode")) {
JsonArray array = getJArray(json, "listMode");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getListMode().add(new Enumeration(new StructureMap.StructureMapTargetListModeEnumFactory(), StructureMap.StructureMapTargetListMode.NULL));
} else {;
res.getListMode().add(parseEnumeration(array.get(i).getAsString(), StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory()));
}
}
};
if (json.has("_listMode")) {
JsonArray array = getJArray(json, "_listMode");
for (int i = 0; i < array.size(); i++) {
if (i == res.getListMode().size())
res.getListMode().add(parseEnumeration(null, StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getListMode().get(i));
}
};
if (json.has("listRuleId"))
res.setListRuleIdElement(parseId(json.get("listRuleId").getAsString()));
if (json.has("_listRuleId"))
parseElementProperties(getJObject(json, "_listRuleId"), res.getListRuleIdElement());
if (json.has("transform"))
res.setTransformElement(parseEnumeration(json.get("transform").getAsString(), StructureMap.StructureMapTransform.NULL, new StructureMap.StructureMapTransformEnumFactory()));
if (json.has("_transform"))
parseElementProperties(getJObject(json, "_transform"), res.getTransformElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseStructureMapGroupRuleTargetParameterComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapGroupRuleTargetParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent();
parseStructureMapGroupRuleTargetParameterComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupRuleTargetParameterComponentProperties(JsonObject json, StructureMap.StructureMapGroupRuleTargetParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapGroupRuleDependentComponent(JsonObject json) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent();
parseStructureMapGroupRuleDependentComponentProperties(json, res);
return res;
}
protected void parseStructureMapGroupRuleDependentComponentProperties(JsonObject json, StructureMap.StructureMapGroupRuleDependentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseId(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseStructureMapGroupRuleTargetParameterComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Subscription parseSubscription(JsonObject json) throws IOException, FHIRFormatError {
Subscription res = new Subscription();
parseSubscriptionProperties(json, res);
return res;
}
protected void parseSubscriptionProperties(JsonObject json, Subscription res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.SubscriptionStatusCodes.NULL, new Enumerations.SubscriptionStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("topic"))
res.setTopicElement(parseCanonical(json.get("topic").getAsString()));
if (json.has("_topic"))
parseElementProperties(getJObject(json, "_topic"), res.getTopicElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(getJsonObjectFromArray(array, i)));
}
};
if (json.has("end"))
res.setEndElement(parseInstant(json.get("end").getAsString()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
if (json.has("managingEntity"))
res.setManagingEntity(parseReference(getJObject(json, "managingEntity")));
if (json.has("reason"))
res.setReasonElement(parseString(json.get("reason").getAsString()));
if (json.has("_reason"))
parseElementProperties(getJObject(json, "_reason"), res.getReasonElement());
if (json.has("filterBy")) {
JsonArray array = getJArray(json, "filterBy");
for (int i = 0; i < array.size(); i++) {
res.getFilterBy().add(parseSubscriptionFilterByComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("channelType"))
res.setChannelType(parseCoding(getJObject(json, "channelType")));
if (json.has("endpoint"))
res.setEndpointElement(parseUrl(json.get("endpoint").getAsString()));
if (json.has("_endpoint"))
parseElementProperties(getJObject(json, "_endpoint"), res.getEndpointElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseSubscriptionParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("heartbeatPeriod"))
res.setHeartbeatPeriodElement(parseUnsignedInt(json.get("heartbeatPeriod").getAsString()));
if (json.has("_heartbeatPeriod"))
parseElementProperties(getJObject(json, "_heartbeatPeriod"), res.getHeartbeatPeriodElement());
if (json.has("timeout"))
res.setTimeoutElement(parseUnsignedInt(json.get("timeout").getAsString()));
if (json.has("_timeout"))
parseElementProperties(getJObject(json, "_timeout"), res.getTimeoutElement());
if (json.has("contentType"))
res.setContentTypeElement(parseCode(json.get("contentType").getAsString()));
if (json.has("_contentType"))
parseElementProperties(getJObject(json, "_contentType"), res.getContentTypeElement());
if (json.has("content"))
res.setContentElement(parseEnumeration(json.get("content").getAsString(), Subscription.SubscriptionPayloadContent.NULL, new Subscription.SubscriptionPayloadContentEnumFactory()));
if (json.has("_content"))
parseElementProperties(getJObject(json, "_content"), res.getContentElement());
if (json.has("maxCount"))
res.setMaxCountElement(parsePositiveInt(json.get("maxCount").getAsString()));
if (json.has("_maxCount"))
parseElementProperties(getJObject(json, "_maxCount"), res.getMaxCountElement());
}
protected Subscription.SubscriptionFilterByComponent parseSubscriptionFilterByComponent(JsonObject json) throws IOException, FHIRFormatError {
Subscription.SubscriptionFilterByComponent res = new Subscription.SubscriptionFilterByComponent();
parseSubscriptionFilterByComponentProperties(json, res);
return res;
}
protected void parseSubscriptionFilterByComponentProperties(JsonObject json, Subscription.SubscriptionFilterByComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("resourceType"))
res.setResourceTypeElement(parseUri(json.get("resourceType").getAsString()));
if (json.has("_resourceType"))
parseElementProperties(getJObject(json, "_resourceType"), res.getResourceTypeElement());
if (json.has("filterParameter"))
res.setFilterParameterElement(parseString(json.get("filterParameter").getAsString()));
if (json.has("_filterParameter"))
parseElementProperties(getJObject(json, "_filterParameter"), res.getFilterParameterElement());
if (json.has("comparator"))
res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), Enumerations.SearchComparator.NULL, new Enumerations.SearchComparatorEnumFactory()));
if (json.has("_comparator"))
parseElementProperties(getJObject(json, "_comparator"), res.getComparatorElement());
if (json.has("modifier"))
res.setModifierElement(parseEnumeration(json.get("modifier").getAsString(), Enumerations.SearchModifierCode.NULL, new Enumerations.SearchModifierCodeEnumFactory()));
if (json.has("_modifier"))
parseElementProperties(getJObject(json, "_modifier"), res.getModifierElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected Subscription.SubscriptionParameterComponent parseSubscriptionParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
Subscription.SubscriptionParameterComponent res = new Subscription.SubscriptionParameterComponent();
parseSubscriptionParameterComponentProperties(json, res);
return res;
}
protected void parseSubscriptionParameterComponentProperties(JsonObject json, Subscription.SubscriptionParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected SubscriptionStatus parseSubscriptionStatus(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionStatus res = new SubscriptionStatus();
parseSubscriptionStatusProperties(json, res);
return res;
}
protected void parseSubscriptionStatusProperties(JsonObject json, SubscriptionStatus res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.SubscriptionStatusCodes.NULL, new Enumerations.SubscriptionStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), SubscriptionStatus.SubscriptionNotificationType.NULL, new SubscriptionStatus.SubscriptionNotificationTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("eventsSinceSubscriptionStart"))
res.setEventsSinceSubscriptionStartElement(parseInteger64(json.get("eventsSinceSubscriptionStart").getAsLong()));
if (json.has("_eventsSinceSubscriptionStart"))
parseElementProperties(getJObject(json, "_eventsSinceSubscriptionStart"), res.getEventsSinceSubscriptionStartElement());
if (json.has("notificationEvent")) {
JsonArray array = getJArray(json, "notificationEvent");
for (int i = 0; i < array.size(); i++) {
res.getNotificationEvent().add(parseSubscriptionStatusNotificationEventComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("subscription"))
res.setSubscription(parseReference(getJObject(json, "subscription")));
if (json.has("topic"))
res.setTopicElement(parseCanonical(json.get("topic").getAsString()));
if (json.has("_topic"))
parseElementProperties(getJObject(json, "_topic"), res.getTopicElement());
if (json.has("error")) {
JsonArray array = getJArray(json, "error");
for (int i = 0; i < array.size(); i++) {
res.getError().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected SubscriptionStatus.SubscriptionStatusNotificationEventComponent parseSubscriptionStatusNotificationEventComponent(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionStatus.SubscriptionStatusNotificationEventComponent res = new SubscriptionStatus.SubscriptionStatusNotificationEventComponent();
parseSubscriptionStatusNotificationEventComponentProperties(json, res);
return res;
}
protected void parseSubscriptionStatusNotificationEventComponentProperties(JsonObject json, SubscriptionStatus.SubscriptionStatusNotificationEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("eventNumber"))
res.setEventNumberElement(parseInteger64(json.get("eventNumber").getAsLong()));
if (json.has("_eventNumber"))
parseElementProperties(getJObject(json, "_eventNumber"), res.getEventNumberElement());
if (json.has("timestamp"))
res.setTimestampElement(parseInstant(json.get("timestamp").getAsString()));
if (json.has("_timestamp"))
parseElementProperties(getJObject(json, "_timestamp"), res.getTimestampElement());
if (json.has("focus"))
res.setFocus(parseReference(getJObject(json, "focus")));
if (json.has("additionalContext")) {
JsonArray array = getJArray(json, "additionalContext");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalContext().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubscriptionTopic parseSubscriptionTopic(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionTopic res = new SubscriptionTopic();
parseSubscriptionTopicProperties(json, res);
return res;
}
protected void parseSubscriptionTopicProperties(JsonObject json, SubscriptionTopic res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("derivedFrom")) {
JsonArray array = getJArray(json, "derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDerivedFrom().add(new CanonicalType());
} else {;
res.getDerivedFrom().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_derivedFrom")) {
JsonArray array = getJArray(json, "_derivedFrom");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDerivedFrom().size())
res.getDerivedFrom().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDerivedFrom().get(i));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("resourceTrigger")) {
JsonArray array = getJArray(json, "resourceTrigger");
for (int i = 0; i < array.size(); i++) {
res.getResourceTrigger().add(parseSubscriptionTopicResourceTriggerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("eventTrigger")) {
JsonArray array = getJArray(json, "eventTrigger");
for (int i = 0; i < array.size(); i++) {
res.getEventTrigger().add(parseSubscriptionTopicEventTriggerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("canFilterBy")) {
JsonArray array = getJArray(json, "canFilterBy");
for (int i = 0; i < array.size(); i++) {
res.getCanFilterBy().add(parseSubscriptionTopicCanFilterByComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("notificationShape")) {
JsonArray array = getJArray(json, "notificationShape");
for (int i = 0; i < array.size(); i++) {
res.getNotificationShape().add(parseSubscriptionTopicNotificationShapeComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubscriptionTopic.SubscriptionTopicResourceTriggerComponent parseSubscriptionTopicResourceTriggerComponent(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionTopic.SubscriptionTopicResourceTriggerComponent res = new SubscriptionTopic.SubscriptionTopicResourceTriggerComponent();
parseSubscriptionTopicResourceTriggerComponentProperties(json, res);
return res;
}
protected void parseSubscriptionTopicResourceTriggerComponentProperties(JsonObject json, SubscriptionTopic.SubscriptionTopicResourceTriggerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("resource"))
res.setResourceElement(parseUri(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("supportedInteraction")) {
JsonArray array = getJArray(json, "supportedInteraction");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSupportedInteraction().add(new Enumeration(new SubscriptionTopic.InteractionTriggerEnumFactory(), SubscriptionTopic.InteractionTrigger.NULL));
} else {;
res.getSupportedInteraction().add(parseEnumeration(array.get(i).getAsString(), SubscriptionTopic.InteractionTrigger.NULL, new SubscriptionTopic.InteractionTriggerEnumFactory()));
}
}
};
if (json.has("_supportedInteraction")) {
JsonArray array = getJArray(json, "_supportedInteraction");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSupportedInteraction().size())
res.getSupportedInteraction().add(parseEnumeration(null, SubscriptionTopic.InteractionTrigger.NULL, new SubscriptionTopic.InteractionTriggerEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getSupportedInteraction().get(i));
}
};
if (json.has("queryCriteria"))
res.setQueryCriteria(parseSubscriptionTopicResourceTriggerQueryCriteriaComponent(getJObject(json, "queryCriteria")));
if (json.has("fhirPathCriteria"))
res.setFhirPathCriteriaElement(parseString(json.get("fhirPathCriteria").getAsString()));
if (json.has("_fhirPathCriteria"))
parseElementProperties(getJObject(json, "_fhirPathCriteria"), res.getFhirPathCriteriaElement());
}
protected SubscriptionTopic.SubscriptionTopicResourceTriggerQueryCriteriaComponent parseSubscriptionTopicResourceTriggerQueryCriteriaComponent(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionTopic.SubscriptionTopicResourceTriggerQueryCriteriaComponent res = new SubscriptionTopic.SubscriptionTopicResourceTriggerQueryCriteriaComponent();
parseSubscriptionTopicResourceTriggerQueryCriteriaComponentProperties(json, res);
return res;
}
protected void parseSubscriptionTopicResourceTriggerQueryCriteriaComponentProperties(JsonObject json, SubscriptionTopic.SubscriptionTopicResourceTriggerQueryCriteriaComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("previous"))
res.setPreviousElement(parseString(json.get("previous").getAsString()));
if (json.has("_previous"))
parseElementProperties(getJObject(json, "_previous"), res.getPreviousElement());
if (json.has("resultForCreate"))
res.setResultForCreateElement(parseEnumeration(json.get("resultForCreate").getAsString(), SubscriptionTopic.CriteriaNotExistsBehavior.NULL, new SubscriptionTopic.CriteriaNotExistsBehaviorEnumFactory()));
if (json.has("_resultForCreate"))
parseElementProperties(getJObject(json, "_resultForCreate"), res.getResultForCreateElement());
if (json.has("current"))
res.setCurrentElement(parseString(json.get("current").getAsString()));
if (json.has("_current"))
parseElementProperties(getJObject(json, "_current"), res.getCurrentElement());
if (json.has("resultForDelete"))
res.setResultForDeleteElement(parseEnumeration(json.get("resultForDelete").getAsString(), SubscriptionTopic.CriteriaNotExistsBehavior.NULL, new SubscriptionTopic.CriteriaNotExistsBehaviorEnumFactory()));
if (json.has("_resultForDelete"))
parseElementProperties(getJObject(json, "_resultForDelete"), res.getResultForDeleteElement());
if (json.has("requireBoth"))
res.setRequireBothElement(parseBoolean(json.get("requireBoth").getAsBoolean()));
if (json.has("_requireBoth"))
parseElementProperties(getJObject(json, "_requireBoth"), res.getRequireBothElement());
}
protected SubscriptionTopic.SubscriptionTopicEventTriggerComponent parseSubscriptionTopicEventTriggerComponent(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionTopic.SubscriptionTopicEventTriggerComponent res = new SubscriptionTopic.SubscriptionTopicEventTriggerComponent();
parseSubscriptionTopicEventTriggerComponentProperties(json, res);
return res;
}
protected void parseSubscriptionTopicEventTriggerComponentProperties(JsonObject json, SubscriptionTopic.SubscriptionTopicEventTriggerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("event"))
res.setEvent(parseCodeableConcept(getJObject(json, "event")));
if (json.has("resource"))
res.setResourceElement(parseUri(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
}
protected SubscriptionTopic.SubscriptionTopicCanFilterByComponent parseSubscriptionTopicCanFilterByComponent(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionTopic.SubscriptionTopicCanFilterByComponent res = new SubscriptionTopic.SubscriptionTopicCanFilterByComponent();
parseSubscriptionTopicCanFilterByComponentProperties(json, res);
return res;
}
protected void parseSubscriptionTopicCanFilterByComponentProperties(JsonObject json, SubscriptionTopic.SubscriptionTopicCanFilterByComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("resource"))
res.setResourceElement(parseUri(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("filterParameter"))
res.setFilterParameterElement(parseString(json.get("filterParameter").getAsString()));
if (json.has("_filterParameter"))
parseElementProperties(getJObject(json, "_filterParameter"), res.getFilterParameterElement());
if (json.has("filterDefinition"))
res.setFilterDefinitionElement(parseUri(json.get("filterDefinition").getAsString()));
if (json.has("_filterDefinition"))
parseElementProperties(getJObject(json, "_filterDefinition"), res.getFilterDefinitionElement());
if (json.has("comparator")) {
JsonArray array = getJArray(json, "comparator");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getComparator().add(new Enumeration(new Enumerations.SearchComparatorEnumFactory(), Enumerations.SearchComparator.NULL));
} else {;
res.getComparator().add(parseEnumeration(array.get(i).getAsString(), Enumerations.SearchComparator.NULL, new Enumerations.SearchComparatorEnumFactory()));
}
}
};
if (json.has("_comparator")) {
JsonArray array = getJArray(json, "_comparator");
for (int i = 0; i < array.size(); i++) {
if (i == res.getComparator().size())
res.getComparator().add(parseEnumeration(null, Enumerations.SearchComparator.NULL, new Enumerations.SearchComparatorEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getComparator().get(i));
}
};
if (json.has("modifier")) {
JsonArray array = getJArray(json, "modifier");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getModifier().add(new Enumeration(new Enumerations.SearchModifierCodeEnumFactory(), Enumerations.SearchModifierCode.NULL));
} else {;
res.getModifier().add(parseEnumeration(array.get(i).getAsString(), Enumerations.SearchModifierCode.NULL, new Enumerations.SearchModifierCodeEnumFactory()));
}
}
};
if (json.has("_modifier")) {
JsonArray array = getJArray(json, "_modifier");
for (int i = 0; i < array.size(); i++) {
if (i == res.getModifier().size())
res.getModifier().add(parseEnumeration(null, Enumerations.SearchModifierCode.NULL, new Enumerations.SearchModifierCodeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getModifier().get(i));
}
};
}
protected SubscriptionTopic.SubscriptionTopicNotificationShapeComponent parseSubscriptionTopicNotificationShapeComponent(JsonObject json) throws IOException, FHIRFormatError {
SubscriptionTopic.SubscriptionTopicNotificationShapeComponent res = new SubscriptionTopic.SubscriptionTopicNotificationShapeComponent();
parseSubscriptionTopicNotificationShapeComponentProperties(json, res);
return res;
}
protected void parseSubscriptionTopicNotificationShapeComponentProperties(JsonObject json, SubscriptionTopic.SubscriptionTopicNotificationShapeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("resource"))
res.setResourceElement(parseUri(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("include")) {
JsonArray array = getJArray(json, "include");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getInclude().add(new StringType());
} else {;
res.getInclude().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_include")) {
JsonArray array = getJArray(json, "_include");
for (int i = 0; i < array.size(); i++) {
if (i == res.getInclude().size())
res.getInclude().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getInclude().get(i));
}
};
if (json.has("revInclude")) {
JsonArray array = getJArray(json, "revInclude");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getRevInclude().add(new StringType());
} else {;
res.getRevInclude().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_revInclude")) {
JsonArray array = getJArray(json, "_revInclude");
for (int i = 0; i < array.size(); i++) {
if (i == res.getRevInclude().size())
res.getRevInclude().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getRevInclude().get(i));
}
};
}
protected Substance parseSubstance(JsonObject json) throws IOException, FHIRFormatError {
Substance res = new Substance();
parseSubstanceProperties(json, res);
return res;
}
protected void parseSubstanceProperties(JsonObject json, Substance res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instance"))
res.setInstanceElement(parseBoolean(json.get("instance").getAsBoolean()));
if (json.has("_instance"))
parseElementProperties(getJObject(json, "_instance"), res.getInstanceElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Substance.FHIRSubstanceStatus.NULL, new Substance.FHIRSubstanceStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("code"))
res.setCode(parseCodeableReference(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("expiry"))
res.setExpiryElement(parseDateTime(json.get("expiry").getAsString()));
if (json.has("_expiry"))
parseElementProperties(getJObject(json, "_expiry"), res.getExpiryElement());
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("ingredient")) {
JsonArray array = getJArray(json, "ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseSubstanceIngredientComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Substance.SubstanceIngredientComponent parseSubstanceIngredientComponent(JsonObject json) throws IOException, FHIRFormatError {
Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent();
parseSubstanceIngredientComponentProperties(json, res);
return res;
}
protected void parseSubstanceIngredientComponentProperties(JsonObject json, Substance.SubstanceIngredientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseRatio(getJObject(json, "quantity")));
DataType substance = parseType("substance", json);
if (substance != null)
res.setSubstance(substance);
}
protected SubstanceDefinition parseSubstanceDefinition(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition res = new SubstanceDefinition();
parseSubstanceDefinitionProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionProperties(JsonObject json, SubstanceDefinition res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("classification")) {
JsonArray array = getJArray(json, "classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("domain"))
res.setDomain(parseCodeableConcept(getJObject(json, "domain")));
if (json.has("grade")) {
JsonArray array = getJArray(json, "grade");
for (int i = 0; i < array.size(); i++) {
res.getGrade().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("informationSource")) {
JsonArray array = getJArray(json, "informationSource");
for (int i = 0; i < array.size(); i++) {
res.getInformationSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("manufacturer")) {
JsonArray array = getJArray(json, "manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("supplier")) {
JsonArray array = getJArray(json, "supplier");
for (int i = 0; i < array.size(); i++) {
res.getSupplier().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("moiety")) {
JsonArray array = getJArray(json, "moiety");
for (int i = 0; i < array.size(); i++) {
res.getMoiety().add(parseSubstanceDefinitionMoietyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("characterization")) {
JsonArray array = getJArray(json, "characterization");
for (int i = 0; i < array.size(); i++) {
res.getCharacterization().add(parseSubstanceDefinitionCharacterizationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseSubstanceDefinitionPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("referenceInformation"))
res.setReferenceInformation(parseReference(getJObject(json, "referenceInformation")));
if (json.has("molecularWeight")) {
JsonArray array = getJArray(json, "molecularWeight");
for (int i = 0; i < array.size(); i++) {
res.getMolecularWeight().add(parseSubstanceDefinitionMolecularWeightComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("structure"))
res.setStructure(parseSubstanceDefinitionStructureComponent(getJObject(json, "structure")));
if (json.has("code")) {
JsonArray array = getJArray(json, "code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseSubstanceDefinitionCodeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("name")) {
JsonArray array = getJArray(json, "name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseSubstanceDefinitionNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relationship")) {
JsonArray array = getJArray(json, "relationship");
for (int i = 0; i < array.size(); i++) {
res.getRelationship().add(parseSubstanceDefinitionRelationshipComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("nucleicAcid"))
res.setNucleicAcid(parseReference(getJObject(json, "nucleicAcid")));
if (json.has("polymer"))
res.setPolymer(parseReference(getJObject(json, "polymer")));
if (json.has("protein"))
res.setProtein(parseReference(getJObject(json, "protein")));
if (json.has("sourceMaterial"))
res.setSourceMaterial(parseSubstanceDefinitionSourceMaterialComponent(getJObject(json, "sourceMaterial")));
}
protected SubstanceDefinition.SubstanceDefinitionMoietyComponent parseSubstanceDefinitionMoietyComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionMoietyComponent res = new SubstanceDefinition.SubstanceDefinitionMoietyComponent();
parseSubstanceDefinitionMoietyComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionMoietyComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionMoietyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("stereochemistry"))
res.setStereochemistry(parseCodeableConcept(getJObject(json, "stereochemistry")));
if (json.has("opticalActivity"))
res.setOpticalActivity(parseCodeableConcept(getJObject(json, "opticalActivity")));
if (json.has("molecularFormula"))
res.setMolecularFormulaElement(parseString(json.get("molecularFormula").getAsString()));
if (json.has("_molecularFormula"))
parseElementProperties(getJObject(json, "_molecularFormula"), res.getMolecularFormulaElement());
DataType amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
if (json.has("measurementType"))
res.setMeasurementType(parseCodeableConcept(getJObject(json, "measurementType")));
}
protected SubstanceDefinition.SubstanceDefinitionCharacterizationComponent parseSubstanceDefinitionCharacterizationComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionCharacterizationComponent res = new SubstanceDefinition.SubstanceDefinitionCharacterizationComponent();
parseSubstanceDefinitionCharacterizationComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionCharacterizationComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionCharacterizationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("technique"))
res.setTechnique(parseCodeableConcept(getJObject(json, "technique")));
if (json.has("form"))
res.setForm(parseCodeableConcept(getJObject(json, "form")));
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("file")) {
JsonArray array = getJArray(json, "file");
for (int i = 0; i < array.size(); i++) {
res.getFile().add(parseAttachment(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceDefinition.SubstanceDefinitionPropertyComponent parseSubstanceDefinitionPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionPropertyComponent res = new SubstanceDefinition.SubstanceDefinitionPropertyComponent();
parseSubstanceDefinitionPropertyComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionPropertyComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent parseSubstanceDefinitionMolecularWeightComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent res = new SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent();
parseSubstanceDefinitionMolecularWeightComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionMolecularWeightComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
}
protected SubstanceDefinition.SubstanceDefinitionStructureComponent parseSubstanceDefinitionStructureComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionStructureComponent res = new SubstanceDefinition.SubstanceDefinitionStructureComponent();
parseSubstanceDefinitionStructureComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionStructureComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionStructureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("stereochemistry"))
res.setStereochemistry(parseCodeableConcept(getJObject(json, "stereochemistry")));
if (json.has("opticalActivity"))
res.setOpticalActivity(parseCodeableConcept(getJObject(json, "opticalActivity")));
if (json.has("molecularFormula"))
res.setMolecularFormulaElement(parseString(json.get("molecularFormula").getAsString()));
if (json.has("_molecularFormula"))
parseElementProperties(getJObject(json, "_molecularFormula"), res.getMolecularFormulaElement());
if (json.has("molecularFormulaByMoiety"))
res.setMolecularFormulaByMoietyElement(parseString(json.get("molecularFormulaByMoiety").getAsString()));
if (json.has("_molecularFormulaByMoiety"))
parseElementProperties(getJObject(json, "_molecularFormulaByMoiety"), res.getMolecularFormulaByMoietyElement());
if (json.has("molecularWeight"))
res.setMolecularWeight(parseSubstanceDefinitionMolecularWeightComponent(getJObject(json, "molecularWeight")));
if (json.has("technique")) {
JsonArray array = getJArray(json, "technique");
for (int i = 0; i < array.size(); i++) {
res.getTechnique().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("sourceDocument")) {
JsonArray array = getJArray(json, "sourceDocument");
for (int i = 0; i < array.size(); i++) {
res.getSourceDocument().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("representation")) {
JsonArray array = getJArray(json, "representation");
for (int i = 0; i < array.size(); i++) {
res.getRepresentation().add(parseSubstanceDefinitionStructureRepresentationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent parseSubstanceDefinitionStructureRepresentationComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent res = new SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent();
parseSubstanceDefinitionStructureRepresentationComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionStructureRepresentationComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("representation"))
res.setRepresentationElement(parseString(json.get("representation").getAsString()));
if (json.has("_representation"))
parseElementProperties(getJObject(json, "_representation"), res.getRepresentationElement());
if (json.has("format"))
res.setFormat(parseCodeableConcept(getJObject(json, "format")));
if (json.has("document"))
res.setDocument(parseReference(getJObject(json, "document")));
}
protected SubstanceDefinition.SubstanceDefinitionCodeComponent parseSubstanceDefinitionCodeComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionCodeComponent res = new SubstanceDefinition.SubstanceDefinitionCodeComponent();
parseSubstanceDefinitionCodeComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionCodeComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionCodeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("statusDate"))
res.setStatusDateElement(parseDateTime(json.get("statusDate").getAsString()));
if (json.has("_statusDate"))
parseElementProperties(getJObject(json, "_statusDate"), res.getStatusDateElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceDefinition.SubstanceDefinitionNameComponent parseSubstanceDefinitionNameComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionNameComponent res = new SubstanceDefinition.SubstanceDefinitionNameComponent();
parseSubstanceDefinitionNameComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionNameComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionNameComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("preferred"))
res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean()));
if (json.has("_preferred"))
parseElementProperties(getJObject(json, "_preferred"), res.getPreferredElement());
if (json.has("language")) {
JsonArray array = getJArray(json, "language");
for (int i = 0; i < array.size(); i++) {
res.getLanguage().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("domain")) {
JsonArray array = getJArray(json, "domain");
for (int i = 0; i < array.size(); i++) {
res.getDomain().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("synonym")) {
JsonArray array = getJArray(json, "synonym");
for (int i = 0; i < array.size(); i++) {
res.getSynonym().add(parseSubstanceDefinitionNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("translation")) {
JsonArray array = getJArray(json, "translation");
for (int i = 0; i < array.size(); i++) {
res.getTranslation().add(parseSubstanceDefinitionNameComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("official")) {
JsonArray array = getJArray(json, "official");
for (int i = 0; i < array.size(); i++) {
res.getOfficial().add(parseSubstanceDefinitionNameOfficialComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceDefinition.SubstanceDefinitionNameOfficialComponent parseSubstanceDefinitionNameOfficialComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionNameOfficialComponent res = new SubstanceDefinition.SubstanceDefinitionNameOfficialComponent();
parseSubstanceDefinitionNameOfficialComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionNameOfficialComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionNameOfficialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("authority"))
res.setAuthority(parseCodeableConcept(getJObject(json, "authority")));
if (json.has("status"))
res.setStatus(parseCodeableConcept(getJObject(json, "status")));
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
}
protected SubstanceDefinition.SubstanceDefinitionRelationshipComponent parseSubstanceDefinitionRelationshipComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionRelationshipComponent res = new SubstanceDefinition.SubstanceDefinitionRelationshipComponent();
parseSubstanceDefinitionRelationshipComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionRelationshipComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionRelationshipComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType substanceDefinition = parseType("substanceDefinition", json);
if (substanceDefinition != null)
res.setSubstanceDefinition(substanceDefinition);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("isDefining"))
res.setIsDefiningElement(parseBoolean(json.get("isDefining").getAsBoolean()));
if (json.has("_isDefining"))
parseElementProperties(getJObject(json, "_isDefining"), res.getIsDefiningElement());
DataType amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
if (json.has("ratioHighLimitAmount"))
res.setRatioHighLimitAmount(parseRatio(getJObject(json, "ratioHighLimitAmount")));
if (json.has("comparator"))
res.setComparator(parseCodeableConcept(getJObject(json, "comparator")));
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceDefinition.SubstanceDefinitionSourceMaterialComponent parseSubstanceDefinitionSourceMaterialComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceDefinition.SubstanceDefinitionSourceMaterialComponent res = new SubstanceDefinition.SubstanceDefinitionSourceMaterialComponent();
parseSubstanceDefinitionSourceMaterialComponentProperties(json, res);
return res;
}
protected void parseSubstanceDefinitionSourceMaterialComponentProperties(JsonObject json, SubstanceDefinition.SubstanceDefinitionSourceMaterialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("genus"))
res.setGenus(parseCodeableConcept(getJObject(json, "genus")));
if (json.has("species"))
res.setSpecies(parseCodeableConcept(getJObject(json, "species")));
if (json.has("part"))
res.setPart(parseCodeableConcept(getJObject(json, "part")));
if (json.has("countryOfOrigin")) {
JsonArray array = getJArray(json, "countryOfOrigin");
for (int i = 0; i < array.size(); i++) {
res.getCountryOfOrigin().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceNucleicAcid parseSubstanceNucleicAcid(JsonObject json) throws IOException, FHIRFormatError {
SubstanceNucleicAcid res = new SubstanceNucleicAcid();
parseSubstanceNucleicAcidProperties(json, res);
return res;
}
protected void parseSubstanceNucleicAcidProperties(JsonObject json, SubstanceNucleicAcid res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("sequenceType"))
res.setSequenceType(parseCodeableConcept(getJObject(json, "sequenceType")));
if (json.has("numberOfSubunits"))
res.setNumberOfSubunitsElement(parseInteger(json.get("numberOfSubunits").getAsLong()));
if (json.has("_numberOfSubunits"))
parseElementProperties(getJObject(json, "_numberOfSubunits"), res.getNumberOfSubunitsElement());
if (json.has("areaOfHybridisation"))
res.setAreaOfHybridisationElement(parseString(json.get("areaOfHybridisation").getAsString()));
if (json.has("_areaOfHybridisation"))
parseElementProperties(getJObject(json, "_areaOfHybridisation"), res.getAreaOfHybridisationElement());
if (json.has("oligoNucleotideType"))
res.setOligoNucleotideType(parseCodeableConcept(getJObject(json, "oligoNucleotideType")));
if (json.has("subunit")) {
JsonArray array = getJArray(json, "subunit");
for (int i = 0; i < array.size(); i++) {
res.getSubunit().add(parseSubstanceNucleicAcidSubunitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent parseSubstanceNucleicAcidSubunitComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent();
parseSubstanceNucleicAcidSubunitComponentProperties(json, res);
return res;
}
protected void parseSubstanceNucleicAcidSubunitComponentProperties(JsonObject json, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("subunit"))
res.setSubunitElement(parseInteger(json.get("subunit").getAsLong()));
if (json.has("_subunit"))
parseElementProperties(getJObject(json, "_subunit"), res.getSubunitElement());
if (json.has("sequence"))
res.setSequenceElement(parseString(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("length"))
res.setLengthElement(parseInteger(json.get("length").getAsLong()));
if (json.has("_length"))
parseElementProperties(getJObject(json, "_length"), res.getLengthElement());
if (json.has("sequenceAttachment"))
res.setSequenceAttachment(parseAttachment(getJObject(json, "sequenceAttachment")));
if (json.has("fivePrime"))
res.setFivePrime(parseCodeableConcept(getJObject(json, "fivePrime")));
if (json.has("threePrime"))
res.setThreePrime(parseCodeableConcept(getJObject(json, "threePrime")));
if (json.has("linkage")) {
JsonArray array = getJArray(json, "linkage");
for (int i = 0; i < array.size(); i++) {
res.getLinkage().add(parseSubstanceNucleicAcidSubunitLinkageComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("sugar")) {
JsonArray array = getJArray(json, "sugar");
for (int i = 0; i < array.size(); i++) {
res.getSugar().add(parseSubstanceNucleicAcidSubunitSugarComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent parseSubstanceNucleicAcidSubunitLinkageComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent();
parseSubstanceNucleicAcidSubunitLinkageComponentProperties(json, res);
return res;
}
protected void parseSubstanceNucleicAcidSubunitLinkageComponentProperties(JsonObject json, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("connectivity"))
res.setConnectivityElement(parseString(json.get("connectivity").getAsString()));
if (json.has("_connectivity"))
parseElementProperties(getJObject(json, "_connectivity"), res.getConnectivityElement());
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("residueSite"))
res.setResidueSiteElement(parseString(json.get("residueSite").getAsString()));
if (json.has("_residueSite"))
parseElementProperties(getJObject(json, "_residueSite"), res.getResidueSiteElement());
}
protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent parseSubstanceNucleicAcidSubunitSugarComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent();
parseSubstanceNucleicAcidSubunitSugarComponentProperties(json, res);
return res;
}
protected void parseSubstanceNucleicAcidSubunitSugarComponentProperties(JsonObject json, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("residueSite"))
res.setResidueSiteElement(parseString(json.get("residueSite").getAsString()));
if (json.has("_residueSite"))
parseElementProperties(getJObject(json, "_residueSite"), res.getResidueSiteElement());
}
protected SubstancePolymer parseSubstancePolymer(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer res = new SubstancePolymer();
parseSubstancePolymerProperties(json, res);
return res;
}
protected void parseSubstancePolymerProperties(JsonObject json, SubstancePolymer res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("class"))
res.setClass_(parseCodeableConcept(getJObject(json, "class")));
if (json.has("geometry"))
res.setGeometry(parseCodeableConcept(getJObject(json, "geometry")));
if (json.has("copolymerConnectivity")) {
JsonArray array = getJArray(json, "copolymerConnectivity");
for (int i = 0; i < array.size(); i++) {
res.getCopolymerConnectivity().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("modification"))
res.setModificationElement(parseString(json.get("modification").getAsString()));
if (json.has("_modification"))
parseElementProperties(getJObject(json, "_modification"), res.getModificationElement());
if (json.has("monomerSet")) {
JsonArray array = getJArray(json, "monomerSet");
for (int i = 0; i < array.size(); i++) {
res.getMonomerSet().add(parseSubstancePolymerMonomerSetComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("repeat")) {
JsonArray array = getJArray(json, "repeat");
for (int i = 0; i < array.size(); i++) {
res.getRepeat().add(parseSubstancePolymerRepeatComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstancePolymer.SubstancePolymerMonomerSetComponent parseSubstancePolymerMonomerSetComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerMonomerSetComponent res = new SubstancePolymer.SubstancePolymerMonomerSetComponent();
parseSubstancePolymerMonomerSetComponentProperties(json, res);
return res;
}
protected void parseSubstancePolymerMonomerSetComponentProperties(JsonObject json, SubstancePolymer.SubstancePolymerMonomerSetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("ratioType"))
res.setRatioType(parseCodeableConcept(getJObject(json, "ratioType")));
if (json.has("startingMaterial")) {
JsonArray array = getJArray(json, "startingMaterial");
for (int i = 0; i < array.size(); i++) {
res.getStartingMaterial().add(parseSubstancePolymerMonomerSetStartingMaterialComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent parseSubstancePolymerMonomerSetStartingMaterialComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent res = new SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent();
parseSubstancePolymerMonomerSetStartingMaterialComponentProperties(json, res);
return res;
}
protected void parseSubstancePolymerMonomerSetStartingMaterialComponentProperties(JsonObject json, SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("isDefining"))
res.setIsDefiningElement(parseBoolean(json.get("isDefining").getAsBoolean()));
if (json.has("_isDefining"))
parseElementProperties(getJObject(json, "_isDefining"), res.getIsDefiningElement());
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
}
protected SubstancePolymer.SubstancePolymerRepeatComponent parseSubstancePolymerRepeatComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatComponent res = new SubstancePolymer.SubstancePolymerRepeatComponent();
parseSubstancePolymerRepeatComponentProperties(json, res);
return res;
}
protected void parseSubstancePolymerRepeatComponentProperties(JsonObject json, SubstancePolymer.SubstancePolymerRepeatComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("averageMolecularFormula"))
res.setAverageMolecularFormulaElement(parseString(json.get("averageMolecularFormula").getAsString()));
if (json.has("_averageMolecularFormula"))
parseElementProperties(getJObject(json, "_averageMolecularFormula"), res.getAverageMolecularFormulaElement());
if (json.has("repeatUnitAmountType"))
res.setRepeatUnitAmountType(parseCodeableConcept(getJObject(json, "repeatUnitAmountType")));
if (json.has("repeatUnit")) {
JsonArray array = getJArray(json, "repeatUnit");
for (int i = 0; i < array.size(); i++) {
res.getRepeatUnit().add(parseSubstancePolymerRepeatRepeatUnitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent parseSubstancePolymerRepeatRepeatUnitComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent();
parseSubstancePolymerRepeatRepeatUnitComponentProperties(json, res);
return res;
}
protected void parseSubstancePolymerRepeatRepeatUnitComponentProperties(JsonObject json, SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("unit"))
res.setUnitElement(parseString(json.get("unit").getAsString()));
if (json.has("_unit"))
parseElementProperties(getJObject(json, "_unit"), res.getUnitElement());
if (json.has("orientation"))
res.setOrientation(parseCodeableConcept(getJObject(json, "orientation")));
if (json.has("amount"))
res.setAmountElement(parseInteger(json.get("amount").getAsLong()));
if (json.has("_amount"))
parseElementProperties(getJObject(json, "_amount"), res.getAmountElement());
if (json.has("degreeOfPolymerisation")) {
JsonArray array = getJArray(json, "degreeOfPolymerisation");
for (int i = 0; i < array.size(); i++) {
res.getDegreeOfPolymerisation().add(parseSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("structuralRepresentation")) {
JsonArray array = getJArray(json, "structuralRepresentation");
for (int i = 0; i < array.size(); i++) {
res.getStructuralRepresentation().add(parseSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent parseSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent();
parseSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentProperties(json, res);
return res;
}
protected void parseSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentProperties(JsonObject json, SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("average"))
res.setAverageElement(parseInteger(json.get("average").getAsLong()));
if (json.has("_average"))
parseElementProperties(getJObject(json, "_average"), res.getAverageElement());
if (json.has("low"))
res.setLowElement(parseInteger(json.get("low").getAsLong()));
if (json.has("_low"))
parseElementProperties(getJObject(json, "_low"), res.getLowElement());
if (json.has("high"))
res.setHighElement(parseInteger(json.get("high").getAsLong()));
if (json.has("_high"))
parseElementProperties(getJObject(json, "_high"), res.getHighElement());
}
protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent parseSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent();
parseSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentProperties(json, res);
return res;
}
protected void parseSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentProperties(JsonObject json, SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("representation"))
res.setRepresentationElement(parseString(json.get("representation").getAsString()));
if (json.has("_representation"))
parseElementProperties(getJObject(json, "_representation"), res.getRepresentationElement());
if (json.has("format"))
res.setFormat(parseCodeableConcept(getJObject(json, "format")));
if (json.has("attachment"))
res.setAttachment(parseAttachment(getJObject(json, "attachment")));
}
protected SubstanceProtein parseSubstanceProtein(JsonObject json) throws IOException, FHIRFormatError {
SubstanceProtein res = new SubstanceProtein();
parseSubstanceProteinProperties(json, res);
return res;
}
protected void parseSubstanceProteinProperties(JsonObject json, SubstanceProtein res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("sequenceType"))
res.setSequenceType(parseCodeableConcept(getJObject(json, "sequenceType")));
if (json.has("numberOfSubunits"))
res.setNumberOfSubunitsElement(parseInteger(json.get("numberOfSubunits").getAsLong()));
if (json.has("_numberOfSubunits"))
parseElementProperties(getJObject(json, "_numberOfSubunits"), res.getNumberOfSubunitsElement());
if (json.has("disulfideLinkage")) {
JsonArray array = getJArray(json, "disulfideLinkage");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDisulfideLinkage().add(new StringType());
} else {;
res.getDisulfideLinkage().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_disulfideLinkage")) {
JsonArray array = getJArray(json, "_disulfideLinkage");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDisulfideLinkage().size())
res.getDisulfideLinkage().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getDisulfideLinkage().get(i));
}
};
if (json.has("subunit")) {
JsonArray array = getJArray(json, "subunit");
for (int i = 0; i < array.size(); i++) {
res.getSubunit().add(parseSubstanceProteinSubunitComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceProtein.SubstanceProteinSubunitComponent parseSubstanceProteinSubunitComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceProtein.SubstanceProteinSubunitComponent res = new SubstanceProtein.SubstanceProteinSubunitComponent();
parseSubstanceProteinSubunitComponentProperties(json, res);
return res;
}
protected void parseSubstanceProteinSubunitComponentProperties(JsonObject json, SubstanceProtein.SubstanceProteinSubunitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("subunit"))
res.setSubunitElement(parseInteger(json.get("subunit").getAsLong()));
if (json.has("_subunit"))
parseElementProperties(getJObject(json, "_subunit"), res.getSubunitElement());
if (json.has("sequence"))
res.setSequenceElement(parseString(json.get("sequence").getAsString()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("length"))
res.setLengthElement(parseInteger(json.get("length").getAsLong()));
if (json.has("_length"))
parseElementProperties(getJObject(json, "_length"), res.getLengthElement());
if (json.has("sequenceAttachment"))
res.setSequenceAttachment(parseAttachment(getJObject(json, "sequenceAttachment")));
if (json.has("nTerminalModificationId"))
res.setNTerminalModificationId(parseIdentifier(getJObject(json, "nTerminalModificationId")));
if (json.has("nTerminalModification"))
res.setNTerminalModificationElement(parseString(json.get("nTerminalModification").getAsString()));
if (json.has("_nTerminalModification"))
parseElementProperties(getJObject(json, "_nTerminalModification"), res.getNTerminalModificationElement());
if (json.has("cTerminalModificationId"))
res.setCTerminalModificationId(parseIdentifier(getJObject(json, "cTerminalModificationId")));
if (json.has("cTerminalModification"))
res.setCTerminalModificationElement(parseString(json.get("cTerminalModification").getAsString()));
if (json.has("_cTerminalModification"))
parseElementProperties(getJObject(json, "_cTerminalModification"), res.getCTerminalModificationElement());
}
protected SubstanceReferenceInformation parseSubstanceReferenceInformation(JsonObject json) throws IOException, FHIRFormatError {
SubstanceReferenceInformation res = new SubstanceReferenceInformation();
parseSubstanceReferenceInformationProperties(json, res);
return res;
}
protected void parseSubstanceReferenceInformationProperties(JsonObject json, SubstanceReferenceInformation res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("gene")) {
JsonArray array = getJArray(json, "gene");
for (int i = 0; i < array.size(); i++) {
res.getGene().add(parseSubstanceReferenceInformationGeneComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("geneElement")) {
JsonArray array = getJArray(json, "geneElement");
for (int i = 0; i < array.size(); i++) {
res.getGeneElement().add(parseSubstanceReferenceInformationGeneElementComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseSubstanceReferenceInformationTargetComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent parseSubstanceReferenceInformationGeneComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent();
parseSubstanceReferenceInformationGeneComponentProperties(json, res);
return res;
}
protected void parseSubstanceReferenceInformationGeneComponentProperties(JsonObject json, SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("geneSequenceOrigin"))
res.setGeneSequenceOrigin(parseCodeableConcept(getJObject(json, "geneSequenceOrigin")));
if (json.has("gene"))
res.setGene(parseCodeableConcept(getJObject(json, "gene")));
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent parseSubstanceReferenceInformationGeneElementComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent();
parseSubstanceReferenceInformationGeneElementComponentProperties(json, res);
return res;
}
protected void parseSubstanceReferenceInformationGeneElementComponentProperties(JsonObject json, SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("element"))
res.setElement(parseIdentifier(getJObject(json, "element")));
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent parseSubstanceReferenceInformationTargetComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent();
parseSubstanceReferenceInformationTargetComponentProperties(json, res);
return res;
}
protected void parseSubstanceReferenceInformationTargetComponentProperties(JsonObject json, SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("target"))
res.setTarget(parseIdentifier(getJObject(json, "target")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("interaction"))
res.setInteraction(parseCodeableConcept(getJObject(json, "interaction")));
if (json.has("organism"))
res.setOrganism(parseCodeableConcept(getJObject(json, "organism")));
if (json.has("organismType"))
res.setOrganismType(parseCodeableConcept(getJObject(json, "organismType")));
DataType amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
if (json.has("amountType"))
res.setAmountType(parseCodeableConcept(getJObject(json, "amountType")));
if (json.has("source")) {
JsonArray array = getJArray(json, "source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceSourceMaterial parseSubstanceSourceMaterial(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial res = new SubstanceSourceMaterial();
parseSubstanceSourceMaterialProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialProperties(JsonObject json, SubstanceSourceMaterial res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("sourceMaterialClass"))
res.setSourceMaterialClass(parseCodeableConcept(getJObject(json, "sourceMaterialClass")));
if (json.has("sourceMaterialType"))
res.setSourceMaterialType(parseCodeableConcept(getJObject(json, "sourceMaterialType")));
if (json.has("sourceMaterialState"))
res.setSourceMaterialState(parseCodeableConcept(getJObject(json, "sourceMaterialState")));
if (json.has("organismId"))
res.setOrganismId(parseIdentifier(getJObject(json, "organismId")));
if (json.has("organismName"))
res.setOrganismNameElement(parseString(json.get("organismName").getAsString()));
if (json.has("_organismName"))
parseElementProperties(getJObject(json, "_organismName"), res.getOrganismNameElement());
if (json.has("parentSubstanceId")) {
JsonArray array = getJArray(json, "parentSubstanceId");
for (int i = 0; i < array.size(); i++) {
res.getParentSubstanceId().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("parentSubstanceName")) {
JsonArray array = getJArray(json, "parentSubstanceName");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getParentSubstanceName().add(new StringType());
} else {;
res.getParentSubstanceName().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_parentSubstanceName")) {
JsonArray array = getJArray(json, "_parentSubstanceName");
for (int i = 0; i < array.size(); i++) {
if (i == res.getParentSubstanceName().size())
res.getParentSubstanceName().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getParentSubstanceName().get(i));
}
};
if (json.has("countryOfOrigin")) {
JsonArray array = getJArray(json, "countryOfOrigin");
for (int i = 0; i < array.size(); i++) {
res.getCountryOfOrigin().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("geographicalLocation")) {
JsonArray array = getJArray(json, "geographicalLocation");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getGeographicalLocation().add(new StringType());
} else {;
res.getGeographicalLocation().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_geographicalLocation")) {
JsonArray array = getJArray(json, "_geographicalLocation");
for (int i = 0; i < array.size(); i++) {
if (i == res.getGeographicalLocation().size())
res.getGeographicalLocation().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getGeographicalLocation().get(i));
}
};
if (json.has("developmentStage"))
res.setDevelopmentStage(parseCodeableConcept(getJObject(json, "developmentStage")));
if (json.has("fractionDescription")) {
JsonArray array = getJArray(json, "fractionDescription");
for (int i = 0; i < array.size(); i++) {
res.getFractionDescription().add(parseSubstanceSourceMaterialFractionDescriptionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("organism"))
res.setOrganism(parseSubstanceSourceMaterialOrganismComponent(getJObject(json, "organism")));
if (json.has("partDescription")) {
JsonArray array = getJArray(json, "partDescription");
for (int i = 0; i < array.size(); i++) {
res.getPartDescription().add(parseSubstanceSourceMaterialPartDescriptionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent parseSubstanceSourceMaterialFractionDescriptionComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent();
parseSubstanceSourceMaterialFractionDescriptionComponentProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialFractionDescriptionComponentProperties(JsonObject json, SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("fraction"))
res.setFractionElement(parseString(json.get("fraction").getAsString()));
if (json.has("_fraction"))
parseElementProperties(getJObject(json, "_fraction"), res.getFractionElement());
if (json.has("materialType"))
res.setMaterialType(parseCodeableConcept(getJObject(json, "materialType")));
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent parseSubstanceSourceMaterialOrganismComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent();
parseSubstanceSourceMaterialOrganismComponentProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialOrganismComponentProperties(JsonObject json, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("family"))
res.setFamily(parseCodeableConcept(getJObject(json, "family")));
if (json.has("genus"))
res.setGenus(parseCodeableConcept(getJObject(json, "genus")));
if (json.has("species"))
res.setSpecies(parseCodeableConcept(getJObject(json, "species")));
if (json.has("intraspecificType"))
res.setIntraspecificType(parseCodeableConcept(getJObject(json, "intraspecificType")));
if (json.has("intraspecificDescription"))
res.setIntraspecificDescriptionElement(parseString(json.get("intraspecificDescription").getAsString()));
if (json.has("_intraspecificDescription"))
parseElementProperties(getJObject(json, "_intraspecificDescription"), res.getIntraspecificDescriptionElement());
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseSubstanceSourceMaterialOrganismAuthorComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("hybrid"))
res.setHybrid(parseSubstanceSourceMaterialOrganismHybridComponent(getJObject(json, "hybrid")));
if (json.has("organismGeneral"))
res.setOrganismGeneral(parseSubstanceSourceMaterialOrganismOrganismGeneralComponent(getJObject(json, "organismGeneral")));
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent parseSubstanceSourceMaterialOrganismAuthorComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent();
parseSubstanceSourceMaterialOrganismAuthorComponentProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialOrganismAuthorComponentProperties(JsonObject json, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("authorType"))
res.setAuthorType(parseCodeableConcept(getJObject(json, "authorType")));
if (json.has("authorDescription"))
res.setAuthorDescriptionElement(parseString(json.get("authorDescription").getAsString()));
if (json.has("_authorDescription"))
parseElementProperties(getJObject(json, "_authorDescription"), res.getAuthorDescriptionElement());
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent parseSubstanceSourceMaterialOrganismHybridComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent();
parseSubstanceSourceMaterialOrganismHybridComponentProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialOrganismHybridComponentProperties(JsonObject json, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("maternalOrganismId"))
res.setMaternalOrganismIdElement(parseString(json.get("maternalOrganismId").getAsString()));
if (json.has("_maternalOrganismId"))
parseElementProperties(getJObject(json, "_maternalOrganismId"), res.getMaternalOrganismIdElement());
if (json.has("maternalOrganismName"))
res.setMaternalOrganismNameElement(parseString(json.get("maternalOrganismName").getAsString()));
if (json.has("_maternalOrganismName"))
parseElementProperties(getJObject(json, "_maternalOrganismName"), res.getMaternalOrganismNameElement());
if (json.has("paternalOrganismId"))
res.setPaternalOrganismIdElement(parseString(json.get("paternalOrganismId").getAsString()));
if (json.has("_paternalOrganismId"))
parseElementProperties(getJObject(json, "_paternalOrganismId"), res.getPaternalOrganismIdElement());
if (json.has("paternalOrganismName"))
res.setPaternalOrganismNameElement(parseString(json.get("paternalOrganismName").getAsString()));
if (json.has("_paternalOrganismName"))
parseElementProperties(getJObject(json, "_paternalOrganismName"), res.getPaternalOrganismNameElement());
if (json.has("hybridType"))
res.setHybridType(parseCodeableConcept(getJObject(json, "hybridType")));
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent parseSubstanceSourceMaterialOrganismOrganismGeneralComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent();
parseSubstanceSourceMaterialOrganismOrganismGeneralComponentProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialOrganismOrganismGeneralComponentProperties(JsonObject json, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("kingdom"))
res.setKingdom(parseCodeableConcept(getJObject(json, "kingdom")));
if (json.has("phylum"))
res.setPhylum(parseCodeableConcept(getJObject(json, "phylum")));
if (json.has("class"))
res.setClass_(parseCodeableConcept(getJObject(json, "class")));
if (json.has("order"))
res.setOrder(parseCodeableConcept(getJObject(json, "order")));
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent parseSubstanceSourceMaterialPartDescriptionComponent(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent();
parseSubstanceSourceMaterialPartDescriptionComponentProperties(json, res);
return res;
}
protected void parseSubstanceSourceMaterialPartDescriptionComponentProperties(JsonObject json, SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("part"))
res.setPart(parseCodeableConcept(getJObject(json, "part")));
if (json.has("partLocation"))
res.setPartLocation(parseCodeableConcept(getJObject(json, "partLocation")));
}
protected SupplyDelivery parseSupplyDelivery(JsonObject json) throws IOException, FHIRFormatError {
SupplyDelivery res = new SupplyDelivery();
parseSupplyDeliveryProperties(json, res);
return res;
}
protected void parseSupplyDeliveryProperties(JsonObject json, SupplyDelivery res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), SupplyDelivery.SupplyDeliveryStatus.NULL, new SupplyDelivery.SupplyDeliveryStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("suppliedItem")) {
JsonArray array = getJArray(json, "suppliedItem");
for (int i = 0; i < array.size(); i++) {
res.getSuppliedItem().add(parseSupplyDeliverySuppliedItemComponent(getJsonObjectFromArray(array, i)));
}
};
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("supplier"))
res.setSupplier(parseReference(getJObject(json, "supplier")));
if (json.has("destination"))
res.setDestination(parseReference(getJObject(json, "destination")));
if (json.has("receiver")) {
JsonArray array = getJArray(json, "receiver");
for (int i = 0; i < array.size(); i++) {
res.getReceiver().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySuppliedItemComponent(JsonObject json) throws IOException, FHIRFormatError {
SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent();
parseSupplyDeliverySuppliedItemComponentProperties(json, res);
return res;
}
protected void parseSupplyDeliverySuppliedItemComponentProperties(JsonObject json, SupplyDelivery.SupplyDeliverySuppliedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
DataType item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected SupplyRequest parseSupplyRequest(JsonObject json) throws IOException, FHIRFormatError {
SupplyRequest res = new SupplyRequest();
parseSupplyRequestProperties(json, res);
return res;
}
protected void parseSupplyRequestProperties(JsonObject json, SupplyRequest res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), SupplyRequest.SupplyRequestStatus.NULL, new SupplyRequest.SupplyRequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("deliverFor"))
res.setDeliverFor(parseReference(getJObject(json, "deliverFor")));
if (json.has("item"))
res.setItem(parseCodeableReference(getJObject(json, "item")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseSupplyRequestParameterComponent(getJsonObjectFromArray(array, i)));
}
};
DataType occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("supplier")) {
JsonArray array = getJArray(json, "supplier");
for (int i = 0; i < array.size(); i++) {
res.getSupplier().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("deliverFrom"))
res.setDeliverFrom(parseReference(getJObject(json, "deliverFrom")));
if (json.has("deliverTo"))
res.setDeliverTo(parseReference(getJObject(json, "deliverTo")));
}
protected SupplyRequest.SupplyRequestParameterComponent parseSupplyRequestParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
SupplyRequest.SupplyRequestParameterComponent res = new SupplyRequest.SupplyRequestParameterComponent();
parseSupplyRequestParameterComponentProperties(json, res);
return res;
}
protected void parseSupplyRequestParameterComponentProperties(JsonObject json, SupplyRequest.SupplyRequestParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Task parseTask(JsonObject json) throws IOException, FHIRFormatError {
Task res = new Task();
parseTaskProperties(json, res);
return res;
}
protected void parseTaskProperties(JsonObject json, Task res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical"))
res.setInstantiatesCanonicalElement(parseCanonical(json.get("instantiatesCanonical").getAsString()));
if (json.has("_instantiatesCanonical"))
parseElementProperties(getJObject(json, "_instantiatesCanonical"), res.getInstantiatesCanonicalElement());
if (json.has("instantiatesUri"))
res.setInstantiatesUriElement(parseUri(json.get("instantiatesUri").getAsString()));
if (json.has("_instantiatesUri"))
parseElementProperties(getJObject(json, "_instantiatesUri"), res.getInstantiatesUriElement());
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Task.TaskStatus.NULL, new Task.TaskStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableReference(getJObject(json, "statusReason")));
if (json.has("businessStatus"))
res.setBusinessStatus(parseCodeableConcept(getJObject(json, "businessStatus")));
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Task.TaskIntent.NULL, new Task.TaskIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("focus"))
res.setFocus(parseReference(getJObject(json, "focus")));
if (json.has("for"))
res.setFor(parseReference(getJObject(json, "for")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("requestedPeriod"))
res.setRequestedPeriod(parsePeriod(getJObject(json, "requestedPeriod")));
if (json.has("executionPeriod"))
res.setExecutionPeriod(parsePeriod(getJObject(json, "executionPeriod")));
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("lastModified"))
res.setLastModifiedElement(parseDateTime(json.get("lastModified").getAsString()));
if (json.has("_lastModified"))
parseElementProperties(getJObject(json, "_lastModified"), res.getLastModifiedElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("requestedPerformer")) {
JsonArray array = getJArray(json, "requestedPerformer");
for (int i = 0; i < array.size(); i++) {
res.getRequestedPerformer().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("performer")) {
JsonArray array = getJArray(json, "performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseTaskPerformerComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reason")) {
JsonArray array = getJArray(json, "reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relevantHistory")) {
JsonArray array = getJArray(json, "relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("restriction"))
res.setRestriction(parseTaskRestrictionComponent(getJObject(json, "restriction")));
if (json.has("input")) {
JsonArray array = getJArray(json, "input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseTaskInputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("output")) {
JsonArray array = getJArray(json, "output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parseTaskOutputComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected Task.TaskPerformerComponent parseTaskPerformerComponent(JsonObject json) throws IOException, FHIRFormatError {
Task.TaskPerformerComponent res = new Task.TaskPerformerComponent();
parseTaskPerformerComponentProperties(json, res);
return res;
}
protected void parseTaskPerformerComponentProperties(JsonObject json, Task.TaskPerformerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("function"))
res.setFunction(parseCodeableConcept(getJObject(json, "function")));
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
}
protected Task.TaskRestrictionComponent parseTaskRestrictionComponent(JsonObject json) throws IOException, FHIRFormatError {
Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent();
parseTaskRestrictionComponentProperties(json, res);
return res;
}
protected void parseTaskRestrictionComponentProperties(JsonObject json, Task.TaskRestrictionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("repetitions"))
res.setRepetitionsElement(parsePositiveInt(json.get("repetitions").getAsString()));
if (json.has("_repetitions"))
parseElementProperties(getJObject(json, "_repetitions"), res.getRepetitionsElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("recipient")) {
JsonArray array = getJArray(json, "recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Task.TaskInputComponent parseTaskInputComponent(JsonObject json) throws IOException, FHIRFormatError {
Task.TaskInputComponent res = new Task.TaskInputComponent();
parseTaskInputComponentProperties(json, res);
return res;
}
protected void parseTaskInputComponentProperties(JsonObject json, Task.TaskInputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Task.TaskOutputComponent parseTaskOutputComponent(JsonObject json) throws IOException, FHIRFormatError {
Task.TaskOutputComponent res = new Task.TaskOutputComponent();
parseTaskOutputComponentProperties(json, res);
return res;
}
protected void parseTaskOutputComponentProperties(JsonObject json, Task.TaskOutputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected TerminologyCapabilities parseTerminologyCapabilities(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities res = new TerminologyCapabilities();
parseTerminologyCapabilitiesProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesProperties(JsonObject json, TerminologyCapabilities res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), Enumerations.CapabilityStatementKind.NULL, new Enumerations.CapabilityStatementKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("software"))
res.setSoftware(parseTerminologyCapabilitiesSoftwareComponent(getJObject(json, "software")));
if (json.has("implementation"))
res.setImplementation(parseTerminologyCapabilitiesImplementationComponent(getJObject(json, "implementation")));
if (json.has("lockedDate"))
res.setLockedDateElement(parseBoolean(json.get("lockedDate").getAsBoolean()));
if (json.has("_lockedDate"))
parseElementProperties(getJObject(json, "_lockedDate"), res.getLockedDateElement());
if (json.has("codeSystem")) {
JsonArray array = getJArray(json, "codeSystem");
for (int i = 0; i < array.size(); i++) {
res.getCodeSystem().add(parseTerminologyCapabilitiesCodeSystemComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("expansion"))
res.setExpansion(parseTerminologyCapabilitiesExpansionComponent(getJObject(json, "expansion")));
if (json.has("codeSearch"))
res.setCodeSearchElement(parseEnumeration(json.get("codeSearch").getAsString(), TerminologyCapabilities.CodeSearchSupport.NULL, new TerminologyCapabilities.CodeSearchSupportEnumFactory()));
if (json.has("_codeSearch"))
parseElementProperties(getJObject(json, "_codeSearch"), res.getCodeSearchElement());
if (json.has("validateCode"))
res.setValidateCode(parseTerminologyCapabilitiesValidateCodeComponent(getJObject(json, "validateCode")));
if (json.has("translation"))
res.setTranslation(parseTerminologyCapabilitiesTranslationComponent(getJObject(json, "translation")));
if (json.has("closure"))
res.setClosure(parseTerminologyCapabilitiesClosureComponent(getJObject(json, "closure")));
}
protected TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent parseTerminologyCapabilitiesSoftwareComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent res = new TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent();
parseTerminologyCapabilitiesSoftwareComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesSoftwareComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent parseTerminologyCapabilitiesImplementationComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent res = new TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent();
parseTerminologyCapabilitiesImplementationComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesImplementationComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent parseTerminologyCapabilitiesCodeSystemComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent();
parseTerminologyCapabilitiesCodeSystemComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesCodeSystemComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("uri"))
res.setUriElement(parseCanonical(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("version")) {
JsonArray array = getJArray(json, "version");
for (int i = 0; i < array.size(); i++) {
res.getVersion().add(parseTerminologyCapabilitiesCodeSystemVersionComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("content"))
res.setContentElement(parseEnumeration(json.get("content").getAsString(), Enumerations.CodeSystemContentMode.NULL, new Enumerations.CodeSystemContentModeEnumFactory()));
if (json.has("_content"))
parseElementProperties(getJObject(json, "_content"), res.getContentElement());
if (json.has("subsumption"))
res.setSubsumptionElement(parseBoolean(json.get("subsumption").getAsBoolean()));
if (json.has("_subsumption"))
parseElementProperties(getJObject(json, "_subsumption"), res.getSubsumptionElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent parseTerminologyCapabilitiesCodeSystemVersionComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent();
parseTerminologyCapabilitiesCodeSystemVersionComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesCodeSystemVersionComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseString(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("isDefault"))
res.setIsDefaultElement(parseBoolean(json.get("isDefault").getAsBoolean()));
if (json.has("_isDefault"))
parseElementProperties(getJObject(json, "_isDefault"), res.getIsDefaultElement());
if (json.has("compositional"))
res.setCompositionalElement(parseBoolean(json.get("compositional").getAsBoolean()));
if (json.has("_compositional"))
parseElementProperties(getJObject(json, "_compositional"), res.getCompositionalElement());
if (json.has("language")) {
JsonArray array = getJArray(json, "language");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLanguage().add(new Enumeration(new Enumerations.CommonLanguagesEnumFactory(), Enumerations.CommonLanguages.NULL));
} else {;
res.getLanguage().add(parseEnumeration(array.get(i).getAsString(), Enumerations.CommonLanguages.NULL, new Enumerations.CommonLanguagesEnumFactory()));
}
}
};
if (json.has("_language")) {
JsonArray array = getJArray(json, "_language");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLanguage().size())
res.getLanguage().add(parseEnumeration(null, Enumerations.CommonLanguages.NULL, new Enumerations.CommonLanguagesEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLanguage().get(i));
}
};
if (json.has("filter")) {
JsonArray array = getJArray(json, "filter");
for (int i = 0; i < array.size(); i++) {
res.getFilter().add(parseTerminologyCapabilitiesCodeSystemVersionFilterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProperty().add(new CodeType());
} else {;
res.getProperty().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_property")) {
JsonArray array = getJArray(json, "_property");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProperty().size())
res.getProperty().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProperty().get(i));
}
};
}
protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent parseTerminologyCapabilitiesCodeSystemVersionFilterComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent();
parseTerminologyCapabilitiesCodeSystemVersionFilterComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesCodeSystemVersionFilterComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("op")) {
JsonArray array = getJArray(json, "op");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getOp().add(new CodeType());
} else {;
res.getOp().add(parseCode(array.get(i).getAsString()));
}
}
};
if (json.has("_op")) {
JsonArray array = getJArray(json, "_op");
for (int i = 0; i < array.size(); i++) {
if (i == res.getOp().size())
res.getOp().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getOp().get(i));
}
};
}
protected TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent parseTerminologyCapabilitiesExpansionComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent res = new TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent();
parseTerminologyCapabilitiesExpansionComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesExpansionComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("hierarchical"))
res.setHierarchicalElement(parseBoolean(json.get("hierarchical").getAsBoolean()));
if (json.has("_hierarchical"))
parseElementProperties(getJObject(json, "_hierarchical"), res.getHierarchicalElement());
if (json.has("paging"))
res.setPagingElement(parseBoolean(json.get("paging").getAsBoolean()));
if (json.has("_paging"))
parseElementProperties(getJObject(json, "_paging"), res.getPagingElement());
if (json.has("incomplete"))
res.setIncompleteElement(parseBoolean(json.get("incomplete").getAsBoolean()));
if (json.has("_incomplete"))
parseElementProperties(getJObject(json, "_incomplete"), res.getIncompleteElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseTerminologyCapabilitiesExpansionParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("textFilter"))
res.setTextFilterElement(parseMarkdown(json.get("textFilter").getAsString()));
if (json.has("_textFilter"))
parseElementProperties(getJObject(json, "_textFilter"), res.getTextFilterElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent parseTerminologyCapabilitiesExpansionParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent res = new TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent();
parseTerminologyCapabilitiesExpansionParameterComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesExpansionParameterComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseCode(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent parseTerminologyCapabilitiesValidateCodeComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent res = new TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent();
parseTerminologyCapabilitiesValidateCodeComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesValidateCodeComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("translations"))
res.setTranslationsElement(parseBoolean(json.get("translations").getAsBoolean()));
if (json.has("_translations"))
parseElementProperties(getJObject(json, "_translations"), res.getTranslationsElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent parseTerminologyCapabilitiesTranslationComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent res = new TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent();
parseTerminologyCapabilitiesTranslationComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesTranslationComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("needsMap"))
res.setNeedsMapElement(parseBoolean(json.get("needsMap").getAsBoolean()));
if (json.has("_needsMap"))
parseElementProperties(getJObject(json, "_needsMap"), res.getNeedsMapElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesClosureComponent parseTerminologyCapabilitiesClosureComponent(JsonObject json) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesClosureComponent res = new TerminologyCapabilities.TerminologyCapabilitiesClosureComponent();
parseTerminologyCapabilitiesClosureComponentProperties(json, res);
return res;
}
protected void parseTerminologyCapabilitiesClosureComponentProperties(JsonObject json, TerminologyCapabilities.TerminologyCapabilitiesClosureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("translation"))
res.setTranslationElement(parseBoolean(json.get("translation").getAsBoolean()));
if (json.has("_translation"))
parseElementProperties(getJObject(json, "_translation"), res.getTranslationElement());
}
protected TestPlan parseTestPlan(JsonObject json) throws IOException, FHIRFormatError {
TestPlan res = new TestPlan();
parseTestPlanProperties(json, res);
return res;
}
protected void parseTestPlanProperties(JsonObject json, TestPlan res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("category")) {
JsonArray array = getJArray(json, "category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("scope")) {
JsonArray array = getJArray(json, "scope");
for (int i = 0; i < array.size(); i++) {
res.getScope().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("testTools"))
res.setTestToolsElement(parseMarkdown(json.get("testTools").getAsString()));
if (json.has("_testTools"))
parseElementProperties(getJObject(json, "_testTools"), res.getTestToolsElement());
if (json.has("dependency")) {
JsonArray array = getJArray(json, "dependency");
for (int i = 0; i < array.size(); i++) {
res.getDependency().add(parseTestPlanDependencyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("exitCriteria"))
res.setExitCriteriaElement(parseMarkdown(json.get("exitCriteria").getAsString()));
if (json.has("_exitCriteria"))
parseElementProperties(getJObject(json, "_exitCriteria"), res.getExitCriteriaElement());
if (json.has("testCase")) {
JsonArray array = getJArray(json, "testCase");
for (int i = 0; i < array.size(); i++) {
res.getTestCase().add(parseTestPlanTestCaseComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestPlan.TestPlanDependencyComponent parseTestPlanDependencyComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestPlanDependencyComponent res = new TestPlan.TestPlanDependencyComponent();
parseTestPlanDependencyComponentProperties(json, res);
return res;
}
protected void parseTestPlanDependencyComponentProperties(JsonObject json, TestPlan.TestPlanDependencyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("predecessor"))
res.setPredecessor(parseReference(getJObject(json, "predecessor")));
}
protected TestPlan.TestPlanTestCaseComponent parseTestPlanTestCaseComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestPlanTestCaseComponent res = new TestPlan.TestPlanTestCaseComponent();
parseTestPlanTestCaseComponentProperties(json, res);
return res;
}
protected void parseTestPlanTestCaseComponentProperties(JsonObject json, TestPlan.TestPlanTestCaseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("sequence"))
res.setSequenceElement(parseInteger(json.get("sequence").getAsLong()));
if (json.has("_sequence"))
parseElementProperties(getJObject(json, "_sequence"), res.getSequenceElement());
if (json.has("scope")) {
JsonArray array = getJArray(json, "scope");
for (int i = 0; i < array.size(); i++) {
res.getScope().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("dependency")) {
JsonArray array = getJArray(json, "dependency");
for (int i = 0; i < array.size(); i++) {
res.getDependency().add(parseTestPlanTestCaseDependencyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("testRun")) {
JsonArray array = getJArray(json, "testRun");
for (int i = 0; i < array.size(); i++) {
res.getTestRun().add(parseTestPlanTestCaseTestRunComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("testData")) {
JsonArray array = getJArray(json, "testData");
for (int i = 0; i < array.size(); i++) {
res.getTestData().add(parseTestPlanTestCaseTestDataComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("assertion")) {
JsonArray array = getJArray(json, "assertion");
for (int i = 0; i < array.size(); i++) {
res.getAssertion().add(parseTestPlanTestCaseAssertionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestPlan.TestCaseDependencyComponent parseTestPlanTestCaseDependencyComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestCaseDependencyComponent res = new TestPlan.TestCaseDependencyComponent();
parseTestPlanTestCaseDependencyComponentProperties(json, res);
return res;
}
protected void parseTestPlanTestCaseDependencyComponentProperties(JsonObject json, TestPlan.TestCaseDependencyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("predecessor"))
res.setPredecessor(parseReference(getJObject(json, "predecessor")));
}
protected TestPlan.TestPlanTestCaseTestRunComponent parseTestPlanTestCaseTestRunComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestPlanTestCaseTestRunComponent res = new TestPlan.TestPlanTestCaseTestRunComponent();
parseTestPlanTestCaseTestRunComponentProperties(json, res);
return res;
}
protected void parseTestPlanTestCaseTestRunComponentProperties(JsonObject json, TestPlan.TestPlanTestCaseTestRunComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("narrative"))
res.setNarrativeElement(parseMarkdown(json.get("narrative").getAsString()));
if (json.has("_narrative"))
parseElementProperties(getJObject(json, "_narrative"), res.getNarrativeElement());
if (json.has("script"))
res.setScript(parseTestPlanTestCaseTestRunScriptComponent(getJObject(json, "script")));
}
protected TestPlan.TestPlanTestCaseTestRunScriptComponent parseTestPlanTestCaseTestRunScriptComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestPlanTestCaseTestRunScriptComponent res = new TestPlan.TestPlanTestCaseTestRunScriptComponent();
parseTestPlanTestCaseTestRunScriptComponentProperties(json, res);
return res;
}
protected void parseTestPlanTestCaseTestRunScriptComponentProperties(JsonObject json, TestPlan.TestPlanTestCaseTestRunScriptComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
DataType source = parseType("source", json);
if (source != null)
res.setSource(source);
}
protected TestPlan.TestPlanTestCaseTestDataComponent parseTestPlanTestCaseTestDataComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestPlanTestCaseTestDataComponent res = new TestPlan.TestPlanTestCaseTestDataComponent();
parseTestPlanTestCaseTestDataComponentProperties(json, res);
return res;
}
protected void parseTestPlanTestCaseTestDataComponentProperties(JsonObject json, TestPlan.TestPlanTestCaseTestDataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCoding(getJObject(json, "type")));
if (json.has("content"))
res.setContent(parseReference(getJObject(json, "content")));
DataType source = parseType("source", json);
if (source != null)
res.setSource(source);
}
protected TestPlan.TestPlanTestCaseAssertionComponent parseTestPlanTestCaseAssertionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestPlan.TestPlanTestCaseAssertionComponent res = new TestPlan.TestPlanTestCaseAssertionComponent();
parseTestPlanTestCaseAssertionComponentProperties(json, res);
return res;
}
protected void parseTestPlanTestCaseAssertionComponentProperties(JsonObject json, TestPlan.TestPlanTestCaseAssertionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("object")) {
JsonArray array = getJArray(json, "object");
for (int i = 0; i < array.size(); i++) {
res.getObject().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("result")) {
JsonArray array = getJArray(json, "result");
for (int i = 0; i < array.size(); i++) {
res.getResult().add(parseCodeableReference(getJsonObjectFromArray(array, i)));
}
};
}
protected TestReport parseTestReport(JsonObject json) throws IOException, FHIRFormatError {
TestReport res = new TestReport();
parseTestReportProperties(json, res);
return res;
}
protected void parseTestReportProperties(JsonObject json, TestReport res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), TestReport.TestReportStatus.NULL, new TestReport.TestReportStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("testScript"))
res.setTestScriptElement(parseCanonical(json.get("testScript").getAsString()));
if (json.has("_testScript"))
parseElementProperties(getJObject(json, "_testScript"), res.getTestScriptElement());
if (json.has("result"))
res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportResult.NULL, new TestReport.TestReportResultEnumFactory()));
if (json.has("_result"))
parseElementProperties(getJObject(json, "_result"), res.getResultElement());
if (json.has("score"))
res.setScoreElement(parseDecimal(json.get("score").getAsBigDecimal()));
if (json.has("_score"))
parseElementProperties(getJObject(json, "_score"), res.getScoreElement());
if (json.has("tester"))
res.setTesterElement(parseString(json.get("tester").getAsString()));
if (json.has("_tester"))
parseElementProperties(getJObject(json, "_tester"), res.getTesterElement());
if (json.has("issued"))
res.setIssuedElement(parseDateTime(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("participant")) {
JsonArray array = getJArray(json, "participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseTestReportParticipantComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("setup"))
res.setSetup(parseTestReportSetupComponent(getJObject(json, "setup")));
if (json.has("test")) {
JsonArray array = getJArray(json, "test");
for (int i = 0; i < array.size(); i++) {
res.getTest().add(parseTestReportTestComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("teardown"))
res.setTeardown(parseTestReportTeardownComponent(getJObject(json, "teardown")));
}
protected TestReport.TestReportParticipantComponent parseTestReportParticipantComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent();
parseTestReportParticipantComponentProperties(json, res);
return res;
}
protected void parseTestReportParticipantComponentProperties(JsonObject json, TestReport.TestReportParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), TestReport.TestReportParticipantType.NULL, new TestReport.TestReportParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
}
protected TestReport.TestReportSetupComponent parseTestReportSetupComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent();
parseTestReportSetupComponentProperties(json, res);
return res;
}
protected void parseTestReportSetupComponentProperties(JsonObject json, TestReport.TestReportSetupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestReportSetupActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.SetupActionComponent res = new TestReport.SetupActionComponent();
parseTestReportSetupActionComponentProperties(json, res);
return res;
}
protected void parseTestReportSetupActionComponentProperties(JsonObject json, TestReport.SetupActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestReportSetupActionOperationComponent(getJObject(json, "operation")));
if (json.has("assert"))
res.setAssert(parseTestReportSetupActionAssertComponent(getJObject(json, "assert")));
}
protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent();
parseTestReportSetupActionOperationComponentProperties(json, res);
return res;
}
protected void parseTestReportSetupActionOperationComponentProperties(JsonObject json, TestReport.SetupActionOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("result"))
res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory()));
if (json.has("_result"))
parseElementProperties(getJObject(json, "_result"), res.getResultElement());
if (json.has("message"))
res.setMessageElement(parseMarkdown(json.get("message").getAsString()));
if (json.has("_message"))
parseElementProperties(getJObject(json, "_message"), res.getMessageElement());
if (json.has("detail"))
res.setDetailElement(parseUri(json.get("detail").getAsString()));
if (json.has("_detail"))
parseElementProperties(getJObject(json, "_detail"), res.getDetailElement());
}
protected TestReport.SetupActionAssertComponent parseTestReportSetupActionAssertComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent();
parseTestReportSetupActionAssertComponentProperties(json, res);
return res;
}
protected void parseTestReportSetupActionAssertComponentProperties(JsonObject json, TestReport.SetupActionAssertComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("result"))
res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory()));
if (json.has("_result"))
parseElementProperties(getJObject(json, "_result"), res.getResultElement());
if (json.has("message"))
res.setMessageElement(parseMarkdown(json.get("message").getAsString()));
if (json.has("_message"))
parseElementProperties(getJObject(json, "_message"), res.getMessageElement());
if (json.has("detail"))
res.setDetailElement(parseString(json.get("detail").getAsString()));
if (json.has("_detail"))
parseElementProperties(getJObject(json, "_detail"), res.getDetailElement());
if (json.has("requirement")) {
JsonArray array = getJArray(json, "requirement");
for (int i = 0; i < array.size(); i++) {
res.getRequirement().add(parseTestReportSetupActionAssertRequirementComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestReport.SetupActionAssertRequirementComponent parseTestReportSetupActionAssertRequirementComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.SetupActionAssertRequirementComponent res = new TestReport.SetupActionAssertRequirementComponent();
parseTestReportSetupActionAssertRequirementComponentProperties(json, res);
return res;
}
protected void parseTestReportSetupActionAssertRequirementComponentProperties(JsonObject json, TestReport.SetupActionAssertRequirementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType link = parseType("link", json);
if (link != null)
res.setLink(link);
}
protected TestReport.TestReportTestComponent parseTestReportTestComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent();
parseTestReportTestComponentProperties(json, res);
return res;
}
protected void parseTestReportTestComponentProperties(JsonObject json, TestReport.TestReportTestComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestReportTestActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestReport.TestActionComponent parseTestReportTestActionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.TestActionComponent res = new TestReport.TestActionComponent();
parseTestReportTestActionComponentProperties(json, res);
return res;
}
protected void parseTestReportTestActionComponentProperties(JsonObject json, TestReport.TestActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestReportSetupActionOperationComponent(getJObject(json, "operation")));
if (json.has("assert"))
res.setAssert(parseTestReportSetupActionAssertComponent(getJObject(json, "assert")));
}
protected TestReport.TestReportTeardownComponent parseTestReportTeardownComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent();
parseTestReportTeardownComponentProperties(json, res);
return res;
}
protected void parseTestReportTeardownComponentProperties(JsonObject json, TestReport.TestReportTeardownComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestReportTeardownActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent();
parseTestReportTeardownActionComponentProperties(json, res);
return res;
}
protected void parseTestReportTeardownActionComponentProperties(JsonObject json, TestReport.TeardownActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestReportSetupActionOperationComponent(getJObject(json, "operation")));
}
protected TestScript parseTestScript(JsonObject json) throws IOException, FHIRFormatError {
TestScript res = new TestScript();
parseTestScriptProperties(json, res);
return res;
}
protected void parseTestScriptProperties(JsonObject json, TestScript res) throws IOException, FHIRFormatError {
parseCanonicalResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("origin")) {
JsonArray array = getJArray(json, "origin");
for (int i = 0; i < array.size(); i++) {
res.getOrigin().add(parseTestScriptOriginComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("destination")) {
JsonArray array = getJArray(json, "destination");
for (int i = 0; i < array.size(); i++) {
res.getDestination().add(parseTestScriptDestinationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("metadata"))
res.setMetadata(parseTestScriptMetadataComponent(getJObject(json, "metadata")));
if (json.has("scope")) {
JsonArray array = getJArray(json, "scope");
for (int i = 0; i < array.size(); i++) {
res.getScope().add(parseTestScriptScopeComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("fixture")) {
JsonArray array = getJArray(json, "fixture");
for (int i = 0; i < array.size(); i++) {
res.getFixture().add(parseTestScriptFixtureComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("profile")) {
JsonArray array = getJArray(json, "profile");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProfile().add(new CanonicalType());
} else {;
res.getProfile().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_profile")) {
JsonArray array = getJArray(json, "_profile");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProfile().size())
res.getProfile().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProfile().get(i));
}
};
if (json.has("variable")) {
JsonArray array = getJArray(json, "variable");
for (int i = 0; i < array.size(); i++) {
res.getVariable().add(parseTestScriptVariableComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("setup"))
res.setSetup(parseTestScriptSetupComponent(getJObject(json, "setup")));
if (json.has("test")) {
JsonArray array = getJArray(json, "test");
for (int i = 0; i < array.size(); i++) {
res.getTest().add(parseTestScriptTestComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("teardown"))
res.setTeardown(parseTestScriptTeardownComponent(getJObject(json, "teardown")));
}
protected TestScript.TestScriptOriginComponent parseTestScriptOriginComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent();
parseTestScriptOriginComponentProperties(json, res);
return res;
}
protected void parseTestScriptOriginComponentProperties(JsonObject json, TestScript.TestScriptOriginComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("index"))
res.setIndexElement(parseInteger(json.get("index").getAsLong()));
if (json.has("_index"))
parseElementProperties(getJObject(json, "_index"), res.getIndexElement());
if (json.has("profile"))
res.setProfile(parseCoding(getJObject(json, "profile")));
if (json.has("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected TestScript.TestScriptDestinationComponent parseTestScriptDestinationComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent();
parseTestScriptDestinationComponentProperties(json, res);
return res;
}
protected void parseTestScriptDestinationComponentProperties(JsonObject json, TestScript.TestScriptDestinationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("index"))
res.setIndexElement(parseInteger(json.get("index").getAsLong()));
if (json.has("_index"))
parseElementProperties(getJObject(json, "_index"), res.getIndexElement());
if (json.has("profile"))
res.setProfile(parseCoding(getJObject(json, "profile")));
if (json.has("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected TestScript.TestScriptMetadataComponent parseTestScriptMetadataComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent();
parseTestScriptMetadataComponentProperties(json, res);
return res;
}
protected void parseTestScriptMetadataComponentProperties(JsonObject json, TestScript.TestScriptMetadataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseTestScriptMetadataLinkComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("capability")) {
JsonArray array = getJArray(json, "capability");
for (int i = 0; i < array.size(); i++) {
res.getCapability().add(parseTestScriptMetadataCapabilityComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestScript.TestScriptMetadataLinkComponent parseTestScriptMetadataLinkComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent();
parseTestScriptMetadataLinkComponentProperties(json, res);
return res;
}
protected void parseTestScriptMetadataLinkComponentProperties(JsonObject json, TestScript.TestScriptMetadataLinkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected TestScript.TestScriptMetadataCapabilityComponent parseTestScriptMetadataCapabilityComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent();
parseTestScriptMetadataCapabilityComponentProperties(json, res);
return res;
}
protected void parseTestScriptMetadataCapabilityComponentProperties(JsonObject json, TestScript.TestScriptMetadataCapabilityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("required"))
res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean()));
if (json.has("_required"))
parseElementProperties(getJObject(json, "_required"), res.getRequiredElement());
if (json.has("validated"))
res.setValidatedElement(parseBoolean(json.get("validated").getAsBoolean()));
if (json.has("_validated"))
parseElementProperties(getJObject(json, "_validated"), res.getValidatedElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("origin")) {
JsonArray array = getJArray(json, "origin");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getOrigin().add(new IntegerType());
} else {;
res.getOrigin().add(parseInteger(array.get(i).getAsLong()));
}
}
};
if (json.has("_origin")) {
JsonArray array = getJArray(json, "_origin");
for (int i = 0; i < array.size(); i++) {
if (i == res.getOrigin().size())
res.getOrigin().add(parseInteger(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getOrigin().get(i));
}
};
if (json.has("destination"))
res.setDestinationElement(parseInteger(json.get("destination").getAsLong()));
if (json.has("_destination"))
parseElementProperties(getJObject(json, "_destination"), res.getDestinationElement());
if (json.has("link")) {
JsonArray array = getJArray(json, "link");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLink().add(new UriType());
} else {;
res.getLink().add(parseUri(array.get(i).getAsString()));
}
}
};
if (json.has("_link")) {
JsonArray array = getJArray(json, "_link");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLink().size())
res.getLink().add(parseUri(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getLink().get(i));
}
};
if (json.has("capabilities"))
res.setCapabilitiesElement(parseCanonical(json.get("capabilities").getAsString()));
if (json.has("_capabilities"))
parseElementProperties(getJObject(json, "_capabilities"), res.getCapabilitiesElement());
}
protected TestScript.TestScriptScopeComponent parseTestScriptScopeComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptScopeComponent res = new TestScript.TestScriptScopeComponent();
parseTestScriptScopeComponentProperties(json, res);
return res;
}
protected void parseTestScriptScopeComponentProperties(JsonObject json, TestScript.TestScriptScopeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("artifact"))
res.setArtifactElement(parseCanonical(json.get("artifact").getAsString()));
if (json.has("_artifact"))
parseElementProperties(getJObject(json, "_artifact"), res.getArtifactElement());
if (json.has("conformance"))
res.setConformance(parseCodeableConcept(getJObject(json, "conformance")));
if (json.has("phase"))
res.setPhase(parseCodeableConcept(getJObject(json, "phase")));
}
protected TestScript.TestScriptFixtureComponent parseTestScriptFixtureComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent();
parseTestScriptFixtureComponentProperties(json, res);
return res;
}
protected void parseTestScriptFixtureComponentProperties(JsonObject json, TestScript.TestScriptFixtureComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("autocreate"))
res.setAutocreateElement(parseBoolean(json.get("autocreate").getAsBoolean()));
if (json.has("_autocreate"))
parseElementProperties(getJObject(json, "_autocreate"), res.getAutocreateElement());
if (json.has("autodelete"))
res.setAutodeleteElement(parseBoolean(json.get("autodelete").getAsBoolean()));
if (json.has("_autodelete"))
parseElementProperties(getJObject(json, "_autodelete"), res.getAutodeleteElement());
if (json.has("resource"))
res.setResource(parseReference(getJObject(json, "resource")));
}
protected TestScript.TestScriptVariableComponent parseTestScriptVariableComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent();
parseTestScriptVariableComponentProperties(json, res);
return res;
}
protected void parseTestScriptVariableComponentProperties(JsonObject json, TestScript.TestScriptVariableComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("defaultValue"))
res.setDefaultValueElement(parseString(json.get("defaultValue").getAsString()));
if (json.has("_defaultValue"))
parseElementProperties(getJObject(json, "_defaultValue"), res.getDefaultValueElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
if (json.has("headerField"))
res.setHeaderFieldElement(parseString(json.get("headerField").getAsString()));
if (json.has("_headerField"))
parseElementProperties(getJObject(json, "_headerField"), res.getHeaderFieldElement());
if (json.has("hint"))
res.setHintElement(parseString(json.get("hint").getAsString()));
if (json.has("_hint"))
parseElementProperties(getJObject(json, "_hint"), res.getHintElement());
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("sourceId"))
res.setSourceIdElement(parseId(json.get("sourceId").getAsString()));
if (json.has("_sourceId"))
parseElementProperties(getJObject(json, "_sourceId"), res.getSourceIdElement());
}
protected TestScript.TestScriptSetupComponent parseTestScriptSetupComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent();
parseTestScriptSetupComponentProperties(json, res);
return res;
}
protected void parseTestScriptSetupComponentProperties(JsonObject json, TestScript.TestScriptSetupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestScriptSetupActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.SetupActionComponent res = new TestScript.SetupActionComponent();
parseTestScriptSetupActionComponentProperties(json, res);
return res;
}
protected void parseTestScriptSetupActionComponentProperties(JsonObject json, TestScript.SetupActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestScriptSetupActionOperationComponent(getJObject(json, "operation")));
if (json.has("assert"))
res.setAssert(parseTestScriptSetupActionAssertComponent(getJObject(json, "assert")));
}
protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent();
parseTestScriptSetupActionOperationComponentProperties(json, res);
return res;
}
protected void parseTestScriptSetupActionOperationComponentProperties(JsonObject json, TestScript.SetupActionOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCoding(getJObject(json, "type")));
if (json.has("resource"))
res.setResourceElement(parseUri(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("accept"))
res.setAcceptElement(parseCode(json.get("accept").getAsString()));
if (json.has("_accept"))
parseElementProperties(getJObject(json, "_accept"), res.getAcceptElement());
if (json.has("contentType"))
res.setContentTypeElement(parseCode(json.get("contentType").getAsString()));
if (json.has("_contentType"))
parseElementProperties(getJObject(json, "_contentType"), res.getContentTypeElement());
if (json.has("destination"))
res.setDestinationElement(parseInteger(json.get("destination").getAsLong()));
if (json.has("_destination"))
parseElementProperties(getJObject(json, "_destination"), res.getDestinationElement());
if (json.has("encodeRequestUrl"))
res.setEncodeRequestUrlElement(parseBoolean(json.get("encodeRequestUrl").getAsBoolean()));
if (json.has("_encodeRequestUrl"))
parseElementProperties(getJObject(json, "_encodeRequestUrl"), res.getEncodeRequestUrlElement());
if (json.has("method"))
res.setMethodElement(parseEnumeration(json.get("method").getAsString(), TestScript.TestScriptRequestMethodCode.NULL, new TestScript.TestScriptRequestMethodCodeEnumFactory()));
if (json.has("_method"))
parseElementProperties(getJObject(json, "_method"), res.getMethodElement());
if (json.has("origin"))
res.setOriginElement(parseInteger(json.get("origin").getAsLong()));
if (json.has("_origin"))
parseElementProperties(getJObject(json, "_origin"), res.getOriginElement());
if (json.has("params"))
res.setParamsElement(parseString(json.get("params").getAsString()));
if (json.has("_params"))
parseElementProperties(getJObject(json, "_params"), res.getParamsElement());
if (json.has("requestHeader")) {
JsonArray array = getJArray(json, "requestHeader");
for (int i = 0; i < array.size(); i++) {
res.getRequestHeader().add(parseTestScriptSetupActionOperationRequestHeaderComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("requestId"))
res.setRequestIdElement(parseId(json.get("requestId").getAsString()));
if (json.has("_requestId"))
parseElementProperties(getJObject(json, "_requestId"), res.getRequestIdElement());
if (json.has("responseId"))
res.setResponseIdElement(parseId(json.get("responseId").getAsString()));
if (json.has("_responseId"))
parseElementProperties(getJObject(json, "_responseId"), res.getResponseIdElement());
if (json.has("sourceId"))
res.setSourceIdElement(parseId(json.get("sourceId").getAsString()));
if (json.has("_sourceId"))
parseElementProperties(getJObject(json, "_sourceId"), res.getSourceIdElement());
if (json.has("targetId"))
res.setTargetIdElement(parseId(json.get("targetId").getAsString()));
if (json.has("_targetId"))
parseElementProperties(getJObject(json, "_targetId"), res.getTargetIdElement());
if (json.has("url"))
res.setUrlElement(parseString(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
protected TestScript.SetupActionOperationRequestHeaderComponent parseTestScriptSetupActionOperationRequestHeaderComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent();
parseTestScriptSetupActionOperationRequestHeaderComponentProperties(json, res);
return res;
}
protected void parseTestScriptSetupActionOperationRequestHeaderComponentProperties(JsonObject json, TestScript.SetupActionOperationRequestHeaderComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("field"))
res.setFieldElement(parseString(json.get("field").getAsString()));
if (json.has("_field"))
parseElementProperties(getJObject(json, "_field"), res.getFieldElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected TestScript.SetupActionAssertComponent parseTestScriptSetupActionAssertComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent();
parseTestScriptSetupActionAssertComponentProperties(json, res);
return res;
}
protected void parseTestScriptSetupActionAssertComponentProperties(JsonObject json, TestScript.SetupActionAssertComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("direction"))
res.setDirectionElement(parseEnumeration(json.get("direction").getAsString(), TestScript.AssertionDirectionType.NULL, new TestScript.AssertionDirectionTypeEnumFactory()));
if (json.has("_direction"))
parseElementProperties(getJObject(json, "_direction"), res.getDirectionElement());
if (json.has("compareToSourceId"))
res.setCompareToSourceIdElement(parseString(json.get("compareToSourceId").getAsString()));
if (json.has("_compareToSourceId"))
parseElementProperties(getJObject(json, "_compareToSourceId"), res.getCompareToSourceIdElement());
if (json.has("compareToSourceExpression"))
res.setCompareToSourceExpressionElement(parseString(json.get("compareToSourceExpression").getAsString()));
if (json.has("_compareToSourceExpression"))
parseElementProperties(getJObject(json, "_compareToSourceExpression"), res.getCompareToSourceExpressionElement());
if (json.has("compareToSourcePath"))
res.setCompareToSourcePathElement(parseString(json.get("compareToSourcePath").getAsString()));
if (json.has("_compareToSourcePath"))
parseElementProperties(getJObject(json, "_compareToSourcePath"), res.getCompareToSourcePathElement());
if (json.has("contentType"))
res.setContentTypeElement(parseCode(json.get("contentType").getAsString()));
if (json.has("_contentType"))
parseElementProperties(getJObject(json, "_contentType"), res.getContentTypeElement());
if (json.has("defaultManualCompletion"))
res.setDefaultManualCompletionElement(parseEnumeration(json.get("defaultManualCompletion").getAsString(), TestScript.AssertionManualCompletionType.NULL, new TestScript.AssertionManualCompletionTypeEnumFactory()));
if (json.has("_defaultManualCompletion"))
parseElementProperties(getJObject(json, "_defaultManualCompletion"), res.getDefaultManualCompletionElement());
if (json.has("expression"))
res.setExpressionElement(parseString(json.get("expression").getAsString()));
if (json.has("_expression"))
parseElementProperties(getJObject(json, "_expression"), res.getExpressionElement());
if (json.has("headerField"))
res.setHeaderFieldElement(parseString(json.get("headerField").getAsString()));
if (json.has("_headerField"))
parseElementProperties(getJObject(json, "_headerField"), res.getHeaderFieldElement());
if (json.has("minimumId"))
res.setMinimumIdElement(parseString(json.get("minimumId").getAsString()));
if (json.has("_minimumId"))
parseElementProperties(getJObject(json, "_minimumId"), res.getMinimumIdElement());
if (json.has("navigationLinks"))
res.setNavigationLinksElement(parseBoolean(json.get("navigationLinks").getAsBoolean()));
if (json.has("_navigationLinks"))
parseElementProperties(getJObject(json, "_navigationLinks"), res.getNavigationLinksElement());
if (json.has("operator"))
res.setOperatorElement(parseEnumeration(json.get("operator").getAsString(), TestScript.AssertionOperatorType.NULL, new TestScript.AssertionOperatorTypeEnumFactory()));
if (json.has("_operator"))
parseElementProperties(getJObject(json, "_operator"), res.getOperatorElement());
if (json.has("path"))
res.setPathElement(parseString(json.get("path").getAsString()));
if (json.has("_path"))
parseElementProperties(getJObject(json, "_path"), res.getPathElement());
if (json.has("requestMethod"))
res.setRequestMethodElement(parseEnumeration(json.get("requestMethod").getAsString(), TestScript.TestScriptRequestMethodCode.NULL, new TestScript.TestScriptRequestMethodCodeEnumFactory()));
if (json.has("_requestMethod"))
parseElementProperties(getJObject(json, "_requestMethod"), res.getRequestMethodElement());
if (json.has("requestURL"))
res.setRequestURLElement(parseString(json.get("requestURL").getAsString()));
if (json.has("_requestURL"))
parseElementProperties(getJObject(json, "_requestURL"), res.getRequestURLElement());
if (json.has("resource"))
res.setResourceElement(parseUri(json.get("resource").getAsString()));
if (json.has("_resource"))
parseElementProperties(getJObject(json, "_resource"), res.getResourceElement());
if (json.has("response"))
res.setResponseElement(parseEnumeration(json.get("response").getAsString(), TestScript.AssertionResponseTypes.NULL, new TestScript.AssertionResponseTypesEnumFactory()));
if (json.has("_response"))
parseElementProperties(getJObject(json, "_response"), res.getResponseElement());
if (json.has("responseCode"))
res.setResponseCodeElement(parseString(json.get("responseCode").getAsString()));
if (json.has("_responseCode"))
parseElementProperties(getJObject(json, "_responseCode"), res.getResponseCodeElement());
if (json.has("sourceId"))
res.setSourceIdElement(parseId(json.get("sourceId").getAsString()));
if (json.has("_sourceId"))
parseElementProperties(getJObject(json, "_sourceId"), res.getSourceIdElement());
if (json.has("stopTestOnFail"))
res.setStopTestOnFailElement(parseBoolean(json.get("stopTestOnFail").getAsBoolean()));
if (json.has("_stopTestOnFail"))
parseElementProperties(getJObject(json, "_stopTestOnFail"), res.getStopTestOnFailElement());
if (json.has("validateProfileId"))
res.setValidateProfileIdElement(parseId(json.get("validateProfileId").getAsString()));
if (json.has("_validateProfileId"))
parseElementProperties(getJObject(json, "_validateProfileId"), res.getValidateProfileIdElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("warningOnly"))
res.setWarningOnlyElement(parseBoolean(json.get("warningOnly").getAsBoolean()));
if (json.has("_warningOnly"))
parseElementProperties(getJObject(json, "_warningOnly"), res.getWarningOnlyElement());
if (json.has("requirement")) {
JsonArray array = getJArray(json, "requirement");
for (int i = 0; i < array.size(); i++) {
res.getRequirement().add(parseTestScriptSetupActionAssertRequirementComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestScript.SetupActionAssertRequirementComponent parseTestScriptSetupActionAssertRequirementComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.SetupActionAssertRequirementComponent res = new TestScript.SetupActionAssertRequirementComponent();
parseTestScriptSetupActionAssertRequirementComponentProperties(json, res);
return res;
}
protected void parseTestScriptSetupActionAssertRequirementComponentProperties(JsonObject json, TestScript.SetupActionAssertRequirementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
DataType link = parseType("link", json);
if (link != null)
res.setLink(link);
}
protected TestScript.TestScriptTestComponent parseTestScriptTestComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent();
parseTestScriptTestComponentProperties(json, res);
return res;
}
protected void parseTestScriptTestComponentProperties(JsonObject json, TestScript.TestScriptTestComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestScriptTestActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestScript.TestActionComponent parseTestScriptTestActionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestActionComponent res = new TestScript.TestActionComponent();
parseTestScriptTestActionComponentProperties(json, res);
return res;
}
protected void parseTestScriptTestActionComponentProperties(JsonObject json, TestScript.TestActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestScriptSetupActionOperationComponent(getJObject(json, "operation")));
if (json.has("assert"))
res.setAssert(parseTestScriptSetupActionAssertComponent(getJObject(json, "assert")));
}
protected TestScript.TestScriptTeardownComponent parseTestScriptTeardownComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent();
parseTestScriptTeardownComponentProperties(json, res);
return res;
}
protected void parseTestScriptTeardownComponentProperties(JsonObject json, TestScript.TestScriptTeardownComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = getJArray(json, "action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestScriptTeardownActionComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(JsonObject json) throws IOException, FHIRFormatError {
TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent();
parseTestScriptTeardownActionComponentProperties(json, res);
return res;
}
protected void parseTestScriptTeardownActionComponentProperties(JsonObject json, TestScript.TeardownActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestScriptSetupActionOperationComponent(getJObject(json, "operation")));
}
protected Transport parseTransport(JsonObject json) throws IOException, FHIRFormatError {
Transport res = new Transport();
parseTransportProperties(json, res);
return res;
}
protected void parseTransportProperties(JsonObject json, Transport res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("instantiatesCanonical"))
res.setInstantiatesCanonicalElement(parseCanonical(json.get("instantiatesCanonical").getAsString()));
if (json.has("_instantiatesCanonical"))
parseElementProperties(getJObject(json, "_instantiatesCanonical"), res.getInstantiatesCanonicalElement());
if (json.has("instantiatesUri"))
res.setInstantiatesUriElement(parseUri(json.get("instantiatesUri").getAsString()));
if (json.has("_instantiatesUri"))
parseElementProperties(getJObject(json, "_instantiatesUri"), res.getInstantiatesUriElement());
if (json.has("basedOn")) {
JsonArray array = getJArray(json, "basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("partOf")) {
JsonArray array = getJArray(json, "partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Transport.TransportStatus.NULL, new Transport.TransportStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Transport.TransportIntent.NULL, new Transport.TransportIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Enumerations.RequestPriority.NULL, new Enumerations.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("focus"))
res.setFocus(parseReference(getJObject(json, "focus")));
if (json.has("for"))
res.setFor(parseReference(getJObject(json, "for")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("completionTime"))
res.setCompletionTimeElement(parseDateTime(json.get("completionTime").getAsString()));
if (json.has("_completionTime"))
parseElementProperties(getJObject(json, "_completionTime"), res.getCompletionTimeElement());
if (json.has("authoredOn"))
res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString()));
if (json.has("_authoredOn"))
parseElementProperties(getJObject(json, "_authoredOn"), res.getAuthoredOnElement());
if (json.has("lastModified"))
res.setLastModifiedElement(parseDateTime(json.get("lastModified").getAsString()));
if (json.has("_lastModified"))
parseElementProperties(getJObject(json, "_lastModified"), res.getLastModifiedElement());
if (json.has("requester"))
res.setRequester(parseReference(getJObject(json, "requester")));
if (json.has("performerType")) {
JsonArray array = getJArray(json, "performerType");
for (int i = 0; i < array.size(); i++) {
res.getPerformerType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("insurance")) {
JsonArray array = getJArray(json, "insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relevantHistory")) {
JsonArray array = getJArray(json, "relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("restriction"))
res.setRestriction(parseTransportRestrictionComponent(getJObject(json, "restriction")));
if (json.has("input")) {
JsonArray array = getJArray(json, "input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseTransportParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("output")) {
JsonArray array = getJArray(json, "output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parseTransportOutputComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("requestedLocation"))
res.setRequestedLocation(parseReference(getJObject(json, "requestedLocation")));
if (json.has("currentLocation"))
res.setCurrentLocation(parseReference(getJObject(json, "currentLocation")));
if (json.has("reason"))
res.setReason(parseCodeableReference(getJObject(json, "reason")));
if (json.has("history"))
res.setHistory(parseReference(getJObject(json, "history")));
}
protected Transport.TransportRestrictionComponent parseTransportRestrictionComponent(JsonObject json) throws IOException, FHIRFormatError {
Transport.TransportRestrictionComponent res = new Transport.TransportRestrictionComponent();
parseTransportRestrictionComponentProperties(json, res);
return res;
}
protected void parseTransportRestrictionComponentProperties(JsonObject json, Transport.TransportRestrictionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("repetitions"))
res.setRepetitionsElement(parsePositiveInt(json.get("repetitions").getAsString()));
if (json.has("_repetitions"))
parseElementProperties(getJObject(json, "_repetitions"), res.getRepetitionsElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("recipient")) {
JsonArray array = getJArray(json, "recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
}
protected Transport.ParameterComponent parseTransportParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
Transport.ParameterComponent res = new Transport.ParameterComponent();
parseTransportParameterComponentProperties(json, res);
return res;
}
protected void parseTransportParameterComponentProperties(JsonObject json, Transport.ParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Transport.TransportOutputComponent parseTransportOutputComponent(JsonObject json) throws IOException, FHIRFormatError {
Transport.TransportOutputComponent res = new Transport.TransportOutputComponent();
parseTransportOutputComponentProperties(json, res);
return res;
}
protected void parseTransportOutputComponentProperties(JsonObject json, Transport.TransportOutputComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ValueSet parseValueSet(JsonObject json) throws IOException, FHIRFormatError {
ValueSet res = new ValueSet();
parseValueSetProperties(json, res);
return res;
}
protected void parseValueSetProperties(JsonObject json, ValueSet res) throws IOException, FHIRFormatError {
parseMetadataResourceProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
DataType versionAlgorithm = parseType("versionAlgorithm", json);
if (versionAlgorithm != null)
res.setVersionAlgorithm(versionAlgorithm);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("experimental"))
res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean()));
if (json.has("_experimental"))
parseElementProperties(getJObject(json, "_experimental"), res.getExperimentalElement());
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("publisher"))
res.setPublisherElement(parseString(json.get("publisher").getAsString()));
if (json.has("_publisher"))
parseElementProperties(getJObject(json, "_publisher"), res.getPublisherElement());
if (json.has("contact")) {
JsonArray array = getJArray(json, "contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("useContext")) {
JsonArray array = getJArray(json, "useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(getJsonObjectFromArray(array, i)));
}
};
if (json.has("jurisdiction")) {
JsonArray array = getJArray(json, "jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("immutable"))
res.setImmutableElement(parseBoolean(json.get("immutable").getAsBoolean()));
if (json.has("_immutable"))
parseElementProperties(getJObject(json, "_immutable"), res.getImmutableElement());
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("copyrightLabel"))
res.setCopyrightLabelElement(parseString(json.get("copyrightLabel").getAsString()));
if (json.has("_copyrightLabel"))
parseElementProperties(getJObject(json, "_copyrightLabel"), res.getCopyrightLabelElement());
if (json.has("approvalDate"))
res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString()));
if (json.has("_approvalDate"))
parseElementProperties(getJObject(json, "_approvalDate"), res.getApprovalDateElement());
if (json.has("lastReviewDate"))
res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString()));
if (json.has("_lastReviewDate"))
parseElementProperties(getJObject(json, "_lastReviewDate"), res.getLastReviewDateElement());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = getJArray(json, "topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("author")) {
JsonArray array = getJArray(json, "author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("editor")) {
JsonArray array = getJArray(json, "editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("reviewer")) {
JsonArray array = getJArray(json, "reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("endorser")) {
JsonArray array = getJArray(json, "endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(getJsonObjectFromArray(array, i)));
}
};
if (json.has("relatedArtifact")) {
JsonArray array = getJArray(json, "relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(getJsonObjectFromArray(array, i)));
}
};
if (json.has("compose"))
res.setCompose(parseValueSetComposeComponent(getJObject(json, "compose")));
if (json.has("expansion"))
res.setExpansion(parseValueSetExpansionComponent(getJObject(json, "expansion")));
if (json.has("scope"))
res.setScope(parseValueSetScopeComponent(getJObject(json, "scope")));
}
protected ValueSet.ValueSetComposeComponent parseValueSetComposeComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent();
parseValueSetComposeComponentProperties(json, res);
return res;
}
protected void parseValueSetComposeComponentProperties(JsonObject json, ValueSet.ValueSetComposeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("lockedDate"))
res.setLockedDateElement(parseDate(json.get("lockedDate").getAsString()));
if (json.has("_lockedDate"))
parseElementProperties(getJObject(json, "_lockedDate"), res.getLockedDateElement());
if (json.has("inactive"))
res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean()));
if (json.has("_inactive"))
parseElementProperties(getJObject(json, "_inactive"), res.getInactiveElement());
if (json.has("include")) {
JsonArray array = getJArray(json, "include");
for (int i = 0; i < array.size(); i++) {
res.getInclude().add(parseValueSetConceptSetComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("exclude")) {
JsonArray array = getJArray(json, "exclude");
for (int i = 0; i < array.size(); i++) {
res.getExclude().add(parseValueSetConceptSetComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getProperty().add(new StringType());
} else {;
res.getProperty().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_property")) {
JsonArray array = getJArray(json, "_property");
for (int i = 0; i < array.size(); i++) {
if (i == res.getProperty().size())
res.getProperty().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getProperty().get(i));
}
};
}
protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent();
parseValueSetConceptSetComponentProperties(json, res);
return res;
}
protected void parseValueSetConceptSetComponentProperties(JsonObject json, ValueSet.ConceptSetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("system"))
res.setSystemElement(parseUri(json.get("system").getAsString()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("concept")) {
JsonArray array = getJArray(json, "concept");
for (int i = 0; i < array.size(); i++) {
res.getConcept().add(parseValueSetConceptReferenceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("filter")) {
JsonArray array = getJArray(json, "filter");
for (int i = 0; i < array.size(); i++) {
res.getFilter().add(parseValueSetConceptSetFilterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("valueSet")) {
JsonArray array = getJArray(json, "valueSet");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getValueSet().add(new CanonicalType());
} else {;
res.getValueSet().add(parseCanonical(array.get(i).getAsString()));
}
}
};
if (json.has("_valueSet")) {
JsonArray array = getJArray(json, "_valueSet");
for (int i = 0; i < array.size(); i++) {
if (i == res.getValueSet().size())
res.getValueSet().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getValueSet().get(i));
}
};
if (json.has("copyright"))
res.setCopyrightElement(parseString(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
}
protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent();
parseValueSetConceptReferenceComponentProperties(json, res);
return res;
}
protected void parseValueSetConceptReferenceComponentProperties(JsonObject json, ValueSet.ConceptReferenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("designation")) {
JsonArray array = getJArray(json, "designation");
for (int i = 0; i < array.size(); i++) {
res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent();
parseValueSetConceptReferenceDesignationComponentProperties(json, res);
return res;
}
protected void parseValueSetConceptReferenceDesignationComponentProperties(JsonObject json, ValueSet.ConceptReferenceDesignationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("language"))
res.setLanguageElement(parseCode(json.get("language").getAsString()));
if (json.has("_language"))
parseElementProperties(getJObject(json, "_language"), res.getLanguageElement());
if (json.has("use"))
res.setUse(parseCoding(getJObject(json, "use")));
if (json.has("additionalUse")) {
JsonArray array = getJArray(json, "additionalUse");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalUse().add(parseCoding(getJsonObjectFromArray(array, i)));
}
};
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent();
parseValueSetConceptSetFilterComponentProperties(json, res);
return res;
}
protected void parseValueSetConceptSetFilterComponentProperties(JsonObject json, ValueSet.ConceptSetFilterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("property"))
res.setPropertyElement(parseCode(json.get("property").getAsString()));
if (json.has("_property"))
parseElementProperties(getJObject(json, "_property"), res.getPropertyElement());
if (json.has("op"))
res.setOpElement(parseEnumeration(json.get("op").getAsString(), Enumerations.FilterOperator.NULL, new Enumerations.FilterOperatorEnumFactory()));
if (json.has("_op"))
parseElementProperties(getJObject(json, "_op"), res.getOpElement());
if (json.has("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ValueSet.ValueSetExpansionComponent parseValueSetExpansionComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent();
parseValueSetExpansionComponentProperties(json, res);
return res;
}
protected void parseValueSetExpansionComponentProperties(JsonObject json, ValueSet.ValueSetExpansionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifierElement(parseUri(json.get("identifier").getAsString()));
if (json.has("_identifier"))
parseElementProperties(getJObject(json, "_identifier"), res.getIdentifierElement());
if (json.has("next"))
res.setNextElement(parseUri(json.get("next").getAsString()));
if (json.has("_next"))
parseElementProperties(getJObject(json, "_next"), res.getNextElement());
if (json.has("timestamp"))
res.setTimestampElement(parseDateTime(json.get("timestamp").getAsString()));
if (json.has("_timestamp"))
parseElementProperties(getJObject(json, "_timestamp"), res.getTimestampElement());
if (json.has("total"))
res.setTotalElement(parseInteger(json.get("total").getAsLong()));
if (json.has("_total"))
parseElementProperties(getJObject(json, "_total"), res.getTotalElement());
if (json.has("offset"))
res.setOffsetElement(parseInteger(json.get("offset").getAsLong()));
if (json.has("_offset"))
parseElementProperties(getJObject(json, "_offset"), res.getOffsetElement());
if (json.has("parameter")) {
JsonArray array = getJArray(json, "parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseValueSetExpansionParameterComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseValueSetExpansionPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contains")) {
JsonArray array = getJArray(json, "contains");
for (int i = 0; i < array.size(); i++) {
res.getContains().add(parseValueSetExpansionContainsComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ValueSet.ValueSetExpansionParameterComponent parseValueSetExpansionParameterComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent();
parseValueSetExpansionParameterComponentProperties(json, res);
return res;
}
protected void parseValueSetExpansionParameterComponentProperties(JsonObject json, ValueSet.ValueSetExpansionParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ValueSet.ValueSetExpansionPropertyComponent parseValueSetExpansionPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionPropertyComponent res = new ValueSet.ValueSetExpansionPropertyComponent();
parseValueSetExpansionPropertyComponentProperties(json, res);
return res;
}
protected void parseValueSetExpansionPropertyComponentProperties(JsonObject json, ValueSet.ValueSetExpansionPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
}
protected ValueSet.ValueSetExpansionContainsComponent parseValueSetExpansionContainsComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent();
parseValueSetExpansionContainsComponentProperties(json, res);
return res;
}
protected void parseValueSetExpansionContainsComponentProperties(JsonObject json, ValueSet.ValueSetExpansionContainsComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("system"))
res.setSystemElement(parseUri(json.get("system").getAsString()));
if (json.has("_system"))
parseElementProperties(getJObject(json, "_system"), res.getSystemElement());
if (json.has("abstract"))
res.setAbstractElement(parseBoolean(json.get("abstract").getAsBoolean()));
if (json.has("_abstract"))
parseElementProperties(getJObject(json, "_abstract"), res.getAbstractElement());
if (json.has("inactive"))
res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean()));
if (json.has("_inactive"))
parseElementProperties(getJObject(json, "_inactive"), res.getInactiveElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
if (json.has("designation")) {
JsonArray array = getJArray(json, "designation");
for (int i = 0; i < array.size(); i++) {
res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("property")) {
JsonArray array = getJArray(json, "property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseValueSetConceptPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("contains")) {
JsonArray array = getJArray(json, "contains");
for (int i = 0; i < array.size(); i++) {
res.getContains().add(parseValueSetExpansionContainsComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ValueSet.ConceptPropertyComponent parseValueSetConceptPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ConceptPropertyComponent res = new ValueSet.ConceptPropertyComponent();
parseValueSetConceptPropertyComponentProperties(json, res);
return res;
}
protected void parseValueSetConceptPropertyComponentProperties(JsonObject json, ValueSet.ConceptPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("subProperty")) {
JsonArray array = getJArray(json, "subProperty");
for (int i = 0; i < array.size(); i++) {
res.getSubProperty().add(parseValueSetConceptSubPropertyComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected ValueSet.ConceptSubPropertyComponent parseValueSetConceptSubPropertyComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ConceptSubPropertyComponent res = new ValueSet.ConceptSubPropertyComponent();
parseValueSetConceptSubPropertyComponentProperties(json, res);
return res;
}
protected void parseValueSetConceptSubPropertyComponentProperties(JsonObject json, ValueSet.ConceptSubPropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
DataType value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ValueSet.ValueSetScopeComponent parseValueSetScopeComponent(JsonObject json) throws IOException, FHIRFormatError {
ValueSet.ValueSetScopeComponent res = new ValueSet.ValueSetScopeComponent();
parseValueSetScopeComponentProperties(json, res);
return res;
}
protected void parseValueSetScopeComponentProperties(JsonObject json, ValueSet.ValueSetScopeComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("inclusionCriteria"))
res.setInclusionCriteriaElement(parseString(json.get("inclusionCriteria").getAsString()));
if (json.has("_inclusionCriteria"))
parseElementProperties(getJObject(json, "_inclusionCriteria"), res.getInclusionCriteriaElement());
if (json.has("exclusionCriteria"))
res.setExclusionCriteriaElement(parseString(json.get("exclusionCriteria").getAsString()));
if (json.has("_exclusionCriteria"))
parseElementProperties(getJObject(json, "_exclusionCriteria"), res.getExclusionCriteriaElement());
}
protected VerificationResult parseVerificationResult(JsonObject json) throws IOException, FHIRFormatError {
VerificationResult res = new VerificationResult();
parseVerificationResultProperties(json, res);
return res;
}
protected void parseVerificationResultProperties(JsonObject json, VerificationResult res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("target")) {
JsonArray array = getJArray(json, "target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseReference(getJsonObjectFromArray(array, i)));
}
};
if (json.has("targetLocation")) {
JsonArray array = getJArray(json, "targetLocation");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getTargetLocation().add(new StringType());
} else {;
res.getTargetLocation().add(parseString(array.get(i).getAsString()));
}
}
};
if (json.has("_targetLocation")) {
JsonArray array = getJArray(json, "_targetLocation");
for (int i = 0; i < array.size(); i++) {
if (i == res.getTargetLocation().size())
res.getTargetLocation().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(getJsonObjectFromArray(array, i), res.getTargetLocation().get(i));
}
};
if (json.has("need"))
res.setNeed(parseCodeableConcept(getJObject(json, "need")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), VerificationResult.VerificationResultStatus.NULL, new VerificationResult.VerificationResultStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusDate"))
res.setStatusDateElement(parseDateTime(json.get("statusDate").getAsString()));
if (json.has("_statusDate"))
parseElementProperties(getJObject(json, "_statusDate"), res.getStatusDateElement());
if (json.has("validationType"))
res.setValidationType(parseCodeableConcept(getJObject(json, "validationType")));
if (json.has("validationProcess")) {
JsonArray array = getJArray(json, "validationProcess");
for (int i = 0; i < array.size(); i++) {
res.getValidationProcess().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("frequency"))
res.setFrequency(parseTiming(getJObject(json, "frequency")));
if (json.has("lastPerformed"))
res.setLastPerformedElement(parseDateTime(json.get("lastPerformed").getAsString()));
if (json.has("_lastPerformed"))
parseElementProperties(getJObject(json, "_lastPerformed"), res.getLastPerformedElement());
if (json.has("nextScheduled"))
res.setNextScheduledElement(parseDate(json.get("nextScheduled").getAsString()));
if (json.has("_nextScheduled"))
parseElementProperties(getJObject(json, "_nextScheduled"), res.getNextScheduledElement());
if (json.has("failureAction"))
res.setFailureAction(parseCodeableConcept(getJObject(json, "failureAction")));
if (json.has("primarySource")) {
JsonArray array = getJArray(json, "primarySource");
for (int i = 0; i < array.size(); i++) {
res.getPrimarySource().add(parseVerificationResultPrimarySourceComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("attestation"))
res.setAttestation(parseVerificationResultAttestationComponent(getJObject(json, "attestation")));
if (json.has("validator")) {
JsonArray array = getJArray(json, "validator");
for (int i = 0; i < array.size(); i++) {
res.getValidator().add(parseVerificationResultValidatorComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected VerificationResult.VerificationResultPrimarySourceComponent parseVerificationResultPrimarySourceComponent(JsonObject json) throws IOException, FHIRFormatError {
VerificationResult.VerificationResultPrimarySourceComponent res = new VerificationResult.VerificationResultPrimarySourceComponent();
parseVerificationResultPrimarySourceComponentProperties(json, res);
return res;
}
protected void parseVerificationResultPrimarySourceComponentProperties(JsonObject json, VerificationResult.VerificationResultPrimarySourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("type")) {
JsonArray array = getJArray(json, "type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("communicationMethod")) {
JsonArray array = getJArray(json, "communicationMethod");
for (int i = 0; i < array.size(); i++) {
res.getCommunicationMethod().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
if (json.has("validationStatus"))
res.setValidationStatus(parseCodeableConcept(getJObject(json, "validationStatus")));
if (json.has("validationDate"))
res.setValidationDateElement(parseDateTime(json.get("validationDate").getAsString()));
if (json.has("_validationDate"))
parseElementProperties(getJObject(json, "_validationDate"), res.getValidationDateElement());
if (json.has("canPushUpdates"))
res.setCanPushUpdates(parseCodeableConcept(getJObject(json, "canPushUpdates")));
if (json.has("pushTypeAvailable")) {
JsonArray array = getJArray(json, "pushTypeAvailable");
for (int i = 0; i < array.size(); i++) {
res.getPushTypeAvailable().add(parseCodeableConcept(getJsonObjectFromArray(array, i)));
}
};
}
protected VerificationResult.VerificationResultAttestationComponent parseVerificationResultAttestationComponent(JsonObject json) throws IOException, FHIRFormatError {
VerificationResult.VerificationResultAttestationComponent res = new VerificationResult.VerificationResultAttestationComponent();
parseVerificationResultAttestationComponentProperties(json, res);
return res;
}
protected void parseVerificationResultAttestationComponentProperties(JsonObject json, VerificationResult.VerificationResultAttestationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
if (json.has("communicationMethod"))
res.setCommunicationMethod(parseCodeableConcept(getJObject(json, "communicationMethod")));
if (json.has("date"))
res.setDateElement(parseDate(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
if (json.has("sourceIdentityCertificate"))
res.setSourceIdentityCertificateElement(parseString(json.get("sourceIdentityCertificate").getAsString()));
if (json.has("_sourceIdentityCertificate"))
parseElementProperties(getJObject(json, "_sourceIdentityCertificate"), res.getSourceIdentityCertificateElement());
if (json.has("proxyIdentityCertificate"))
res.setProxyIdentityCertificateElement(parseString(json.get("proxyIdentityCertificate").getAsString()));
if (json.has("_proxyIdentityCertificate"))
parseElementProperties(getJObject(json, "_proxyIdentityCertificate"), res.getProxyIdentityCertificateElement());
if (json.has("proxySignature"))
res.setProxySignature(parseSignature(getJObject(json, "proxySignature")));
if (json.has("sourceSignature"))
res.setSourceSignature(parseSignature(getJObject(json, "sourceSignature")));
}
protected VerificationResult.VerificationResultValidatorComponent parseVerificationResultValidatorComponent(JsonObject json) throws IOException, FHIRFormatError {
VerificationResult.VerificationResultValidatorComponent res = new VerificationResult.VerificationResultValidatorComponent();
parseVerificationResultValidatorComponentProperties(json, res);
return res;
}
protected void parseVerificationResultValidatorComponentProperties(JsonObject json, VerificationResult.VerificationResultValidatorComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("organization"))
res.setOrganization(parseReference(getJObject(json, "organization")));
if (json.has("identityCertificate"))
res.setIdentityCertificateElement(parseString(json.get("identityCertificate").getAsString()));
if (json.has("_identityCertificate"))
parseElementProperties(getJObject(json, "_identityCertificate"), res.getIdentityCertificateElement());
if (json.has("attestationSignature"))
res.setAttestationSignature(parseSignature(getJObject(json, "attestationSignature")));
}
protected VisionPrescription parseVisionPrescription(JsonObject json) throws IOException, FHIRFormatError {
VisionPrescription res = new VisionPrescription();
parseVisionPrescriptionProperties(json, res);
return res;
}
protected void parseVisionPrescriptionProperties(JsonObject json, VisionPrescription res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = getJArray(json, "identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(getJsonObjectFromArray(array, i)));
}
};
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.FinancialResourceStatusCodes.NULL, new Enumerations.FinancialResourceStatusCodesEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("dateWritten"))
res.setDateWrittenElement(parseDateTime(json.get("dateWritten").getAsString()));
if (json.has("_dateWritten"))
parseElementProperties(getJObject(json, "_dateWritten"), res.getDateWrittenElement());
if (json.has("prescriber"))
res.setPrescriber(parseReference(getJObject(json, "prescriber")));
if (json.has("lensSpecification")) {
JsonArray array = getJArray(json, "lensSpecification");
for (int i = 0; i < array.size(); i++) {
res.getLensSpecification().add(parseVisionPrescriptionLensSpecificationComponent(getJsonObjectFromArray(array, i)));
}
};
}
protected VisionPrescription.VisionPrescriptionLensSpecificationComponent parseVisionPrescriptionLensSpecificationComponent(JsonObject json) throws IOException, FHIRFormatError {
VisionPrescription.VisionPrescriptionLensSpecificationComponent res = new VisionPrescription.VisionPrescriptionLensSpecificationComponent();
parseVisionPrescriptionLensSpecificationComponentProperties(json, res);
return res;
}
protected void parseVisionPrescriptionLensSpecificationComponentProperties(JsonObject json, VisionPrescription.VisionPrescriptionLensSpecificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("product"))
res.setProduct(parseCodeableConcept(getJObject(json, "product")));
if (json.has("eye"))
res.setEyeElement(parseEnumeration(json.get("eye").getAsString(), VisionPrescription.VisionEyes.NULL, new VisionPrescription.VisionEyesEnumFactory()));
if (json.has("_eye"))
parseElementProperties(getJObject(json, "_eye"), res.getEyeElement());
if (json.has("sphere"))
res.setSphereElement(parseDecimal(json.get("sphere").getAsBigDecimal()));
if (json.has("_sphere"))
parseElementProperties(getJObject(json, "_sphere"), res.getSphereElement());
if (json.has("cylinder"))
res.setCylinderElement(parseDecimal(json.get("cylinder").getAsBigDecimal()));
if (json.has("_cylinder"))
parseElementProperties(getJObject(json, "_cylinder"), res.getCylinderElement());
if (json.has("axis"))
res.setAxisElement(parseInteger(json.get("axis").getAsLong()));
if (json.has("_axis"))
parseElementProperties(getJObject(json, "_axis"), res.getAxisElement());
if (json.has("prism")) {
JsonArray array = getJArray(json, "prism");
for (int i = 0; i < array.size(); i++) {
res.getPrism().add(parseVisionPrescriptionPrismComponent(getJsonObjectFromArray(array, i)));
}
};
if (json.has("add"))
res.setAddElement(parseDecimal(json.get("add").getAsBigDecimal()));
if (json.has("_add"))
parseElementProperties(getJObject(json, "_add"), res.getAddElement());
if (json.has("power"))
res.setPowerElement(parseDecimal(json.get("power").getAsBigDecimal()));
if (json.has("_power"))
parseElementProperties(getJObject(json, "_power"), res.getPowerElement());
if (json.has("backCurve"))
res.setBackCurveElement(parseDecimal(json.get("backCurve").getAsBigDecimal()));
if (json.has("_backCurve"))
parseElementProperties(getJObject(json, "_backCurve"), res.getBackCurveElement());
if (json.has("diameter"))
res.setDiameterElement(parseDecimal(json.get("diameter").getAsBigDecimal()));
if (json.has("_diameter"))
parseElementProperties(getJObject(json, "_diameter"), res.getDiameterElement());
if (json.has("duration"))
res.setDuration(parseQuantity(getJObject(json, "duration")));
if (json.has("color"))
res.setColorElement(parseString(json.get("color").getAsString()));
if (json.has("_color"))
parseElementProperties(getJObject(json, "_color"), res.getColorElement());
if (json.has("brand"))
res.setBrandElement(parseString(json.get("brand").getAsString()));
if (json.has("_brand"))
parseElementProperties(getJObject(json, "_brand"), res.getBrandElement());
if (json.has("note")) {
JsonArray array = getJArray(json, "note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(getJsonObjectFromArray(array, i)));
}
};
}
protected VisionPrescription.PrismComponent parseVisionPrescriptionPrismComponent(JsonObject json) throws IOException, FHIRFormatError {
VisionPrescription.PrismComponent res = new VisionPrescription.PrismComponent();
parseVisionPrescriptionPrismComponentProperties(json, res);
return res;
}
protected void parseVisionPrescriptionPrismComponentProperties(JsonObject json, VisionPrescription.PrismComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("amount"))
res.setAmountElement(parseDecimal(json.get("amount").getAsBigDecimal()));
if (json.has("_amount"))
parseElementProperties(getJObject(json, "_amount"), res.getAmountElement());
if (json.has("base"))
res.setBaseElement(parseEnumeration(json.get("base").getAsString(), VisionPrescription.VisionBase.NULL, new VisionPrescription.VisionBaseEnumFactory()));
if (json.has("_base"))
parseElementProperties(getJObject(json, "_base"), res.getBaseElement());
}
@Override
protected Resource parseResource(JsonObject json) throws IOException, FHIRFormatError {
if (!json.has("resourceType")) {
throw new FHIRFormatError("Unable to find resource type - maybe not a FHIR resource?");
}
String t = json.get("resourceType").getAsString();
if (Utilities.noString(t)) {
throw new FHIRFormatError("Unable to find resource type - maybe not a FHIR resource?");
} else if (t.equals("Account")) {
return parseAccount(json);
} else if (t.equals("ActivityDefinition")) {
return parseActivityDefinition(json);
} else if (t.equals("ActorDefinition")) {
return parseActorDefinition(json);
} else if (t.equals("AdministrableProductDefinition")) {
return parseAdministrableProductDefinition(json);
} else if (t.equals("AdverseEvent")) {
return parseAdverseEvent(json);
} else if (t.equals("AllergyIntolerance")) {
return parseAllergyIntolerance(json);
} else if (t.equals("Appointment")) {
return parseAppointment(json);
} else if (t.equals("AppointmentResponse")) {
return parseAppointmentResponse(json);
} else if (t.equals("ArtifactAssessment")) {
return parseArtifactAssessment(json);
} else if (t.equals("AuditEvent")) {
return parseAuditEvent(json);
} else if (t.equals("Basic")) {
return parseBasic(json);
} else if (t.equals("Binary")) {
return parseBinary(json);
} else if (t.equals("BiologicallyDerivedProduct")) {
return parseBiologicallyDerivedProduct(json);
} else if (t.equals("BiologicallyDerivedProductDispense")) {
return parseBiologicallyDerivedProductDispense(json);
} else if (t.equals("BodyStructure")) {
return parseBodyStructure(json);
} else if (t.equals("Bundle")) {
return parseBundle(json);
} else if (t.equals("CapabilityStatement")) {
return parseCapabilityStatement(json);
} else if (t.equals("CarePlan")) {
return parseCarePlan(json);
} else if (t.equals("CareTeam")) {
return parseCareTeam(json);
} else if (t.equals("ChargeItem")) {
return parseChargeItem(json);
} else if (t.equals("ChargeItemDefinition")) {
return parseChargeItemDefinition(json);
} else if (t.equals("Citation")) {
return parseCitation(json);
} else if (t.equals("Claim")) {
return parseClaim(json);
} else if (t.equals("ClaimResponse")) {
return parseClaimResponse(json);
} else if (t.equals("ClinicalImpression")) {
return parseClinicalImpression(json);
} else if (t.equals("ClinicalUseDefinition")) {
return parseClinicalUseDefinition(json);
} else if (t.equals("CodeSystem")) {
return parseCodeSystem(json);
} else if (t.equals("Communication")) {
return parseCommunication(json);
} else if (t.equals("CommunicationRequest")) {
return parseCommunicationRequest(json);
} else if (t.equals("CompartmentDefinition")) {
return parseCompartmentDefinition(json);
} else if (t.equals("Composition")) {
return parseComposition(json);
} else if (t.equals("ConceptMap")) {
return parseConceptMap(json);
} else if (t.equals("Condition")) {
return parseCondition(json);
} else if (t.equals("ConditionDefinition")) {
return parseConditionDefinition(json);
} else if (t.equals("Consent")) {
return parseConsent(json);
} else if (t.equals("Contract")) {
return parseContract(json);
} else if (t.equals("Coverage")) {
return parseCoverage(json);
} else if (t.equals("CoverageEligibilityRequest")) {
return parseCoverageEligibilityRequest(json);
} else if (t.equals("CoverageEligibilityResponse")) {
return parseCoverageEligibilityResponse(json);
} else if (t.equals("DetectedIssue")) {
return parseDetectedIssue(json);
} else if (t.equals("Device")) {
return parseDevice(json);
} else if (t.equals("DeviceAssociation")) {
return parseDeviceAssociation(json);
} else if (t.equals("DeviceDefinition")) {
return parseDeviceDefinition(json);
} else if (t.equals("DeviceDispense")) {
return parseDeviceDispense(json);
} else if (t.equals("DeviceMetric")) {
return parseDeviceMetric(json);
} else if (t.equals("DeviceRequest")) {
return parseDeviceRequest(json);
} else if (t.equals("DeviceUsage")) {
return parseDeviceUsage(json);
} else if (t.equals("DiagnosticReport")) {
return parseDiagnosticReport(json);
} else if (t.equals("DocumentReference")) {
return parseDocumentReference(json);
} else if (t.equals("Encounter")) {
return parseEncounter(json);
} else if (t.equals("EncounterHistory")) {
return parseEncounterHistory(json);
} else if (t.equals("Endpoint")) {
return parseEndpoint(json);
} else if (t.equals("EnrollmentRequest")) {
return parseEnrollmentRequest(json);
} else if (t.equals("EnrollmentResponse")) {
return parseEnrollmentResponse(json);
} else if (t.equals("EpisodeOfCare")) {
return parseEpisodeOfCare(json);
} else if (t.equals("EventDefinition")) {
return parseEventDefinition(json);
} else if (t.equals("Evidence")) {
return parseEvidence(json);
} else if (t.equals("EvidenceReport")) {
return parseEvidenceReport(json);
} else if (t.equals("EvidenceVariable")) {
return parseEvidenceVariable(json);
} else if (t.equals("ExampleScenario")) {
return parseExampleScenario(json);
} else if (t.equals("ExplanationOfBenefit")) {
return parseExplanationOfBenefit(json);
} else if (t.equals("FamilyMemberHistory")) {
return parseFamilyMemberHistory(json);
} else if (t.equals("Flag")) {
return parseFlag(json);
} else if (t.equals("FormularyItem")) {
return parseFormularyItem(json);
} else if (t.equals("GenomicStudy")) {
return parseGenomicStudy(json);
} else if (t.equals("Goal")) {
return parseGoal(json);
} else if (t.equals("GraphDefinition")) {
return parseGraphDefinition(json);
} else if (t.equals("Group")) {
return parseGroup(json);
} else if (t.equals("GuidanceResponse")) {
return parseGuidanceResponse(json);
} else if (t.equals("HealthcareService")) {
return parseHealthcareService(json);
} else if (t.equals("ImagingSelection")) {
return parseImagingSelection(json);
} else if (t.equals("ImagingStudy")) {
return parseImagingStudy(json);
} else if (t.equals("Immunization")) {
return parseImmunization(json);
} else if (t.equals("ImmunizationEvaluation")) {
return parseImmunizationEvaluation(json);
} else if (t.equals("ImmunizationRecommendation")) {
return parseImmunizationRecommendation(json);
} else if (t.equals("ImplementationGuide")) {
return parseImplementationGuide(json);
} else if (t.equals("Ingredient")) {
return parseIngredient(json);
} else if (t.equals("InsurancePlan")) {
return parseInsurancePlan(json);
} else if (t.equals("InventoryItem")) {
return parseInventoryItem(json);
} else if (t.equals("InventoryReport")) {
return parseInventoryReport(json);
} else if (t.equals("Invoice")) {
return parseInvoice(json);
} else if (t.equals("Library")) {
return parseLibrary(json);
} else if (t.equals("Linkage")) {
return parseLinkage(json);
} else if (t.equals("List")) {
return parseListResource(json);
} else if (t.equals("Location")) {
return parseLocation(json);
} else if (t.equals("ManufacturedItemDefinition")) {
return parseManufacturedItemDefinition(json);
} else if (t.equals("Measure")) {
return parseMeasure(json);
} else if (t.equals("MeasureReport")) {
return parseMeasureReport(json);
} else if (t.equals("Medication")) {
return parseMedication(json);
} else if (t.equals("MedicationAdministration")) {
return parseMedicationAdministration(json);
} else if (t.equals("MedicationDispense")) {
return parseMedicationDispense(json);
} else if (t.equals("MedicationKnowledge")) {
return parseMedicationKnowledge(json);
} else if (t.equals("MedicationRequest")) {
return parseMedicationRequest(json);
} else if (t.equals("MedicationStatement")) {
return parseMedicationStatement(json);
} else if (t.equals("MedicinalProductDefinition")) {
return parseMedicinalProductDefinition(json);
} else if (t.equals("MessageDefinition")) {
return parseMessageDefinition(json);
} else if (t.equals("MessageHeader")) {
return parseMessageHeader(json);
} else if (t.equals("MolecularSequence")) {
return parseMolecularSequence(json);
} else if (t.equals("NamingSystem")) {
return parseNamingSystem(json);
} else if (t.equals("NutritionIntake")) {
return parseNutritionIntake(json);
} else if (t.equals("NutritionOrder")) {
return parseNutritionOrder(json);
} else if (t.equals("NutritionProduct")) {
return parseNutritionProduct(json);
} else if (t.equals("Observation")) {
return parseObservation(json);
} else if (t.equals("ObservationDefinition")) {
return parseObservationDefinition(json);
} else if (t.equals("OperationDefinition")) {
return parseOperationDefinition(json);
} else if (t.equals("OperationOutcome")) {
return parseOperationOutcome(json);
} else if (t.equals("Organization")) {
return parseOrganization(json);
} else if (t.equals("OrganizationAffiliation")) {
return parseOrganizationAffiliation(json);
} else if (t.equals("PackagedProductDefinition")) {
return parsePackagedProductDefinition(json);
} else if (t.equals("Parameters")) {
return parseParameters(json);
} else if (t.equals("Patient")) {
return parsePatient(json);
} else if (t.equals("PaymentNotice")) {
return parsePaymentNotice(json);
} else if (t.equals("PaymentReconciliation")) {
return parsePaymentReconciliation(json);
} else if (t.equals("Permission")) {
return parsePermission(json);
} else if (t.equals("Person")) {
return parsePerson(json);
} else if (t.equals("PlanDefinition")) {
return parsePlanDefinition(json);
} else if (t.equals("Practitioner")) {
return parsePractitioner(json);
} else if (t.equals("PractitionerRole")) {
return parsePractitionerRole(json);
} else if (t.equals("Procedure")) {
return parseProcedure(json);
} else if (t.equals("Provenance")) {
return parseProvenance(json);
} else if (t.equals("Questionnaire")) {
return parseQuestionnaire(json);
} else if (t.equals("QuestionnaireResponse")) {
return parseQuestionnaireResponse(json);
} else if (t.equals("RegulatedAuthorization")) {
return parseRegulatedAuthorization(json);
} else if (t.equals("RelatedPerson")) {
return parseRelatedPerson(json);
} else if (t.equals("RequestOrchestration")) {
return parseRequestOrchestration(json);
} else if (t.equals("Requirements")) {
return parseRequirements(json);
} else if (t.equals("ResearchStudy")) {
return parseResearchStudy(json);
} else if (t.equals("ResearchSubject")) {
return parseResearchSubject(json);
} else if (t.equals("RiskAssessment")) {
return parseRiskAssessment(json);
} else if (t.equals("Schedule")) {
return parseSchedule(json);
} else if (t.equals("SearchParameter")) {
return parseSearchParameter(json);
} else if (t.equals("ServiceRequest")) {
return parseServiceRequest(json);
} else if (t.equals("Slot")) {
return parseSlot(json);
} else if (t.equals("Specimen")) {
return parseSpecimen(json);
} else if (t.equals("SpecimenDefinition")) {
return parseSpecimenDefinition(json);
} else if (t.equals("StructureDefinition")) {
return parseStructureDefinition(json);
} else if (t.equals("StructureMap")) {
return parseStructureMap(json);
} else if (t.equals("Subscription")) {
return parseSubscription(json);
} else if (t.equals("SubscriptionStatus")) {
return parseSubscriptionStatus(json);
} else if (t.equals("SubscriptionTopic")) {
return parseSubscriptionTopic(json);
} else if (t.equals("Substance")) {
return parseSubstance(json);
} else if (t.equals("SubstanceDefinition")) {
return parseSubstanceDefinition(json);
} else if (t.equals("SubstanceNucleicAcid")) {
return parseSubstanceNucleicAcid(json);
} else if (t.equals("SubstancePolymer")) {
return parseSubstancePolymer(json);
} else if (t.equals("SubstanceProtein")) {
return parseSubstanceProtein(json);
} else if (t.equals("SubstanceReferenceInformation")) {
return parseSubstanceReferenceInformation(json);
} else if (t.equals("SubstanceSourceMaterial")) {
return parseSubstanceSourceMaterial(json);
} else if (t.equals("SupplyDelivery")) {
return parseSupplyDelivery(json);
} else if (t.equals("SupplyRequest")) {
return parseSupplyRequest(json);
} else if (t.equals("Task")) {
return parseTask(json);
} else if (t.equals("TerminologyCapabilities")) {
return parseTerminologyCapabilities(json);
} else if (t.equals("TestPlan")) {
return parseTestPlan(json);
} else if (t.equals("TestReport")) {
return parseTestReport(json);
} else if (t.equals("TestScript")) {
return parseTestScript(json);
} else if (t.equals("Transport")) {
return parseTransport(json);
} else if (t.equals("ValueSet")) {
return parseValueSet(json);
} else if (t.equals("VerificationResult")) {
return parseVerificationResult(json);
} else if (t.equals("VisionPrescription")) {
return parseVisionPrescription(json);
} else {
Resource res = parseCustomResource(t, json);
if (res != null) {
return res;
} else {
throw new FHIRFormatError("Unknown/Unrecognised resource type '"+t+"' (in property 'resourceType')");
}
}
}
protected DataType parseType(String prefix, JsonObject json) throws IOException, FHIRFormatError {
if (json.has(prefix+"Date") || json.has("_"+prefix+"Date")) {
DataType t = json.has(prefix+"Date") ? parseDate(json.get(prefix+"Date").getAsString()) : new DateType();
if (json.has("_"+prefix+"Date"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Date"), t);
return t;
}
else if (json.has(prefix+"DateTime") || json.has("_"+prefix+"DateTime")) {
DataType t = json.has(prefix+"DateTime") ? parseDateTime(json.get(prefix+"DateTime").getAsString()) : new DateTimeType();
if (json.has("_"+prefix+"DateTime"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"DateTime"), t);
return t;
}
else if (json.has(prefix+"Code") || json.has("_"+prefix+"Code")) {
DataType t = json.has(prefix+"Code") ? parseCode(json.get(prefix+"Code").getAsString()) : new CodeType();
if (json.has("_"+prefix+"Code"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Code"), t);
return t;
}
else if (json.has(prefix+"String") || json.has("_"+prefix+"String")) {
DataType t = json.has(prefix+"String") ? parseString(json.get(prefix+"String").getAsString()) : new StringType();
if (json.has("_"+prefix+"String"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"String"), t);
return t;
}
else if (json.has(prefix+"Integer") || json.has("_"+prefix+"Integer")) {
DataType t = json.has(prefix+"Integer") ? parseInteger(json.get(prefix+"Integer").getAsLong()) : new IntegerType();
if (json.has("_"+prefix+"Integer"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Integer"), t);
return t;
}
else if (json.has(prefix+"Integer64") || json.has("_"+prefix+"Integer64")) {
DataType t = json.has(prefix+"Integer64") ? parseInteger64(json.get(prefix+"Integer64").getAsLong()) : new Integer64Type();
if (json.has("_"+prefix+"Integer64"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Integer64"), t);
return t;
}
else if (json.has(prefix+"Oid") || json.has("_"+prefix+"Oid")) {
DataType t = json.has(prefix+"Oid") ? parseOid(json.get(prefix+"Oid").getAsString()) : new OidType();
if (json.has("_"+prefix+"Oid"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Oid"), t);
return t;
}
else if (json.has(prefix+"Canonical") || json.has("_"+prefix+"Canonical")) {
DataType t = json.has(prefix+"Canonical") ? parseCanonical(json.get(prefix+"Canonical").getAsString()) : new CanonicalType();
if (json.has("_"+prefix+"Canonical"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Canonical"), t);
return t;
}
else if (json.has(prefix+"Uri") || json.has("_"+prefix+"Uri")) {
DataType t = json.has(prefix+"Uri") ? parseUri(json.get(prefix+"Uri").getAsString()) : new UriType();
if (json.has("_"+prefix+"Uri"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Uri"), t);
return t;
}
else if (json.has(prefix+"Uuid") || json.has("_"+prefix+"Uuid")) {
DataType t = json.has(prefix+"Uuid") ? parseUuid(json.get(prefix+"Uuid").getAsString()) : new UuidType();
if (json.has("_"+prefix+"Uuid"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Uuid"), t);
return t;
}
else if (json.has(prefix+"Url") || json.has("_"+prefix+"Url")) {
DataType t = json.has(prefix+"Url") ? parseUrl(json.get(prefix+"Url").getAsString()) : new UrlType();
if (json.has("_"+prefix+"Url"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Url"), t);
return t;
}
else if (json.has(prefix+"Instant") || json.has("_"+prefix+"Instant")) {
DataType t = json.has(prefix+"Instant") ? parseInstant(json.get(prefix+"Instant").getAsString()) : new InstantType();
if (json.has("_"+prefix+"Instant"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Instant"), t);
return t;
}
else if (json.has(prefix+"Boolean") || json.has("_"+prefix+"Boolean")) {
DataType t = json.has(prefix+"Boolean") ? parseBoolean(json.get(prefix+"Boolean").getAsBoolean()) : new BooleanType();
if (json.has("_"+prefix+"Boolean"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Boolean"), t);
return t;
}
else if (json.has(prefix+"Base64Binary") || json.has("_"+prefix+"Base64Binary")) {
DataType t = json.has(prefix+"Base64Binary") ? parseBase64Binary(json.get(prefix+"Base64Binary").getAsString()) : new Base64BinaryType();
if (json.has("_"+prefix+"Base64Binary"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Base64Binary"), t);
return t;
}
else if (json.has(prefix+"UnsignedInt") || json.has("_"+prefix+"UnsignedInt")) {
DataType t = json.has(prefix+"UnsignedInt") ? parseUnsignedInt(json.get(prefix+"UnsignedInt").getAsString()) : new UnsignedIntType();
if (json.has("_"+prefix+"UnsignedInt"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"UnsignedInt"), t);
return t;
}
else if (json.has(prefix+"Markdown") || json.has("_"+prefix+"Markdown")) {
DataType t = json.has(prefix+"Markdown") ? parseMarkdown(json.get(prefix+"Markdown").getAsString()) : new MarkdownType();
if (json.has("_"+prefix+"Markdown"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Markdown"), t);
return t;
}
else if (json.has(prefix+"Time") || json.has("_"+prefix+"Time")) {
DataType t = json.has(prefix+"Time") ? parseTime(json.get(prefix+"Time").getAsString()) : new TimeType();
if (json.has("_"+prefix+"Time"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Time"), t);
return t;
}
else if (json.has(prefix+"Id") || json.has("_"+prefix+"Id")) {
DataType t = json.has(prefix+"Id") ? parseId(json.get(prefix+"Id").getAsString()) : new IdType();
if (json.has("_"+prefix+"Id"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Id"), t);
return t;
}
else if (json.has(prefix+"PositiveInt") || json.has("_"+prefix+"PositiveInt")) {
DataType t = json.has(prefix+"PositiveInt") ? parsePositiveInt(json.get(prefix+"PositiveInt").getAsString()) : new PositiveIntType();
if (json.has("_"+prefix+"PositiveInt"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"PositiveInt"), t);
return t;
}
else if (json.has(prefix+"Decimal") || json.has("_"+prefix+"Decimal")) {
DataType t = json.has(prefix+"Decimal") ? parseDecimal(json.get(prefix+"Decimal").getAsBigDecimal()) : new DecimalType();
if (json.has("_"+prefix+"Decimal"))
parseElementProperties(json.getAsJsonObject("_"+prefix+"Decimal"), t);
return t;
} else if (json.has(prefix+"Address")) {
return parseAddress(getJObject(json, prefix+"Address"));
} else if (json.has(prefix+"Age")) {
return parseAge(getJObject(json, prefix+"Age"));
} else if (json.has(prefix+"Annotation")) {
return parseAnnotation(getJObject(json, prefix+"Annotation"));
} else if (json.has(prefix+"Attachment")) {
return parseAttachment(getJObject(json, prefix+"Attachment"));
} else if (json.has(prefix+"Availability")) {
return parseAvailability(getJObject(json, prefix+"Availability"));
} else if (json.has(prefix+"CodeableConcept")) {
return parseCodeableConcept(getJObject(json, prefix+"CodeableConcept"));
} else if (json.has(prefix+"CodeableReference")) {
return parseCodeableReference(getJObject(json, prefix+"CodeableReference"));
} else if (json.has(prefix+"Coding")) {
return parseCoding(getJObject(json, prefix+"Coding"));
} else if (json.has(prefix+"ContactDetail")) {
return parseContactDetail(getJObject(json, prefix+"ContactDetail"));
} else if (json.has(prefix+"ContactPoint")) {
return parseContactPoint(getJObject(json, prefix+"ContactPoint"));
} else if (json.has(prefix+"Contributor")) {
return parseContributor(getJObject(json, prefix+"Contributor"));
} else if (json.has(prefix+"Count")) {
return parseCount(getJObject(json, prefix+"Count"));
} else if (json.has(prefix+"DataRequirement")) {
return parseDataRequirement(getJObject(json, prefix+"DataRequirement"));
} else if (json.has(prefix+"Distance")) {
return parseDistance(getJObject(json, prefix+"Distance"));
} else if (json.has(prefix+"Dosage")) {
return parseDosage(getJObject(json, prefix+"Dosage"));
} else if (json.has(prefix+"Duration")) {
return parseDuration(getJObject(json, prefix+"Duration"));
} else if (json.has(prefix+"ElementDefinition")) {
return parseElementDefinition(getJObject(json, prefix+"ElementDefinition"));
} else if (json.has(prefix+"Expression")) {
return parseExpression(getJObject(json, prefix+"Expression"));
} else if (json.has(prefix+"ExtendedContactDetail")) {
return parseExtendedContactDetail(getJObject(json, prefix+"ExtendedContactDetail"));
} else if (json.has(prefix+"Extension")) {
return parseExtension(getJObject(json, prefix+"Extension"));
} else if (json.has(prefix+"HumanName")) {
return parseHumanName(getJObject(json, prefix+"HumanName"));
} else if (json.has(prefix+"Identifier")) {
return parseIdentifier(getJObject(json, prefix+"Identifier"));
} else if (json.has(prefix+"MarketingStatus")) {
return parseMarketingStatus(getJObject(json, prefix+"MarketingStatus"));
} else if (json.has(prefix+"Meta")) {
return parseMeta(getJObject(json, prefix+"Meta"));
} else if (json.has(prefix+"MonetaryComponent")) {
return parseMonetaryComponent(getJObject(json, prefix+"MonetaryComponent"));
} else if (json.has(prefix+"Money")) {
return parseMoney(getJObject(json, prefix+"Money"));
} else if (json.has(prefix+"Narrative")) {
return parseNarrative(getJObject(json, prefix+"Narrative"));
} else if (json.has(prefix+"ParameterDefinition")) {
return parseParameterDefinition(getJObject(json, prefix+"ParameterDefinition"));
} else if (json.has(prefix+"Period")) {
return parsePeriod(getJObject(json, prefix+"Period"));
} else if (json.has(prefix+"ProductShelfLife")) {
return parseProductShelfLife(getJObject(json, prefix+"ProductShelfLife"));
} else if (json.has(prefix+"Quantity")) {
return parseQuantity(getJObject(json, prefix+"Quantity"));
} else if (json.has(prefix+"Range")) {
return parseRange(getJObject(json, prefix+"Range"));
} else if (json.has(prefix+"Ratio")) {
return parseRatio(getJObject(json, prefix+"Ratio"));
} else if (json.has(prefix+"RatioRange")) {
return parseRatioRange(getJObject(json, prefix+"RatioRange"));
} else if (json.has(prefix+"Reference")) {
return parseReference(getJObject(json, prefix+"Reference"));
} else if (json.has(prefix+"RelatedArtifact")) {
return parseRelatedArtifact(getJObject(json, prefix+"RelatedArtifact"));
} else if (json.has(prefix+"SampledData")) {
return parseSampledData(getJObject(json, prefix+"SampledData"));
} else if (json.has(prefix+"Signature")) {
return parseSignature(getJObject(json, prefix+"Signature"));
} else if (json.has(prefix+"Timing")) {
return parseTiming(getJObject(json, prefix+"Timing"));
} else if (json.has(prefix+"TriggerDefinition")) {
return parseTriggerDefinition(getJObject(json, prefix+"TriggerDefinition"));
} else if (json.has(prefix+"UsageContext")) {
return parseUsageContext(getJObject(json, prefix+"UsageContext"));
} else if (json.has(prefix+"VirtualServiceDetail")) {
return parseVirtualServiceDetail(getJObject(json, prefix+"VirtualServiceDetail"));
} else {
return null;
}
}
protected DataType parseAnyType(JsonObject json, String type) throws IOException, FHIRFormatError {
return parseType(json, type);
}
protected DataType parseType(JsonObject json, String type) throws IOException, FHIRFormatError {
if (Utilities.noString(type)) {
throw new FHIRFormatError("Unable to parse type - type not specified");
} else if (type.equals("Address")) {
return parseAddress(json);
} else if (type.equals("Age")) {
return parseAge(json);
} else if (type.equals("Annotation")) {
return parseAnnotation(json);
} else if (type.equals("Attachment")) {
return parseAttachment(json);
} else if (type.equals("Availability")) {
return parseAvailability(json);
} else if (type.equals("CodeableConcept")) {
return parseCodeableConcept(json);
} else if (type.equals("CodeableReference")) {
return parseCodeableReference(json);
} else if (type.equals("Coding")) {
return parseCoding(json);
} else if (type.equals("ContactDetail")) {
return parseContactDetail(json);
} else if (type.equals("ContactPoint")) {
return parseContactPoint(json);
} else if (type.equals("Contributor")) {
return parseContributor(json);
} else if (type.equals("Count")) {
return parseCount(json);
} else if (type.equals("DataRequirement")) {
return parseDataRequirement(json);
} else if (type.equals("Distance")) {
return parseDistance(json);
} else if (type.equals("Dosage")) {
return parseDosage(json);
} else if (type.equals("Duration")) {
return parseDuration(json);
} else if (type.equals("ElementDefinition")) {
return parseElementDefinition(json);
} else if (type.equals("Expression")) {
return parseExpression(json);
} else if (type.equals("ExtendedContactDetail")) {
return parseExtendedContactDetail(json);
} else if (type.equals("Extension")) {
return parseExtension(json);
} else if (type.equals("HumanName")) {
return parseHumanName(json);
} else if (type.equals("Identifier")) {
return parseIdentifier(json);
} else if (type.equals("MarketingStatus")) {
return parseMarketingStatus(json);
} else if (type.equals("Meta")) {
return parseMeta(json);
} else if (type.equals("MonetaryComponent")) {
return parseMonetaryComponent(json);
} else if (type.equals("Money")) {
return parseMoney(json);
} else if (type.equals("Narrative")) {
return parseNarrative(json);
} else if (type.equals("ParameterDefinition")) {
return parseParameterDefinition(json);
} else if (type.equals("Period")) {
return parsePeriod(json);
} else if (type.equals("ProductShelfLife")) {
return parseProductShelfLife(json);
} else if (type.equals("Quantity")) {
return parseQuantity(json);
} else if (type.equals("Range")) {
return parseRange(json);
} else if (type.equals("Ratio")) {
return parseRatio(json);
} else if (type.equals("RatioRange")) {
return parseRatioRange(json);
} else if (type.equals("Reference")) {
return parseReference(json);
} else if (type.equals("RelatedArtifact")) {
return parseRelatedArtifact(json);
} else if (type.equals("SampledData")) {
return parseSampledData(json);
} else if (type.equals("Signature")) {
return parseSignature(json);
} else if (type.equals("Timing")) {
return parseTiming(json);
} else if (type.equals("TriggerDefinition")) {
return parseTriggerDefinition(json);
} else if (type.equals("UsageContext")) {
return parseUsageContext(json);
} else if (type.equals("VirtualServiceDetail")) {
return parseVirtualServiceDetail(json);
} else {
throw new FHIRFormatError("Unknown Type "+type);
}
}
protected boolean hasTypeName(JsonObject json, String prefix) {
if (json.has(prefix+"Address")) {
return true;
};
if (json.has(prefix+"Age")) {
return true;
};
if (json.has(prefix+"Annotation")) {
return true;
};
if (json.has(prefix+"Attachment")) {
return true;
};
if (json.has(prefix+"Availability")) {
return true;
};
if (json.has(prefix+"CodeableConcept")) {
return true;
};
if (json.has(prefix+"CodeableReference")) {
return true;
};
if (json.has(prefix+"Coding")) {
return true;
};
if (json.has(prefix+"ContactDetail")) {
return true;
};
if (json.has(prefix+"ContactPoint")) {
return true;
};
if (json.has(prefix+"Contributor")) {
return true;
};
if (json.has(prefix+"Count")) {
return true;
};
if (json.has(prefix+"DataRequirement")) {
return true;
};
if (json.has(prefix+"Distance")) {
return true;
};
if (json.has(prefix+"Dosage")) {
return true;
};
if (json.has(prefix+"Duration")) {
return true;
};
if (json.has(prefix+"ElementDefinition")) {
return true;
};
if (json.has(prefix+"Expression")) {
return true;
};
if (json.has(prefix+"ExtendedContactDetail")) {
return true;
};
if (json.has(prefix+"Extension")) {
return true;
};
if (json.has(prefix+"HumanName")) {
return true;
};
if (json.has(prefix+"Identifier")) {
return true;
};
if (json.has(prefix+"MarketingStatus")) {
return true;
};
if (json.has(prefix+"Meta")) {
return true;
};
if (json.has(prefix+"MonetaryComponent")) {
return true;
};
if (json.has(prefix+"Money")) {
return true;
};
if (json.has(prefix+"Narrative")) {
return true;
};
if (json.has(prefix+"ParameterDefinition")) {
return true;
};
if (json.has(prefix+"Period")) {
return true;
};
if (json.has(prefix+"ProductShelfLife")) {
return true;
};
if (json.has(prefix+"Quantity")) {
return true;
};
if (json.has(prefix+"Range")) {
return true;
};
if (json.has(prefix+"Ratio")) {
return true;
};
if (json.has(prefix+"RatioRange")) {
return true;
};
if (json.has(prefix+"Reference")) {
return true;
};
if (json.has(prefix+"RelatedArtifact")) {
return true;
};
if (json.has(prefix+"SampledData")) {
return true;
};
if (json.has(prefix+"Signature")) {
return true;
};
if (json.has(prefix+"Timing")) {
return true;
};
if (json.has(prefix+"TriggerDefinition")) {
return true;
};
if (json.has(prefix+"UsageContext")) {
return true;
};
if (json.has(prefix+"VirtualServiceDetail")) {
return true;
};
if (json.has(prefix+"Account")) {
return true;
};
if (json.has(prefix+"ActivityDefinition")) {
return true;
};
if (json.has(prefix+"ActorDefinition")) {
return true;
};
if (json.has(prefix+"AdministrableProductDefinition")) {
return true;
};
if (json.has(prefix+"AdverseEvent")) {
return true;
};
if (json.has(prefix+"AllergyIntolerance")) {
return true;
};
if (json.has(prefix+"Appointment")) {
return true;
};
if (json.has(prefix+"AppointmentResponse")) {
return true;
};
if (json.has(prefix+"ArtifactAssessment")) {
return true;
};
if (json.has(prefix+"AuditEvent")) {
return true;
};
if (json.has(prefix+"Basic")) {
return true;
};
if (json.has(prefix+"Binary")) {
return true;
};
if (json.has(prefix+"BiologicallyDerivedProduct")) {
return true;
};
if (json.has(prefix+"BiologicallyDerivedProductDispense")) {
return true;
};
if (json.has(prefix+"BodyStructure")) {
return true;
};
if (json.has(prefix+"Bundle")) {
return true;
};
if (json.has(prefix+"CapabilityStatement")) {
return true;
};
if (json.has(prefix+"CarePlan")) {
return true;
};
if (json.has(prefix+"CareTeam")) {
return true;
};
if (json.has(prefix+"ChargeItem")) {
return true;
};
if (json.has(prefix+"ChargeItemDefinition")) {
return true;
};
if (json.has(prefix+"Citation")) {
return true;
};
if (json.has(prefix+"Claim")) {
return true;
};
if (json.has(prefix+"ClaimResponse")) {
return true;
};
if (json.has(prefix+"ClinicalImpression")) {
return true;
};
if (json.has(prefix+"ClinicalUseDefinition")) {
return true;
};
if (json.has(prefix+"CodeSystem")) {
return true;
};
if (json.has(prefix+"Communication")) {
return true;
};
if (json.has(prefix+"CommunicationRequest")) {
return true;
};
if (json.has(prefix+"CompartmentDefinition")) {
return true;
};
if (json.has(prefix+"Composition")) {
return true;
};
if (json.has(prefix+"ConceptMap")) {
return true;
};
if (json.has(prefix+"Condition")) {
return true;
};
if (json.has(prefix+"ConditionDefinition")) {
return true;
};
if (json.has(prefix+"Consent")) {
return true;
};
if (json.has(prefix+"Contract")) {
return true;
};
if (json.has(prefix+"Coverage")) {
return true;
};
if (json.has(prefix+"CoverageEligibilityRequest")) {
return true;
};
if (json.has(prefix+"CoverageEligibilityResponse")) {
return true;
};
if (json.has(prefix+"DetectedIssue")) {
return true;
};
if (json.has(prefix+"Device")) {
return true;
};
if (json.has(prefix+"DeviceAssociation")) {
return true;
};
if (json.has(prefix+"DeviceDefinition")) {
return true;
};
if (json.has(prefix+"DeviceDispense")) {
return true;
};
if (json.has(prefix+"DeviceMetric")) {
return true;
};
if (json.has(prefix+"DeviceRequest")) {
return true;
};
if (json.has(prefix+"DeviceUsage")) {
return true;
};
if (json.has(prefix+"DiagnosticReport")) {
return true;
};
if (json.has(prefix+"DocumentReference")) {
return true;
};
if (json.has(prefix+"Encounter")) {
return true;
};
if (json.has(prefix+"EncounterHistory")) {
return true;
};
if (json.has(prefix+"Endpoint")) {
return true;
};
if (json.has(prefix+"EnrollmentRequest")) {
return true;
};
if (json.has(prefix+"EnrollmentResponse")) {
return true;
};
if (json.has(prefix+"EpisodeOfCare")) {
return true;
};
if (json.has(prefix+"EventDefinition")) {
return true;
};
if (json.has(prefix+"Evidence")) {
return true;
};
if (json.has(prefix+"EvidenceReport")) {
return true;
};
if (json.has(prefix+"EvidenceVariable")) {
return true;
};
if (json.has(prefix+"ExampleScenario")) {
return true;
};
if (json.has(prefix+"ExplanationOfBenefit")) {
return true;
};
if (json.has(prefix+"FamilyMemberHistory")) {
return true;
};
if (json.has(prefix+"Flag")) {
return true;
};
if (json.has(prefix+"FormularyItem")) {
return true;
};
if (json.has(prefix+"GenomicStudy")) {
return true;
};
if (json.has(prefix+"Goal")) {
return true;
};
if (json.has(prefix+"GraphDefinition")) {
return true;
};
if (json.has(prefix+"Group")) {
return true;
};
if (json.has(prefix+"GuidanceResponse")) {
return true;
};
if (json.has(prefix+"HealthcareService")) {
return true;
};
if (json.has(prefix+"ImagingSelection")) {
return true;
};
if (json.has(prefix+"ImagingStudy")) {
return true;
};
if (json.has(prefix+"Immunization")) {
return true;
};
if (json.has(prefix+"ImmunizationEvaluation")) {
return true;
};
if (json.has(prefix+"ImmunizationRecommendation")) {
return true;
};
if (json.has(prefix+"ImplementationGuide")) {
return true;
};
if (json.has(prefix+"Ingredient")) {
return true;
};
if (json.has(prefix+"InsurancePlan")) {
return true;
};
if (json.has(prefix+"InventoryItem")) {
return true;
};
if (json.has(prefix+"InventoryReport")) {
return true;
};
if (json.has(prefix+"Invoice")) {
return true;
};
if (json.has(prefix+"Library")) {
return true;
};
if (json.has(prefix+"Linkage")) {
return true;
};
if (json.has(prefix+"List")) {
return true;
};
if (json.has(prefix+"Location")) {
return true;
};
if (json.has(prefix+"ManufacturedItemDefinition")) {
return true;
};
if (json.has(prefix+"Measure")) {
return true;
};
if (json.has(prefix+"MeasureReport")) {
return true;
};
if (json.has(prefix+"Medication")) {
return true;
};
if (json.has(prefix+"MedicationAdministration")) {
return true;
};
if (json.has(prefix+"MedicationDispense")) {
return true;
};
if (json.has(prefix+"MedicationKnowledge")) {
return true;
};
if (json.has(prefix+"MedicationRequest")) {
return true;
};
if (json.has(prefix+"MedicationStatement")) {
return true;
};
if (json.has(prefix+"MedicinalProductDefinition")) {
return true;
};
if (json.has(prefix+"MessageDefinition")) {
return true;
};
if (json.has(prefix+"MessageHeader")) {
return true;
};
if (json.has(prefix+"MolecularSequence")) {
return true;
};
if (json.has(prefix+"NamingSystem")) {
return true;
};
if (json.has(prefix+"NutritionIntake")) {
return true;
};
if (json.has(prefix+"NutritionOrder")) {
return true;
};
if (json.has(prefix+"NutritionProduct")) {
return true;
};
if (json.has(prefix+"Observation")) {
return true;
};
if (json.has(prefix+"ObservationDefinition")) {
return true;
};
if (json.has(prefix+"OperationDefinition")) {
return true;
};
if (json.has(prefix+"OperationOutcome")) {
return true;
};
if (json.has(prefix+"Organization")) {
return true;
};
if (json.has(prefix+"OrganizationAffiliation")) {
return true;
};
if (json.has(prefix+"PackagedProductDefinition")) {
return true;
};
if (json.has(prefix+"Parameters")) {
return true;
};
if (json.has(prefix+"Patient")) {
return true;
};
if (json.has(prefix+"PaymentNotice")) {
return true;
};
if (json.has(prefix+"PaymentReconciliation")) {
return true;
};
if (json.has(prefix+"Permission")) {
return true;
};
if (json.has(prefix+"Person")) {
return true;
};
if (json.has(prefix+"PlanDefinition")) {
return true;
};
if (json.has(prefix+"Practitioner")) {
return true;
};
if (json.has(prefix+"PractitionerRole")) {
return true;
};
if (json.has(prefix+"Procedure")) {
return true;
};
if (json.has(prefix+"Provenance")) {
return true;
};
if (json.has(prefix+"Questionnaire")) {
return true;
};
if (json.has(prefix+"QuestionnaireResponse")) {
return true;
};
if (json.has(prefix+"RegulatedAuthorization")) {
return true;
};
if (json.has(prefix+"RelatedPerson")) {
return true;
};
if (json.has(prefix+"RequestOrchestration")) {
return true;
};
if (json.has(prefix+"Requirements")) {
return true;
};
if (json.has(prefix+"ResearchStudy")) {
return true;
};
if (json.has(prefix+"ResearchSubject")) {
return true;
};
if (json.has(prefix+"RiskAssessment")) {
return true;
};
if (json.has(prefix+"Schedule")) {
return true;
};
if (json.has(prefix+"SearchParameter")) {
return true;
};
if (json.has(prefix+"ServiceRequest")) {
return true;
};
if (json.has(prefix+"Slot")) {
return true;
};
if (json.has(prefix+"Specimen")) {
return true;
};
if (json.has(prefix+"SpecimenDefinition")) {
return true;
};
if (json.has(prefix+"StructureDefinition")) {
return true;
};
if (json.has(prefix+"StructureMap")) {
return true;
};
if (json.has(prefix+"Subscription")) {
return true;
};
if (json.has(prefix+"SubscriptionStatus")) {
return true;
};
if (json.has(prefix+"SubscriptionTopic")) {
return true;
};
if (json.has(prefix+"Substance")) {
return true;
};
if (json.has(prefix+"SubstanceDefinition")) {
return true;
};
if (json.has(prefix+"SubstanceNucleicAcid")) {
return true;
};
if (json.has(prefix+"SubstancePolymer")) {
return true;
};
if (json.has(prefix+"SubstanceProtein")) {
return true;
};
if (json.has(prefix+"SubstanceReferenceInformation")) {
return true;
};
if (json.has(prefix+"SubstanceSourceMaterial")) {
return true;
};
if (json.has(prefix+"SupplyDelivery")) {
return true;
};
if (json.has(prefix+"SupplyRequest")) {
return true;
};
if (json.has(prefix+"Task")) {
return true;
};
if (json.has(prefix+"TerminologyCapabilities")) {
return true;
};
if (json.has(prefix+"TestPlan")) {
return true;
};
if (json.has(prefix+"TestReport")) {
return true;
};
if (json.has(prefix+"TestScript")) {
return true;
};
if (json.has(prefix+"Transport")) {
return true;
};
if (json.has(prefix+"ValueSet")) {
return true;
};
if (json.has(prefix+"VerificationResult")) {
return true;
};
if (json.has(prefix+"VisionPrescription")) {
return true;
};
if (json.has(prefix+"Date") || json.has("_"+prefix+"Date"))
return true;
if (json.has(prefix+"DateTime") || json.has("_"+prefix+"DateTime"))
return true;
if (json.has(prefix+"Code") || json.has("_"+prefix+"Code"))
return true;
if (json.has(prefix+"String") || json.has("_"+prefix+"String"))
return true;
if (json.has(prefix+"Integer") || json.has("_"+prefix+"Integer"))
return true;
if (json.has(prefix+"Integer64") || json.has("_"+prefix+"Integer64"))
return true;
if (json.has(prefix+"Oid") || json.has("_"+prefix+"Oid"))
return true;
if (json.has(prefix+"Canonical") || json.has("_"+prefix+"Canonical"))
return true;
if (json.has(prefix+"Uri") || json.has("_"+prefix+"Uri"))
return true;
if (json.has(prefix+"Uuid") || json.has("_"+prefix+"Uuid"))
return true;
if (json.has(prefix+"Url") || json.has("_"+prefix+"Url"))
return true;
if (json.has(prefix+"Instant") || json.has("_"+prefix+"Instant"))
return true;
if (json.has(prefix+"Boolean") || json.has("_"+prefix+"Boolean"))
return true;
if (json.has(prefix+"Base64Binary") || json.has("_"+prefix+"Base64Binary"))
return true;
if (json.has(prefix+"UnsignedInt") || json.has("_"+prefix+"UnsignedInt"))
return true;
if (json.has(prefix+"Markdown") || json.has("_"+prefix+"Markdown"))
return true;
if (json.has(prefix+"Time") || json.has("_"+prefix+"Time"))
return true;
if (json.has(prefix+"Id") || json.has("_"+prefix+"Id"))
return true;
if (json.has(prefix+"PositiveInt") || json.has("_"+prefix+"PositiveInt"))
return true;
if (json.has(prefix+"Decimal") || json.has("_"+prefix+"Decimal"))
return true;
return false;
}
// -- compose ---------------------------------------------------------------------------------------------------------------------
protected void composeBaseProperties(Base element) throws IOException {
}
protected > void composeEnumerationCore(String name, Enumeration value, EnumFactory e, boolean inArray) throws IOException {
if (value != null && value.getValue() != null) {
prop(name, e.toCode(value.getValue()));
} else if (inArray)
writeNull(name);
}
protected > void composeEnumerationExtras(String name, Enumeration value, EnumFactory e, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
} else if (inArray)
writeNull(name);
}
protected void composeDateCore(String name, DateType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.asStringValue());
}
else if (inArray)
writeNull(name);
}
protected void composeDateExtras(String name, DateType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeDateTimeCore(String name, DateTimeType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.asStringValue());
}
else if (inArray)
writeNull(name);
}
protected void composeDateTimeExtras(String name, DateTimeType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeCodeCore(String name, CodeType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeCodeExtras(String name, CodeType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeStringCore(String name, StringType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeStringExtras(String name, StringType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeIntegerCore(String name, IntegerType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, Integer.valueOf(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeIntegerExtras(String name, IntegerType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeInteger64Core(String name, Integer64Type value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.getValue().toString());
}
else if (inArray)
writeNull(name);
}
protected void composeInteger64Extras(String name, Integer64Type value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeOidCore(String name, OidType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeOidExtras(String name, OidType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeCanonicalCore(String name, CanonicalType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeCanonicalExtras(String name, CanonicalType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeUriCore(String name, UriType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeUriExtras(String name, UriType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeUuidCore(String name, UuidType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeUuidExtras(String name, UuidType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeUrlCore(String name, UrlType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeUrlExtras(String name, UrlType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeInstantCore(String name, InstantType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.asStringValue());
}
else if (inArray)
writeNull(name);
}
protected void composeInstantExtras(String name, InstantType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeBooleanCore(String name, BooleanType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.getValue());
}
else if (inArray)
writeNull(name);
}
protected void composeBooleanExtras(String name, BooleanType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeBase64BinaryCore(String name, Base64BinaryType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeBase64BinaryExtras(String name, Base64BinaryType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeUnsignedIntCore(String name, UnsignedIntType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, Integer.valueOf(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeUnsignedIntExtras(String name, UnsignedIntType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeMarkdownCore(String name, MarkdownType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeMarkdownExtras(String name, MarkdownType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeTimeCore(String name, TimeType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.asStringValue());
}
else if (inArray)
writeNull(name);
}
protected void composeTimeExtras(String name, TimeType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeIdCore(String name, IdType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, toString(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composeIdExtras(String name, IdType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composePositiveIntCore(String name, PositiveIntType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, Integer.valueOf(value.getValue()));
}
else if (inArray)
writeNull(name);
}
protected void composePositiveIntExtras(String name, PositiveIntType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeDecimalCore(String name, DecimalType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.getValue());
}
else if (inArray)
writeNull(name);
}
protected void composeDecimalExtras(String name, DecimalType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElementProperties(value);
close();
}
else if (inArray)
writeNull(name);
}
protected void composeBackboneElementProperties(BackboneElement element) throws IOException {
composeElementProperties(element);
if (element.hasModifierExtension()) {
openArray("modifierExtension");
for (Extension e : element.getModifierExtension())
composeExtension(null, e);
closeArray();
};
}
protected void composeBackboneTypeProperties(BackboneType element) throws IOException {
composeDataTypeProperties(element);
if (element.hasModifierExtension()) {
openArray("modifierExtension");
for (Extension e : element.getModifierExtension())
composeExtension(null, e);
closeArray();
};
}
protected void composeDataTypeProperties(DataType element) throws IOException {
composeElementProperties(element);
}
protected void composeElementProperties(Element element) throws IOException {
if (element.hasIdElement()) {
composeStringCore("id", element.getIdElement(), false);
composeStringExtras("id", element.getIdElement(), false);
}
if (element.hasExtension()) {
openArray("extension");
for (Extension e : element.getExtension())
composeExtension(null, e);
closeArray();
};
}
protected void composeAddress(String name, Address element) throws IOException {
if (element != null) {
open(name);
composeAddressProperties(element);
close();
}
}
protected void composeAddressProperties(Address element) throws IOException {
composeDataTypeProperties(element);
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Address.AddressUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Address.AddressUseEnumFactory(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Address.AddressTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Address.AddressTypeEnumFactory(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLine()) {
if (anyHasValue(element.getLine())) {
openArray("line");
for (StringType e : element.getLine())
composeStringCore(null, e, e != element.getLine().get(element.getLine().size()-1));
closeArray();
}
if (anyHasExtras(element.getLine())) {
openArray("_line");
for (StringType e : element.getLine())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasCityElement()) {
composeStringCore("city", element.getCityElement(), false);
composeStringExtras("city", element.getCityElement(), false);
}
if (element.hasDistrictElement()) {
composeStringCore("district", element.getDistrictElement(), false);
composeStringExtras("district", element.getDistrictElement(), false);
}
if (element.hasStateElement()) {
composeStringCore("state", element.getStateElement(), false);
composeStringExtras("state", element.getStateElement(), false);
}
if (element.hasPostalCodeElement()) {
composeStringCore("postalCode", element.getPostalCodeElement(), false);
composeStringExtras("postalCode", element.getPostalCodeElement(), false);
}
if (element.hasCountryElement()) {
composeStringCore("country", element.getCountryElement(), false);
composeStringExtras("country", element.getCountryElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeAge(String name, Age element) throws IOException {
if (element != null) {
open(name);
composeAgeProperties(element);
close();
}
}
protected void composeAgeProperties(Age element) throws IOException {
composeQuantityProperties(element);
}
protected void composeAnnotation(String name, Annotation element) throws IOException {
if (element != null) {
open(name);
composeAnnotationProperties(element);
close();
}
}
protected void composeAnnotationProperties(Annotation element) throws IOException {
composeDataTypeProperties(element);
if (element.hasAuthor()) {
composeType("author", element.getAuthor());
}
if (element.hasTimeElement()) {
composeDateTimeCore("time", element.getTimeElement(), false);
composeDateTimeExtras("time", element.getTimeElement(), false);
}
if (element.hasTextElement()) {
composeMarkdownCore("text", element.getTextElement(), false);
composeMarkdownExtras("text", element.getTextElement(), false);
}
}
protected void composeAttachment(String name, Attachment element) throws IOException {
if (element != null) {
open(name);
composeAttachmentProperties(element);
close();
}
}
protected void composeAttachmentProperties(Attachment element) throws IOException {
composeDataTypeProperties(element);
if (element.hasContentTypeElement()) {
composeCodeCore("contentType", element.getContentTypeElement(), false);
composeCodeExtras("contentType", element.getContentTypeElement(), false);
}
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasDataElement()) {
composeBase64BinaryCore("data", element.getDataElement(), false);
composeBase64BinaryExtras("data", element.getDataElement(), false);
}
if (element.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
if (element.hasSizeElement()) {
composeInteger64Core("size", element.getSizeElement(), false);
composeInteger64Extras("size", element.getSizeElement(), false);
}
if (element.hasHashElement()) {
composeBase64BinaryCore("hash", element.getHashElement(), false);
composeBase64BinaryExtras("hash", element.getHashElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasCreationElement()) {
composeDateTimeCore("creation", element.getCreationElement(), false);
composeDateTimeExtras("creation", element.getCreationElement(), false);
}
if (element.hasHeightElement()) {
composePositiveIntCore("height", element.getHeightElement(), false);
composePositiveIntExtras("height", element.getHeightElement(), false);
}
if (element.hasWidthElement()) {
composePositiveIntCore("width", element.getWidthElement(), false);
composePositiveIntExtras("width", element.getWidthElement(), false);
}
if (element.hasFramesElement()) {
composePositiveIntCore("frames", element.getFramesElement(), false);
composePositiveIntExtras("frames", element.getFramesElement(), false);
}
if (element.hasDurationElement()) {
composeDecimalCore("duration", element.getDurationElement(), false);
composeDecimalExtras("duration", element.getDurationElement(), false);
}
if (element.hasPagesElement()) {
composePositiveIntCore("pages", element.getPagesElement(), false);
composePositiveIntExtras("pages", element.getPagesElement(), false);
}
}
protected void composeAvailability(String name, Availability element) throws IOException {
if (element != null) {
open(name);
composeAvailabilityProperties(element);
close();
}
}
protected void composeAvailabilityProperties(Availability element) throws IOException {
composeDataTypeProperties(element);
if (element.hasAvailableTime()) {
openArray("availableTime");
for (Availability.AvailabilityAvailableTimeComponent e : element.getAvailableTime())
composeAvailabilityAvailableTimeComponent(null, e);
closeArray();
};
if (element.hasNotAvailableTime()) {
openArray("notAvailableTime");
for (Availability.AvailabilityNotAvailableTimeComponent e : element.getNotAvailableTime())
composeAvailabilityNotAvailableTimeComponent(null, e);
closeArray();
};
}
protected void composeAvailabilityAvailableTimeComponent(String name, Availability.AvailabilityAvailableTimeComponent element) throws IOException {
if (element != null) {
open(name);
composeAvailabilityAvailableTimeComponentProperties(element);
close();
}
}
protected void composeAvailabilityAvailableTimeComponentProperties(Availability.AvailabilityAvailableTimeComponent element) throws IOException {
composeElementProperties(element);
if (element.hasDaysOfWeek()) {
openArray("daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationCore(null, e, new Enumerations.DaysOfWeekEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getDaysOfWeek())) {
openArray("_daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationExtras(null, e, new Enumerations.DaysOfWeekEnumFactory(), true);
closeArray();
}
};
if (element.hasAllDayElement()) {
composeBooleanCore("allDay", element.getAllDayElement(), false);
composeBooleanExtras("allDay", element.getAllDayElement(), false);
}
if (element.hasAvailableStartTimeElement()) {
composeTimeCore("availableStartTime", element.getAvailableStartTimeElement(), false);
composeTimeExtras("availableStartTime", element.getAvailableStartTimeElement(), false);
}
if (element.hasAvailableEndTimeElement()) {
composeTimeCore("availableEndTime", element.getAvailableEndTimeElement(), false);
composeTimeExtras("availableEndTime", element.getAvailableEndTimeElement(), false);
}
}
protected void composeAvailabilityNotAvailableTimeComponent(String name, Availability.AvailabilityNotAvailableTimeComponent element) throws IOException {
if (element != null) {
open(name);
composeAvailabilityNotAvailableTimeComponentProperties(element);
close();
}
}
protected void composeAvailabilityNotAvailableTimeComponentProperties(Availability.AvailabilityNotAvailableTimeComponent element) throws IOException {
composeElementProperties(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasDuring()) {
composePeriod("during", element.getDuring());
}
}
protected void composeCodeableConcept(String name, CodeableConcept element) throws IOException {
if (element != null) {
open(name);
composeCodeableConceptProperties(element);
close();
}
}
protected void composeCodeableConceptProperties(CodeableConcept element) throws IOException {
composeDataTypeProperties(element);
if (element.hasCoding()) {
openArray("coding");
for (Coding e : element.getCoding())
composeCoding(null, e);
closeArray();
};
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
}
protected void composeCodeableReference(String name, CodeableReference element) throws IOException {
if (element != null) {
open(name);
composeCodeableReferenceProperties(element);
close();
}
}
protected void composeCodeableReferenceProperties(CodeableReference element) throws IOException {
composeDataTypeProperties(element);
if (element.hasConcept()) {
composeCodeableConcept("concept", element.getConcept());
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeCoding(String name, Coding element) throws IOException {
if (element != null) {
open(name);
composeCodingProperties(element);
close();
}
}
protected void composeCodingProperties(Coding element) throws IOException {
composeDataTypeProperties(element);
if (element.hasSystemElement()) {
composeUriCore("system", element.getSystemElement(), false);
composeUriExtras("system", element.getSystemElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasUserSelectedElement()) {
composeBooleanCore("userSelected", element.getUserSelectedElement(), false);
composeBooleanExtras("userSelected", element.getUserSelectedElement(), false);
}
}
protected void composeContactDetail(String name, ContactDetail element) throws IOException {
if (element != null) {
open(name);
composeContactDetailProperties(element);
close();
}
}
protected void composeContactDetailProperties(ContactDetail element) throws IOException {
composeDataTypeProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
}
protected void composeContactPoint(String name, ContactPoint element) throws IOException {
if (element != null) {
open(name);
composeContactPointProperties(element);
close();
}
}
protected void composeContactPointProperties(ContactPoint element) throws IOException {
composeDataTypeProperties(element);
if (element.hasSystemElement()) {
composeEnumerationCore("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory(), false);
composeEnumerationExtras("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory(), false);
}
if (element.hasRankElement()) {
composePositiveIntCore("rank", element.getRankElement(), false);
composePositiveIntExtras("rank", element.getRankElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeContributor(String name, Contributor element) throws IOException {
if (element != null) {
open(name);
composeContributorProperties(element);
close();
}
}
protected void composeContributorProperties(Contributor element) throws IOException {
composeDataTypeProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
}
protected void composeCount(String name, Count element) throws IOException {
if (element != null) {
open(name);
composeCountProperties(element);
close();
}
}
protected void composeCountProperties(Count element) throws IOException {
composeQuantityProperties(element);
}
protected void composeDataRequirement(String name, DataRequirement element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementProperties(element);
close();
}
}
protected void composeDataRequirementProperties(DataRequirement element) throws IOException {
composeDataTypeProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.FHIRTypesEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.FHIRTypesEnumFactory(), false);
}
if (element.hasProfile()) {
if (anyHasValue(element.getProfile())) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, e != element.getProfile().get(element.getProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasMustSupport()) {
if (anyHasValue(element.getMustSupport())) {
openArray("mustSupport");
for (StringType e : element.getMustSupport())
composeStringCore(null, e, e != element.getMustSupport().get(element.getMustSupport().size()-1));
closeArray();
}
if (anyHasExtras(element.getMustSupport())) {
openArray("_mustSupport");
for (StringType e : element.getMustSupport())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasCodeFilter()) {
openArray("codeFilter");
for (DataRequirement.DataRequirementCodeFilterComponent e : element.getCodeFilter())
composeDataRequirementCodeFilterComponent(null, e);
closeArray();
};
if (element.hasDateFilter()) {
openArray("dateFilter");
for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter())
composeDataRequirementDateFilterComponent(null, e);
closeArray();
};
if (element.hasValueFilter()) {
openArray("valueFilter");
for (DataRequirement.DataRequirementValueFilterComponent e : element.getValueFilter())
composeDataRequirementValueFilterComponent(null, e);
closeArray();
};
if (element.hasLimitElement()) {
composePositiveIntCore("limit", element.getLimitElement(), false);
composePositiveIntExtras("limit", element.getLimitElement(), false);
}
if (element.hasSort()) {
openArray("sort");
for (DataRequirement.DataRequirementSortComponent e : element.getSort())
composeDataRequirementSortComponent(null, e);
closeArray();
};
}
protected void composeDataRequirementCodeFilterComponent(String name, DataRequirement.DataRequirementCodeFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementCodeFilterComponentProperties(element);
close();
}
}
protected void composeDataRequirementCodeFilterComponentProperties(DataRequirement.DataRequirementCodeFilterComponent element) throws IOException {
composeElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasSearchParamElement()) {
composeStringCore("searchParam", element.getSearchParamElement(), false);
composeStringExtras("searchParam", element.getSearchParamElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasCode()) {
openArray("code");
for (Coding e : element.getCode())
composeCoding(null, e);
closeArray();
};
}
protected void composeDataRequirementDateFilterComponent(String name, DataRequirement.DataRequirementDateFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementDateFilterComponentProperties(element);
close();
}
}
protected void composeDataRequirementDateFilterComponentProperties(DataRequirement.DataRequirementDateFilterComponent element) throws IOException {
composeElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasSearchParamElement()) {
composeStringCore("searchParam", element.getSearchParamElement(), false);
composeStringExtras("searchParam", element.getSearchParamElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeDataRequirementValueFilterComponent(String name, DataRequirement.DataRequirementValueFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementValueFilterComponentProperties(element);
close();
}
}
protected void composeDataRequirementValueFilterComponentProperties(DataRequirement.DataRequirementValueFilterComponent element) throws IOException {
composeElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasSearchParamElement()) {
composeStringCore("searchParam", element.getSearchParamElement(), false);
composeStringExtras("searchParam", element.getSearchParamElement(), false);
}
if (element.hasComparatorElement()) {
composeEnumerationCore("comparator", element.getComparatorElement(), new DataRequirement.ValueFilterComparatorEnumFactory(), false);
composeEnumerationExtras("comparator", element.getComparatorElement(), new DataRequirement.ValueFilterComparatorEnumFactory(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeDataRequirementSortComponent(String name, DataRequirement.DataRequirementSortComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementSortComponentProperties(element);
close();
}
}
protected void composeDataRequirementSortComponentProperties(DataRequirement.DataRequirementSortComponent element) throws IOException {
composeElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasDirectionElement()) {
composeEnumerationCore("direction", element.getDirectionElement(), new DataRequirement.SortDirectionEnumFactory(), false);
composeEnumerationExtras("direction", element.getDirectionElement(), new DataRequirement.SortDirectionEnumFactory(), false);
}
}
protected void composeDistance(String name, Distance element) throws IOException {
if (element != null) {
open(name);
composeDistanceProperties(element);
close();
}
}
protected void composeDistanceProperties(Distance element) throws IOException {
composeQuantityProperties(element);
}
protected void composeDosage(String name, Dosage element) throws IOException {
if (element != null) {
open(name);
composeDosageProperties(element);
close();
}
}
protected void composeDosageProperties(Dosage element) throws IOException {
composeBackboneTypeProperties(element);
if (element.hasSequenceElement()) {
composeIntegerCore("sequence", element.getSequenceElement(), false);
composeIntegerExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasAdditionalInstruction()) {
openArray("additionalInstruction");
for (CodeableConcept e : element.getAdditionalInstruction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientInstructionElement()) {
composeStringCore("patientInstruction", element.getPatientInstructionElement(), false);
composeStringExtras("patientInstruction", element.getPatientInstructionElement(), false);
}
if (element.hasTiming()) {
composeTiming("timing", element.getTiming());
}
if (element.hasAsNeededElement()) {
composeBooleanCore("asNeeded", element.getAsNeededElement(), false);
composeBooleanExtras("asNeeded", element.getAsNeededElement(), false);
}
if (element.hasAsNeededFor()) {
openArray("asNeededFor");
for (CodeableConcept e : element.getAsNeededFor())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSite()) {
composeCodeableConcept("site", element.getSite());
}
if (element.hasRoute()) {
composeCodeableConcept("route", element.getRoute());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasDoseAndRate()) {
openArray("doseAndRate");
for (Dosage.DosageDoseAndRateComponent e : element.getDoseAndRate())
composeDosageDoseAndRateComponent(null, e);
closeArray();
};
if (element.hasMaxDosePerPeriod()) {
openArray("maxDosePerPeriod");
for (Ratio e : element.getMaxDosePerPeriod())
composeRatio(null, e);
closeArray();
};
if (element.hasMaxDosePerAdministration()) {
composeQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration());
}
if (element.hasMaxDosePerLifetime()) {
composeQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime());
}
}
protected void composeDosageDoseAndRateComponent(String name, Dosage.DosageDoseAndRateComponent element) throws IOException {
if (element != null) {
open(name);
composeDosageDoseAndRateComponentProperties(element);
close();
}
}
protected void composeDosageDoseAndRateComponentProperties(Dosage.DosageDoseAndRateComponent element) throws IOException {
composeElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDose()) {
composeType("dose", element.getDose());
}
if (element.hasRate()) {
composeType("rate", element.getRate());
}
}
protected void composeDuration(String name, Duration element) throws IOException {
if (element != null) {
open(name);
composeDurationProperties(element);
close();
}
}
protected void composeDurationProperties(Duration element) throws IOException {
composeQuantityProperties(element);
}
protected void composeElementDefinition(String name, ElementDefinition element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionProperties(element);
close();
}
}
protected void composeElementDefinitionProperties(ElementDefinition element) throws IOException {
composeBackboneTypeProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasRepresentation()) {
openArray("representation");
for (Enumeration e : element.getRepresentation())
composeEnumerationCore(null, e, new ElementDefinition.PropertyRepresentationEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getRepresentation())) {
openArray("_representation");
for (Enumeration e : element.getRepresentation())
composeEnumerationExtras(null, e, new ElementDefinition.PropertyRepresentationEnumFactory(), true);
closeArray();
}
};
if (element.hasSliceNameElement()) {
composeStringCore("sliceName", element.getSliceNameElement(), false);
composeStringExtras("sliceName", element.getSliceNameElement(), false);
}
if (element.hasSliceIsConstrainingElement()) {
composeBooleanCore("sliceIsConstraining", element.getSliceIsConstrainingElement(), false);
composeBooleanExtras("sliceIsConstraining", element.getSliceIsConstrainingElement(), false);
}
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasCode()) {
openArray("code");
for (Coding e : element.getCode())
composeCoding(null, e);
closeArray();
};
if (element.hasSlicing()) {
composeElementDefinitionSlicingComponent("slicing", element.getSlicing());
}
if (element.hasShortElement()) {
composeStringCore("short", element.getShortElement(), false);
composeStringExtras("short", element.getShortElement(), false);
}
if (element.hasDefinitionElement()) {
composeMarkdownCore("definition", element.getDefinitionElement(), false);
composeMarkdownExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
if (element.hasRequirementsElement()) {
composeMarkdownCore("requirements", element.getRequirementsElement(), false);
composeMarkdownExtras("requirements", element.getRequirementsElement(), false);
}
if (element.hasAlias()) {
if (anyHasValue(element.getAlias())) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, e != element.getAlias().get(element.getAlias().size()-1));
closeArray();
}
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasMinElement()) {
composeUnsignedIntCore("min", element.getMinElement(), false);
composeUnsignedIntExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
if (element.hasBase()) {
composeElementDefinitionBaseComponent("base", element.getBase());
}
if (element.hasContentReferenceElement()) {
composeUriCore("contentReference", element.getContentReferenceElement(), false);
composeUriExtras("contentReference", element.getContentReferenceElement(), false);
}
if (element.hasType()) {
openArray("type");
for (ElementDefinition.TypeRefComponent e : element.getType())
composeTypeRefComponent(null, e);
closeArray();
};
if (element.hasDefaultValue()) {
composeType("defaultValue", element.getDefaultValue());
}
if (element.hasMeaningWhenMissingElement()) {
composeMarkdownCore("meaningWhenMissing", element.getMeaningWhenMissingElement(), false);
composeMarkdownExtras("meaningWhenMissing", element.getMeaningWhenMissingElement(), false);
}
if (element.hasOrderMeaningElement()) {
composeStringCore("orderMeaning", element.getOrderMeaningElement(), false);
composeStringExtras("orderMeaning", element.getOrderMeaningElement(), false);
}
if (element.hasFixed()) {
composeType("fixed", element.getFixed());
}
if (element.hasPattern()) {
composeType("pattern", element.getPattern());
}
if (element.hasExample()) {
openArray("example");
for (ElementDefinition.ElementDefinitionExampleComponent e : element.getExample())
composeElementDefinitionExampleComponent(null, e);
closeArray();
};
if (element.hasMinValue()) {
composeType("minValue", element.getMinValue());
}
if (element.hasMaxValue()) {
composeType("maxValue", element.getMaxValue());
}
if (element.hasMaxLengthElement()) {
composeIntegerCore("maxLength", element.getMaxLengthElement(), false);
composeIntegerExtras("maxLength", element.getMaxLengthElement(), false);
}
if (element.hasCondition()) {
if (anyHasValue(element.getCondition())) {
openArray("condition");
for (IdType e : element.getCondition())
composeIdCore(null, e, e != element.getCondition().get(element.getCondition().size()-1));
closeArray();
}
if (anyHasExtras(element.getCondition())) {
openArray("_condition");
for (IdType e : element.getCondition())
composeIdExtras(null, e, true);
closeArray();
}
};
if (element.hasConstraint()) {
openArray("constraint");
for (ElementDefinition.ElementDefinitionConstraintComponent e : element.getConstraint())
composeElementDefinitionConstraintComponent(null, e);
closeArray();
};
if (element.hasMustHaveValueElement()) {
composeBooleanCore("mustHaveValue", element.getMustHaveValueElement(), false);
composeBooleanExtras("mustHaveValue", element.getMustHaveValueElement(), false);
}
if (element.hasValueAlternatives()) {
if (anyHasValue(element.getValueAlternatives())) {
openArray("valueAlternatives");
for (CanonicalType e : element.getValueAlternatives())
composeCanonicalCore(null, e, e != element.getValueAlternatives().get(element.getValueAlternatives().size()-1));
closeArray();
}
if (anyHasExtras(element.getValueAlternatives())) {
openArray("_valueAlternatives");
for (CanonicalType e : element.getValueAlternatives())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasMustSupportElement()) {
composeBooleanCore("mustSupport", element.getMustSupportElement(), false);
composeBooleanExtras("mustSupport", element.getMustSupportElement(), false);
}
if (element.hasIsModifierElement()) {
composeBooleanCore("isModifier", element.getIsModifierElement(), false);
composeBooleanExtras("isModifier", element.getIsModifierElement(), false);
}
if (element.hasIsModifierReasonElement()) {
composeStringCore("isModifierReason", element.getIsModifierReasonElement(), false);
composeStringExtras("isModifierReason", element.getIsModifierReasonElement(), false);
}
if (element.hasIsSummaryElement()) {
composeBooleanCore("isSummary", element.getIsSummaryElement(), false);
composeBooleanExtras("isSummary", element.getIsSummaryElement(), false);
}
if (element.hasBinding()) {
composeElementDefinitionBindingComponent("binding", element.getBinding());
}
if (element.hasMapping()) {
openArray("mapping");
for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping())
composeElementDefinitionMappingComponent(null, e);
closeArray();
};
}
protected void composeElementDefinitionSlicingComponent(String name, ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionSlicingComponentProperties(element);
close();
}
}
protected void composeElementDefinitionSlicingComponentProperties(ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException {
composeElementProperties(element);
if (element.hasDiscriminator()) {
openArray("discriminator");
for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator())
composeElementDefinitionSlicingDiscriminatorComponent(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasOrderedElement()) {
composeBooleanCore("ordered", element.getOrderedElement(), false);
composeBooleanExtras("ordered", element.getOrderedElement(), false);
}
if (element.hasRulesElement()) {
composeEnumerationCore("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory(), false);
composeEnumerationExtras("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory(), false);
}
}
protected void composeElementDefinitionSlicingDiscriminatorComponent(String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionSlicingDiscriminatorComponentProperties(element);
close();
}
}
protected void composeElementDefinitionSlicingDiscriminatorComponentProperties(ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException {
composeElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory(), false);
}
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
}
protected void composeElementDefinitionBaseComponent(String name, ElementDefinition.ElementDefinitionBaseComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionBaseComponentProperties(element);
close();
}
}
protected void composeElementDefinitionBaseComponentProperties(ElementDefinition.ElementDefinitionBaseComponent element) throws IOException {
composeElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasMinElement()) {
composeUnsignedIntCore("min", element.getMinElement(), false);
composeUnsignedIntExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
}
protected void composeTypeRefComponent(String name, ElementDefinition.TypeRefComponent element) throws IOException {
if (element != null) {
open(name);
composeTypeRefComponentProperties(element);
close();
}
}
protected void composeTypeRefComponentProperties(ElementDefinition.TypeRefComponent element) throws IOException {
composeElementProperties(element);
if (element.hasCodeElement()) {
composeUriCore("code", element.getCodeElement(), false);
composeUriExtras("code", element.getCodeElement(), false);
}
if (element.hasProfile()) {
if (anyHasValue(element.getProfile())) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, e != element.getProfile().get(element.getProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasTargetProfile()) {
if (anyHasValue(element.getTargetProfile())) {
openArray("targetProfile");
for (CanonicalType e : element.getTargetProfile())
composeCanonicalCore(null, e, e != element.getTargetProfile().get(element.getTargetProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getTargetProfile())) {
openArray("_targetProfile");
for (CanonicalType e : element.getTargetProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasAggregation()) {
openArray("aggregation");
for (Enumeration e : element.getAggregation())
composeEnumerationCore(null, e, new ElementDefinition.AggregationModeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getAggregation())) {
openArray("_aggregation");
for (Enumeration e : element.getAggregation())
composeEnumerationExtras(null, e, new ElementDefinition.AggregationModeEnumFactory(), true);
closeArray();
}
};
if (element.hasVersioningElement()) {
composeEnumerationCore("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory(), false);
composeEnumerationExtras("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory(), false);
}
}
protected void composeElementDefinitionExampleComponent(String name, ElementDefinition.ElementDefinitionExampleComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionExampleComponentProperties(element);
close();
}
}
protected void composeElementDefinitionExampleComponentProperties(ElementDefinition.ElementDefinitionExampleComponent element) throws IOException {
composeElementProperties(element);
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeElementDefinitionConstraintComponent(String name, ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionConstraintComponentProperties(element);
close();
}
}
protected void composeElementDefinitionConstraintComponentProperties(ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException {
composeElementProperties(element);
if (element.hasKeyElement()) {
composeIdCore("key", element.getKeyElement(), false);
composeIdExtras("key", element.getKeyElement(), false);
}
if (element.hasRequirementsElement()) {
composeMarkdownCore("requirements", element.getRequirementsElement(), false);
composeMarkdownExtras("requirements", element.getRequirementsElement(), false);
}
if (element.hasSeverityElement()) {
composeEnumerationCore("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory(), false);
composeEnumerationExtras("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory(), false);
}
if (element.hasSuppressElement()) {
composeBooleanCore("suppress", element.getSuppressElement(), false);
composeBooleanExtras("suppress", element.getSuppressElement(), false);
}
if (element.hasHumanElement()) {
composeStringCore("human", element.getHumanElement(), false);
composeStringExtras("human", element.getHumanElement(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
if (element.hasSourceElement()) {
composeCanonicalCore("source", element.getSourceElement(), false);
composeCanonicalExtras("source", element.getSourceElement(), false);
}
}
protected void composeElementDefinitionBindingComponent(String name, ElementDefinition.ElementDefinitionBindingComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionBindingComponentProperties(element);
close();
}
}
protected void composeElementDefinitionBindingComponentProperties(ElementDefinition.ElementDefinitionBindingComponent element) throws IOException {
composeElementProperties(element);
if (element.hasStrengthElement()) {
composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false);
composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasAdditional()) {
openArray("additional");
for (ElementDefinition.ElementDefinitionBindingAdditionalComponent e : element.getAdditional())
composeElementDefinitionBindingAdditionalComponent(null, e);
closeArray();
};
}
protected void composeElementDefinitionBindingAdditionalComponent(String name, ElementDefinition.ElementDefinitionBindingAdditionalComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionBindingAdditionalComponentProperties(element);
close();
}
}
protected void composeElementDefinitionBindingAdditionalComponentProperties(ElementDefinition.ElementDefinitionBindingAdditionalComponent element) throws IOException {
composeElementProperties(element);
if (element.hasPurposeElement()) {
composeEnumerationCore("purpose", element.getPurposeElement(), new ElementDefinition.AdditionalBindingPurposeVSEnumFactory(), false);
composeEnumerationExtras("purpose", element.getPurposeElement(), new ElementDefinition.AdditionalBindingPurposeVSEnumFactory(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasShortDocoElement()) {
composeStringCore("shortDoco", element.getShortDocoElement(), false);
composeStringExtras("shortDoco", element.getShortDocoElement(), false);
}
if (element.hasUsage()) {
openArray("usage");
for (UsageContext e : element.getUsage())
composeUsageContext(null, e);
closeArray();
};
if (element.hasAnyElement()) {
composeBooleanCore("any", element.getAnyElement(), false);
composeBooleanExtras("any", element.getAnyElement(), false);
}
}
protected void composeElementDefinitionMappingComponent(String name, ElementDefinition.ElementDefinitionMappingComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionMappingComponentProperties(element);
close();
}
}
protected void composeElementDefinitionMappingComponentProperties(ElementDefinition.ElementDefinitionMappingComponent element) throws IOException {
composeElementProperties(element);
if (element.hasIdentityElement()) {
composeIdCore("identity", element.getIdentityElement(), false);
composeIdExtras("identity", element.getIdentityElement(), false);
}
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasMapElement()) {
composeStringCore("map", element.getMapElement(), false);
composeStringExtras("map", element.getMapElement(), false);
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
}
protected void composeExpression(String name, Expression element) throws IOException {
if (element != null) {
open(name);
composeExpressionProperties(element);
close();
}
}
protected void composeExpressionProperties(Expression element) throws IOException {
composeDataTypeProperties(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNameElement()) {
composeCodeCore("name", element.getNameElement(), false);
composeCodeExtras("name", element.getNameElement(), false);
}
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
if (element.hasReferenceElement()) {
composeUriCore("reference", element.getReferenceElement(), false);
composeUriExtras("reference", element.getReferenceElement(), false);
}
}
protected void composeExtendedContactDetail(String name, ExtendedContactDetail element) throws IOException {
if (element != null) {
open(name);
composeExtendedContactDetailProperties(element);
close();
}
}
protected void composeExtendedContactDetailProperties(ExtendedContactDetail element) throws IOException {
composeDataTypeProperties(element);
if (element.hasPurpose()) {
composeCodeableConcept("purpose", element.getPurpose());
}
if (element.hasName()) {
openArray("name");
for (HumanName e : element.getName())
composeHumanName(null, e);
closeArray();
};
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasAddress()) {
composeAddress("address", element.getAddress());
}
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeExtension(String name, Extension element) throws IOException {
if (element != null) {
open(name);
composeExtensionProperties(element);
close();
}
}
protected void composeExtensionProperties(Extension element) throws IOException {
composeDataTypeProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeHumanName(String name, HumanName element) throws IOException {
if (element != null) {
open(name);
composeHumanNameProperties(element);
close();
}
}
protected void composeHumanNameProperties(HumanName element) throws IOException {
composeDataTypeProperties(element);
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new HumanName.NameUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new HumanName.NameUseEnumFactory(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasFamilyElement()) {
composeStringCore("family", element.getFamilyElement(), false);
composeStringExtras("family", element.getFamilyElement(), false);
}
if (element.hasGiven()) {
if (anyHasValue(element.getGiven())) {
openArray("given");
for (StringType e : element.getGiven())
composeStringCore(null, e, e != element.getGiven().get(element.getGiven().size()-1));
closeArray();
}
if (anyHasExtras(element.getGiven())) {
openArray("_given");
for (StringType e : element.getGiven())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasPrefix()) {
if (anyHasValue(element.getPrefix())) {
openArray("prefix");
for (StringType e : element.getPrefix())
composeStringCore(null, e, e != element.getPrefix().get(element.getPrefix().size()-1));
closeArray();
}
if (anyHasExtras(element.getPrefix())) {
openArray("_prefix");
for (StringType e : element.getPrefix())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSuffix()) {
if (anyHasValue(element.getSuffix())) {
openArray("suffix");
for (StringType e : element.getSuffix())
composeStringCore(null, e, e != element.getSuffix().get(element.getSuffix().size()-1));
closeArray();
}
if (anyHasExtras(element.getSuffix())) {
openArray("_suffix");
for (StringType e : element.getSuffix())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeIdentifier(String name, Identifier element) throws IOException {
if (element != null) {
open(name);
composeIdentifierProperties(element);
close();
}
}
protected void composeIdentifierProperties(Identifier element) throws IOException {
composeDataTypeProperties(element);
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSystemElement()) {
composeUriCore("system", element.getSystemElement(), false);
composeUriExtras("system", element.getSystemElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasAssigner()) {
composeReference("assigner", element.getAssigner());
}
}
protected void composeMarketingStatus(String name, MarketingStatus element) throws IOException {
if (element != null) {
open(name);
composeMarketingStatusProperties(element);
close();
}
}
protected void composeMarketingStatusProperties(MarketingStatus element) throws IOException {
composeBackboneTypeProperties(element);
if (element.hasCountry()) {
composeCodeableConcept("country", element.getCountry());
}
if (element.hasJurisdiction()) {
composeCodeableConcept("jurisdiction", element.getJurisdiction());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasDateRange()) {
composePeriod("dateRange", element.getDateRange());
}
if (element.hasRestoreDateElement()) {
composeDateTimeCore("restoreDate", element.getRestoreDateElement(), false);
composeDateTimeExtras("restoreDate", element.getRestoreDateElement(), false);
}
}
protected void composeMeta(String name, Meta element) throws IOException {
if (element != null) {
open(name);
composeMetaProperties(element);
close();
}
}
protected void composeMetaProperties(Meta element) throws IOException {
composeDataTypeProperties(element);
if (element.hasVersionIdElement()) {
composeIdCore("versionId", element.getVersionIdElement(), false);
composeIdExtras("versionId", element.getVersionIdElement(), false);
}
if (element.hasLastUpdatedElement()) {
composeInstantCore("lastUpdated", element.getLastUpdatedElement(), false);
composeInstantExtras("lastUpdated", element.getLastUpdatedElement(), false);
}
if (element.hasSourceElement()) {
composeUriCore("source", element.getSourceElement(), false);
composeUriExtras("source", element.getSourceElement(), false);
}
if (element.hasProfile()) {
if (anyHasValue(element.getProfile())) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, e != element.getProfile().get(element.getProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasSecurity()) {
openArray("security");
for (Coding e : element.getSecurity())
composeCoding(null, e);
closeArray();
};
if (element.hasTag()) {
openArray("tag");
for (Coding e : element.getTag())
composeCoding(null, e);
closeArray();
};
}
protected void composeMonetaryComponent(String name, MonetaryComponent element) throws IOException {
if (element != null) {
open(name);
composeMonetaryComponentProperties(element);
close();
}
}
protected void composeMonetaryComponentProperties(MonetaryComponent element) throws IOException {
composeDataTypeProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new MonetaryComponent.PriceComponentTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new MonetaryComponent.PriceComponentTypeEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composeMoney(String name, Money element) throws IOException {
if (element != null) {
open(name);
composeMoneyProperties(element);
close();
}
}
protected void composeMoneyProperties(Money element) throws IOException {
composeDataTypeProperties(element);
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
if (element.hasCurrencyElement()) {
composeCodeCore("currency", element.getCurrencyElement(), false);
composeCodeExtras("currency", element.getCurrencyElement(), false);
}
}
protected void composeNarrative(String name, Narrative element) throws IOException {
if (element != null) {
open(name);
composeNarrativeProperties(element);
close();
}
}
protected void composeNarrativeProperties(Narrative element) throws IOException {
composeDataTypeProperties(element);
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory(), false);
}
if (element.hasDiv()) {
XhtmlNode node = element.getDiv();
if (node.getNsDecl() == null) {
node.attribute("xmlns", XHTML_NS);
}
composeXhtml("div", node);
}
}
protected void composeParameterDefinition(String name, ParameterDefinition element) throws IOException {
if (element != null) {
open(name);
composeParameterDefinitionProperties(element);
close();
}
}
protected void composeParameterDefinitionProperties(ParameterDefinition element) throws IOException {
composeDataTypeProperties(element);
if (element.hasNameElement()) {
composeCodeCore("name", element.getNameElement(), false);
composeCodeExtras("name", element.getNameElement(), false);
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Enumerations.OperationParameterUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Enumerations.OperationParameterUseEnumFactory(), false);
}
if (element.hasMinElement()) {
composeIntegerCore("min", element.getMinElement(), false);
composeIntegerExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.FHIRTypesEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.FHIRTypesEnumFactory(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
}
protected void composePeriod(String name, Period element) throws IOException {
if (element != null) {
open(name);
composePeriodProperties(element);
close();
}
}
protected void composePeriodProperties(Period element) throws IOException {
composeDataTypeProperties(element);
if (element.hasStartElement()) {
composeDateTimeCore("start", element.getStartElement(), false);
composeDateTimeExtras("start", element.getStartElement(), false);
}
if (element.hasEndElement()) {
composeDateTimeCore("end", element.getEndElement(), false);
composeDateTimeExtras("end", element.getEndElement(), false);
}
}
protected void composeProductShelfLife(String name, ProductShelfLife element) throws IOException {
if (element != null) {
open(name);
composeProductShelfLifeProperties(element);
close();
}
}
protected void composeProductShelfLifeProperties(ProductShelfLife element) throws IOException {
composeBackboneTypeProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPeriod()) {
composeType("period", element.getPeriod());
}
if (element.hasSpecialPrecautionsForStorage()) {
openArray("specialPrecautionsForStorage");
for (CodeableConcept e : element.getSpecialPrecautionsForStorage())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeQuantity(String name, Quantity element) throws IOException {
if (element != null) {
open(name);
composeQuantityProperties(element);
close();
}
}
protected void composeQuantityProperties(Quantity element) throws IOException {
composeDataTypeProperties(element);
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
if (element.hasComparatorElement()) {
composeEnumerationCore("comparator", element.getComparatorElement(), new Enumerations.QuantityComparatorEnumFactory(), false);
composeEnumerationExtras("comparator", element.getComparatorElement(), new Enumerations.QuantityComparatorEnumFactory(), false);
}
if (element.hasUnitElement()) {
composeStringCore("unit", element.getUnitElement(), false);
composeStringExtras("unit", element.getUnitElement(), false);
}
if (element.hasSystemElement()) {
composeUriCore("system", element.getSystemElement(), false);
composeUriExtras("system", element.getSystemElement(), false);
}
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
}
protected void composeRange(String name, Range element) throws IOException {
if (element != null) {
open(name);
composeRangeProperties(element);
close();
}
}
protected void composeRangeProperties(Range element) throws IOException {
composeDataTypeProperties(element);
if (element.hasLow()) {
composeQuantity("low", element.getLow());
}
if (element.hasHigh()) {
composeQuantity("high", element.getHigh());
}
}
protected void composeRatio(String name, Ratio element) throws IOException {
if (element != null) {
open(name);
composeRatioProperties(element);
close();
}
}
protected void composeRatioProperties(Ratio element) throws IOException {
composeDataTypeProperties(element);
if (element.hasNumerator()) {
composeQuantity("numerator", element.getNumerator());
}
if (element.hasDenominator()) {
composeQuantity("denominator", element.getDenominator());
}
}
protected void composeRatioRange(String name, RatioRange element) throws IOException {
if (element != null) {
open(name);
composeRatioRangeProperties(element);
close();
}
}
protected void composeRatioRangeProperties(RatioRange element) throws IOException {
composeDataTypeProperties(element);
if (element.hasLowNumerator()) {
composeQuantity("lowNumerator", element.getLowNumerator());
}
if (element.hasHighNumerator()) {
composeQuantity("highNumerator", element.getHighNumerator());
}
if (element.hasDenominator()) {
composeQuantity("denominator", element.getDenominator());
}
}
protected void composeReference(String name, Reference element) throws IOException {
if (element != null) {
open(name);
composeReferenceProperties(element);
close();
}
}
protected void composeReferenceProperties(Reference element) throws IOException {
composeDataTypeProperties(element);
if (element.hasReferenceElement()) {
composeStringCore("reference", element.getReferenceElement(), false);
composeStringExtras("reference", element.getReferenceElement(), false);
}
if (element.hasTypeElement()) {
composeUriCore("type", element.getTypeElement(), false);
composeUriExtras("type", element.getTypeElement(), false);
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
}
protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException {
if (element != null) {
open(name);
composeRelatedArtifactProperties(element);
close();
}
}
protected void composeRelatedArtifactProperties(RelatedArtifact element) throws IOException {
composeDataTypeProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(), false);
}
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasCitationElement()) {
composeMarkdownCore("citation", element.getCitationElement(), false);
composeMarkdownExtras("citation", element.getCitationElement(), false);
}
if (element.hasDocument()) {
composeAttachment("document", element.getDocument());
}
if (element.hasResourceElement()) {
composeCanonicalCore("resource", element.getResourceElement(), false);
composeCanonicalExtras("resource", element.getResourceElement(), false);
}
if (element.hasResourceReference()) {
composeReference("resourceReference", element.getResourceReference());
}
if (element.hasPublicationStatusElement()) {
composeEnumerationCore("publicationStatus", element.getPublicationStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("publicationStatus", element.getPublicationStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasPublicationDateElement()) {
composeDateCore("publicationDate", element.getPublicationDateElement(), false);
composeDateExtras("publicationDate", element.getPublicationDateElement(), false);
}
}
protected void composeSampledData(String name, SampledData element) throws IOException {
if (element != null) {
open(name);
composeSampledDataProperties(element);
close();
}
}
protected void composeSampledDataProperties(SampledData element) throws IOException {
composeDataTypeProperties(element);
if (element.hasOrigin()) {
composeQuantity("origin", element.getOrigin());
}
if (element.hasIntervalElement()) {
composeDecimalCore("interval", element.getIntervalElement(), false);
composeDecimalExtras("interval", element.getIntervalElement(), false);
}
if (element.hasIntervalUnitElement()) {
composeCodeCore("intervalUnit", element.getIntervalUnitElement(), false);
composeCodeExtras("intervalUnit", element.getIntervalUnitElement(), false);
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasLowerLimitElement()) {
composeDecimalCore("lowerLimit", element.getLowerLimitElement(), false);
composeDecimalExtras("lowerLimit", element.getLowerLimitElement(), false);
}
if (element.hasUpperLimitElement()) {
composeDecimalCore("upperLimit", element.getUpperLimitElement(), false);
composeDecimalExtras("upperLimit", element.getUpperLimitElement(), false);
}
if (element.hasDimensionsElement()) {
composePositiveIntCore("dimensions", element.getDimensionsElement(), false);
composePositiveIntExtras("dimensions", element.getDimensionsElement(), false);
}
if (element.hasCodeMapElement()) {
composeCanonicalCore("codeMap", element.getCodeMapElement(), false);
composeCanonicalExtras("codeMap", element.getCodeMapElement(), false);
}
if (element.hasOffsetsElement()) {
composeStringCore("offsets", element.getOffsetsElement(), false);
composeStringExtras("offsets", element.getOffsetsElement(), false);
}
if (element.hasDataElement()) {
composeStringCore("data", element.getDataElement(), false);
composeStringExtras("data", element.getDataElement(), false);
}
}
protected void composeSignature(String name, Signature element) throws IOException {
if (element != null) {
open(name);
composeSignatureProperties(element);
close();
}
}
protected void composeSignatureProperties(Signature element) throws IOException {
composeDataTypeProperties(element);
if (element.hasType()) {
openArray("type");
for (Coding e : element.getType())
composeCoding(null, e);
closeArray();
};
if (element.hasWhenElement()) {
composeInstantCore("when", element.getWhenElement(), false);
composeInstantExtras("when", element.getWhenElement(), false);
}
if (element.hasWho()) {
composeReference("who", element.getWho());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
if (element.hasTargetFormatElement()) {
composeCodeCore("targetFormat", element.getTargetFormatElement(), false);
composeCodeExtras("targetFormat", element.getTargetFormatElement(), false);
}
if (element.hasSigFormatElement()) {
composeCodeCore("sigFormat", element.getSigFormatElement(), false);
composeCodeExtras("sigFormat", element.getSigFormatElement(), false);
}
if (element.hasDataElement()) {
composeBase64BinaryCore("data", element.getDataElement(), false);
composeBase64BinaryExtras("data", element.getDataElement(), false);
}
}
protected void composeTiming(String name, Timing element) throws IOException {
if (element != null) {
open(name);
composeTimingProperties(element);
close();
}
}
protected void composeTimingProperties(Timing element) throws IOException {
composeBackboneTypeProperties(element);
if (element.hasEvent()) {
if (anyHasValue(element.getEvent())) {
openArray("event");
for (DateTimeType e : element.getEvent())
composeDateTimeCore(null, e, e != element.getEvent().get(element.getEvent().size()-1));
closeArray();
}
if (anyHasExtras(element.getEvent())) {
openArray("_event");
for (DateTimeType e : element.getEvent())
composeDateTimeExtras(null, e, true);
closeArray();
}
};
if (element.hasRepeat()) {
composeTimingRepeatComponent("repeat", element.getRepeat());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeTimingRepeatComponent(String name, Timing.TimingRepeatComponent element) throws IOException {
if (element != null) {
open(name);
composeTimingRepeatComponentProperties(element);
close();
}
}
protected void composeTimingRepeatComponentProperties(Timing.TimingRepeatComponent element) throws IOException {
composeElementProperties(element);
if (element.hasBounds()) {
composeType("bounds", element.getBounds());
}
if (element.hasCountElement()) {
composePositiveIntCore("count", element.getCountElement(), false);
composePositiveIntExtras("count", element.getCountElement(), false);
}
if (element.hasCountMaxElement()) {
composePositiveIntCore("countMax", element.getCountMaxElement(), false);
composePositiveIntExtras("countMax", element.getCountMaxElement(), false);
}
if (element.hasDurationElement()) {
composeDecimalCore("duration", element.getDurationElement(), false);
composeDecimalExtras("duration", element.getDurationElement(), false);
}
if (element.hasDurationMaxElement()) {
composeDecimalCore("durationMax", element.getDurationMaxElement(), false);
composeDecimalExtras("durationMax", element.getDurationMaxElement(), false);
}
if (element.hasDurationUnitElement()) {
composeEnumerationCore("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false);
composeEnumerationExtras("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false);
}
if (element.hasFrequencyElement()) {
composePositiveIntCore("frequency", element.getFrequencyElement(), false);
composePositiveIntExtras("frequency", element.getFrequencyElement(), false);
}
if (element.hasFrequencyMaxElement()) {
composePositiveIntCore("frequencyMax", element.getFrequencyMaxElement(), false);
composePositiveIntExtras("frequencyMax", element.getFrequencyMaxElement(), false);
}
if (element.hasPeriodElement()) {
composeDecimalCore("period", element.getPeriodElement(), false);
composeDecimalExtras("period", element.getPeriodElement(), false);
}
if (element.hasPeriodMaxElement()) {
composeDecimalCore("periodMax", element.getPeriodMaxElement(), false);
composeDecimalExtras("periodMax", element.getPeriodMaxElement(), false);
}
if (element.hasPeriodUnitElement()) {
composeEnumerationCore("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false);
composeEnumerationExtras("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false);
}
if (element.hasDayOfWeek()) {
openArray("dayOfWeek");
for (Enumeration e : element.getDayOfWeek())
composeEnumerationCore(null, e, new Enumerations.DaysOfWeekEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getDayOfWeek())) {
openArray("_dayOfWeek");
for (Enumeration e : element.getDayOfWeek())
composeEnumerationExtras(null, e, new Enumerations.DaysOfWeekEnumFactory(), true);
closeArray();
}
};
if (element.hasTimeOfDay()) {
if (anyHasValue(element.getTimeOfDay())) {
openArray("timeOfDay");
for (TimeType e : element.getTimeOfDay())
composeTimeCore(null, e, e != element.getTimeOfDay().get(element.getTimeOfDay().size()-1));
closeArray();
}
if (anyHasExtras(element.getTimeOfDay())) {
openArray("_timeOfDay");
for (TimeType e : element.getTimeOfDay())
composeTimeExtras(null, e, true);
closeArray();
}
};
if (element.hasWhen()) {
openArray("when");
for (Enumeration e : element.getWhen())
composeEnumerationCore(null, e, new Timing.EventTimingEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getWhen())) {
openArray("_when");
for (Enumeration e : element.getWhen())
composeEnumerationExtras(null, e, new Timing.EventTimingEnumFactory(), true);
closeArray();
}
};
if (element.hasOffsetElement()) {
composeUnsignedIntCore("offset", element.getOffsetElement(), false);
composeUnsignedIntExtras("offset", element.getOffsetElement(), false);
}
}
protected void composeTriggerDefinition(String name, TriggerDefinition element) throws IOException {
if (element != null) {
open(name);
composeTriggerDefinitionProperties(element);
close();
}
}
protected void composeTriggerDefinitionProperties(TriggerDefinition element) throws IOException {
composeDataTypeProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubscriptionTopicElement()) {
composeCanonicalCore("subscriptionTopic", element.getSubscriptionTopicElement(), false);
composeCanonicalExtras("subscriptionTopic", element.getSubscriptionTopicElement(), false);
}
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasData()) {
openArray("data");
for (DataRequirement e : element.getData())
composeDataRequirement(null, e);
closeArray();
};
if (element.hasCondition()) {
composeExpression("condition", element.getCondition());
}
}
protected void composeUsageContext(String name, UsageContext element) throws IOException {
if (element != null) {
open(name);
composeUsageContextProperties(element);
close();
}
}
protected void composeUsageContextProperties(UsageContext element) throws IOException {
composeDataTypeProperties(element);
if (element.hasCode()) {
composeCoding("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeVirtualServiceDetail(String name, VirtualServiceDetail element) throws IOException {
if (element != null) {
open(name);
composeVirtualServiceDetailProperties(element);
close();
}
}
protected void composeVirtualServiceDetailProperties(VirtualServiceDetail element) throws IOException {
composeDataTypeProperties(element);
if (element.hasChannelType()) {
composeCoding("channelType", element.getChannelType());
}
if (element.hasAddress()) {
composeType("address", element.getAddress());
}
if (element.hasAdditionalInfo()) {
if (anyHasValue(element.getAdditionalInfo())) {
openArray("additionalInfo");
for (UrlType e : element.getAdditionalInfo())
composeUrlCore(null, e, e != element.getAdditionalInfo().get(element.getAdditionalInfo().size()-1));
closeArray();
}
if (anyHasExtras(element.getAdditionalInfo())) {
openArray("_additionalInfo");
for (UrlType e : element.getAdditionalInfo())
composeUrlExtras(null, e, true);
closeArray();
}
};
if (element.hasMaxParticipantsElement()) {
composePositiveIntCore("maxParticipants", element.getMaxParticipantsElement(), false);
composePositiveIntExtras("maxParticipants", element.getMaxParticipantsElement(), false);
}
if (element.hasSessionKeyElement()) {
composeStringCore("sessionKey", element.getSessionKeyElement(), false);
composeStringExtras("sessionKey", element.getSessionKeyElement(), false);
}
}
protected void composeCanonicalResourceProperties(CanonicalResource element) throws IOException {
composeDomainResourceProperties(element);
}
protected void composeDomainResourceProperties(DomainResource element) throws IOException {
composeResourceProperties(element);
if (element.hasText()) {
composeNarrative("text", element.getText());
}
if (element.hasContained()) {
openArray("contained");
for (Resource e : element.getContained()) {
open(null);
composeResource(e);
close();
}
closeArray();
};
if (element.hasExtension()) {
openArray("extension");
for (Extension e : element.getExtension())
composeExtension(null, e);
closeArray();
};
if (element.hasModifierExtension()) {
openArray("modifierExtension");
for (Extension e : element.getModifierExtension())
composeExtension(null, e);
closeArray();
};
}
protected void composeMetadataResourceProperties(MetadataResource element) throws IOException {
composeCanonicalResourceProperties(element);
}
protected void composeResourceProperties(Resource element) throws IOException {
composeBaseProperties(element);
if (element.hasIdElement()) {
composeIdCore("id", element.getIdElement(), false);
composeIdExtras("id", element.getIdElement(), false);
}
if (element.hasMeta()) {
composeMeta("meta", element.getMeta());
}
if (element.hasImplicitRulesElement()) {
composeUriCore("implicitRules", element.getImplicitRulesElement(), false);
composeUriExtras("implicitRules", element.getImplicitRulesElement(), false);
}
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
}
protected void composeAccount(String name, Account element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAccountProperties(element);
}
}
protected void composeAccountProperties(Account element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Account.AccountStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Account.AccountStatusEnumFactory(), false);
}
if (element.hasBillingStatus()) {
composeCodeableConcept("billingStatus", element.getBillingStatus());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
};
if (element.hasServicePeriod()) {
composePeriod("servicePeriod", element.getServicePeriod());
}
if (element.hasCoverage()) {
openArray("coverage");
for (Account.CoverageComponent e : element.getCoverage())
composeCoverageComponent(null, e);
closeArray();
};
if (element.hasOwner()) {
composeReference("owner", element.getOwner());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasGuarantor()) {
openArray("guarantor");
for (Account.GuarantorComponent e : element.getGuarantor())
composeGuarantorComponent(null, e);
closeArray();
};
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (Account.AccountDiagnosisComponent e : element.getDiagnosis())
composeAccountDiagnosisComponent(null, e);
closeArray();
};
if (element.hasProcedure()) {
openArray("procedure");
for (Account.AccountProcedureComponent e : element.getProcedure())
composeAccountProcedureComponent(null, e);
closeArray();
};
if (element.hasRelatedAccount()) {
openArray("relatedAccount");
for (Account.AccountRelatedAccountComponent e : element.getRelatedAccount())
composeAccountRelatedAccountComponent(null, e);
closeArray();
};
if (element.hasCurrency()) {
composeCodeableConcept("currency", element.getCurrency());
}
if (element.hasBalance()) {
openArray("balance");
for (Account.AccountBalanceComponent e : element.getBalance())
composeAccountBalanceComponent(null, e);
closeArray();
};
if (element.hasCalculatedAtElement()) {
composeInstantCore("calculatedAt", element.getCalculatedAtElement(), false);
composeInstantExtras("calculatedAt", element.getCalculatedAtElement(), false);
}
}
protected void composeCoverageComponent(String name, Account.CoverageComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageComponentProperties(element);
close();
}
}
protected void composeCoverageComponentProperties(Account.CoverageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasPriorityElement()) {
composePositiveIntCore("priority", element.getPriorityElement(), false);
composePositiveIntExtras("priority", element.getPriorityElement(), false);
}
}
protected void composeGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException {
if (element != null) {
open(name);
composeGuarantorComponentProperties(element);
close();
}
}
protected void composeGuarantorComponentProperties(Account.GuarantorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasParty()) {
composeReference("party", element.getParty());
}
if (element.hasOnHoldElement()) {
composeBooleanCore("onHold", element.getOnHoldElement(), false);
composeBooleanExtras("onHold", element.getOnHoldElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeAccountDiagnosisComponent(String name, Account.AccountDiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeAccountDiagnosisComponentProperties(element);
close();
}
}
protected void composeAccountDiagnosisComponentProperties(Account.AccountDiagnosisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCondition()) {
composeCodeableReference("condition", element.getCondition());
}
if (element.hasDateOfDiagnosisElement()) {
composeDateTimeCore("dateOfDiagnosis", element.getDateOfDiagnosisElement(), false);
composeDateTimeExtras("dateOfDiagnosis", element.getDateOfDiagnosisElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasOnAdmissionElement()) {
composeBooleanCore("onAdmission", element.getOnAdmissionElement(), false);
composeBooleanExtras("onAdmission", element.getOnAdmissionElement(), false);
}
if (element.hasPackageCode()) {
openArray("packageCode");
for (CodeableConcept e : element.getPackageCode())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeAccountProcedureComponent(String name, Account.AccountProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeAccountProcedureComponentProperties(element);
close();
}
}
protected void composeAccountProcedureComponentProperties(Account.AccountProcedureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCode()) {
composeCodeableReference("code", element.getCode());
}
if (element.hasDateOfServiceElement()) {
composeDateTimeCore("dateOfService", element.getDateOfServiceElement(), false);
composeDateTimeExtras("dateOfService", element.getDateOfServiceElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPackageCode()) {
openArray("packageCode");
for (CodeableConcept e : element.getPackageCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDevice()) {
openArray("device");
for (Reference e : element.getDevice())
composeReference(null, e);
closeArray();
};
}
protected void composeAccountRelatedAccountComponent(String name, Account.AccountRelatedAccountComponent element) throws IOException {
if (element != null) {
open(name);
composeAccountRelatedAccountComponentProperties(element);
close();
}
}
protected void composeAccountRelatedAccountComponentProperties(Account.AccountRelatedAccountComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasAccount()) {
composeReference("account", element.getAccount());
}
}
protected void composeAccountBalanceComponent(String name, Account.AccountBalanceComponent element) throws IOException {
if (element != null) {
open(name);
composeAccountBalanceComponentProperties(element);
close();
}
}
protected void composeAccountBalanceComponentProperties(Account.AccountBalanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAggregate()) {
composeCodeableConcept("aggregate", element.getAggregate());
}
if (element.hasTerm()) {
composeCodeableConcept("term", element.getTerm());
}
if (element.hasEstimateElement()) {
composeBooleanCore("estimate", element.getEstimateElement(), false);
composeBooleanExtras("estimate", element.getEstimateElement(), false);
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composeActivityDefinition(String name, ActivityDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeActivityDefinitionProperties(element);
}
}
protected void composeActivityDefinitionProperties(ActivityDefinition element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasUsageElement()) {
composeMarkdownCore("usage", element.getUsageElement(), false);
composeMarkdownExtras("usage", element.getUsageElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasLibrary()) {
if (anyHasValue(element.getLibrary())) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, e != element.getLibrary().get(element.getLibrary().size()-1));
closeArray();
}
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new ActivityDefinition.RequestResourceTypesEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new ActivityDefinition.RequestResourceTypesEnumFactory(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasAsNeeded()) {
composeType("asNeeded", element.getAsNeeded());
}
if (element.hasLocation()) {
composeCodeableReference("location", element.getLocation());
}
if (element.hasParticipant()) {
openArray("participant");
for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant())
composeActivityDefinitionParticipantComponent(null, e);
closeArray();
};
if (element.hasProduct()) {
composeType("product", element.getProduct());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasDosage()) {
openArray("dosage");
for (Dosage e : element.getDosage())
composeDosage(null, e);
closeArray();
};
if (element.hasBodySite()) {
openArray("bodySite");
for (CodeableConcept e : element.getBodySite())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSpecimenRequirement()) {
if (anyHasValue(element.getSpecimenRequirement())) {
openArray("specimenRequirement");
for (CanonicalType e : element.getSpecimenRequirement())
composeCanonicalCore(null, e, e != element.getSpecimenRequirement().get(element.getSpecimenRequirement().size()-1));
closeArray();
}
if (anyHasExtras(element.getSpecimenRequirement())) {
openArray("_specimenRequirement");
for (CanonicalType e : element.getSpecimenRequirement())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasObservationRequirement()) {
if (anyHasValue(element.getObservationRequirement())) {
openArray("observationRequirement");
for (CanonicalType e : element.getObservationRequirement())
composeCanonicalCore(null, e, e != element.getObservationRequirement().get(element.getObservationRequirement().size()-1));
closeArray();
}
if (anyHasExtras(element.getObservationRequirement())) {
openArray("_observationRequirement");
for (CanonicalType e : element.getObservationRequirement())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasObservationResultRequirement()) {
if (anyHasValue(element.getObservationResultRequirement())) {
openArray("observationResultRequirement");
for (CanonicalType e : element.getObservationResultRequirement())
composeCanonicalCore(null, e, e != element.getObservationResultRequirement().get(element.getObservationResultRequirement().size()-1));
closeArray();
}
if (anyHasExtras(element.getObservationResultRequirement())) {
openArray("_observationResultRequirement");
for (CanonicalType e : element.getObservationResultRequirement())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasTransformElement()) {
composeCanonicalCore("transform", element.getTransformElement(), false);
composeCanonicalExtras("transform", element.getTransformElement(), false);
}
if (element.hasDynamicValue()) {
openArray("dynamicValue");
for (ActivityDefinition.ActivityDefinitionDynamicValueComponent e : element.getDynamicValue())
composeActivityDefinitionDynamicValueComponent(null, e);
closeArray();
};
}
protected void composeActivityDefinitionParticipantComponent(String name, ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeActivityDefinitionParticipantComponentProperties(element);
close();
}
}
protected void composeActivityDefinitionParticipantComponentProperties(ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
}
if (element.hasTypeCanonicalElement()) {
composeCanonicalCore("typeCanonical", element.getTypeCanonicalElement(), false);
composeCanonicalExtras("typeCanonical", element.getTypeCanonicalElement(), false);
}
if (element.hasTypeReference()) {
composeReference("typeReference", element.getTypeReference());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
}
protected void composeActivityDefinitionDynamicValueComponent(String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException {
if (element != null) {
open(name);
composeActivityDefinitionDynamicValueComponentProperties(element);
close();
}
}
protected void composeActivityDefinitionDynamicValueComponentProperties(ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composeActorDefinition(String name, ActorDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeActorDefinitionProperties(element);
}
}
protected void composeActorDefinitionProperties(ActorDefinition element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ExampleScenarioActorTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ExampleScenarioActorTypeEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasReference()) {
if (anyHasValue(element.getReference())) {
openArray("reference");
for (UrlType e : element.getReference())
composeUrlCore(null, e, e != element.getReference().get(element.getReference().size()-1));
closeArray();
}
if (anyHasExtras(element.getReference())) {
openArray("_reference");
for (UrlType e : element.getReference())
composeUrlExtras(null, e, true);
closeArray();
}
};
if (element.hasCapabilitiesElement()) {
composeCanonicalCore("capabilities", element.getCapabilitiesElement(), false);
composeCanonicalExtras("capabilities", element.getCapabilitiesElement(), false);
}
if (element.hasDerivedFrom()) {
if (anyHasValue(element.getDerivedFrom())) {
openArray("derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalCore(null, e, e != element.getDerivedFrom().get(element.getDerivedFrom().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFrom())) {
openArray("_derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
}
protected void composeAdministrableProductDefinition(String name, AdministrableProductDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAdministrableProductDefinitionProperties(element);
}
}
protected void composeAdministrableProductDefinitionProperties(AdministrableProductDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasFormOf()) {
openArray("formOf");
for (Reference e : element.getFormOf())
composeReference(null, e);
closeArray();
};
if (element.hasAdministrableDoseForm()) {
composeCodeableConcept("administrableDoseForm", element.getAdministrableDoseForm());
}
if (element.hasUnitOfPresentation()) {
composeCodeableConcept("unitOfPresentation", element.getUnitOfPresentation());
}
if (element.hasProducedFrom()) {
openArray("producedFrom");
for (Reference e : element.getProducedFrom())
composeReference(null, e);
closeArray();
};
if (element.hasIngredient()) {
openArray("ingredient");
for (CodeableConcept e : element.getIngredient())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasProperty()) {
openArray("property");
for (AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent e : element.getProperty())
composeAdministrableProductDefinitionPropertyComponent(null, e);
closeArray();
};
if (element.hasRouteOfAdministration()) {
openArray("routeOfAdministration");
for (AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent e : element.getRouteOfAdministration())
composeAdministrableProductDefinitionRouteOfAdministrationComponent(null, e);
closeArray();
};
}
protected void composeAdministrableProductDefinitionPropertyComponent(String name, AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeAdministrableProductDefinitionPropertyComponentProperties(element);
close();
}
}
protected void composeAdministrableProductDefinitionPropertyComponentProperties(AdministrableProductDefinition.AdministrableProductDefinitionPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
}
protected void composeAdministrableProductDefinitionRouteOfAdministrationComponent(String name, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent element) throws IOException {
if (element != null) {
open(name);
composeAdministrableProductDefinitionRouteOfAdministrationComponentProperties(element);
close();
}
}
protected void composeAdministrableProductDefinitionRouteOfAdministrationComponentProperties(AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasFirstDose()) {
composeQuantity("firstDose", element.getFirstDose());
}
if (element.hasMaxSingleDose()) {
composeQuantity("maxSingleDose", element.getMaxSingleDose());
}
if (element.hasMaxDosePerDay()) {
composeQuantity("maxDosePerDay", element.getMaxDosePerDay());
}
if (element.hasMaxDosePerTreatmentPeriod()) {
composeRatio("maxDosePerTreatmentPeriod", element.getMaxDosePerTreatmentPeriod());
}
if (element.hasMaxTreatmentPeriod()) {
composeDuration("maxTreatmentPeriod", element.getMaxTreatmentPeriod());
}
if (element.hasTargetSpecies()) {
openArray("targetSpecies");
for (AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent e : element.getTargetSpecies())
composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent(null, e);
closeArray();
};
}
protected void composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent(String name, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent element) throws IOException {
if (element != null) {
open(name);
composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponentProperties(element);
close();
}
}
protected void composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponentProperties(AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasWithdrawalPeriod()) {
openArray("withdrawalPeriod");
for (AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent e : element.getWithdrawalPeriod())
composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(null, e);
closeArray();
};
}
protected void composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(String name, AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element) throws IOException {
if (element != null) {
open(name);
composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentProperties(element);
close();
}
}
protected void composeAdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentProperties(AdministrableProductDefinition.AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTissue()) {
composeCodeableConcept("tissue", element.getTissue());
}
if (element.hasValue()) {
composeQuantity("value", element.getValue());
}
if (element.hasSupportingInformationElement()) {
composeStringCore("supportingInformation", element.getSupportingInformationElement(), false);
composeStringExtras("supportingInformation", element.getSupportingInformationElement(), false);
}
}
protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAdverseEventProperties(element);
}
}
protected void composeAdverseEventProperties(AdverseEvent element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new AdverseEvent.AdverseEventStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new AdverseEvent.AdverseEventStatusEnumFactory(), false);
}
if (element.hasActualityElement()) {
composeEnumerationCore("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory(), false);
composeEnumerationExtras("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasDetectedElement()) {
composeDateTimeCore("detected", element.getDetectedElement(), false);
composeDateTimeExtras("detected", element.getDetectedElement(), false);
}
if (element.hasRecordedDateElement()) {
composeDateTimeCore("recordedDate", element.getRecordedDateElement(), false);
composeDateTimeExtras("recordedDate", element.getRecordedDateElement(), false);
}
if (element.hasResultingEffect()) {
openArray("resultingEffect");
for (Reference e : element.getResultingEffect())
composeReference(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasSeriousness()) {
composeCodeableConcept("seriousness", element.getSeriousness());
}
if (element.hasOutcome()) {
openArray("outcome");
for (CodeableConcept e : element.getOutcome())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasParticipant()) {
openArray("participant");
for (AdverseEvent.AdverseEventParticipantComponent e : element.getParticipant())
composeAdverseEventParticipantComponent(null, e);
closeArray();
};
if (element.hasStudy()) {
openArray("study");
for (Reference e : element.getStudy())
composeReference(null, e);
closeArray();
};
if (element.hasExpectedInResearchStudyElement()) {
composeBooleanCore("expectedInResearchStudy", element.getExpectedInResearchStudyElement(), false);
composeBooleanExtras("expectedInResearchStudy", element.getExpectedInResearchStudyElement(), false);
}
if (element.hasSuspectEntity()) {
openArray("suspectEntity");
for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity())
composeAdverseEventSuspectEntityComponent(null, e);
closeArray();
};
if (element.hasContributingFactor()) {
openArray("contributingFactor");
for (AdverseEvent.AdverseEventContributingFactorComponent e : element.getContributingFactor())
composeAdverseEventContributingFactorComponent(null, e);
closeArray();
};
if (element.hasPreventiveAction()) {
openArray("preventiveAction");
for (AdverseEvent.AdverseEventPreventiveActionComponent e : element.getPreventiveAction())
composeAdverseEventPreventiveActionComponent(null, e);
closeArray();
};
if (element.hasMitigatingAction()) {
openArray("mitigatingAction");
for (AdverseEvent.AdverseEventMitigatingActionComponent e : element.getMitigatingAction())
composeAdverseEventMitigatingActionComponent(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (AdverseEvent.AdverseEventSupportingInfoComponent e : element.getSupportingInfo())
composeAdverseEventSupportingInfoComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeAdverseEventParticipantComponent(String name, AdverseEvent.AdverseEventParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventParticipantComponentProperties(element);
close();
}
}
protected void composeAdverseEventParticipantComponentProperties(AdverseEvent.AdverseEventParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeAdverseEventSuspectEntityComponent(String name, AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventSuspectEntityComponentProperties(element);
close();
}
}
protected void composeAdverseEventSuspectEntityComponentProperties(AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInstance()) {
composeType("instance", element.getInstance());
}
if (element.hasCausality()) {
composeAdverseEventSuspectEntityCausalityComponent("causality", element.getCausality());
}
}
protected void composeAdverseEventSuspectEntityCausalityComponent(String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventSuspectEntityCausalityComponentProperties(element);
close();
}
}
protected void composeAdverseEventSuspectEntityCausalityComponentProperties(AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAssessmentMethod()) {
composeCodeableConcept("assessmentMethod", element.getAssessmentMethod());
}
if (element.hasEntityRelatedness()) {
composeCodeableConcept("entityRelatedness", element.getEntityRelatedness());
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
}
protected void composeAdverseEventContributingFactorComponent(String name, AdverseEvent.AdverseEventContributingFactorComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventContributingFactorComponentProperties(element);
close();
}
}
protected void composeAdverseEventContributingFactorComponentProperties(AdverseEvent.AdverseEventContributingFactorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeAdverseEventPreventiveActionComponent(String name, AdverseEvent.AdverseEventPreventiveActionComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventPreventiveActionComponentProperties(element);
close();
}
}
protected void composeAdverseEventPreventiveActionComponentProperties(AdverseEvent.AdverseEventPreventiveActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeAdverseEventMitigatingActionComponent(String name, AdverseEvent.AdverseEventMitigatingActionComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventMitigatingActionComponentProperties(element);
close();
}
}
protected void composeAdverseEventMitigatingActionComponentProperties(AdverseEvent.AdverseEventMitigatingActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeAdverseEventSupportingInfoComponent(String name, AdverseEvent.AdverseEventSupportingInfoComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventSupportingInfoComponentProperties(element);
close();
}
}
protected void composeAdverseEventSupportingInfoComponentProperties(AdverseEvent.AdverseEventSupportingInfoComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAllergyIntoleranceProperties(element);
}
}
protected void composeAllergyIntoleranceProperties(AllergyIntolerance element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasClinicalStatus()) {
composeCodeableConcept("clinicalStatus", element.getClinicalStatus());
}
if (element.hasVerificationStatus()) {
composeCodeableConcept("verificationStatus", element.getVerificationStatus());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCategory()) {
openArray("category");
for (Enumeration e : element.getCategory())
composeEnumerationCore(null, e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getCategory())) {
openArray("_category");
for (Enumeration e : element.getCategory())
composeEnumerationExtras(null, e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), true);
closeArray();
}
};
if (element.hasCriticalityElement()) {
composeEnumerationCore("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory(), false);
composeEnumerationExtras("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOnset()) {
composeType("onset", element.getOnset());
}
if (element.hasRecordedDateElement()) {
composeDateTimeCore("recordedDate", element.getRecordedDateElement(), false);
composeDateTimeExtras("recordedDate", element.getRecordedDateElement(), false);
}
if (element.hasParticipant()) {
openArray("participant");
for (AllergyIntolerance.AllergyIntoleranceParticipantComponent e : element.getParticipant())
composeAllergyIntoleranceParticipantComponent(null, e);
closeArray();
};
if (element.hasLastOccurrenceElement()) {
composeDateTimeCore("lastOccurrence", element.getLastOccurrenceElement(), false);
composeDateTimeExtras("lastOccurrence", element.getLastOccurrenceElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasReaction()) {
openArray("reaction");
for (AllergyIntolerance.AllergyIntoleranceReactionComponent e : element.getReaction())
composeAllergyIntoleranceReactionComponent(null, e);
closeArray();
};
}
protected void composeAllergyIntoleranceParticipantComponent(String name, AllergyIntolerance.AllergyIntoleranceParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeAllergyIntoleranceParticipantComponentProperties(element);
close();
}
}
protected void composeAllergyIntoleranceParticipantComponentProperties(AllergyIntolerance.AllergyIntoleranceParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeAllergyIntoleranceReactionComponent(String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException {
if (element != null) {
open(name);
composeAllergyIntoleranceReactionComponentProperties(element);
close();
}
}
protected void composeAllergyIntoleranceReactionComponentProperties(AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubstance()) {
composeCodeableConcept("substance", element.getSubstance());
}
if (element.hasManifestation()) {
openArray("manifestation");
for (CodeableReference e : element.getManifestation())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasOnsetElement()) {
composeDateTimeCore("onset", element.getOnsetElement(), false);
composeDateTimeExtras("onset", element.getOnsetElement(), false);
}
if (element.hasSeverityElement()) {
composeEnumerationCore("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory(), false);
composeEnumerationExtras("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory(), false);
}
if (element.hasExposureRoute()) {
composeCodeableConcept("exposureRoute", element.getExposureRoute());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeAppointment(String name, Appointment element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAppointmentProperties(element);
}
}
protected void composeAppointmentProperties(Appointment element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory(), false);
}
if (element.hasCancellationReason()) {
composeCodeableConcept("cancellationReason", element.getCancellationReason());
}
if (element.hasClass_()) {
openArray("class");
for (CodeableConcept e : element.getClass_())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiceCategory()) {
openArray("serviceCategory");
for (CodeableConcept e : element.getServiceCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiceType()) {
openArray("serviceType");
for (CodeableReference e : element.getServiceType())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAppointmentType()) {
composeCodeableConcept("appointmentType", element.getAppointmentType());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasReplaces()) {
openArray("replaces");
for (Reference e : element.getReplaces())
composeReference(null, e);
closeArray();
};
if (element.hasVirtualService()) {
openArray("virtualService");
for (VirtualServiceDetail e : element.getVirtualService())
composeVirtualServiceDetail(null, e);
closeArray();
};
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasPreviousAppointment()) {
composeReference("previousAppointment", element.getPreviousAppointment());
}
if (element.hasOriginatingAppointment()) {
composeReference("originatingAppointment", element.getOriginatingAppointment());
}
if (element.hasStartElement()) {
composeInstantCore("start", element.getStartElement(), false);
composeInstantExtras("start", element.getStartElement(), false);
}
if (element.hasEndElement()) {
composeInstantCore("end", element.getEndElement(), false);
composeInstantExtras("end", element.getEndElement(), false);
}
if (element.hasMinutesDurationElement()) {
composePositiveIntCore("minutesDuration", element.getMinutesDurationElement(), false);
composePositiveIntExtras("minutesDuration", element.getMinutesDurationElement(), false);
}
if (element.hasRequestedPeriod()) {
openArray("requestedPeriod");
for (Period e : element.getRequestedPeriod())
composePeriod(null, e);
closeArray();
};
if (element.hasSlot()) {
openArray("slot");
for (Reference e : element.getSlot())
composeReference(null, e);
closeArray();
};
if (element.hasAccount()) {
openArray("account");
for (Reference e : element.getAccount())
composeReference(null, e);
closeArray();
};
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasCancellationDateElement()) {
composeDateTimeCore("cancellationDate", element.getCancellationDateElement(), false);
composeDateTimeExtras("cancellationDate", element.getCancellationDateElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasPatientInstruction()) {
openArray("patientInstruction");
for (CodeableReference e : element.getPatientInstruction())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasParticipant()) {
openArray("participant");
for (Appointment.AppointmentParticipantComponent e : element.getParticipant())
composeAppointmentParticipantComponent(null, e);
closeArray();
};
if (element.hasRecurrenceIdElement()) {
composePositiveIntCore("recurrenceId", element.getRecurrenceIdElement(), false);
composePositiveIntExtras("recurrenceId", element.getRecurrenceIdElement(), false);
}
if (element.hasOccurrenceChangedElement()) {
composeBooleanCore("occurrenceChanged", element.getOccurrenceChangedElement(), false);
composeBooleanExtras("occurrenceChanged", element.getOccurrenceChangedElement(), false);
}
if (element.hasRecurrenceTemplate()) {
openArray("recurrenceTemplate");
for (Appointment.AppointmentRecurrenceTemplateComponent e : element.getRecurrenceTemplate())
composeAppointmentRecurrenceTemplateComponent(null, e);
closeArray();
};
}
protected void composeAppointmentParticipantComponent(String name, Appointment.AppointmentParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeAppointmentParticipantComponentProperties(element);
close();
}
}
protected void composeAppointmentParticipantComponentProperties(Appointment.AppointmentParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
if (element.hasRequiredElement()) {
composeBooleanCore("required", element.getRequiredElement(), false);
composeBooleanExtras("required", element.getRequiredElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(), false);
}
}
protected void composeAppointmentRecurrenceTemplateComponent(String name, Appointment.AppointmentRecurrenceTemplateComponent element) throws IOException {
if (element != null) {
open(name);
composeAppointmentRecurrenceTemplateComponentProperties(element);
close();
}
}
protected void composeAppointmentRecurrenceTemplateComponentProperties(Appointment.AppointmentRecurrenceTemplateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTimezone()) {
composeCodeableConcept("timezone", element.getTimezone());
}
if (element.hasRecurrenceType()) {
composeCodeableConcept("recurrenceType", element.getRecurrenceType());
}
if (element.hasLastOccurrenceDateElement()) {
composeDateCore("lastOccurrenceDate", element.getLastOccurrenceDateElement(), false);
composeDateExtras("lastOccurrenceDate", element.getLastOccurrenceDateElement(), false);
}
if (element.hasOccurrenceCountElement()) {
composePositiveIntCore("occurrenceCount", element.getOccurrenceCountElement(), false);
composePositiveIntExtras("occurrenceCount", element.getOccurrenceCountElement(), false);
}
if (element.hasOccurrenceDate()) {
if (anyHasValue(element.getOccurrenceDate())) {
openArray("occurrenceDate");
for (DateType e : element.getOccurrenceDate())
composeDateCore(null, e, e != element.getOccurrenceDate().get(element.getOccurrenceDate().size()-1));
closeArray();
}
if (anyHasExtras(element.getOccurrenceDate())) {
openArray("_occurrenceDate");
for (DateType e : element.getOccurrenceDate())
composeDateExtras(null, e, true);
closeArray();
}
};
if (element.hasWeeklyTemplate()) {
composeAppointmentRecurrenceTemplateWeeklyTemplateComponent("weeklyTemplate", element.getWeeklyTemplate());
}
if (element.hasMonthlyTemplate()) {
composeAppointmentRecurrenceTemplateMonthlyTemplateComponent("monthlyTemplate", element.getMonthlyTemplate());
}
if (element.hasYearlyTemplate()) {
composeAppointmentRecurrenceTemplateYearlyTemplateComponent("yearlyTemplate", element.getYearlyTemplate());
}
if (element.hasExcludingDate()) {
if (anyHasValue(element.getExcludingDate())) {
openArray("excludingDate");
for (DateType e : element.getExcludingDate())
composeDateCore(null, e, e != element.getExcludingDate().get(element.getExcludingDate().size()-1));
closeArray();
}
if (anyHasExtras(element.getExcludingDate())) {
openArray("_excludingDate");
for (DateType e : element.getExcludingDate())
composeDateExtras(null, e, true);
closeArray();
}
};
if (element.hasExcludingRecurrenceId()) {
if (anyHasValue(element.getExcludingRecurrenceId())) {
openArray("excludingRecurrenceId");
for (PositiveIntType e : element.getExcludingRecurrenceId())
composePositiveIntCore(null, e, e != element.getExcludingRecurrenceId().get(element.getExcludingRecurrenceId().size()-1));
closeArray();
}
if (anyHasExtras(element.getExcludingRecurrenceId())) {
openArray("_excludingRecurrenceId");
for (PositiveIntType e : element.getExcludingRecurrenceId())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
}
protected void composeAppointmentRecurrenceTemplateWeeklyTemplateComponent(String name, Appointment.AppointmentRecurrenceTemplateWeeklyTemplateComponent element) throws IOException {
if (element != null) {
open(name);
composeAppointmentRecurrenceTemplateWeeklyTemplateComponentProperties(element);
close();
}
}
protected void composeAppointmentRecurrenceTemplateWeeklyTemplateComponentProperties(Appointment.AppointmentRecurrenceTemplateWeeklyTemplateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMondayElement()) {
composeBooleanCore("monday", element.getMondayElement(), false);
composeBooleanExtras("monday", element.getMondayElement(), false);
}
if (element.hasTuesdayElement()) {
composeBooleanCore("tuesday", element.getTuesdayElement(), false);
composeBooleanExtras("tuesday", element.getTuesdayElement(), false);
}
if (element.hasWednesdayElement()) {
composeBooleanCore("wednesday", element.getWednesdayElement(), false);
composeBooleanExtras("wednesday", element.getWednesdayElement(), false);
}
if (element.hasThursdayElement()) {
composeBooleanCore("thursday", element.getThursdayElement(), false);
composeBooleanExtras("thursday", element.getThursdayElement(), false);
}
if (element.hasFridayElement()) {
composeBooleanCore("friday", element.getFridayElement(), false);
composeBooleanExtras("friday", element.getFridayElement(), false);
}
if (element.hasSaturdayElement()) {
composeBooleanCore("saturday", element.getSaturdayElement(), false);
composeBooleanExtras("saturday", element.getSaturdayElement(), false);
}
if (element.hasSundayElement()) {
composeBooleanCore("sunday", element.getSundayElement(), false);
composeBooleanExtras("sunday", element.getSundayElement(), false);
}
if (element.hasWeekIntervalElement()) {
composePositiveIntCore("weekInterval", element.getWeekIntervalElement(), false);
composePositiveIntExtras("weekInterval", element.getWeekIntervalElement(), false);
}
}
protected void composeAppointmentRecurrenceTemplateMonthlyTemplateComponent(String name, Appointment.AppointmentRecurrenceTemplateMonthlyTemplateComponent element) throws IOException {
if (element != null) {
open(name);
composeAppointmentRecurrenceTemplateMonthlyTemplateComponentProperties(element);
close();
}
}
protected void composeAppointmentRecurrenceTemplateMonthlyTemplateComponentProperties(Appointment.AppointmentRecurrenceTemplateMonthlyTemplateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDayOfMonthElement()) {
composePositiveIntCore("dayOfMonth", element.getDayOfMonthElement(), false);
composePositiveIntExtras("dayOfMonth", element.getDayOfMonthElement(), false);
}
if (element.hasNthWeekOfMonth()) {
composeCoding("nthWeekOfMonth", element.getNthWeekOfMonth());
}
if (element.hasDayOfWeek()) {
composeCoding("dayOfWeek", element.getDayOfWeek());
}
if (element.hasMonthIntervalElement()) {
composePositiveIntCore("monthInterval", element.getMonthIntervalElement(), false);
composePositiveIntExtras("monthInterval", element.getMonthIntervalElement(), false);
}
}
protected void composeAppointmentRecurrenceTemplateYearlyTemplateComponent(String name, Appointment.AppointmentRecurrenceTemplateYearlyTemplateComponent element) throws IOException {
if (element != null) {
open(name);
composeAppointmentRecurrenceTemplateYearlyTemplateComponentProperties(element);
close();
}
}
protected void composeAppointmentRecurrenceTemplateYearlyTemplateComponentProperties(Appointment.AppointmentRecurrenceTemplateYearlyTemplateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasYearIntervalElement()) {
composePositiveIntCore("yearInterval", element.getYearIntervalElement(), false);
composePositiveIntExtras("yearInterval", element.getYearIntervalElement(), false);
}
}
protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAppointmentResponseProperties(element);
}
}
protected void composeAppointmentResponseProperties(AppointmentResponse element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasAppointment()) {
composeReference("appointment", element.getAppointment());
}
if (element.hasProposedNewTimeElement()) {
composeBooleanCore("proposedNewTime", element.getProposedNewTimeElement(), false);
composeBooleanExtras("proposedNewTime", element.getProposedNewTimeElement(), false);
}
if (element.hasStartElement()) {
composeInstantCore("start", element.getStartElement(), false);
composeInstantExtras("start", element.getStartElement(), false);
}
if (element.hasEndElement()) {
composeInstantCore("end", element.getEndElement(), false);
composeInstantExtras("end", element.getEndElement(), false);
}
if (element.hasParticipantType()) {
openArray("participantType");
for (CodeableConcept e : element.getParticipantType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
if (element.hasParticipantStatusElement()) {
composeEnumerationCore("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.AppointmentResponseStatusEnumFactory(), false);
composeEnumerationExtras("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.AppointmentResponseStatusEnumFactory(), false);
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
if (element.hasRecurringElement()) {
composeBooleanCore("recurring", element.getRecurringElement(), false);
composeBooleanExtras("recurring", element.getRecurringElement(), false);
}
if (element.hasOccurrenceDateElement()) {
composeDateCore("occurrenceDate", element.getOccurrenceDateElement(), false);
composeDateExtras("occurrenceDate", element.getOccurrenceDateElement(), false);
}
if (element.hasRecurrenceIdElement()) {
composePositiveIntCore("recurrenceId", element.getRecurrenceIdElement(), false);
composePositiveIntExtras("recurrenceId", element.getRecurrenceIdElement(), false);
}
}
protected void composeArtifactAssessment(String name, ArtifactAssessment element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeArtifactAssessmentProperties(element);
}
}
protected void composeArtifactAssessmentProperties(ArtifactAssessment element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasCiteAs()) {
composeType("citeAs", element.getCiteAs());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasArtifact()) {
composeType("artifact", element.getArtifact());
}
if (element.hasContent()) {
openArray("content");
for (ArtifactAssessment.ArtifactAssessmentContentComponent e : element.getContent())
composeArtifactAssessmentContentComponent(null, e);
closeArray();
};
if (element.hasWorkflowStatusElement()) {
composeEnumerationCore("workflowStatus", element.getWorkflowStatusElement(), new ArtifactAssessment.ArtifactAssessmentWorkflowStatusEnumFactory(), false);
composeEnumerationExtras("workflowStatus", element.getWorkflowStatusElement(), new ArtifactAssessment.ArtifactAssessmentWorkflowStatusEnumFactory(), false);
}
if (element.hasDispositionElement()) {
composeEnumerationCore("disposition", element.getDispositionElement(), new ArtifactAssessment.ArtifactAssessmentDispositionEnumFactory(), false);
composeEnumerationExtras("disposition", element.getDispositionElement(), new ArtifactAssessment.ArtifactAssessmentDispositionEnumFactory(), false);
}
}
protected void composeArtifactAssessmentContentComponent(String name, ArtifactAssessment.ArtifactAssessmentContentComponent element) throws IOException {
if (element != null) {
open(name);
composeArtifactAssessmentContentComponentProperties(element);
close();
}
}
protected void composeArtifactAssessmentContentComponentProperties(ArtifactAssessment.ArtifactAssessmentContentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInformationTypeElement()) {
composeEnumerationCore("informationType", element.getInformationTypeElement(), new ArtifactAssessment.ArtifactAssessmentInformationTypeEnumFactory(), false);
composeEnumerationExtras("informationType", element.getInformationTypeElement(), new ArtifactAssessment.ArtifactAssessmentInformationTypeEnumFactory(), false);
}
if (element.hasSummaryElement()) {
composeMarkdownCore("summary", element.getSummaryElement(), false);
composeMarkdownExtras("summary", element.getSummaryElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasPath()) {
if (anyHasValue(element.getPath())) {
openArray("path");
for (UriType e : element.getPath())
composeUriCore(null, e, e != element.getPath().get(element.getPath().size()-1));
closeArray();
}
if (anyHasExtras(element.getPath())) {
openArray("_path");
for (UriType e : element.getPath())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasFreeToShareElement()) {
composeBooleanCore("freeToShare", element.getFreeToShareElement(), false);
composeBooleanExtras("freeToShare", element.getFreeToShareElement(), false);
}
if (element.hasComponent()) {
openArray("component");
for (ArtifactAssessment.ArtifactAssessmentContentComponent e : element.getComponent())
composeArtifactAssessmentContentComponent(null, e);
closeArray();
};
}
protected void composeAuditEvent(String name, AuditEvent element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAuditEventProperties(element);
}
}
protected void composeAuditEventProperties(AuditEvent element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasActionElement()) {
composeEnumerationCore("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false);
composeEnumerationExtras("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false);
}
if (element.hasSeverityElement()) {
composeEnumerationCore("severity", element.getSeverityElement(), new AuditEvent.AuditEventSeverityEnumFactory(), false);
composeEnumerationExtras("severity", element.getSeverityElement(), new AuditEvent.AuditEventSeverityEnumFactory(), false);
}
if (element.hasOccurred()) {
composeType("occurred", element.getOccurred());
}
if (element.hasRecordedElement()) {
composeInstantCore("recorded", element.getRecordedElement(), false);
composeInstantExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasOutcome()) {
composeAuditEventOutcomeComponent("outcome", element.getOutcome());
}
if (element.hasAuthorization()) {
openArray("authorization");
for (CodeableConcept e : element.getAuthorization())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasAgent()) {
openArray("agent");
for (AuditEvent.AuditEventAgentComponent e : element.getAgent())
composeAuditEventAgentComponent(null, e);
closeArray();
};
if (element.hasSource()) {
composeAuditEventSourceComponent("source", element.getSource());
}
if (element.hasEntity()) {
openArray("entity");
for (AuditEvent.AuditEventEntityComponent e : element.getEntity())
composeAuditEventEntityComponent(null, e);
closeArray();
};
}
protected void composeAuditEventOutcomeComponent(String name, AuditEvent.AuditEventOutcomeComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventOutcomeComponentProperties(element);
close();
}
}
protected void composeAuditEventOutcomeComponentProperties(AuditEvent.AuditEventOutcomeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCoding("code", element.getCode());
}
if (element.hasDetail()) {
openArray("detail");
for (CodeableConcept e : element.getDetail())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventAgentComponentProperties(element);
close();
}
}
protected void composeAuditEventAgentComponentProperties(AuditEvent.AuditEventAgentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRole()) {
openArray("role");
for (CodeableConcept e : element.getRole())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasWho()) {
composeReference("who", element.getWho());
}
if (element.hasRequestorElement()) {
composeBooleanCore("requestor", element.getRequestorElement(), false);
composeBooleanExtras("requestor", element.getRequestorElement(), false);
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasPolicy()) {
if (anyHasValue(element.getPolicy())) {
openArray("policy");
for (UriType e : element.getPolicy())
composeUriCore(null, e, e != element.getPolicy().get(element.getPolicy().size()-1));
closeArray();
}
if (anyHasExtras(element.getPolicy())) {
openArray("_policy");
for (UriType e : element.getPolicy())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasNetwork()) {
composeType("network", element.getNetwork());
}
if (element.hasAuthorization()) {
openArray("authorization");
for (CodeableConcept e : element.getAuthorization())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventSourceComponentProperties(element);
close();
}
}
protected void composeAuditEventSourceComponentProperties(AuditEvent.AuditEventSourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSite()) {
composeReference("site", element.getSite());
}
if (element.hasObserver()) {
composeReference("observer", element.getObserver());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventEntityComponentProperties(element);
close();
}
}
protected void composeAuditEventEntityComponentProperties(AuditEvent.AuditEventEntityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasWhat()) {
composeReference("what", element.getWhat());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasSecurityLabel()) {
openArray("securityLabel");
for (CodeableConcept e : element.getSecurityLabel())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasQueryElement()) {
composeBase64BinaryCore("query", element.getQueryElement(), false);
composeBase64BinaryExtras("query", element.getQueryElement(), false);
}
if (element.hasDetail()) {
openArray("detail");
for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail())
composeAuditEventEntityDetailComponent(null, e);
closeArray();
};
if (element.hasAgent()) {
openArray("agent");
for (AuditEvent.AuditEventAgentComponent e : element.getAgent())
composeAuditEventAgentComponent(null, e);
closeArray();
};
}
protected void composeAuditEventEntityDetailComponent(String name, AuditEvent.AuditEventEntityDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventEntityDetailComponentProperties(element);
close();
}
}
protected void composeAuditEventEntityDetailComponentProperties(AuditEvent.AuditEventEntityDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeBasic(String name, Basic element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBasicProperties(element);
}
}
protected void composeBasicProperties(Basic element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
}
protected void composeBinary(String name, Binary element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBinaryProperties(element);
}
}
protected void composeBinaryProperties(Binary element) throws IOException {
composeResourceProperties(element);
if (element.hasContentTypeElement()) {
composeCodeCore("contentType", element.getContentTypeElement(), false);
composeCodeExtras("contentType", element.getContentTypeElement(), false);
}
if (element.hasSecurityContext()) {
composeReference("securityContext", element.getSecurityContext());
}
if (element.hasDataElement()) {
composeBase64BinaryCore("data", element.getDataElement(), false);
composeBase64BinaryExtras("data", element.getDataElement(), false);
}
}
protected void composeBiologicallyDerivedProduct(String name, BiologicallyDerivedProduct element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBiologicallyDerivedProductProperties(element);
}
}
protected void composeBiologicallyDerivedProductProperties(BiologicallyDerivedProduct element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasProductCategory()) {
composeCoding("productCategory", element.getProductCategory());
}
if (element.hasProductCode()) {
composeCodeableConcept("productCode", element.getProductCode());
}
if (element.hasParent()) {
openArray("parent");
for (Reference e : element.getParent())
composeReference(null, e);
closeArray();
};
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
};
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBiologicalSourceEvent()) {
composeIdentifier("biologicalSourceEvent", element.getBiologicalSourceEvent());
}
if (element.hasProcessingFacility()) {
openArray("processingFacility");
for (Reference e : element.getProcessingFacility())
composeReference(null, e);
closeArray();
};
if (element.hasDivisionElement()) {
composeStringCore("division", element.getDivisionElement(), false);
composeStringExtras("division", element.getDivisionElement(), false);
}
if (element.hasProductStatus()) {
composeCoding("productStatus", element.getProductStatus());
}
if (element.hasExpirationDateElement()) {
composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false);
composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false);
}
if (element.hasCollection()) {
composeBiologicallyDerivedProductCollectionComponent("collection", element.getCollection());
}
if (element.hasStorageTempRequirements()) {
composeRange("storageTempRequirements", element.getStorageTempRequirements());
}
if (element.hasProperty()) {
openArray("property");
for (BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent e : element.getProperty())
composeBiologicallyDerivedProductPropertyComponent(null, e);
closeArray();
};
}
protected void composeBiologicallyDerivedProductCollectionComponent(String name, BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductCollectionComponentProperties(element);
close();
}
}
protected void composeBiologicallyDerivedProductCollectionComponentProperties(BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCollector()) {
composeReference("collector", element.getCollector());
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasCollected()) {
composeType("collected", element.getCollected());
}
}
protected void composeBiologicallyDerivedProductPropertyComponent(String name, BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductPropertyComponentProperties(element);
close();
}
}
protected void composeBiologicallyDerivedProductPropertyComponentProperties(BiologicallyDerivedProduct.BiologicallyDerivedProductPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeBiologicallyDerivedProductDispense(String name, BiologicallyDerivedProductDispense element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBiologicallyDerivedProductDispenseProperties(element);
}
}
protected void composeBiologicallyDerivedProductDispenseProperties(BiologicallyDerivedProductDispense element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispenseCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispenseCodesEnumFactory(), false);
}
if (element.hasOriginRelationshipType()) {
composeCodeableConcept("originRelationshipType", element.getOriginRelationshipType());
}
if (element.hasProduct()) {
composeReference("product", element.getProduct());
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasMatchStatus()) {
composeCodeableConcept("matchStatus", element.getMatchStatus());
}
if (element.hasPerformer()) {
openArray("performer");
for (BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent e : element.getPerformer())
composeBiologicallyDerivedProductDispensePerformerComponent(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasPreparedDateElement()) {
composeDateTimeCore("preparedDate", element.getPreparedDateElement(), false);
composeDateTimeExtras("preparedDate", element.getPreparedDateElement(), false);
}
if (element.hasWhenHandedOverElement()) {
composeDateTimeCore("whenHandedOver", element.getWhenHandedOverElement(), false);
composeDateTimeExtras("whenHandedOver", element.getWhenHandedOverElement(), false);
}
if (element.hasDestination()) {
composeReference("destination", element.getDestination());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasUsageInstructionElement()) {
composeStringCore("usageInstruction", element.getUsageInstructionElement(), false);
composeStringExtras("usageInstruction", element.getUsageInstructionElement(), false);
}
}
protected void composeBiologicallyDerivedProductDispensePerformerComponent(String name, BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductDispensePerformerComponentProperties(element);
close();
}
}
protected void composeBiologicallyDerivedProductDispensePerformerComponentProperties(BiologicallyDerivedProductDispense.BiologicallyDerivedProductDispensePerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeBodyStructure(String name, BodyStructure element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBodyStructureProperties(element);
}
}
protected void composeBodyStructureProperties(BodyStructure element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasMorphology()) {
composeCodeableConcept("morphology", element.getMorphology());
}
if (element.hasIncludedStructure()) {
openArray("includedStructure");
for (BodyStructure.BodyStructureIncludedStructureComponent e : element.getIncludedStructure())
composeBodyStructureIncludedStructureComponent(null, e);
closeArray();
};
if (element.hasExcludedStructure()) {
openArray("excludedStructure");
for (BodyStructure.BodyStructureIncludedStructureComponent e : element.getExcludedStructure())
composeBodyStructureIncludedStructureComponent(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasImage()) {
openArray("image");
for (Attachment e : element.getImage())
composeAttachment(null, e);
closeArray();
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
}
protected void composeBodyStructureIncludedStructureComponent(String name, BodyStructure.BodyStructureIncludedStructureComponent element) throws IOException {
if (element != null) {
open(name);
composeBodyStructureIncludedStructureComponentProperties(element);
close();
}
}
protected void composeBodyStructureIncludedStructureComponentProperties(BodyStructure.BodyStructureIncludedStructureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStructure()) {
composeCodeableConcept("structure", element.getStructure());
}
if (element.hasLaterality()) {
composeCodeableConcept("laterality", element.getLaterality());
}
if (element.hasBodyLandmarkOrientation()) {
openArray("bodyLandmarkOrientation");
for (BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent e : element.getBodyLandmarkOrientation())
composeBodyStructureIncludedStructureBodyLandmarkOrientationComponent(null, e);
closeArray();
};
if (element.hasSpatialReference()) {
openArray("spatialReference");
for (Reference e : element.getSpatialReference())
composeReference(null, e);
closeArray();
};
if (element.hasQualifier()) {
openArray("qualifier");
for (CodeableConcept e : element.getQualifier())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeBodyStructureIncludedStructureBodyLandmarkOrientationComponent(String name, BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent element) throws IOException {
if (element != null) {
open(name);
composeBodyStructureIncludedStructureBodyLandmarkOrientationComponentProperties(element);
close();
}
}
protected void composeBodyStructureIncludedStructureBodyLandmarkOrientationComponentProperties(BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLandmarkDescription()) {
openArray("landmarkDescription");
for (CodeableConcept e : element.getLandmarkDescription())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasClockFacePosition()) {
openArray("clockFacePosition");
for (CodeableConcept e : element.getClockFacePosition())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDistanceFromLandmark()) {
openArray("distanceFromLandmark");
for (BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent e : element.getDistanceFromLandmark())
composeBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent(null, e);
closeArray();
};
if (element.hasSurfaceOrientation()) {
openArray("surfaceOrientation");
for (CodeableConcept e : element.getSurfaceOrientation())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent(String name, BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent element) throws IOException {
if (element != null) {
open(name);
composeBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponentProperties(element);
close();
}
}
protected void composeBodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponentProperties(BodyStructure.BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDevice()) {
openArray("device");
for (CodeableReference e : element.getDevice())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasValue()) {
openArray("value");
for (Quantity e : element.getValue())
composeQuantity(null, e);
closeArray();
};
}
protected void composeBundle(String name, Bundle element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBundleProperties(element);
}
}
protected void composeBundleProperties(Bundle element) throws IOException {
composeResourceProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory(), false);
}
if (element.hasTimestampElement()) {
composeInstantCore("timestamp", element.getTimestampElement(), false);
composeInstantExtras("timestamp", element.getTimestampElement(), false);
}
if (element.hasTotalElement()) {
composeUnsignedIntCore("total", element.getTotalElement(), false);
composeUnsignedIntExtras("total", element.getTotalElement(), false);
}
if (element.hasLink()) {
openArray("link");
for (Bundle.BundleLinkComponent e : element.getLink())
composeBundleLinkComponent(null, e);
closeArray();
};
if (element.hasEntry()) {
openArray("entry");
for (Bundle.BundleEntryComponent e : element.getEntry())
composeBundleEntryComponent(null, e);
closeArray();
};
if (element.hasSignature()) {
composeSignature("signature", element.getSignature());
}
if (element.hasIssues()) {
open("issues");
composeResource(element.getIssues());
close();
}
}
protected void composeBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeBundleLinkComponentProperties(element);
close();
}
}
protected void composeBundleLinkComponentProperties(Bundle.BundleLinkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRelationElement()) {
composeEnumerationCore("relation", element.getRelationElement(), new Bundle.LinkRelationTypesEnumFactory(), false);
composeEnumerationExtras("relation", element.getRelationElement(), new Bundle.LinkRelationTypesEnumFactory(), false);
}
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
}
protected void composeBundleEntryComponent(String name, Bundle.BundleEntryComponent element) throws IOException {
if (element != null) {
open(name);
composeBundleEntryComponentProperties(element);
close();
}
}
protected void composeBundleEntryComponentProperties(Bundle.BundleEntryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLink()) {
openArray("link");
for (Bundle.BundleLinkComponent e : element.getLink())
composeBundleLinkComponent(null, e);
closeArray();
};
if (element.hasFullUrlElement()) {
composeUriCore("fullUrl", element.getFullUrlElement(), false);
composeUriExtras("fullUrl", element.getFullUrlElement(), false);
}
if (element.hasResource()) {
open("resource");
composeResource(element.getResource());
close();
}
if (element.hasSearch()) {
composeBundleEntrySearchComponent("search", element.getSearch());
}
if (element.hasRequest()) {
composeBundleEntryRequestComponent("request", element.getRequest());
}
if (element.hasResponse()) {
composeBundleEntryResponseComponent("response", element.getResponse());
}
}
protected void composeBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element) throws IOException {
if (element != null) {
open(name);
composeBundleEntrySearchComponentProperties(element);
close();
}
}
protected void composeBundleEntrySearchComponentProperties(Bundle.BundleEntrySearchComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory(), false);
}
if (element.hasScoreElement()) {
composeDecimalCore("score", element.getScoreElement(), false);
composeDecimalExtras("score", element.getScoreElement(), false);
}
}
protected void composeBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element) throws IOException {
if (element != null) {
open(name);
composeBundleEntryRequestComponentProperties(element);
close();
}
}
protected void composeBundleEntryRequestComponentProperties(Bundle.BundleEntryRequestComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMethodElement()) {
composeEnumerationCore("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory(), false);
composeEnumerationExtras("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory(), false);
}
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIfNoneMatchElement()) {
composeStringCore("ifNoneMatch", element.getIfNoneMatchElement(), false);
composeStringExtras("ifNoneMatch", element.getIfNoneMatchElement(), false);
}
if (element.hasIfModifiedSinceElement()) {
composeInstantCore("ifModifiedSince", element.getIfModifiedSinceElement(), false);
composeInstantExtras("ifModifiedSince", element.getIfModifiedSinceElement(), false);
}
if (element.hasIfMatchElement()) {
composeStringCore("ifMatch", element.getIfMatchElement(), false);
composeStringExtras("ifMatch", element.getIfMatchElement(), false);
}
if (element.hasIfNoneExistElement()) {
composeStringCore("ifNoneExist", element.getIfNoneExistElement(), false);
composeStringExtras("ifNoneExist", element.getIfNoneExistElement(), false);
}
}
protected void composeBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element) throws IOException {
if (element != null) {
open(name);
composeBundleEntryResponseComponentProperties(element);
close();
}
}
protected void composeBundleEntryResponseComponentProperties(Bundle.BundleEntryResponseComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStatusElement()) {
composeStringCore("status", element.getStatusElement(), false);
composeStringExtras("status", element.getStatusElement(), false);
}
if (element.hasLocationElement()) {
composeUriCore("location", element.getLocationElement(), false);
composeUriExtras("location", element.getLocationElement(), false);
}
if (element.hasEtagElement()) {
composeStringCore("etag", element.getEtagElement(), false);
composeStringExtras("etag", element.getEtagElement(), false);
}
if (element.hasLastModifiedElement()) {
composeInstantCore("lastModified", element.getLastModifiedElement(), false);
composeInstantExtras("lastModified", element.getLastModifiedElement(), false);
}
if (element.hasOutcome()) {
open("outcome");
composeResource(element.getOutcome());
close();
}
}
protected void composeCapabilityStatement(String name, CapabilityStatement element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCapabilityStatementProperties(element);
}
}
protected void composeCapabilityStatementProperties(CapabilityStatement element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new Enumerations.CapabilityStatementKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new Enumerations.CapabilityStatementKindEnumFactory(), false);
}
if (element.hasInstantiates()) {
if (anyHasValue(element.getInstantiates())) {
openArray("instantiates");
for (CanonicalType e : element.getInstantiates())
composeCanonicalCore(null, e, e != element.getInstantiates().get(element.getInstantiates().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiates())) {
openArray("_instantiates");
for (CanonicalType e : element.getInstantiates())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasImports()) {
if (anyHasValue(element.getImports())) {
openArray("imports");
for (CanonicalType e : element.getImports())
composeCanonicalCore(null, e, e != element.getImports().get(element.getImports().size()-1));
closeArray();
}
if (anyHasExtras(element.getImports())) {
openArray("_imports");
for (CanonicalType e : element.getImports())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasSoftware()) {
composeCapabilityStatementSoftwareComponent("software", element.getSoftware());
}
if (element.hasImplementation()) {
composeCapabilityStatementImplementationComponent("implementation", element.getImplementation());
}
if (element.hasFhirVersionElement()) {
composeEnumerationCore("fhirVersion", element.getFhirVersionElement(), new Enumerations.FHIRVersionEnumFactory(), false);
composeEnumerationExtras("fhirVersion", element.getFhirVersionElement(), new Enumerations.FHIRVersionEnumFactory(), false);
}
if (element.hasFormat()) {
if (anyHasValue(element.getFormat())) {
openArray("format");
for (CodeType e : element.getFormat())
composeCodeCore(null, e, e != element.getFormat().get(element.getFormat().size()-1));
closeArray();
}
if (anyHasExtras(element.getFormat())) {
openArray("_format");
for (CodeType e : element.getFormat())
composeCodeExtras(null, e, true);
closeArray();
}
};
if (element.hasPatchFormat()) {
if (anyHasValue(element.getPatchFormat())) {
openArray("patchFormat");
for (CodeType e : element.getPatchFormat())
composeCodeCore(null, e, e != element.getPatchFormat().get(element.getPatchFormat().size()-1));
closeArray();
}
if (anyHasExtras(element.getPatchFormat())) {
openArray("_patchFormat");
for (CodeType e : element.getPatchFormat())
composeCodeExtras(null, e, true);
closeArray();
}
};
if (element.hasAcceptLanguage()) {
if (anyHasValue(element.getAcceptLanguage())) {
openArray("acceptLanguage");
for (CodeType e : element.getAcceptLanguage())
composeCodeCore(null, e, e != element.getAcceptLanguage().get(element.getAcceptLanguage().size()-1));
closeArray();
}
if (anyHasExtras(element.getAcceptLanguage())) {
openArray("_acceptLanguage");
for (CodeType e : element.getAcceptLanguage())
composeCodeExtras(null, e, true);
closeArray();
}
};
if (element.hasImplementationGuide()) {
if (anyHasValue(element.getImplementationGuide())) {
openArray("implementationGuide");
for (CanonicalType e : element.getImplementationGuide())
composeCanonicalCore(null, e, e != element.getImplementationGuide().get(element.getImplementationGuide().size()-1));
closeArray();
}
if (anyHasExtras(element.getImplementationGuide())) {
openArray("_implementationGuide");
for (CanonicalType e : element.getImplementationGuide())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasRest()) {
openArray("rest");
for (CapabilityStatement.CapabilityStatementRestComponent e : element.getRest())
composeCapabilityStatementRestComponent(null, e);
closeArray();
};
if (element.hasMessaging()) {
openArray("messaging");
for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging())
composeCapabilityStatementMessagingComponent(null, e);
closeArray();
};
if (element.hasDocument()) {
openArray("document");
for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument())
composeCapabilityStatementDocumentComponent(null, e);
closeArray();
};
}
protected void composeCapabilityStatementSoftwareComponent(String name, CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementSoftwareComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementSoftwareComponentProperties(CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasReleaseDateElement()) {
composeDateTimeCore("releaseDate", element.getReleaseDateElement(), false);
composeDateTimeExtras("releaseDate", element.getReleaseDateElement(), false);
}
}
protected void composeCapabilityStatementImplementationComponent(String name, CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementImplementationComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementImplementationComponentProperties(CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
}
protected void composeCapabilityStatementRestComponent(String name, CapabilityStatement.CapabilityStatementRestComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementRestComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementRestComponentProperties(CapabilityStatement.CapabilityStatementRestComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasSecurity()) {
composeCapabilityStatementRestSecurityComponent("security", element.getSecurity());
}
if (element.hasResource()) {
openArray("resource");
for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource())
composeCapabilityStatementRestResourceComponent(null, e);
closeArray();
};
if (element.hasInteraction()) {
openArray("interaction");
for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction())
composeSystemInteractionComponent(null, e);
closeArray();
};
if (element.hasSearchParam()) {
openArray("searchParam");
for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam())
composeCapabilityStatementRestResourceSearchParamComponent(null, e);
closeArray();
};
if (element.hasOperation()) {
openArray("operation");
for (CapabilityStatement.CapabilityStatementRestResourceOperationComponent e : element.getOperation())
composeCapabilityStatementRestResourceOperationComponent(null, e);
closeArray();
};
if (element.hasCompartment()) {
if (anyHasValue(element.getCompartment())) {
openArray("compartment");
for (CanonicalType e : element.getCompartment())
composeCanonicalCore(null, e, e != element.getCompartment().get(element.getCompartment().size()-1));
closeArray();
}
if (anyHasExtras(element.getCompartment())) {
openArray("_compartment");
for (CanonicalType e : element.getCompartment())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
}
protected void composeCapabilityStatementRestSecurityComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementRestSecurityComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementRestSecurityComponentProperties(CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCorsElement()) {
composeBooleanCore("cors", element.getCorsElement(), false);
composeBooleanExtras("cors", element.getCorsElement(), false);
}
if (element.hasService()) {
openArray("service");
for (CodeableConcept e : element.getService())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeCapabilityStatementRestResourceComponent(String name, CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementRestResourceComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementRestResourceComponentProperties(CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeCodeCore("type", element.getTypeElement(), false);
composeCodeExtras("type", element.getTypeElement(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
if (element.hasSupportedProfile()) {
if (anyHasValue(element.getSupportedProfile())) {
openArray("supportedProfile");
for (CanonicalType e : element.getSupportedProfile())
composeCanonicalCore(null, e, e != element.getSupportedProfile().get(element.getSupportedProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getSupportedProfile())) {
openArray("_supportedProfile");
for (CanonicalType e : element.getSupportedProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasInteraction()) {
openArray("interaction");
for (CapabilityStatement.ResourceInteractionComponent e : element.getInteraction())
composeResourceInteractionComponent(null, e);
closeArray();
};
if (element.hasVersioningElement()) {
composeEnumerationCore("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory(), false);
composeEnumerationExtras("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory(), false);
}
if (element.hasReadHistoryElement()) {
composeBooleanCore("readHistory", element.getReadHistoryElement(), false);
composeBooleanExtras("readHistory", element.getReadHistoryElement(), false);
}
if (element.hasUpdateCreateElement()) {
composeBooleanCore("updateCreate", element.getUpdateCreateElement(), false);
composeBooleanExtras("updateCreate", element.getUpdateCreateElement(), false);
}
if (element.hasConditionalCreateElement()) {
composeBooleanCore("conditionalCreate", element.getConditionalCreateElement(), false);
composeBooleanExtras("conditionalCreate", element.getConditionalCreateElement(), false);
}
if (element.hasConditionalReadElement()) {
composeEnumerationCore("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory(), false);
composeEnumerationExtras("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory(), false);
}
if (element.hasConditionalUpdateElement()) {
composeBooleanCore("conditionalUpdate", element.getConditionalUpdateElement(), false);
composeBooleanExtras("conditionalUpdate", element.getConditionalUpdateElement(), false);
}
if (element.hasConditionalPatchElement()) {
composeBooleanCore("conditionalPatch", element.getConditionalPatchElement(), false);
composeBooleanExtras("conditionalPatch", element.getConditionalPatchElement(), false);
}
if (element.hasConditionalDeleteElement()) {
composeEnumerationCore("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory(), false);
composeEnumerationExtras("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory(), false);
}
if (element.hasReferencePolicy()) {
openArray("referencePolicy");
for (Enumeration e : element.getReferencePolicy())
composeEnumerationCore(null, e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getReferencePolicy())) {
openArray("_referencePolicy");
for (Enumeration e : element.getReferencePolicy())
composeEnumerationExtras(null, e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), true);
closeArray();
}
};
if (element.hasSearchInclude()) {
if (anyHasValue(element.getSearchInclude())) {
openArray("searchInclude");
for (StringType e : element.getSearchInclude())
composeStringCore(null, e, e != element.getSearchInclude().get(element.getSearchInclude().size()-1));
closeArray();
}
if (anyHasExtras(element.getSearchInclude())) {
openArray("_searchInclude");
for (StringType e : element.getSearchInclude())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSearchRevInclude()) {
if (anyHasValue(element.getSearchRevInclude())) {
openArray("searchRevInclude");
for (StringType e : element.getSearchRevInclude())
composeStringCore(null, e, e != element.getSearchRevInclude().get(element.getSearchRevInclude().size()-1));
closeArray();
}
if (anyHasExtras(element.getSearchRevInclude())) {
openArray("_searchRevInclude");
for (StringType e : element.getSearchRevInclude())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSearchParam()) {
openArray("searchParam");
for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam())
composeCapabilityStatementRestResourceSearchParamComponent(null, e);
closeArray();
};
if (element.hasOperation()) {
openArray("operation");
for (CapabilityStatement.CapabilityStatementRestResourceOperationComponent e : element.getOperation())
composeCapabilityStatementRestResourceOperationComponent(null, e);
closeArray();
};
}
protected void composeResourceInteractionComponent(String name, CapabilityStatement.ResourceInteractionComponent element) throws IOException {
if (element != null) {
open(name);
composeResourceInteractionComponentProperties(element);
close();
}
}
protected void composeResourceInteractionComponentProperties(CapabilityStatement.ResourceInteractionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeCapabilityStatementRestResourceSearchParamComponent(String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementRestResourceSearchParamComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementRestResourceSearchParamComponentProperties(CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDefinitionElement()) {
composeCanonicalCore("definition", element.getDefinitionElement(), false);
composeCanonicalExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeCapabilityStatementRestResourceOperationComponent(String name, CapabilityStatement.CapabilityStatementRestResourceOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementRestResourceOperationComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementRestResourceOperationComponentProperties(CapabilityStatement.CapabilityStatementRestResourceOperationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDefinitionElement()) {
composeCanonicalCore("definition", element.getDefinitionElement(), false);
composeCanonicalExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeSystemInteractionComponent(String name, CapabilityStatement.SystemInteractionComponent element) throws IOException {
if (element != null) {
open(name);
composeSystemInteractionComponentProperties(element);
close();
}
}
protected void composeSystemInteractionComponentProperties(CapabilityStatement.SystemInteractionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeCapabilityStatementMessagingComponent(String name, CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementMessagingComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementMessagingComponentProperties(CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEndpoint()) {
openArray("endpoint");
for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint())
composeCapabilityStatementMessagingEndpointComponent(null, e);
closeArray();
};
if (element.hasReliableCacheElement()) {
composeUnsignedIntCore("reliableCache", element.getReliableCacheElement(), false);
composeUnsignedIntExtras("reliableCache", element.getReliableCacheElement(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasSupportedMessage()) {
openArray("supportedMessage");
for (CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent e : element.getSupportedMessage())
composeCapabilityStatementMessagingSupportedMessageComponent(null, e);
closeArray();
};
}
protected void composeCapabilityStatementMessagingEndpointComponent(String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementMessagingEndpointComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementMessagingEndpointComponentProperties(CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasProtocol()) {
composeCoding("protocol", element.getProtocol());
}
if (element.hasAddressElement()) {
composeUrlCore("address", element.getAddressElement(), false);
composeUrlExtras("address", element.getAddressElement(), false);
}
}
protected void composeCapabilityStatementMessagingSupportedMessageComponent(String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementMessagingSupportedMessageComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementMessagingSupportedMessageComponentProperties(CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false);
}
if (element.hasDefinitionElement()) {
composeCanonicalCore("definition", element.getDefinitionElement(), false);
composeCanonicalExtras("definition", element.getDefinitionElement(), false);
}
}
protected void composeCapabilityStatementDocumentComponent(String name, CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementDocumentComponentProperties(element);
close();
}
}
protected void composeCapabilityStatementDocumentComponentProperties(CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
}
protected void composeCarePlan(String name, CarePlan element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCarePlanProperties(element);
}
}
protected void composeCarePlanProperties(CarePlan element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasReplaces()) {
openArray("replaces");
for (Reference e : element.getReplaces())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
if (element.hasContributor()) {
openArray("contributor");
for (Reference e : element.getContributor())
composeReference(null, e);
closeArray();
};
if (element.hasCareTeam()) {
openArray("careTeam");
for (Reference e : element.getCareTeam())
composeReference(null, e);
closeArray();
};
if (element.hasAddresses()) {
openArray("addresses");
for (CodeableReference e : element.getAddresses())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Reference e : element.getSupportingInfo())
composeReference(null, e);
closeArray();
};
if (element.hasGoal()) {
openArray("goal");
for (Reference e : element.getGoal())
composeReference(null, e);
closeArray();
};
if (element.hasActivity()) {
openArray("activity");
for (CarePlan.CarePlanActivityComponent e : element.getActivity())
composeCarePlanActivityComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element) throws IOException {
if (element != null) {
open(name);
composeCarePlanActivityComponentProperties(element);
close();
}
}
protected void composeCarePlanActivityComponentProperties(CarePlan.CarePlanActivityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPerformedActivity()) {
openArray("performedActivity");
for (CodeableReference e : element.getPerformedActivity())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasProgress()) {
openArray("progress");
for (Annotation e : element.getProgress())
composeAnnotation(null, e);
closeArray();
};
if (element.hasPlannedActivityReference()) {
composeReference("plannedActivityReference", element.getPlannedActivityReference());
}
}
protected void composeCareTeam(String name, CareTeam element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCareTeamProperties(element);
}
}
protected void composeCareTeamProperties(CareTeam element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasParticipant()) {
openArray("participant");
for (CareTeam.CareTeamParticipantComponent e : element.getParticipant())
composeCareTeamParticipantComponent(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasManagingOrganization()) {
openArray("managingOrganization");
for (Reference e : element.getManagingOrganization())
composeReference(null, e);
closeArray();
};
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeCareTeamParticipantComponentProperties(element);
close();
}
}
protected void composeCareTeamParticipantComponentProperties(CareTeam.CareTeamParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasMember()) {
composeReference("member", element.getMember());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
if (element.hasCoverage()) {
composeType("coverage", element.getCoverage());
}
}
protected void composeChargeItem(String name, ChargeItem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeChargeItemProperties(element);
}
}
protected void composeChargeItemProperties(ChargeItem element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasDefinitionUri()) {
if (anyHasValue(element.getDefinitionUri())) {
openArray("definitionUri");
for (UriType e : element.getDefinitionUri())
composeUriCore(null, e, e != element.getDefinitionUri().get(element.getDefinitionUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getDefinitionUri())) {
openArray("_definitionUri");
for (UriType e : element.getDefinitionUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasDefinitionCanonical()) {
if (anyHasValue(element.getDefinitionCanonical())) {
openArray("definitionCanonical");
for (CanonicalType e : element.getDefinitionCanonical())
composeCanonicalCore(null, e, e != element.getDefinitionCanonical().get(element.getDefinitionCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getDefinitionCanonical())) {
openArray("_definitionCanonical");
for (CanonicalType e : element.getDefinitionCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory(), false);
}
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasPerformer()) {
openArray("performer");
for (ChargeItem.ChargeItemPerformerComponent e : element.getPerformer())
composeChargeItemPerformerComponent(null, e);
closeArray();
};
if (element.hasPerformingOrganization()) {
composeReference("performingOrganization", element.getPerformingOrganization());
}
if (element.hasRequestingOrganization()) {
composeReference("requestingOrganization", element.getRequestingOrganization());
}
if (element.hasCostCenter()) {
composeReference("costCenter", element.getCostCenter());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasBodysite()) {
openArray("bodysite");
for (CodeableConcept e : element.getBodysite())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasUnitPriceComponent()) {
composeMonetaryComponent("unitPriceComponent", element.getUnitPriceComponent());
}
if (element.hasTotalPriceComponent()) {
composeMonetaryComponent("totalPriceComponent", element.getTotalPriceComponent());
}
if (element.hasOverrideReason()) {
composeCodeableConcept("overrideReason", element.getOverrideReason());
}
if (element.hasEnterer()) {
composeReference("enterer", element.getEnterer());
}
if (element.hasEnteredDateElement()) {
composeDateTimeCore("enteredDate", element.getEnteredDateElement(), false);
composeDateTimeExtras("enteredDate", element.getEnteredDateElement(), false);
}
if (element.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasService()) {
openArray("service");
for (CodeableReference e : element.getService())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasProduct()) {
openArray("product");
for (CodeableReference e : element.getProduct())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasAccount()) {
openArray("account");
for (Reference e : element.getAccount())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
}
protected void composeChargeItemPerformerComponent(String name, ChargeItem.ChargeItemPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemPerformerComponentProperties(element);
close();
}
}
protected void composeChargeItemPerformerComponentProperties(ChargeItem.ChargeItemPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeChargeItemDefinition(String name, ChargeItemDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeChargeItemDefinitionProperties(element);
}
}
protected void composeChargeItemDefinitionProperties(ChargeItemDefinition element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDerivedFromUri()) {
if (anyHasValue(element.getDerivedFromUri())) {
openArray("derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriCore(null, e, e != element.getDerivedFromUri().get(element.getDerivedFromUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFromUri())) {
openArray("_derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasPartOf()) {
if (anyHasValue(element.getPartOf())) {
openArray("partOf");
for (CanonicalType e : element.getPartOf())
composeCanonicalCore(null, e, e != element.getPartOf().get(element.getPartOf().size()-1));
closeArray();
}
if (anyHasExtras(element.getPartOf())) {
openArray("_partOf");
for (CanonicalType e : element.getPartOf())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasReplaces()) {
if (anyHasValue(element.getReplaces())) {
openArray("replaces");
for (CanonicalType e : element.getReplaces())
composeCanonicalCore(null, e, e != element.getReplaces().get(element.getReplaces().size()-1));
closeArray();
}
if (anyHasExtras(element.getReplaces())) {
openArray("_replaces");
for (CanonicalType e : element.getReplaces())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasInstance()) {
openArray("instance");
for (Reference e : element.getInstance())
composeReference(null, e);
closeArray();
};
if (element.hasApplicability()) {
openArray("applicability");
for (ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent e : element.getApplicability())
composeChargeItemDefinitionApplicabilityComponent(null, e);
closeArray();
};
if (element.hasPropertyGroup()) {
openArray("propertyGroup");
for (ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent e : element.getPropertyGroup())
composeChargeItemDefinitionPropertyGroupComponent(null, e);
closeArray();
};
}
protected void composeChargeItemDefinitionApplicabilityComponent(String name, ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemDefinitionApplicabilityComponentProperties(element);
close();
}
}
protected void composeChargeItemDefinitionApplicabilityComponentProperties(ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCondition()) {
composeExpression("condition", element.getCondition());
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasRelatedArtifact()) {
composeRelatedArtifact("relatedArtifact", element.getRelatedArtifact());
}
}
protected void composeChargeItemDefinitionPropertyGroupComponent(String name, ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemDefinitionPropertyGroupComponentProperties(element);
close();
}
}
protected void composeChargeItemDefinitionPropertyGroupComponentProperties(ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasApplicability()) {
openArray("applicability");
for (ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent e : element.getApplicability())
composeChargeItemDefinitionApplicabilityComponent(null, e);
closeArray();
};
if (element.hasPriceComponent()) {
openArray("priceComponent");
for (MonetaryComponent e : element.getPriceComponent())
composeMonetaryComponent(null, e);
closeArray();
};
}
protected void composeCitation(String name, Citation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCitationProperties(element);
}
}
protected void composeCitationProperties(Citation element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasSummary()) {
openArray("summary");
for (Citation.CitationSummaryComponent e : element.getSummary())
composeCitationSummaryComponent(null, e);
closeArray();
};
if (element.hasClassification()) {
openArray("classification");
for (Citation.CitationClassificationComponent e : element.getClassification())
composeCitationClassificationComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasCurrentState()) {
openArray("currentState");
for (CodeableConcept e : element.getCurrentState())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasStatusDate()) {
openArray("statusDate");
for (Citation.CitationStatusDateComponent e : element.getStatusDate())
composeCitationStatusDateComponent(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasCitedArtifact()) {
composeCitationCitedArtifactComponent("citedArtifact", element.getCitedArtifact());
}
}
protected void composeCitationSummaryComponent(String name, Citation.CitationSummaryComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationSummaryComponentProperties(element);
close();
}
}
protected void composeCitationSummaryComponentProperties(Citation.CitationSummaryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStyle()) {
composeCodeableConcept("style", element.getStyle());
}
if (element.hasTextElement()) {
composeMarkdownCore("text", element.getTextElement(), false);
composeMarkdownExtras("text", element.getTextElement(), false);
}
}
protected void composeCitationClassificationComponent(String name, Citation.CitationClassificationComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationClassificationComponentProperties(element);
close();
}
}
protected void composeCitationClassificationComponentProperties(Citation.CitationClassificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeCitationStatusDateComponent(String name, Citation.CitationStatusDateComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationStatusDateComponentProperties(element);
close();
}
}
protected void composeCitationStatusDateComponentProperties(Citation.CitationStatusDateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasActivity()) {
composeCodeableConcept("activity", element.getActivity());
}
if (element.hasActualElement()) {
composeBooleanCore("actual", element.getActualElement(), false);
composeBooleanExtras("actual", element.getActualElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeCitationCitedArtifactComponent(String name, Citation.CitationCitedArtifactComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactComponentProperties(Citation.CitationCitedArtifactComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRelatedIdentifier()) {
openArray("relatedIdentifier");
for (Identifier e : element.getRelatedIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasDateAccessedElement()) {
composeDateTimeCore("dateAccessed", element.getDateAccessedElement(), false);
composeDateTimeExtras("dateAccessed", element.getDateAccessedElement(), false);
}
if (element.hasVersion()) {
composeCitationCitedArtifactVersionComponent("version", element.getVersion());
}
if (element.hasCurrentState()) {
openArray("currentState");
for (CodeableConcept e : element.getCurrentState())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasStatusDate()) {
openArray("statusDate");
for (Citation.CitationCitedArtifactStatusDateComponent e : element.getStatusDate())
composeCitationCitedArtifactStatusDateComponent(null, e);
closeArray();
};
if (element.hasTitle()) {
openArray("title");
for (Citation.CitationCitedArtifactTitleComponent e : element.getTitle())
composeCitationCitedArtifactTitleComponent(null, e);
closeArray();
};
if (element.hasAbstract()) {
openArray("abstract");
for (Citation.CitationCitedArtifactAbstractComponent e : element.getAbstract())
composeCitationCitedArtifactAbstractComponent(null, e);
closeArray();
};
if (element.hasPart()) {
composeCitationCitedArtifactPartComponent("part", element.getPart());
}
if (element.hasRelatesTo()) {
openArray("relatesTo");
for (Citation.CitationCitedArtifactRelatesToComponent e : element.getRelatesTo())
composeCitationCitedArtifactRelatesToComponent(null, e);
closeArray();
};
if (element.hasPublicationForm()) {
openArray("publicationForm");
for (Citation.CitationCitedArtifactPublicationFormComponent e : element.getPublicationForm())
composeCitationCitedArtifactPublicationFormComponent(null, e);
closeArray();
};
if (element.hasWebLocation()) {
openArray("webLocation");
for (Citation.CitationCitedArtifactWebLocationComponent e : element.getWebLocation())
composeCitationCitedArtifactWebLocationComponent(null, e);
closeArray();
};
if (element.hasClassification()) {
openArray("classification");
for (Citation.CitationCitedArtifactClassificationComponent e : element.getClassification())
composeCitationCitedArtifactClassificationComponent(null, e);
closeArray();
};
if (element.hasContributorship()) {
composeCitationCitedArtifactContributorshipComponent("contributorship", element.getContributorship());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeCitationCitedArtifactVersionComponent(String name, Citation.CitationCitedArtifactVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactVersionComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactVersionComponentProperties(Citation.CitationCitedArtifactVersionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasBaseCitation()) {
composeReference("baseCitation", element.getBaseCitation());
}
}
protected void composeCitationCitedArtifactStatusDateComponent(String name, Citation.CitationCitedArtifactStatusDateComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactStatusDateComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactStatusDateComponentProperties(Citation.CitationCitedArtifactStatusDateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasActivity()) {
composeCodeableConcept("activity", element.getActivity());
}
if (element.hasActualElement()) {
composeBooleanCore("actual", element.getActualElement(), false);
composeBooleanExtras("actual", element.getActualElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeCitationCitedArtifactTitleComponent(String name, Citation.CitationCitedArtifactTitleComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactTitleComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactTitleComponentProperties(Citation.CitationCitedArtifactTitleComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasTextElement()) {
composeMarkdownCore("text", element.getTextElement(), false);
composeMarkdownExtras("text", element.getTextElement(), false);
}
}
protected void composeCitationCitedArtifactAbstractComponent(String name, Citation.CitationCitedArtifactAbstractComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactAbstractComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactAbstractComponentProperties(Citation.CitationCitedArtifactAbstractComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasTextElement()) {
composeMarkdownCore("text", element.getTextElement(), false);
composeMarkdownExtras("text", element.getTextElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
}
protected void composeCitationCitedArtifactPartComponent(String name, Citation.CitationCitedArtifactPartComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactPartComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactPartComponentProperties(Citation.CitationCitedArtifactPartComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasBaseCitation()) {
composeReference("baseCitation", element.getBaseCitation());
}
}
protected void composeCitationCitedArtifactRelatesToComponent(String name, Citation.CitationCitedArtifactRelatesToComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactRelatesToComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactRelatesToComponentProperties(Citation.CitationCitedArtifactRelatesToComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Citation.RelatedArtifactTypeExpandedEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Citation.RelatedArtifactTypeExpandedEnumFactory(), false);
}
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasCitationElement()) {
composeMarkdownCore("citation", element.getCitationElement(), false);
composeMarkdownExtras("citation", element.getCitationElement(), false);
}
if (element.hasDocument()) {
composeAttachment("document", element.getDocument());
}
if (element.hasResourceElement()) {
composeCanonicalCore("resource", element.getResourceElement(), false);
composeCanonicalExtras("resource", element.getResourceElement(), false);
}
if (element.hasResourceReference()) {
composeReference("resourceReference", element.getResourceReference());
}
}
protected void composeCitationCitedArtifactPublicationFormComponent(String name, Citation.CitationCitedArtifactPublicationFormComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactPublicationFormComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactPublicationFormComponentProperties(Citation.CitationCitedArtifactPublicationFormComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPublishedIn()) {
composeCitationCitedArtifactPublicationFormPublishedInComponent("publishedIn", element.getPublishedIn());
}
if (element.hasCitedMedium()) {
composeCodeableConcept("citedMedium", element.getCitedMedium());
}
if (element.hasVolumeElement()) {
composeStringCore("volume", element.getVolumeElement(), false);
composeStringExtras("volume", element.getVolumeElement(), false);
}
if (element.hasIssueElement()) {
composeStringCore("issue", element.getIssueElement(), false);
composeStringExtras("issue", element.getIssueElement(), false);
}
if (element.hasArticleDateElement()) {
composeDateTimeCore("articleDate", element.getArticleDateElement(), false);
composeDateTimeExtras("articleDate", element.getArticleDateElement(), false);
}
if (element.hasPublicationDateTextElement()) {
composeStringCore("publicationDateText", element.getPublicationDateTextElement(), false);
composeStringExtras("publicationDateText", element.getPublicationDateTextElement(), false);
}
if (element.hasPublicationDateSeasonElement()) {
composeStringCore("publicationDateSeason", element.getPublicationDateSeasonElement(), false);
composeStringExtras("publicationDateSeason", element.getPublicationDateSeasonElement(), false);
}
if (element.hasLastRevisionDateElement()) {
composeDateTimeCore("lastRevisionDate", element.getLastRevisionDateElement(), false);
composeDateTimeExtras("lastRevisionDate", element.getLastRevisionDateElement(), false);
}
if (element.hasLanguage()) {
openArray("language");
for (CodeableConcept e : element.getLanguage())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAccessionNumberElement()) {
composeStringCore("accessionNumber", element.getAccessionNumberElement(), false);
composeStringExtras("accessionNumber", element.getAccessionNumberElement(), false);
}
if (element.hasPageStringElement()) {
composeStringCore("pageString", element.getPageStringElement(), false);
composeStringExtras("pageString", element.getPageStringElement(), false);
}
if (element.hasFirstPageElement()) {
composeStringCore("firstPage", element.getFirstPageElement(), false);
composeStringExtras("firstPage", element.getFirstPageElement(), false);
}
if (element.hasLastPageElement()) {
composeStringCore("lastPage", element.getLastPageElement(), false);
composeStringExtras("lastPage", element.getLastPageElement(), false);
}
if (element.hasPageCountElement()) {
composeStringCore("pageCount", element.getPageCountElement(), false);
composeStringExtras("pageCount", element.getPageCountElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
}
protected void composeCitationCitedArtifactPublicationFormPublishedInComponent(String name, Citation.CitationCitedArtifactPublicationFormPublishedInComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactPublicationFormPublishedInComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactPublicationFormPublishedInComponentProperties(Citation.CitationCitedArtifactPublicationFormPublishedInComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasPublisher()) {
composeReference("publisher", element.getPublisher());
}
if (element.hasPublisherLocationElement()) {
composeStringCore("publisherLocation", element.getPublisherLocationElement(), false);
composeStringExtras("publisherLocation", element.getPublisherLocationElement(), false);
}
}
protected void composeCitationCitedArtifactWebLocationComponent(String name, Citation.CitationCitedArtifactWebLocationComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactWebLocationComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactWebLocationComponentProperties(Citation.CitationCitedArtifactWebLocationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
}
protected void composeCitationCitedArtifactClassificationComponent(String name, Citation.CitationCitedArtifactClassificationComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactClassificationComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactClassificationComponentProperties(Citation.CitationCitedArtifactClassificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasArtifactAssessment()) {
openArray("artifactAssessment");
for (Reference e : element.getArtifactAssessment())
composeReference(null, e);
closeArray();
};
}
protected void composeCitationCitedArtifactContributorshipComponent(String name, Citation.CitationCitedArtifactContributorshipComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactContributorshipComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactContributorshipComponentProperties(Citation.CitationCitedArtifactContributorshipComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCompleteElement()) {
composeBooleanCore("complete", element.getCompleteElement(), false);
composeBooleanExtras("complete", element.getCompleteElement(), false);
}
if (element.hasEntry()) {
openArray("entry");
for (Citation.CitationCitedArtifactContributorshipEntryComponent e : element.getEntry())
composeCitationCitedArtifactContributorshipEntryComponent(null, e);
closeArray();
};
if (element.hasSummary()) {
openArray("summary");
for (Citation.ContributorshipSummaryComponent e : element.getSummary())
composeContributorshipSummaryComponent(null, e);
closeArray();
};
}
protected void composeCitationCitedArtifactContributorshipEntryComponent(String name, Citation.CitationCitedArtifactContributorshipEntryComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactContributorshipEntryComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactContributorshipEntryComponentProperties(Citation.CitationCitedArtifactContributorshipEntryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContributor()) {
composeReference("contributor", element.getContributor());
}
if (element.hasForenameInitialsElement()) {
composeStringCore("forenameInitials", element.getForenameInitialsElement(), false);
composeStringExtras("forenameInitials", element.getForenameInitialsElement(), false);
}
if (element.hasAffiliation()) {
openArray("affiliation");
for (Reference e : element.getAffiliation())
composeReference(null, e);
closeArray();
};
if (element.hasContributionType()) {
openArray("contributionType");
for (CodeableConcept e : element.getContributionType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasContributionInstance()) {
openArray("contributionInstance");
for (Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent e : element.getContributionInstance())
composeCitationCitedArtifactContributorshipEntryContributionInstanceComponent(null, e);
closeArray();
};
if (element.hasCorrespondingContactElement()) {
composeBooleanCore("correspondingContact", element.getCorrespondingContactElement(), false);
composeBooleanExtras("correspondingContact", element.getCorrespondingContactElement(), false);
}
if (element.hasRankingOrderElement()) {
composePositiveIntCore("rankingOrder", element.getRankingOrderElement(), false);
composePositiveIntExtras("rankingOrder", element.getRankingOrderElement(), false);
}
}
protected void composeCitationCitedArtifactContributorshipEntryContributionInstanceComponent(String name, Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeCitationCitedArtifactContributorshipEntryContributionInstanceComponentProperties(element);
close();
}
}
protected void composeCitationCitedArtifactContributorshipEntryContributionInstanceComponentProperties(Citation.CitationCitedArtifactContributorshipEntryContributionInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasTimeElement()) {
composeDateTimeCore("time", element.getTimeElement(), false);
composeDateTimeExtras("time", element.getTimeElement(), false);
}
}
protected void composeContributorshipSummaryComponent(String name, Citation.ContributorshipSummaryComponent element) throws IOException {
if (element != null) {
open(name);
composeContributorshipSummaryComponentProperties(element);
close();
}
}
protected void composeContributorshipSummaryComponentProperties(Citation.ContributorshipSummaryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStyle()) {
composeCodeableConcept("style", element.getStyle());
}
if (element.hasSource()) {
composeCodeableConcept("source", element.getSource());
}
if (element.hasValueElement()) {
composeMarkdownCore("value", element.getValueElement(), false);
composeMarkdownExtras("value", element.getValueElement(), false);
}
}
protected void composeClaim(String name, Claim element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeClaimProperties(element);
}
}
protected void composeClaimProperties(Claim element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Enumerations.UseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Enumerations.UseEnumFactory(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasBillablePeriod()) {
composePeriod("billablePeriod", element.getBillablePeriod());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasEnterer()) {
composeReference("enterer", element.getEnterer());
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasFundsReserve()) {
composeCodeableConcept("fundsReserve", element.getFundsReserve());
}
if (element.hasRelated()) {
openArray("related");
for (Claim.RelatedClaimComponent e : element.getRelated())
composeRelatedClaimComponent(null, e);
closeArray();
};
if (element.hasPrescription()) {
composeReference("prescription", element.getPrescription());
}
if (element.hasOriginalPrescription()) {
composeReference("originalPrescription", element.getOriginalPrescription());
}
if (element.hasPayee()) {
composePayeeComponent("payee", element.getPayee());
}
if (element.hasReferral()) {
composeReference("referral", element.getReferral());
}
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
};
if (element.hasFacility()) {
composeReference("facility", element.getFacility());
}
if (element.hasDiagnosisRelatedGroup()) {
composeCodeableConcept("diagnosisRelatedGroup", element.getDiagnosisRelatedGroup());
}
if (element.hasEvent()) {
openArray("event");
for (Claim.ClaimEventComponent e : element.getEvent())
composeClaimEventComponent(null, e);
closeArray();
};
if (element.hasCareTeam()) {
openArray("careTeam");
for (Claim.CareTeamComponent e : element.getCareTeam())
composeCareTeamComponent(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Claim.SupportingInformationComponent e : element.getSupportingInfo())
composeSupportingInformationComponent(null, e);
closeArray();
};
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (Claim.DiagnosisComponent e : element.getDiagnosis())
composeDiagnosisComponent(null, e);
closeArray();
};
if (element.hasProcedure()) {
openArray("procedure");
for (Claim.ProcedureComponent e : element.getProcedure())
composeProcedureComponent(null, e);
closeArray();
};
if (element.hasInsurance()) {
openArray("insurance");
for (Claim.InsuranceComponent e : element.getInsurance())
composeInsuranceComponent(null, e);
closeArray();
};
if (element.hasAccident()) {
composeAccidentComponent("accident", element.getAccident());
}
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasItem()) {
openArray("item");
for (Claim.ItemComponent e : element.getItem())
composeItemComponent(null, e);
closeArray();
};
if (element.hasTotal()) {
composeMoney("total", element.getTotal());
}
}
protected void composeRelatedClaimComponent(String name, Claim.RelatedClaimComponent element) throws IOException {
if (element != null) {
open(name);
composeRelatedClaimComponentProperties(element);
close();
}
}
protected void composeRelatedClaimComponentProperties(Claim.RelatedClaimComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasClaim()) {
composeReference("claim", element.getClaim());
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasReference()) {
composeIdentifier("reference", element.getReference());
}
}
protected void composePayeeComponent(String name, Claim.PayeeComponent element) throws IOException {
if (element != null) {
open(name);
composePayeeComponentProperties(element);
close();
}
}
protected void composePayeeComponentProperties(Claim.PayeeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeClaimEventComponent(String name, Claim.ClaimEventComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimEventComponentProperties(element);
close();
}
}
protected void composeClaimEventComponentProperties(Claim.ClaimEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasWhen()) {
composeType("when", element.getWhen());
}
}
protected void composeCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException {
if (element != null) {
open(name);
composeCareTeamComponentProperties(element);
close();
}
}
protected void composeCareTeamComponentProperties(Claim.CareTeamComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasResponsibleElement()) {
composeBooleanCore("responsible", element.getResponsibleElement(), false);
composeBooleanExtras("responsible", element.getResponsibleElement(), false);
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasSpecialty()) {
composeCodeableConcept("specialty", element.getSpecialty());
}
}
protected void composeSupportingInformationComponent(String name, Claim.SupportingInformationComponent element) throws IOException {
if (element != null) {
open(name);
composeSupportingInformationComponentProperties(element);
close();
}
}
protected void composeSupportingInformationComponentProperties(Claim.SupportingInformationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
}
protected void composeDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosisComponentProperties(element);
close();
}
}
protected void composeDiagnosisComponentProperties(Claim.DiagnosisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasDiagnosis()) {
composeType("diagnosis", element.getDiagnosis());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasOnAdmission()) {
composeCodeableConcept("onAdmission", element.getOnAdmission());
}
}
protected void composeProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeProcedureComponentProperties(element);
close();
}
}
protected void composeProcedureComponentProperties(Claim.ProcedureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasProcedure()) {
composeType("procedure", element.getProcedure());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
}
protected void composeInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeInsuranceComponentProperties(element);
close();
}
}
protected void composeInsuranceComponentProperties(Claim.InsuranceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasFocalElement()) {
composeBooleanCore("focal", element.getFocalElement(), false);
composeBooleanExtras("focal", element.getFocalElement(), false);
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasBusinessArrangementElement()) {
composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false);
composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false);
}
if (element.hasPreAuthRef()) {
if (anyHasValue(element.getPreAuthRef())) {
openArray("preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringCore(null, e, e != element.getPreAuthRef().get(element.getPreAuthRef().size()-1));
closeArray();
}
if (anyHasExtras(element.getPreAuthRef())) {
openArray("_preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasClaimResponse()) {
composeReference("claimResponse", element.getClaimResponse());
}
}
protected void composeAccidentComponent(String name, Claim.AccidentComponent element) throws IOException {
if (element != null) {
open(name);
composeAccidentComponentProperties(element);
close();
}
}
protected void composeAccidentComponentProperties(Claim.AccidentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasLocation()) {
composeType("location", element.getLocation());
}
}
protected void composeItemComponent(String name, Claim.ItemComponent element) throws IOException {
if (element != null) {
open(name);
composeItemComponentProperties(element);
close();
}
}
protected void composeItemComponentProperties(Claim.ItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCareTeamSequence()) {
if (anyHasValue(element.getCareTeamSequence())) {
openArray("careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntCore(null, e, e != element.getCareTeamSequence().get(element.getCareTeamSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getCareTeamSequence())) {
openArray("_careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasDiagnosisSequence()) {
if (anyHasValue(element.getDiagnosisSequence())) {
openArray("diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntCore(null, e, e != element.getDiagnosisSequence().get(element.getDiagnosisSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getDiagnosisSequence())) {
openArray("_diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasProcedureSequence()) {
if (anyHasValue(element.getProcedureSequence())) {
openArray("procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntCore(null, e, e != element.getProcedureSequence().get(element.getProcedureSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getProcedureSequence())) {
openArray("_procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasInformationSequence()) {
if (anyHasValue(element.getInformationSequence())) {
openArray("informationSequence");
for (PositiveIntType e : element.getInformationSequence())
composePositiveIntCore(null, e, e != element.getInformationSequence().get(element.getInformationSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getInformationSequence())) {
openArray("_informationSequence");
for (PositiveIntType e : element.getInformationSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
};
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasLocation()) {
composeType("location", element.getLocation());
}
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
openArray("bodySite");
for (Claim.BodySiteComponent e : element.getBodySite())
composeBodySiteComponent(null, e);
closeArray();
};
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (Claim.DetailComponent e : element.getDetail())
composeDetailComponent(null, e);
closeArray();
};
}
protected void composeBodySiteComponent(String name, Claim.BodySiteComponent element) throws IOException {
if (element != null) {
open(name);
composeBodySiteComponentProperties(element);
close();
}
}
protected void composeBodySiteComponentProperties(Claim.BodySiteComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSite()) {
openArray("site");
for (CodeableReference e : element.getSite())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeDetailComponent(String name, Claim.DetailComponent element) throws IOException {
if (element != null) {
open(name);
composeDetailComponentProperties(element);
close();
}
}
protected void composeDetailComponentProperties(Claim.DetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
if (element.hasSubDetail()) {
openArray("subDetail");
for (Claim.SubDetailComponent e : element.getSubDetail())
composeSubDetailComponent(null, e);
closeArray();
};
}
protected void composeSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeSubDetailComponentProperties(element);
close();
}
}
protected void composeSubDetailComponentProperties(Claim.SubDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
}
protected void composeClaimResponse(String name, ClaimResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeClaimResponseProperties(element);
}
}
protected void composeClaimResponseProperties(ClaimResponse element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Enumerations.UseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Enumerations.UseEnumFactory(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasRequestor()) {
composeReference("requestor", element.getRequestor());
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new Enumerations.ClaimProcessingCodesEnumFactory(), false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.ClaimProcessingCodesEnumFactory(), false);
}
if (element.hasDecision()) {
composeCodeableConcept("decision", element.getDecision());
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasPreAuthRefElement()) {
composeStringCore("preAuthRef", element.getPreAuthRefElement(), false);
composeStringExtras("preAuthRef", element.getPreAuthRefElement(), false);
}
if (element.hasPreAuthPeriod()) {
composePeriod("preAuthPeriod", element.getPreAuthPeriod());
}
if (element.hasEvent()) {
openArray("event");
for (ClaimResponse.ClaimResponseEventComponent e : element.getEvent())
composeClaimResponseEventComponent(null, e);
closeArray();
};
if (element.hasPayeeType()) {
composeCodeableConcept("payeeType", element.getPayeeType());
}
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
};
if (element.hasDiagnosisRelatedGroup()) {
composeCodeableConcept("diagnosisRelatedGroup", element.getDiagnosisRelatedGroup());
}
if (element.hasItem()) {
openArray("item");
for (ClaimResponse.ItemComponent e : element.getItem())
composeItemComponent(null, e);
closeArray();
};
if (element.hasAddItem()) {
openArray("addItem");
for (ClaimResponse.AddedItemComponent e : element.getAddItem())
composeAddedItemComponent(null, e);
closeArray();
};
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasTotal()) {
openArray("total");
for (ClaimResponse.TotalComponent e : element.getTotal())
composeTotalComponent(null, e);
closeArray();
};
if (element.hasPayment()) {
composePaymentComponent("payment", element.getPayment());
}
if (element.hasFundsReserve()) {
composeCodeableConcept("fundsReserve", element.getFundsReserve());
}
if (element.hasFormCode()) {
composeCodeableConcept("formCode", element.getFormCode());
}
if (element.hasForm()) {
composeAttachment("form", element.getForm());
}
if (element.hasProcessNote()) {
openArray("processNote");
for (ClaimResponse.NoteComponent e : element.getProcessNote())
composeNoteComponent(null, e);
closeArray();
};
if (element.hasCommunicationRequest()) {
openArray("communicationRequest");
for (Reference e : element.getCommunicationRequest())
composeReference(null, e);
closeArray();
};
if (element.hasInsurance()) {
openArray("insurance");
for (ClaimResponse.InsuranceComponent e : element.getInsurance())
composeInsuranceComponent(null, e);
closeArray();
};
if (element.hasError()) {
openArray("error");
for (ClaimResponse.ErrorComponent e : element.getError())
composeErrorComponent(null, e);
closeArray();
};
}
protected void composeClaimResponseEventComponent(String name, ClaimResponse.ClaimResponseEventComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimResponseEventComponentProperties(element);
close();
}
}
protected void composeClaimResponseEventComponentProperties(ClaimResponse.ClaimResponseEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasWhen()) {
composeType("when", element.getWhen());
}
}
protected void composeItemComponent(String name, ClaimResponse.ItemComponent element) throws IOException {
if (element != null) {
open(name);
composeItemComponentProperties(element);
close();
}
}
protected void composeItemComponentProperties(ClaimResponse.ItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItemSequenceElement()) {
composePositiveIntCore("itemSequence", element.getItemSequenceElement(), false);
composePositiveIntExtras("itemSequence", element.getItemSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (ClaimResponse.ItemDetailComponent e : element.getDetail())
composeItemDetailComponent(null, e);
closeArray();
};
}
protected void composeReviewOutcomeComponent(String name, ClaimResponse.ReviewOutcomeComponent element) throws IOException {
if (element != null) {
open(name);
composeReviewOutcomeComponentProperties(element);
close();
}
}
protected void composeReviewOutcomeComponentProperties(ClaimResponse.ReviewOutcomeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDecision()) {
composeCodeableConcept("decision", element.getDecision());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPreAuthRefElement()) {
composeStringCore("preAuthRef", element.getPreAuthRefElement(), false);
composeStringExtras("preAuthRef", element.getPreAuthRefElement(), false);
}
if (element.hasPreAuthPeriod()) {
composePeriod("preAuthPeriod", element.getPreAuthPeriod());
}
}
protected void composeAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element) throws IOException {
if (element != null) {
open(name);
composeAdjudicationComponentProperties(element);
close();
}
}
protected void composeAdjudicationComponentProperties(ClaimResponse.AdjudicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
}
protected void composeItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeItemDetailComponentProperties(element);
close();
}
}
protected void composeItemDetailComponentProperties(ClaimResponse.ItemDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDetailSequenceElement()) {
composePositiveIntCore("detailSequence", element.getDetailSequenceElement(), false);
composePositiveIntExtras("detailSequence", element.getDetailSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasSubDetail()) {
openArray("subDetail");
for (ClaimResponse.SubDetailComponent e : element.getSubDetail())
composeSubDetailComponent(null, e);
closeArray();
};
}
protected void composeSubDetailComponent(String name, ClaimResponse.SubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeSubDetailComponentProperties(element);
close();
}
}
protected void composeSubDetailComponentProperties(ClaimResponse.SubDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubDetailSequenceElement()) {
composePositiveIntCore("subDetailSequence", element.getSubDetailSequenceElement(), false);
composePositiveIntExtras("subDetailSequence", element.getSubDetailSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
}
protected void composeAddedItemComponent(String name, ClaimResponse.AddedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemComponentProperties(element);
close();
}
}
protected void composeAddedItemComponentProperties(ClaimResponse.AddedItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItemSequence()) {
if (anyHasValue(element.getItemSequence())) {
openArray("itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntCore(null, e, e != element.getItemSequence().get(element.getItemSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getItemSequence())) {
openArray("_itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasDetailSequence()) {
if (anyHasValue(element.getDetailSequence())) {
openArray("detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntCore(null, e, e != element.getDetailSequence().get(element.getDetailSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getDetailSequence())) {
openArray("_detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasSubdetailSequence()) {
if (anyHasValue(element.getSubdetailSequence())) {
openArray("subdetailSequence");
for (PositiveIntType e : element.getSubdetailSequence())
composePositiveIntCore(null, e, e != element.getSubdetailSequence().get(element.getSubdetailSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getSubdetailSequence())) {
openArray("_subdetailSequence");
for (PositiveIntType e : element.getSubdetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasProvider()) {
openArray("provider");
for (Reference e : element.getProvider())
composeReference(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
};
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasLocation()) {
composeType("location", element.getLocation());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasBodySite()) {
openArray("bodySite");
for (ClaimResponse.BodySiteComponent e : element.getBodySite())
composeBodySiteComponent(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (ClaimResponse.AddedItemDetailComponent e : element.getDetail())
composeAddedItemDetailComponent(null, e);
closeArray();
};
}
protected void composeBodySiteComponent(String name, ClaimResponse.BodySiteComponent element) throws IOException {
if (element != null) {
open(name);
composeBodySiteComponentProperties(element);
close();
}
}
protected void composeBodySiteComponentProperties(ClaimResponse.BodySiteComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSite()) {
openArray("site");
for (CodeableReference e : element.getSite())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeAddedItemDetailComponent(String name, ClaimResponse.AddedItemDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemDetailComponentProperties(element);
close();
}
}
protected void composeAddedItemDetailComponentProperties(ClaimResponse.AddedItemDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasSubDetail()) {
openArray("subDetail");
for (ClaimResponse.AddedItemSubDetailComponent e : element.getSubDetail())
composeAddedItemSubDetailComponent(null, e);
closeArray();
};
}
protected void composeAddedItemSubDetailComponent(String name, ClaimResponse.AddedItemSubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemSubDetailComponentProperties(element);
close();
}
}
protected void composeAddedItemSubDetailComponentProperties(ClaimResponse.AddedItemSubDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
}
protected void composeTotalComponent(String name, ClaimResponse.TotalComponent element) throws IOException {
if (element != null) {
open(name);
composeTotalComponentProperties(element);
close();
}
}
protected void composeTotalComponentProperties(ClaimResponse.TotalComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composePaymentComponent(String name, ClaimResponse.PaymentComponent element) throws IOException {
if (element != null) {
open(name);
composePaymentComponentProperties(element);
close();
}
}
protected void composePaymentComponentProperties(ClaimResponse.PaymentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAdjustment()) {
composeMoney("adjustment", element.getAdjustment());
}
if (element.hasAdjustmentReason()) {
composeCodeableConcept("adjustmentReason", element.getAdjustmentReason());
}
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
}
protected void composeNoteComponent(String name, ClaimResponse.NoteComponent element) throws IOException {
if (element != null) {
open(name);
composeNoteComponentProperties(element);
close();
}
}
protected void composeNoteComponentProperties(ClaimResponse.NoteComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNumberElement()) {
composePositiveIntCore("number", element.getNumberElement(), false);
composePositiveIntExtras("number", element.getNumberElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
}
protected void composeInsuranceComponent(String name, ClaimResponse.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeInsuranceComponentProperties(element);
close();
}
}
protected void composeInsuranceComponentProperties(ClaimResponse.InsuranceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasFocalElement()) {
composeBooleanCore("focal", element.getFocalElement(), false);
composeBooleanExtras("focal", element.getFocalElement(), false);
}
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasBusinessArrangementElement()) {
composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false);
composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false);
}
if (element.hasClaimResponse()) {
composeReference("claimResponse", element.getClaimResponse());
}
}
protected void composeErrorComponent(String name, ClaimResponse.ErrorComponent element) throws IOException {
if (element != null) {
open(name);
composeErrorComponentProperties(element);
close();
}
}
protected void composeErrorComponentProperties(ClaimResponse.ErrorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItemSequenceElement()) {
composePositiveIntCore("itemSequence", element.getItemSequenceElement(), false);
composePositiveIntExtras("itemSequence", element.getItemSequenceElement(), false);
}
if (element.hasDetailSequenceElement()) {
composePositiveIntCore("detailSequence", element.getDetailSequenceElement(), false);
composePositiveIntExtras("detailSequence", element.getDetailSequenceElement(), false);
}
if (element.hasSubDetailSequenceElement()) {
composePositiveIntCore("subDetailSequence", element.getSubDetailSequenceElement(), false);
composePositiveIntExtras("subDetailSequence", element.getSubDetailSequenceElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasExpression()) {
if (anyHasValue(element.getExpression())) {
openArray("expression");
for (StringType e : element.getExpression())
composeStringCore(null, e, e != element.getExpression().get(element.getExpression().size()-1));
closeArray();
}
if (anyHasExtras(element.getExpression())) {
openArray("_expression");
for (StringType e : element.getExpression())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeClinicalImpressionProperties(element);
}
}
protected void composeClinicalImpressionProperties(ClinicalImpression element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasEffective()) {
composeType("effective", element.getEffective());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasPrevious()) {
composeReference("previous", element.getPrevious());
}
if (element.hasProblem()) {
openArray("problem");
for (Reference e : element.getProblem())
composeReference(null, e);
closeArray();
};
if (element.hasChangePattern()) {
composeCodeableConcept("changePattern", element.getChangePattern());
}
if (element.hasProtocol()) {
if (anyHasValue(element.getProtocol())) {
openArray("protocol");
for (UriType e : element.getProtocol())
composeUriCore(null, e, e != element.getProtocol().get(element.getProtocol().size()-1));
closeArray();
}
if (anyHasExtras(element.getProtocol())) {
openArray("_protocol");
for (UriType e : element.getProtocol())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasSummaryElement()) {
composeStringCore("summary", element.getSummaryElement(), false);
composeStringExtras("summary", element.getSummaryElement(), false);
}
if (element.hasFinding()) {
openArray("finding");
for (ClinicalImpression.ClinicalImpressionFindingComponent e : element.getFinding())
composeClinicalImpressionFindingComponent(null, e);
closeArray();
};
if (element.hasPrognosisCodeableConcept()) {
openArray("prognosisCodeableConcept");
for (CodeableConcept e : element.getPrognosisCodeableConcept())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPrognosisReference()) {
openArray("prognosisReference");
for (Reference e : element.getPrognosisReference())
composeReference(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Reference e : element.getSupportingInfo())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeClinicalImpressionFindingComponent(String name, ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalImpressionFindingComponentProperties(element);
close();
}
}
protected void composeClinicalImpressionFindingComponentProperties(ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasBasisElement()) {
composeStringCore("basis", element.getBasisElement(), false);
composeStringExtras("basis", element.getBasisElement(), false);
}
}
protected void composeClinicalUseDefinition(String name, ClinicalUseDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeClinicalUseDefinitionProperties(element);
}
}
protected void composeClinicalUseDefinitionProperties(ClinicalUseDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new ClinicalUseDefinition.ClinicalUseDefinitionTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new ClinicalUseDefinition.ClinicalUseDefinitionTypeEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
};
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasContraindication()) {
composeClinicalUseDefinitionContraindicationComponent("contraindication", element.getContraindication());
}
if (element.hasIndication()) {
composeClinicalUseDefinitionIndicationComponent("indication", element.getIndication());
}
if (element.hasInteraction()) {
composeClinicalUseDefinitionInteractionComponent("interaction", element.getInteraction());
}
if (element.hasPopulation()) {
openArray("population");
for (Reference e : element.getPopulation())
composeReference(null, e);
closeArray();
};
if (element.hasLibrary()) {
if (anyHasValue(element.getLibrary())) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, e != element.getLibrary().get(element.getLibrary().size()-1));
closeArray();
}
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasUndesirableEffect()) {
composeClinicalUseDefinitionUndesirableEffectComponent("undesirableEffect", element.getUndesirableEffect());
}
if (element.hasWarning()) {
composeClinicalUseDefinitionWarningComponent("warning", element.getWarning());
}
}
protected void composeClinicalUseDefinitionContraindicationComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionContraindicationComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionContraindicationComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionContraindicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDiseaseSymptomProcedure()) {
composeCodeableReference("diseaseSymptomProcedure", element.getDiseaseSymptomProcedure());
}
if (element.hasDiseaseStatus()) {
composeCodeableReference("diseaseStatus", element.getDiseaseStatus());
}
if (element.hasComorbidity()) {
openArray("comorbidity");
for (CodeableReference e : element.getComorbidity())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasIndication()) {
openArray("indication");
for (Reference e : element.getIndication())
composeReference(null, e);
closeArray();
};
if (element.hasApplicability()) {
composeExpression("applicability", element.getApplicability());
}
if (element.hasOtherTherapy()) {
openArray("otherTherapy");
for (ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent e : element.getOtherTherapy())
composeClinicalUseDefinitionContraindicationOtherTherapyComponent(null, e);
closeArray();
};
}
protected void composeClinicalUseDefinitionContraindicationOtherTherapyComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionContraindicationOtherTherapyComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionContraindicationOtherTherapyComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRelationshipType()) {
composeCodeableConcept("relationshipType", element.getRelationshipType());
}
if (element.hasTreatment()) {
composeCodeableReference("treatment", element.getTreatment());
}
}
protected void composeClinicalUseDefinitionIndicationComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionIndicationComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionIndicationComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionIndicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDiseaseSymptomProcedure()) {
composeCodeableReference("diseaseSymptomProcedure", element.getDiseaseSymptomProcedure());
}
if (element.hasDiseaseStatus()) {
composeCodeableReference("diseaseStatus", element.getDiseaseStatus());
}
if (element.hasComorbidity()) {
openArray("comorbidity");
for (CodeableReference e : element.getComorbidity())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasIntendedEffect()) {
composeCodeableReference("intendedEffect", element.getIntendedEffect());
}
if (element.hasDuration()) {
composeType("duration", element.getDuration());
}
if (element.hasUndesirableEffect()) {
openArray("undesirableEffect");
for (Reference e : element.getUndesirableEffect())
composeReference(null, e);
closeArray();
};
if (element.hasApplicability()) {
composeExpression("applicability", element.getApplicability());
}
if (element.hasOtherTherapy()) {
openArray("otherTherapy");
for (ClinicalUseDefinition.ClinicalUseDefinitionContraindicationOtherTherapyComponent e : element.getOtherTherapy())
composeClinicalUseDefinitionContraindicationOtherTherapyComponent(null, e);
closeArray();
};
}
protected void composeClinicalUseDefinitionInteractionComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionInteractionComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionInteractionComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionInteractionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInteractant()) {
openArray("interactant");
for (ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent e : element.getInteractant())
composeClinicalUseDefinitionInteractionInteractantComponent(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasEffect()) {
composeCodeableReference("effect", element.getEffect());
}
if (element.hasIncidence()) {
composeCodeableConcept("incidence", element.getIncidence());
}
if (element.hasManagement()) {
openArray("management");
for (CodeableConcept e : element.getManagement())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeClinicalUseDefinitionInteractionInteractantComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionInteractionInteractantComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionInteractionInteractantComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionInteractionInteractantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeClinicalUseDefinitionUndesirableEffectComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionUndesirableEffectComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionUndesirableEffectComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionUndesirableEffectComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSymptomConditionEffect()) {
composeCodeableReference("symptomConditionEffect", element.getSymptomConditionEffect());
}
if (element.hasClassification()) {
composeCodeableConcept("classification", element.getClassification());
}
if (element.hasFrequencyOfOccurrence()) {
composeCodeableConcept("frequencyOfOccurrence", element.getFrequencyOfOccurrence());
}
}
protected void composeClinicalUseDefinitionWarningComponent(String name, ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalUseDefinitionWarningComponentProperties(element);
close();
}
}
protected void composeClinicalUseDefinitionWarningComponentProperties(ClinicalUseDefinition.ClinicalUseDefinitionWarningComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeCodeSystem(String name, CodeSystem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCodeSystemProperties(element);
}
}
protected void composeCodeSystemProperties(CodeSystem element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasCaseSensitiveElement()) {
composeBooleanCore("caseSensitive", element.getCaseSensitiveElement(), false);
composeBooleanExtras("caseSensitive", element.getCaseSensitiveElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasHierarchyMeaningElement()) {
composeEnumerationCore("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory(), false);
composeEnumerationExtras("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory(), false);
}
if (element.hasCompositionalElement()) {
composeBooleanCore("compositional", element.getCompositionalElement(), false);
composeBooleanExtras("compositional", element.getCompositionalElement(), false);
}
if (element.hasVersionNeededElement()) {
composeBooleanCore("versionNeeded", element.getVersionNeededElement(), false);
composeBooleanExtras("versionNeeded", element.getVersionNeededElement(), false);
}
if (element.hasContentElement()) {
composeEnumerationCore("content", element.getContentElement(), new Enumerations.CodeSystemContentModeEnumFactory(), false);
composeEnumerationExtras("content", element.getContentElement(), new Enumerations.CodeSystemContentModeEnumFactory(), false);
}
if (element.hasSupplementsElement()) {
composeCanonicalCore("supplements", element.getSupplementsElement(), false);
composeCanonicalExtras("supplements", element.getSupplementsElement(), false);
}
if (element.hasCountElement()) {
composeUnsignedIntCore("count", element.getCountElement(), false);
composeUnsignedIntExtras("count", element.getCountElement(), false);
}
if (element.hasFilter()) {
openArray("filter");
for (CodeSystem.CodeSystemFilterComponent e : element.getFilter())
composeCodeSystemFilterComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (CodeSystem.PropertyComponent e : element.getProperty())
composePropertyComponent(null, e);
closeArray();
};
if (element.hasConcept()) {
openArray("concept");
for (CodeSystem.ConceptDefinitionComponent e : element.getConcept())
composeConceptDefinitionComponent(null, e);
closeArray();
};
}
protected void composeCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeCodeSystemFilterComponentProperties(element);
close();
}
}
protected void composeCodeSystemFilterComponentProperties(CodeSystem.CodeSystemFilterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasOperator()) {
openArray("operator");
for (Enumeration e : element.getOperator())
composeEnumerationCore(null, e, new Enumerations.FilterOperatorEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getOperator())) {
openArray("_operator");
for (Enumeration e : element.getOperator())
composeEnumerationExtras(null, e, new Enumerations.FilterOperatorEnumFactory(), true);
closeArray();
}
};
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composePropertyComponent(String name, CodeSystem.PropertyComponent element) throws IOException {
if (element != null) {
open(name);
composePropertyComponentProperties(element);
close();
}
}
protected void composePropertyComponentProperties(CodeSystem.PropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory(), false);
}
}
protected void composeConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptDefinitionComponentProperties(element);
close();
}
}
protected void composeConceptDefinitionComponentProperties(CodeSystem.ConceptDefinitionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasDefinitionElement()) {
composeStringCore("definition", element.getDefinitionElement(), false);
composeStringExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasDesignation()) {
openArray("designation");
for (CodeSystem.ConceptDefinitionDesignationComponent e : element.getDesignation())
composeConceptDefinitionDesignationComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (CodeSystem.ConceptPropertyComponent e : element.getProperty())
composeConceptPropertyComponent(null, e);
closeArray();
};
if (element.hasConcept()) {
openArray("concept");
for (CodeSystem.ConceptDefinitionComponent e : element.getConcept())
composeConceptDefinitionComponent(null, e);
closeArray();
};
}
protected void composeConceptDefinitionDesignationComponent(String name, CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptDefinitionDesignationComponentProperties(element);
close();
}
}
protected void composeConceptDefinitionDesignationComponentProperties(CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasUse()) {
composeCoding("use", element.getUse());
}
if (element.hasAdditionalUse()) {
openArray("additionalUse");
for (Coding e : element.getAdditionalUse())
composeCoding(null, e);
closeArray();
};
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptPropertyComponentProperties(element);
close();
}
}
protected void composeConceptPropertyComponentProperties(CodeSystem.ConceptPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeCommunication(String name, Communication element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCommunicationProperties(element);
}
}
protected void composeCommunicationProperties(Communication element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasInResponseTo()) {
openArray("inResponseTo");
for (Reference e : element.getInResponseTo())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasMedium()) {
openArray("medium");
for (CodeableConcept e : element.getMedium())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasTopic()) {
composeCodeableConcept("topic", element.getTopic());
}
if (element.hasAbout()) {
openArray("about");
for (Reference e : element.getAbout())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSentElement()) {
composeDateTimeCore("sent", element.getSentElement(), false);
composeDateTimeExtras("sent", element.getSentElement(), false);
}
if (element.hasReceivedElement()) {
composeDateTimeCore("received", element.getReceivedElement(), false);
composeDateTimeExtras("received", element.getReceivedElement(), false);
}
if (element.hasRecipient()) {
openArray("recipient");
for (Reference e : element.getRecipient())
composeReference(null, e);
closeArray();
};
if (element.hasSender()) {
composeReference("sender", element.getSender());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasPayload()) {
openArray("payload");
for (Communication.CommunicationPayloadComponent e : element.getPayload())
composeCommunicationPayloadComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeCommunicationPayloadComponent(String name, Communication.CommunicationPayloadComponent element) throws IOException {
if (element != null) {
open(name);
composeCommunicationPayloadComponentProperties(element);
close();
}
}
protected void composeCommunicationPayloadComponentProperties(Communication.CommunicationPayloadComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCommunicationRequestProperties(element);
}
}
protected void composeCommunicationRequestProperties(CommunicationRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasReplaces()) {
openArray("replaces");
for (Reference e : element.getReplaces())
composeReference(null, e);
closeArray();
};
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasMedium()) {
openArray("medium");
for (CodeableConcept e : element.getMedium())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasAbout()) {
openArray("about");
for (Reference e : element.getAbout())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasPayload()) {
openArray("payload");
for (CommunicationRequest.CommunicationRequestPayloadComponent e : element.getPayload())
composeCommunicationRequestPayloadComponent(null, e);
closeArray();
};
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasRecipient()) {
openArray("recipient");
for (Reference e : element.getRecipient())
composeReference(null, e);
closeArray();
};
if (element.hasInformationProvider()) {
openArray("informationProvider");
for (Reference e : element.getInformationProvider())
composeReference(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeCommunicationRequestPayloadComponent(String name, CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException {
if (element != null) {
open(name);
composeCommunicationRequestPayloadComponentProperties(element);
close();
}
}
protected void composeCommunicationRequestPayloadComponentProperties(CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCompartmentDefinitionProperties(element);
}
}
protected void composeCompartmentDefinitionProperties(CompartmentDefinition element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new Enumerations.CompartmentTypeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new Enumerations.CompartmentTypeEnumFactory(), false);
}
if (element.hasSearchElement()) {
composeBooleanCore("search", element.getSearchElement(), false);
composeBooleanExtras("search", element.getSearchElement(), false);
}
if (element.hasResource()) {
openArray("resource");
for (CompartmentDefinition.CompartmentDefinitionResourceComponent e : element.getResource())
composeCompartmentDefinitionResourceComponent(null, e);
closeArray();
};
}
protected void composeCompartmentDefinitionResourceComponent(String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeCompartmentDefinitionResourceComponentProperties(element);
close();
}
}
protected void composeCompartmentDefinitionResourceComponentProperties(CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasParam()) {
if (anyHasValue(element.getParam())) {
openArray("param");
for (StringType e : element.getParam())
composeStringCore(null, e, e != element.getParam().get(element.getParam().size()-1));
closeArray();
}
if (anyHasExtras(element.getParam())) {
openArray("_param");
for (StringType e : element.getParam())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasStartParamElement()) {
composeUriCore("startParam", element.getStartParamElement(), false);
composeUriExtras("startParam", element.getStartParamElement(), false);
}
if (element.hasEndParamElement()) {
composeUriCore("endParam", element.getEndParamElement(), false);
composeUriExtras("endParam", element.getEndParamElement(), false);
}
}
protected void composeComposition(String name, Composition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCompositionProperties(element);
}
}
protected void composeCompositionProperties(Composition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.CompositionStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.CompositionStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (Reference e : element.getAuthor())
composeReference(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasAttester()) {
openArray("attester");
for (Composition.CompositionAttesterComponent e : element.getAttester())
composeCompositionAttesterComponent(null, e);
closeArray();
};
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
if (element.hasRelatesTo()) {
openArray("relatesTo");
for (RelatedArtifact e : element.getRelatesTo())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasEvent()) {
openArray("event");
for (Composition.CompositionEventComponent e : element.getEvent())
composeCompositionEventComponent(null, e);
closeArray();
};
if (element.hasSection()) {
openArray("section");
for (Composition.SectionComponent e : element.getSection())
composeSectionComponent(null, e);
closeArray();
};
}
protected void composeCompositionAttesterComponent(String name, Composition.CompositionAttesterComponent element) throws IOException {
if (element != null) {
open(name);
composeCompositionAttesterComponentProperties(element);
close();
}
}
protected void composeCompositionAttesterComponentProperties(Composition.CompositionAttesterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMode()) {
composeCodeableConcept("mode", element.getMode());
}
if (element.hasTimeElement()) {
composeDateTimeCore("time", element.getTimeElement(), false);
composeDateTimeExtras("time", element.getTimeElement(), false);
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeCompositionEventComponent(String name, Composition.CompositionEventComponent element) throws IOException {
if (element != null) {
open(name);
composeCompositionEventComponentProperties(element);
close();
}
}
protected void composeCompositionEventComponentProperties(Composition.CompositionEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasDetail()) {
openArray("detail");
for (CodeableReference e : element.getDetail())
composeCodeableReference(null, e);
closeArray();
};
}
protected void composeSectionComponent(String name, Composition.SectionComponent element) throws IOException {
if (element != null) {
open(name);
composeSectionComponentProperties(element);
close();
}
}
protected void composeSectionComponentProperties(Composition.SectionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasAuthor()) {
openArray("author");
for (Reference e : element.getAuthor())
composeReference(null, e);
closeArray();
};
if (element.hasFocus()) {
composeReference("focus", element.getFocus());
}
if (element.hasText()) {
composeNarrative("text", element.getText());
}
if (element.hasOrderedBy()) {
composeCodeableConcept("orderedBy", element.getOrderedBy());
}
if (element.hasEntry()) {
openArray("entry");
for (Reference e : element.getEntry())
composeReference(null, e);
closeArray();
};
if (element.hasEmptyReason()) {
composeCodeableConcept("emptyReason", element.getEmptyReason());
}
if (element.hasSection()) {
openArray("section");
for (Composition.SectionComponent e : element.getSection())
composeSectionComponent(null, e);
closeArray();
};
}
protected void composeConceptMap(String name, ConceptMap element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConceptMapProperties(element);
}
}
protected void composeConceptMapProperties(ConceptMap element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (ConceptMap.PropertyComponent e : element.getProperty())
composePropertyComponent(null, e);
closeArray();
};
if (element.hasAdditionalAttribute()) {
openArray("additionalAttribute");
for (ConceptMap.AdditionalAttributeComponent e : element.getAdditionalAttribute())
composeAdditionalAttributeComponent(null, e);
closeArray();
};
if (element.hasSourceScope()) {
composeType("sourceScope", element.getSourceScope());
}
if (element.hasTargetScope()) {
composeType("targetScope", element.getTargetScope());
}
if (element.hasGroup()) {
openArray("group");
for (ConceptMap.ConceptMapGroupComponent e : element.getGroup())
composeConceptMapGroupComponent(null, e);
closeArray();
};
}
protected void composePropertyComponent(String name, ConceptMap.PropertyComponent element) throws IOException {
if (element != null) {
open(name);
composePropertyComponentProperties(element);
close();
}
}
protected void composePropertyComponentProperties(ConceptMap.PropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new ConceptMap.ConceptMapPropertyTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new ConceptMap.ConceptMapPropertyTypeEnumFactory(), false);
}
if (element.hasSystemElement()) {
composeCanonicalCore("system", element.getSystemElement(), false);
composeCanonicalExtras("system", element.getSystemElement(), false);
}
}
protected void composeAdditionalAttributeComponent(String name, ConceptMap.AdditionalAttributeComponent element) throws IOException {
if (element != null) {
open(name);
composeAdditionalAttributeComponentProperties(element);
close();
}
}
protected void composeAdditionalAttributeComponentProperties(ConceptMap.AdditionalAttributeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new ConceptMap.ConceptMapAttributeTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new ConceptMap.ConceptMapAttributeTypeEnumFactory(), false);
}
}
protected void composeConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptMapGroupComponentProperties(element);
close();
}
}
protected void composeConceptMapGroupComponentProperties(ConceptMap.ConceptMapGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSourceElement()) {
composeCanonicalCore("source", element.getSourceElement(), false);
composeCanonicalExtras("source", element.getSourceElement(), false);
}
if (element.hasTargetElement()) {
composeCanonicalCore("target", element.getTargetElement(), false);
composeCanonicalExtras("target", element.getTargetElement(), false);
}
if (element.hasElement()) {
openArray("element");
for (ConceptMap.SourceElementComponent e : element.getElement())
composeSourceElementComponent(null, e);
closeArray();
};
if (element.hasUnmapped()) {
composeConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped());
}
}
protected void composeSourceElementComponent(String name, ConceptMap.SourceElementComponent element) throws IOException {
if (element != null) {
open(name);
composeSourceElementComponentProperties(element);
close();
}
}
protected void composeSourceElementComponentProperties(ConceptMap.SourceElementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasNoMapElement()) {
composeBooleanCore("noMap", element.getNoMapElement(), false);
composeBooleanExtras("noMap", element.getNoMapElement(), false);
}
if (element.hasTarget()) {
openArray("target");
for (ConceptMap.TargetElementComponent e : element.getTarget())
composeTargetElementComponent(null, e);
closeArray();
};
}
protected void composeTargetElementComponent(String name, ConceptMap.TargetElementComponent element) throws IOException {
if (element != null) {
open(name);
composeTargetElementComponentProperties(element);
close();
}
}
protected void composeTargetElementComponentProperties(ConceptMap.TargetElementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasProperty()) {
openArray("property");
for (ConceptMap.MappingPropertyComponent e : element.getProperty())
composeMappingPropertyComponent(null, e);
closeArray();
};
if (element.hasDependsOn()) {
openArray("dependsOn");
for (ConceptMap.OtherElementComponent e : element.getDependsOn())
composeOtherElementComponent(null, e);
closeArray();
};
if (element.hasProduct()) {
openArray("product");
for (ConceptMap.OtherElementComponent e : element.getProduct())
composeOtherElementComponent(null, e);
closeArray();
};
}
protected void composeMappingPropertyComponent(String name, ConceptMap.MappingPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeMappingPropertyComponentProperties(element);
close();
}
}
protected void composeMappingPropertyComponentProperties(ConceptMap.MappingPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeOtherElementComponent(String name, ConceptMap.OtherElementComponent element) throws IOException {
if (element != null) {
open(name);
composeOtherElementComponentProperties(element);
close();
}
}
protected void composeOtherElementComponentProperties(ConceptMap.OtherElementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAttributeElement()) {
composeCodeCore("attribute", element.getAttributeElement(), false);
composeCodeExtras("attribute", element.getAttributeElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
}
protected void composeConceptMapGroupUnmappedComponent(String name, ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptMapGroupUnmappedComponentProperties(element);
close();
}
}
protected void composeConceptMapGroupUnmappedComponentProperties(ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory(), false);
}
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory(), false);
}
if (element.hasOtherMapElement()) {
composeCanonicalCore("otherMap", element.getOtherMapElement(), false);
composeCanonicalExtras("otherMap", element.getOtherMapElement(), false);
}
}
protected void composeCondition(String name, Condition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConditionProperties(element);
}
}
protected void composeConditionProperties(Condition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasClinicalStatus()) {
composeCodeableConcept("clinicalStatus", element.getClinicalStatus());
}
if (element.hasVerificationStatus()) {
composeCodeableConcept("verificationStatus", element.getVerificationStatus());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSeverity()) {
composeCodeableConcept("severity", element.getSeverity());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasBodySite()) {
openArray("bodySite");
for (CodeableConcept e : element.getBodySite())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOnset()) {
composeType("onset", element.getOnset());
}
if (element.hasAbatement()) {
composeType("abatement", element.getAbatement());
}
if (element.hasRecordedDateElement()) {
composeDateTimeCore("recordedDate", element.getRecordedDateElement(), false);
composeDateTimeExtras("recordedDate", element.getRecordedDateElement(), false);
}
if (element.hasParticipant()) {
openArray("participant");
for (Condition.ConditionParticipantComponent e : element.getParticipant())
composeConditionParticipantComponent(null, e);
closeArray();
};
if (element.hasStage()) {
openArray("stage");
for (Condition.ConditionStageComponent e : element.getStage())
composeConditionStageComponent(null, e);
closeArray();
};
if (element.hasEvidence()) {
openArray("evidence");
for (CodeableReference e : element.getEvidence())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeConditionParticipantComponent(String name, Condition.ConditionParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionParticipantComponentProperties(element);
close();
}
}
protected void composeConditionParticipantComponentProperties(Condition.ConditionParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeConditionStageComponent(String name, Condition.ConditionStageComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionStageComponentProperties(element);
close();
}
}
protected void composeConditionStageComponentProperties(Condition.ConditionStageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSummary()) {
composeCodeableConcept("summary", element.getSummary());
}
if (element.hasAssessment()) {
openArray("assessment");
for (Reference e : element.getAssessment())
composeReference(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
}
protected void composeConditionDefinition(String name, ConditionDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConditionDefinitionProperties(element);
}
}
protected void composeConditionDefinitionProperties(ConditionDefinition element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSeverity()) {
composeCodeableConcept("severity", element.getSeverity());
}
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasStage()) {
composeCodeableConcept("stage", element.getStage());
}
if (element.hasHasSeverityElement()) {
composeBooleanCore("hasSeverity", element.getHasSeverityElement(), false);
composeBooleanExtras("hasSeverity", element.getHasSeverityElement(), false);
}
if (element.hasHasBodySiteElement()) {
composeBooleanCore("hasBodySite", element.getHasBodySiteElement(), false);
composeBooleanExtras("hasBodySite", element.getHasBodySiteElement(), false);
}
if (element.hasHasStageElement()) {
composeBooleanCore("hasStage", element.getHasStageElement(), false);
composeBooleanExtras("hasStage", element.getHasStageElement(), false);
}
if (element.hasDefinition()) {
if (anyHasValue(element.getDefinition())) {
openArray("definition");
for (UriType e : element.getDefinition())
composeUriCore(null, e, e != element.getDefinition().get(element.getDefinition().size()-1));
closeArray();
}
if (anyHasExtras(element.getDefinition())) {
openArray("_definition");
for (UriType e : element.getDefinition())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasObservation()) {
openArray("observation");
for (ConditionDefinition.ConditionDefinitionObservationComponent e : element.getObservation())
composeConditionDefinitionObservationComponent(null, e);
closeArray();
};
if (element.hasMedication()) {
openArray("medication");
for (ConditionDefinition.ConditionDefinitionMedicationComponent e : element.getMedication())
composeConditionDefinitionMedicationComponent(null, e);
closeArray();
};
if (element.hasPrecondition()) {
openArray("precondition");
for (ConditionDefinition.ConditionDefinitionPreconditionComponent e : element.getPrecondition())
composeConditionDefinitionPreconditionComponent(null, e);
closeArray();
};
if (element.hasTeam()) {
openArray("team");
for (Reference e : element.getTeam())
composeReference(null, e);
closeArray();
};
if (element.hasQuestionnaire()) {
openArray("questionnaire");
for (ConditionDefinition.ConditionDefinitionQuestionnaireComponent e : element.getQuestionnaire())
composeConditionDefinitionQuestionnaireComponent(null, e);
closeArray();
};
if (element.hasPlan()) {
openArray("plan");
for (ConditionDefinition.ConditionDefinitionPlanComponent e : element.getPlan())
composeConditionDefinitionPlanComponent(null, e);
closeArray();
};
}
protected void composeConditionDefinitionObservationComponent(String name, ConditionDefinition.ConditionDefinitionObservationComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionDefinitionObservationComponentProperties(element);
close();
}
}
protected void composeConditionDefinitionObservationComponentProperties(ConditionDefinition.ConditionDefinitionObservationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeConditionDefinitionMedicationComponent(String name, ConditionDefinition.ConditionDefinitionMedicationComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionDefinitionMedicationComponentProperties(element);
close();
}
}
protected void composeConditionDefinitionMedicationComponentProperties(ConditionDefinition.ConditionDefinitionMedicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeConditionDefinitionPreconditionComponent(String name, ConditionDefinition.ConditionDefinitionPreconditionComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionDefinitionPreconditionComponentProperties(element);
close();
}
}
protected void composeConditionDefinitionPreconditionComponentProperties(ConditionDefinition.ConditionDefinitionPreconditionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new ConditionDefinition.ConditionPreconditionTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new ConditionDefinition.ConditionPreconditionTypeEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeConditionDefinitionQuestionnaireComponent(String name, ConditionDefinition.ConditionDefinitionQuestionnaireComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionDefinitionQuestionnaireComponentProperties(element);
close();
}
}
protected void composeConditionDefinitionQuestionnaireComponentProperties(ConditionDefinition.ConditionDefinitionQuestionnaireComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPurposeElement()) {
composeEnumerationCore("purpose", element.getPurposeElement(), new ConditionDefinition.ConditionQuestionnairePurposeEnumFactory(), false);
composeEnumerationExtras("purpose", element.getPurposeElement(), new ConditionDefinition.ConditionQuestionnairePurposeEnumFactory(), false);
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeConditionDefinitionPlanComponent(String name, ConditionDefinition.ConditionDefinitionPlanComponent element) throws IOException {
if (element != null) {
open(name);
composeConditionDefinitionPlanComponentProperties(element);
close();
}
}
protected void composeConditionDefinitionPlanComponentProperties(ConditionDefinition.ConditionDefinitionPlanComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeConsent(String name, Consent element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConsentProperties(element);
}
}
protected void composeConsentProperties(Consent element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasGrantor()) {
openArray("grantor");
for (Reference e : element.getGrantor())
composeReference(null, e);
closeArray();
};
if (element.hasGrantee()) {
openArray("grantee");
for (Reference e : element.getGrantee())
composeReference(null, e);
closeArray();
};
if (element.hasManager()) {
openArray("manager");
for (Reference e : element.getManager())
composeReference(null, e);
closeArray();
};
if (element.hasController()) {
openArray("controller");
for (Reference e : element.getController())
composeReference(null, e);
closeArray();
};
if (element.hasSourceAttachment()) {
openArray("sourceAttachment");
for (Attachment e : element.getSourceAttachment())
composeAttachment(null, e);
closeArray();
};
if (element.hasSourceReference()) {
openArray("sourceReference");
for (Reference e : element.getSourceReference())
composeReference(null, e);
closeArray();
};
if (element.hasRegulatoryBasis()) {
openArray("regulatoryBasis");
for (CodeableConcept e : element.getRegulatoryBasis())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPolicyBasis()) {
composeConsentPolicyBasisComponent("policyBasis", element.getPolicyBasis());
}
if (element.hasPolicyText()) {
openArray("policyText");
for (Reference e : element.getPolicyText())
composeReference(null, e);
closeArray();
};
if (element.hasVerification()) {
openArray("verification");
for (Consent.ConsentVerificationComponent e : element.getVerification())
composeConsentVerificationComponent(null, e);
closeArray();
};
if (element.hasDecisionElement()) {
composeEnumerationCore("decision", element.getDecisionElement(), new Enumerations.ConsentProvisionTypeEnumFactory(), false);
composeEnumerationExtras("decision", element.getDecisionElement(), new Enumerations.ConsentProvisionTypeEnumFactory(), false);
}
if (element.hasProvision()) {
openArray("provision");
for (Consent.ProvisionComponent e : element.getProvision())
composeProvisionComponent(null, e);
closeArray();
};
}
protected void composeConsentPolicyBasisComponent(String name, Consent.ConsentPolicyBasisComponent element) throws IOException {
if (element != null) {
open(name);
composeConsentPolicyBasisComponentProperties(element);
close();
}
}
protected void composeConsentPolicyBasisComponentProperties(Consent.ConsentPolicyBasisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
}
protected void composeConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element) throws IOException {
if (element != null) {
open(name);
composeConsentVerificationComponentProperties(element);
close();
}
}
protected void composeConsentVerificationComponentProperties(Consent.ConsentVerificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasVerifiedElement()) {
composeBooleanCore("verified", element.getVerifiedElement(), false);
composeBooleanExtras("verified", element.getVerifiedElement(), false);
}
if (element.hasVerificationType()) {
composeCodeableConcept("verificationType", element.getVerificationType());
}
if (element.hasVerifiedBy()) {
composeReference("verifiedBy", element.getVerifiedBy());
}
if (element.hasVerifiedWith()) {
composeReference("verifiedWith", element.getVerifiedWith());
}
if (element.hasVerificationDate()) {
if (anyHasValue(element.getVerificationDate())) {
openArray("verificationDate");
for (DateTimeType e : element.getVerificationDate())
composeDateTimeCore(null, e, e != element.getVerificationDate().get(element.getVerificationDate().size()-1));
closeArray();
}
if (anyHasExtras(element.getVerificationDate())) {
openArray("_verificationDate");
for (DateTimeType e : element.getVerificationDate())
composeDateTimeExtras(null, e, true);
closeArray();
}
};
}
protected void composeProvisionComponent(String name, Consent.ProvisionComponent element) throws IOException {
if (element != null) {
open(name);
composeProvisionComponentProperties(element);
close();
}
}
protected void composeProvisionComponentProperties(Consent.ProvisionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasActor()) {
openArray("actor");
for (Consent.ProvisionActorComponent e : element.getActor())
composeProvisionActorComponent(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (CodeableConcept e : element.getAction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSecurityLabel()) {
openArray("securityLabel");
for (Coding e : element.getSecurityLabel())
composeCoding(null, e);
closeArray();
};
if (element.hasPurpose()) {
openArray("purpose");
for (Coding e : element.getPurpose())
composeCoding(null, e);
closeArray();
};
if (element.hasDocumentType()) {
openArray("documentType");
for (Coding e : element.getDocumentType())
composeCoding(null, e);
closeArray();
};
if (element.hasResourceType()) {
openArray("resourceType");
for (Coding e : element.getResourceType())
composeCoding(null, e);
closeArray();
};
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDataPeriod()) {
composePeriod("dataPeriod", element.getDataPeriod());
}
if (element.hasData()) {
openArray("data");
for (Consent.ProvisionDataComponent e : element.getData())
composeProvisionDataComponent(null, e);
closeArray();
};
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
if (element.hasProvision()) {
openArray("provision");
for (Consent.ProvisionComponent e : element.getProvision())
composeProvisionComponent(null, e);
closeArray();
};
}
protected void composeProvisionActorComponent(String name, Consent.ProvisionActorComponent element) throws IOException {
if (element != null) {
open(name);
composeProvisionActorComponentProperties(element);
close();
}
}
protected void composeProvisionActorComponentProperties(Consent.ProvisionActorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeProvisionDataComponent(String name, Consent.ProvisionDataComponent element) throws IOException {
if (element != null) {
open(name);
composeProvisionDataComponentProperties(element);
close();
}
}
protected void composeProvisionDataComponentProperties(Consent.ProvisionDataComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMeaningElement()) {
composeEnumerationCore("meaning", element.getMeaningElement(), new Enumerations.ConsentDataMeaningEnumFactory(), false);
composeEnumerationExtras("meaning", element.getMeaningElement(), new Enumerations.ConsentDataMeaningEnumFactory(), false);
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeContract(String name, Contract element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeContractProperties(element);
}
}
protected void composeContractProperties(Contract element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Contract.ContractResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Contract.ContractResourceStatusCodesEnumFactory(), false);
}
if (element.hasLegalState()) {
composeCodeableConcept("legalState", element.getLegalState());
}
if (element.hasInstantiatesCanonical()) {
composeReference("instantiatesCanonical", element.getInstantiatesCanonical());
}
if (element.hasInstantiatesUriElement()) {
composeUriCore("instantiatesUri", element.getInstantiatesUriElement(), false);
composeUriExtras("instantiatesUri", element.getInstantiatesUriElement(), false);
}
if (element.hasContentDerivative()) {
composeCodeableConcept("contentDerivative", element.getContentDerivative());
}
if (element.hasIssuedElement()) {
composeDateTimeCore("issued", element.getIssuedElement(), false);
composeDateTimeExtras("issued", element.getIssuedElement(), false);
}
if (element.hasApplies()) {
composePeriod("applies", element.getApplies());
}
if (element.hasExpirationType()) {
composeCodeableConcept("expirationType", element.getExpirationType());
}
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
};
if (element.hasAuthority()) {
openArray("authority");
for (Reference e : element.getAuthority())
composeReference(null, e);
closeArray();
};
if (element.hasDomain()) {
openArray("domain");
for (Reference e : element.getDomain())
composeReference(null, e);
closeArray();
};
if (element.hasSite()) {
openArray("site");
for (Reference e : element.getSite())
composeReference(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasAlias()) {
if (anyHasValue(element.getAlias())) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, e != element.getAlias().get(element.getAlias().size()-1));
closeArray();
}
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasScope()) {
composeCodeableConcept("scope", element.getScope());
}
if (element.hasTopic()) {
composeType("topic", element.getTopic());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
openArray("subType");
for (CodeableConcept e : element.getSubType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasContentDefinition()) {
composeContentDefinitionComponent("contentDefinition", element.getContentDefinition());
}
if (element.hasTerm()) {
openArray("term");
for (Contract.TermComponent e : element.getTerm())
composeTermComponent(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Reference e : element.getSupportingInfo())
composeReference(null, e);
closeArray();
};
if (element.hasRelevantHistory()) {
openArray("relevantHistory");
for (Reference e : element.getRelevantHistory())
composeReference(null, e);
closeArray();
};
if (element.hasSigner()) {
openArray("signer");
for (Contract.SignatoryComponent e : element.getSigner())
composeSignatoryComponent(null, e);
closeArray();
};
if (element.hasFriendly()) {
openArray("friendly");
for (Contract.FriendlyLanguageComponent e : element.getFriendly())
composeFriendlyLanguageComponent(null, e);
closeArray();
};
if (element.hasLegal()) {
openArray("legal");
for (Contract.LegalLanguageComponent e : element.getLegal())
composeLegalLanguageComponent(null, e);
closeArray();
};
if (element.hasRule()) {
openArray("rule");
for (Contract.ComputableLanguageComponent e : element.getRule())
composeComputableLanguageComponent(null, e);
closeArray();
};
if (element.hasLegallyBinding()) {
composeType("legallyBinding", element.getLegallyBinding());
}
}
protected void composeContentDefinitionComponent(String name, Contract.ContentDefinitionComponent element) throws IOException {
if (element != null) {
open(name);
composeContentDefinitionComponentProperties(element);
close();
}
}
protected void composeContentDefinitionComponentProperties(Contract.ContentDefinitionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasPublisher()) {
composeReference("publisher", element.getPublisher());
}
if (element.hasPublicationDateElement()) {
composeDateTimeCore("publicationDate", element.getPublicationDateElement(), false);
composeDateTimeExtras("publicationDate", element.getPublicationDateElement(), false);
}
if (element.hasPublicationStatusElement()) {
composeEnumerationCore("publicationStatus", element.getPublicationStatusElement(), new Contract.ContractResourcePublicationStatusCodesEnumFactory(), false);
composeEnumerationExtras("publicationStatus", element.getPublicationStatusElement(), new Contract.ContractResourcePublicationStatusCodesEnumFactory(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
}
protected void composeTermComponent(String name, Contract.TermComponent element) throws IOException {
if (element != null) {
open(name);
composeTermComponentProperties(element);
close();
}
}
protected void composeTermComponentProperties(Contract.TermComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasIssuedElement()) {
composeDateTimeCore("issued", element.getIssuedElement(), false);
composeDateTimeExtras("issued", element.getIssuedElement(), false);
}
if (element.hasApplies()) {
composePeriod("applies", element.getApplies());
}
if (element.hasTopic()) {
composeType("topic", element.getTopic());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasSecurityLabel()) {
openArray("securityLabel");
for (Contract.SecurityLabelComponent e : element.getSecurityLabel())
composeSecurityLabelComponent(null, e);
closeArray();
};
if (element.hasOffer()) {
composeContractOfferComponent("offer", element.getOffer());
}
if (element.hasAsset()) {
openArray("asset");
for (Contract.ContractAssetComponent e : element.getAsset())
composeContractAssetComponent(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (Contract.ActionComponent e : element.getAction())
composeActionComponent(null, e);
closeArray();
};
if (element.hasGroup()) {
openArray("group");
for (Contract.TermComponent e : element.getGroup())
composeTermComponent(null, e);
closeArray();
};
}
protected void composeSecurityLabelComponent(String name, Contract.SecurityLabelComponent element) throws IOException {
if (element != null) {
open(name);
composeSecurityLabelComponentProperties(element);
close();
}
}
protected void composeSecurityLabelComponentProperties(Contract.SecurityLabelComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNumber()) {
if (anyHasValue(element.getNumber())) {
openArray("number");
for (UnsignedIntType e : element.getNumber())
composeUnsignedIntCore(null, e, e != element.getNumber().get(element.getNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNumber())) {
openArray("_number");
for (UnsignedIntType e : element.getNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
};
if (element.hasClassification()) {
composeCoding("classification", element.getClassification());
}
if (element.hasCategory()) {
openArray("category");
for (Coding e : element.getCategory())
composeCoding(null, e);
closeArray();
};
if (element.hasControl()) {
openArray("control");
for (Coding e : element.getControl())
composeCoding(null, e);
closeArray();
};
}
protected void composeContractOfferComponent(String name, Contract.ContractOfferComponent element) throws IOException {
if (element != null) {
open(name);
composeContractOfferComponentProperties(element);
close();
}
}
protected void composeContractOfferComponentProperties(Contract.ContractOfferComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasParty()) {
openArray("party");
for (Contract.ContractPartyComponent e : element.getParty())
composeContractPartyComponent(null, e);
closeArray();
};
if (element.hasTopic()) {
composeReference("topic", element.getTopic());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDecision()) {
composeCodeableConcept("decision", element.getDecision());
}
if (element.hasDecisionMode()) {
openArray("decisionMode");
for (CodeableConcept e : element.getDecisionMode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAnswer()) {
openArray("answer");
for (Contract.AnswerComponent e : element.getAnswer())
composeAnswerComponent(null, e);
closeArray();
};
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLinkId()) {
if (anyHasValue(element.getLinkId())) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, e != element.getLinkId().get(element.getLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getLinkId())) {
openArray("_linkId");
for (StringType e : element.getLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSecurityLabelNumber()) {
if (anyHasValue(element.getSecurityLabelNumber())) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, e != element.getSecurityLabelNumber().get(element.getSecurityLabelNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
};
}
protected void composeContractPartyComponent(String name, Contract.ContractPartyComponent element) throws IOException {
if (element != null) {
open(name);
composeContractPartyComponentProperties(element);
close();
}
}
protected void composeContractPartyComponentProperties(Contract.ContractPartyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
openArray("reference");
for (Reference e : element.getReference())
composeReference(null, e);
closeArray();
};
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composeAnswerComponent(String name, Contract.AnswerComponent element) throws IOException {
if (element != null) {
open(name);
composeAnswerComponentProperties(element);
close();
}
}
protected void composeAnswerComponentProperties(Contract.AnswerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeContractAssetComponent(String name, Contract.ContractAssetComponent element) throws IOException {
if (element != null) {
open(name);
composeContractAssetComponentProperties(element);
close();
}
}
protected void composeContractAssetComponentProperties(Contract.ContractAssetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasScope()) {
composeCodeableConcept("scope", element.getScope());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasTypeReference()) {
openArray("typeReference");
for (Reference e : element.getTypeReference())
composeReference(null, e);
closeArray();
};
if (element.hasSubtype()) {
openArray("subtype");
for (CodeableConcept e : element.getSubtype())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasRelationship()) {
composeCoding("relationship", element.getRelationship());
}
if (element.hasContext()) {
openArray("context");
for (Contract.AssetContextComponent e : element.getContext())
composeAssetContextComponent(null, e);
closeArray();
};
if (element.hasConditionElement()) {
composeStringCore("condition", element.getConditionElement(), false);
composeStringExtras("condition", element.getConditionElement(), false);
}
if (element.hasPeriodType()) {
openArray("periodType");
for (CodeableConcept e : element.getPeriodType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPeriod()) {
openArray("period");
for (Period e : element.getPeriod())
composePeriod(null, e);
closeArray();
};
if (element.hasUsePeriod()) {
openArray("usePeriod");
for (Period e : element.getUsePeriod())
composePeriod(null, e);
closeArray();
};
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLinkId()) {
if (anyHasValue(element.getLinkId())) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, e != element.getLinkId().get(element.getLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getLinkId())) {
openArray("_linkId");
for (StringType e : element.getLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasAnswer()) {
openArray("answer");
for (Contract.AnswerComponent e : element.getAnswer())
composeAnswerComponent(null, e);
closeArray();
};
if (element.hasSecurityLabelNumber()) {
if (anyHasValue(element.getSecurityLabelNumber())) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, e != element.getSecurityLabelNumber().get(element.getSecurityLabelNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
};
if (element.hasValuedItem()) {
openArray("valuedItem");
for (Contract.ValuedItemComponent e : element.getValuedItem())
composeValuedItemComponent(null, e);
closeArray();
};
}
protected void composeAssetContextComponent(String name, Contract.AssetContextComponent element) throws IOException {
if (element != null) {
open(name);
composeAssetContextComponentProperties(element);
close();
}
}
protected void composeAssetContextComponentProperties(Contract.AssetContextComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
}
protected void composeValuedItemComponent(String name, Contract.ValuedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeValuedItemComponentProperties(element);
close();
}
}
protected void composeValuedItemComponentProperties(Contract.ValuedItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEntity()) {
composeType("entity", element.getEntity());
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasEffectiveTimeElement()) {
composeDateTimeCore("effectiveTime", element.getEffectiveTimeElement(), false);
composeDateTimeExtras("effectiveTime", element.getEffectiveTimeElement(), false);
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasPointsElement()) {
composeDecimalCore("points", element.getPointsElement(), false);
composeDecimalExtras("points", element.getPointsElement(), false);
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasPaymentElement()) {
composeStringCore("payment", element.getPaymentElement(), false);
composeStringExtras("payment", element.getPaymentElement(), false);
}
if (element.hasPaymentDateElement()) {
composeDateTimeCore("paymentDate", element.getPaymentDateElement(), false);
composeDateTimeExtras("paymentDate", element.getPaymentDateElement(), false);
}
if (element.hasResponsible()) {
composeReference("responsible", element.getResponsible());
}
if (element.hasRecipient()) {
composeReference("recipient", element.getRecipient());
}
if (element.hasLinkId()) {
if (anyHasValue(element.getLinkId())) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, e != element.getLinkId().get(element.getLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getLinkId())) {
openArray("_linkId");
for (StringType e : element.getLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSecurityLabelNumber()) {
if (anyHasValue(element.getSecurityLabelNumber())) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, e != element.getSecurityLabelNumber().get(element.getSecurityLabelNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
};
}
protected void composeActionComponent(String name, Contract.ActionComponent element) throws IOException {
if (element != null) {
open(name);
composeActionComponentProperties(element);
close();
}
}
protected void composeActionComponentProperties(Contract.ActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubject()) {
openArray("subject");
for (Contract.ActionSubjectComponent e : element.getSubject())
composeActionSubjectComponent(null, e);
closeArray();
};
if (element.hasIntent()) {
composeCodeableConcept("intent", element.getIntent());
}
if (element.hasLinkId()) {
if (anyHasValue(element.getLinkId())) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, e != element.getLinkId().get(element.getLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getLinkId())) {
openArray("_linkId");
for (StringType e : element.getLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasContext()) {
composeReference("context", element.getContext());
}
if (element.hasContextLinkId()) {
if (anyHasValue(element.getContextLinkId())) {
openArray("contextLinkId");
for (StringType e : element.getContextLinkId())
composeStringCore(null, e, e != element.getContextLinkId().get(element.getContextLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getContextLinkId())) {
openArray("_contextLinkId");
for (StringType e : element.getContextLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasRequester()) {
openArray("requester");
for (Reference e : element.getRequester())
composeReference(null, e);
closeArray();
};
if (element.hasRequesterLinkId()) {
if (anyHasValue(element.getRequesterLinkId())) {
openArray("requesterLinkId");
for (StringType e : element.getRequesterLinkId())
composeStringCore(null, e, e != element.getRequesterLinkId().get(element.getRequesterLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getRequesterLinkId())) {
openArray("_requesterLinkId");
for (StringType e : element.getRequesterLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasPerformerType()) {
openArray("performerType");
for (CodeableConcept e : element.getPerformerType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPerformerRole()) {
composeCodeableConcept("performerRole", element.getPerformerRole());
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasPerformerLinkId()) {
if (anyHasValue(element.getPerformerLinkId())) {
openArray("performerLinkId");
for (StringType e : element.getPerformerLinkId())
composeStringCore(null, e, e != element.getPerformerLinkId().get(element.getPerformerLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getPerformerLinkId())) {
openArray("_performerLinkId");
for (StringType e : element.getPerformerLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasReasonLinkId()) {
if (anyHasValue(element.getReasonLinkId())) {
openArray("reasonLinkId");
for (StringType e : element.getReasonLinkId())
composeStringCore(null, e, e != element.getReasonLinkId().get(element.getReasonLinkId().size()-1));
closeArray();
}
if (anyHasExtras(element.getReasonLinkId())) {
openArray("_reasonLinkId");
for (StringType e : element.getReasonLinkId())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasSecurityLabelNumber()) {
if (anyHasValue(element.getSecurityLabelNumber())) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, e != element.getSecurityLabelNumber().get(element.getSecurityLabelNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
};
}
protected void composeActionSubjectComponent(String name, Contract.ActionSubjectComponent element) throws IOException {
if (element != null) {
open(name);
composeActionSubjectComponentProperties(element);
close();
}
}
protected void composeActionSubjectComponentProperties(Contract.ActionSubjectComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
openArray("reference");
for (Reference e : element.getReference())
composeReference(null, e);
closeArray();
};
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composeSignatoryComponent(String name, Contract.SignatoryComponent element) throws IOException {
if (element != null) {
open(name);
composeSignatoryComponentProperties(element);
close();
}
}
protected void composeSignatoryComponentProperties(Contract.SignatoryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
if (element.hasSignature()) {
openArray("signature");
for (Signature e : element.getSignature())
composeSignature(null, e);
closeArray();
};
}
protected void composeFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element) throws IOException {
if (element != null) {
open(name);
composeFriendlyLanguageComponentProperties(element);
close();
}
}
protected void composeFriendlyLanguageComponentProperties(Contract.FriendlyLanguageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeLegalLanguageComponent(String name, Contract.LegalLanguageComponent element) throws IOException {
if (element != null) {
open(name);
composeLegalLanguageComponentProperties(element);
close();
}
}
protected void composeLegalLanguageComponentProperties(Contract.LegalLanguageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element) throws IOException {
if (element != null) {
open(name);
composeComputableLanguageComponentProperties(element);
close();
}
}
protected void composeComputableLanguageComponentProperties(Contract.ComputableLanguageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeCoverage(String name, Coverage element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCoverageProperties(element);
}
}
protected void composeCoverageProperties(Coverage element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new Coverage.KindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new Coverage.KindEnumFactory(), false);
}
if (element.hasPaymentBy()) {
openArray("paymentBy");
for (Coverage.CoveragePaymentByComponent e : element.getPaymentBy())
composeCoveragePaymentByComponent(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPolicyHolder()) {
composeReference("policyHolder", element.getPolicyHolder());
}
if (element.hasSubscriber()) {
composeReference("subscriber", element.getSubscriber());
}
if (element.hasSubscriberId()) {
openArray("subscriberId");
for (Identifier e : element.getSubscriberId())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBeneficiary()) {
composeReference("beneficiary", element.getBeneficiary());
}
if (element.hasDependentElement()) {
composeStringCore("dependent", element.getDependentElement(), false);
composeStringExtras("dependent", element.getDependentElement(), false);
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasClass_()) {
openArray("class");
for (Coverage.ClassComponent e : element.getClass_())
composeClassComponent(null, e);
closeArray();
};
if (element.hasOrderElement()) {
composePositiveIntCore("order", element.getOrderElement(), false);
composePositiveIntExtras("order", element.getOrderElement(), false);
}
if (element.hasNetworkElement()) {
composeStringCore("network", element.getNetworkElement(), false);
composeStringExtras("network", element.getNetworkElement(), false);
}
if (element.hasCostToBeneficiary()) {
openArray("costToBeneficiary");
for (Coverage.CostToBeneficiaryComponent e : element.getCostToBeneficiary())
composeCostToBeneficiaryComponent(null, e);
closeArray();
};
if (element.hasSubrogationElement()) {
composeBooleanCore("subrogation", element.getSubrogationElement(), false);
composeBooleanExtras("subrogation", element.getSubrogationElement(), false);
}
if (element.hasContract()) {
openArray("contract");
for (Reference e : element.getContract())
composeReference(null, e);
closeArray();
};
if (element.hasInsurancePlan()) {
composeReference("insurancePlan", element.getInsurancePlan());
}
}
protected void composeCoveragePaymentByComponent(String name, Coverage.CoveragePaymentByComponent element) throws IOException {
if (element != null) {
open(name);
composeCoveragePaymentByComponentProperties(element);
close();
}
}
protected void composeCoveragePaymentByComponentProperties(Coverage.CoveragePaymentByComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasParty()) {
composeReference("party", element.getParty());
}
if (element.hasResponsibilityElement()) {
composeStringCore("responsibility", element.getResponsibilityElement(), false);
composeStringExtras("responsibility", element.getResponsibilityElement(), false);
}
}
protected void composeClassComponent(String name, Coverage.ClassComponent element) throws IOException {
if (element != null) {
open(name);
composeClassComponentProperties(element);
close();
}
}
protected void composeClassComponentProperties(Coverage.ClassComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeIdentifier("value", element.getValue());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
}
protected void composeCostToBeneficiaryComponent(String name, Coverage.CostToBeneficiaryComponent element) throws IOException {
if (element != null) {
open(name);
composeCostToBeneficiaryComponentProperties(element);
close();
}
}
protected void composeCostToBeneficiaryComponentProperties(Coverage.CostToBeneficiaryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasNetwork()) {
composeCodeableConcept("network", element.getNetwork());
}
if (element.hasUnit()) {
composeCodeableConcept("unit", element.getUnit());
}
if (element.hasTerm()) {
composeCodeableConcept("term", element.getTerm());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasException()) {
openArray("exception");
for (Coverage.ExemptionComponent e : element.getException())
composeExemptionComponent(null, e);
closeArray();
};
}
protected void composeExemptionComponent(String name, Coverage.ExemptionComponent element) throws IOException {
if (element != null) {
open(name);
composeExemptionComponentProperties(element);
close();
}
}
protected void composeExemptionComponentProperties(Coverage.ExemptionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeCoverageEligibilityRequest(String name, CoverageEligibilityRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCoverageEligibilityRequestProperties(element);
}
}
protected void composeCoverageEligibilityRequestProperties(CoverageEligibilityRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasPurpose()) {
openArray("purpose");
for (Enumeration e : element.getPurpose())
composeEnumerationCore(null, e, new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getPurpose())) {
openArray("_purpose");
for (Enumeration e : element.getPurpose())
composeEnumerationExtras(null, e, new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory(), true);
closeArray();
}
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEvent()) {
openArray("event");
for (CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent e : element.getEvent())
composeCoverageEligibilityRequestEventComponent(null, e);
closeArray();
};
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasEnterer()) {
composeReference("enterer", element.getEnterer());
}
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasFacility()) {
composeReference("facility", element.getFacility());
}
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (CoverageEligibilityRequest.SupportingInformationComponent e : element.getSupportingInfo())
composeSupportingInformationComponent(null, e);
closeArray();
};
if (element.hasInsurance()) {
openArray("insurance");
for (CoverageEligibilityRequest.InsuranceComponent e : element.getInsurance())
composeInsuranceComponent(null, e);
closeArray();
};
if (element.hasItem()) {
openArray("item");
for (CoverageEligibilityRequest.DetailsComponent e : element.getItem())
composeDetailsComponent(null, e);
closeArray();
};
}
protected void composeCoverageEligibilityRequestEventComponent(String name, CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityRequestEventComponentProperties(element);
close();
}
}
protected void composeCoverageEligibilityRequestEventComponentProperties(CoverageEligibilityRequest.CoverageEligibilityRequestEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasWhen()) {
composeType("when", element.getWhen());
}
}
protected void composeSupportingInformationComponent(String name, CoverageEligibilityRequest.SupportingInformationComponent element) throws IOException {
if (element != null) {
open(name);
composeSupportingInformationComponentProperties(element);
close();
}
}
protected void composeSupportingInformationComponentProperties(CoverageEligibilityRequest.SupportingInformationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasInformation()) {
composeReference("information", element.getInformation());
}
if (element.hasAppliesToAllElement()) {
composeBooleanCore("appliesToAll", element.getAppliesToAllElement(), false);
composeBooleanExtras("appliesToAll", element.getAppliesToAllElement(), false);
}
}
protected void composeInsuranceComponent(String name, CoverageEligibilityRequest.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeInsuranceComponentProperties(element);
close();
}
}
protected void composeInsuranceComponentProperties(CoverageEligibilityRequest.InsuranceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFocalElement()) {
composeBooleanCore("focal", element.getFocalElement(), false);
composeBooleanExtras("focal", element.getFocalElement(), false);
}
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasBusinessArrangementElement()) {
composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false);
composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false);
}
}
protected void composeDetailsComponent(String name, CoverageEligibilityRequest.DetailsComponent element) throws IOException {
if (element != null) {
open(name);
composeDetailsComponentProperties(element);
close();
}
}
protected void composeDetailsComponentProperties(CoverageEligibilityRequest.DetailsComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSupportingInfoSequence()) {
if (anyHasValue(element.getSupportingInfoSequence())) {
openArray("supportingInfoSequence");
for (PositiveIntType e : element.getSupportingInfoSequence())
composePositiveIntCore(null, e, e != element.getSupportingInfoSequence().get(element.getSupportingInfoSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getSupportingInfoSequence())) {
openArray("_supportingInfoSequence");
for (PositiveIntType e : element.getSupportingInfoSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFacility()) {
composeReference("facility", element.getFacility());
}
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (CoverageEligibilityRequest.DiagnosisComponent e : element.getDiagnosis())
composeDiagnosisComponent(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (Reference e : element.getDetail())
composeReference(null, e);
closeArray();
};
}
protected void composeDiagnosisComponent(String name, CoverageEligibilityRequest.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosisComponentProperties(element);
close();
}
}
protected void composeDiagnosisComponentProperties(CoverageEligibilityRequest.DiagnosisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDiagnosis()) {
composeType("diagnosis", element.getDiagnosis());
}
}
protected void composeCoverageEligibilityResponse(String name, CoverageEligibilityResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCoverageEligibilityResponseProperties(element);
}
}
protected void composeCoverageEligibilityResponseProperties(CoverageEligibilityResponse element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasPurpose()) {
openArray("purpose");
for (Enumeration e : element.getPurpose())
composeEnumerationCore(null, e, new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getPurpose())) {
openArray("_purpose");
for (Enumeration e : element.getPurpose())
composeEnumerationExtras(null, e, new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory(), true);
closeArray();
}
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEvent()) {
openArray("event");
for (CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent e : element.getEvent())
composeCoverageEligibilityResponseEventComponent(null, e);
closeArray();
};
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasRequestor()) {
composeReference("requestor", element.getRequestor());
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new CoverageEligibilityResponse.EligibilityOutcomeEnumFactory(), false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new CoverageEligibilityResponse.EligibilityOutcomeEnumFactory(), false);
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasInsurance()) {
openArray("insurance");
for (CoverageEligibilityResponse.InsuranceComponent e : element.getInsurance())
composeInsuranceComponent(null, e);
closeArray();
};
if (element.hasPreAuthRefElement()) {
composeStringCore("preAuthRef", element.getPreAuthRefElement(), false);
composeStringExtras("preAuthRef", element.getPreAuthRefElement(), false);
}
if (element.hasForm()) {
composeCodeableConcept("form", element.getForm());
}
if (element.hasError()) {
openArray("error");
for (CoverageEligibilityResponse.ErrorsComponent e : element.getError())
composeErrorsComponent(null, e);
closeArray();
};
}
protected void composeCoverageEligibilityResponseEventComponent(String name, CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityResponseEventComponentProperties(element);
close();
}
}
protected void composeCoverageEligibilityResponseEventComponentProperties(CoverageEligibilityResponse.CoverageEligibilityResponseEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasWhen()) {
composeType("when", element.getWhen());
}
}
protected void composeInsuranceComponent(String name, CoverageEligibilityResponse.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeInsuranceComponentProperties(element);
close();
}
}
protected void composeInsuranceComponentProperties(CoverageEligibilityResponse.InsuranceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasInforceElement()) {
composeBooleanCore("inforce", element.getInforceElement(), false);
composeBooleanExtras("inforce", element.getInforceElement(), false);
}
if (element.hasBenefitPeriod()) {
composePeriod("benefitPeriod", element.getBenefitPeriod());
}
if (element.hasItem()) {
openArray("item");
for (CoverageEligibilityResponse.ItemsComponent e : element.getItem())
composeItemsComponent(null, e);
closeArray();
};
}
protected void composeItemsComponent(String name, CoverageEligibilityResponse.ItemsComponent element) throws IOException {
if (element != null) {
open(name);
composeItemsComponentProperties(element);
close();
}
}
protected void composeItemsComponentProperties(CoverageEligibilityResponse.ItemsComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasExcludedElement()) {
composeBooleanCore("excluded", element.getExcludedElement(), false);
composeBooleanExtras("excluded", element.getExcludedElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNetwork()) {
composeCodeableConcept("network", element.getNetwork());
}
if (element.hasUnit()) {
composeCodeableConcept("unit", element.getUnit());
}
if (element.hasTerm()) {
composeCodeableConcept("term", element.getTerm());
}
if (element.hasBenefit()) {
openArray("benefit");
for (CoverageEligibilityResponse.BenefitComponent e : element.getBenefit())
composeBenefitComponent(null, e);
closeArray();
};
if (element.hasAuthorizationRequiredElement()) {
composeBooleanCore("authorizationRequired", element.getAuthorizationRequiredElement(), false);
composeBooleanExtras("authorizationRequired", element.getAuthorizationRequiredElement(), false);
}
if (element.hasAuthorizationSupporting()) {
openArray("authorizationSupporting");
for (CodeableConcept e : element.getAuthorizationSupporting())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthorizationUrlElement()) {
composeUriCore("authorizationUrl", element.getAuthorizationUrlElement(), false);
composeUriExtras("authorizationUrl", element.getAuthorizationUrlElement(), false);
}
}
protected void composeBenefitComponent(String name, CoverageEligibilityResponse.BenefitComponent element) throws IOException {
if (element != null) {
open(name);
composeBenefitComponentProperties(element);
close();
}
}
protected void composeBenefitComponentProperties(CoverageEligibilityResponse.BenefitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAllowed()) {
composeType("allowed", element.getAllowed());
}
if (element.hasUsed()) {
composeType("used", element.getUsed());
}
}
protected void composeErrorsComponent(String name, CoverageEligibilityResponse.ErrorsComponent element) throws IOException {
if (element != null) {
open(name);
composeErrorsComponentProperties(element);
close();
}
}
protected void composeErrorsComponentProperties(CoverageEligibilityResponse.ErrorsComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasExpression()) {
if (anyHasValue(element.getExpression())) {
openArray("expression");
for (StringType e : element.getExpression())
composeStringCore(null, e, e != element.getExpression().get(element.getExpression().size()-1));
closeArray();
}
if (anyHasExtras(element.getExpression())) {
openArray("_expression");
for (StringType e : element.getExpression())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDetectedIssueProperties(element);
}
}
protected void composeDetectedIssueProperties(DetectedIssue element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSeverityElement()) {
composeEnumerationCore("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory(), false);
composeEnumerationExtras("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasIdentified()) {
composeType("identified", element.getIdentified());
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasImplicated()) {
openArray("implicated");
for (Reference e : element.getImplicated())
composeReference(null, e);
closeArray();
};
if (element.hasEvidence()) {
openArray("evidence");
for (DetectedIssue.DetectedIssueEvidenceComponent e : element.getEvidence())
composeDetectedIssueEvidenceComponent(null, e);
closeArray();
};
if (element.hasDetailElement()) {
composeMarkdownCore("detail", element.getDetailElement(), false);
composeMarkdownExtras("detail", element.getDetailElement(), false);
}
if (element.hasReferenceElement()) {
composeUriCore("reference", element.getReferenceElement(), false);
composeUriExtras("reference", element.getReferenceElement(), false);
}
if (element.hasMitigation()) {
openArray("mitigation");
for (DetectedIssue.DetectedIssueMitigationComponent e : element.getMitigation())
composeDetectedIssueMitigationComponent(null, e);
closeArray();
};
}
protected void composeDetectedIssueEvidenceComponent(String name, DetectedIssue.DetectedIssueEvidenceComponent element) throws IOException {
if (element != null) {
open(name);
composeDetectedIssueEvidenceComponentProperties(element);
close();
}
}
protected void composeDetectedIssueEvidenceComponentProperties(DetectedIssue.DetectedIssueEvidenceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (Reference e : element.getDetail())
composeReference(null, e);
closeArray();
};
}
protected void composeDetectedIssueMitigationComponent(String name, DetectedIssue.DetectedIssueMitigationComponent element) throws IOException {
if (element != null) {
open(name);
composeDetectedIssueMitigationComponentProperties(element);
close();
}
}
protected void composeDetectedIssueMitigationComponentProperties(DetectedIssue.DetectedIssueMitigationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAction()) {
composeCodeableConcept("action", element.getAction());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeDevice(String name, Device element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceProperties(element);
}
}
protected void composeDeviceProperties(Device element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasDisplayNameElement()) {
composeStringCore("displayName", element.getDisplayNameElement(), false);
composeStringExtras("displayName", element.getDisplayNameElement(), false);
}
if (element.hasDefinition()) {
composeCodeableReference("definition", element.getDefinition());
}
if (element.hasUdiCarrier()) {
openArray("udiCarrier");
for (Device.DeviceUdiCarrierComponent e : element.getUdiCarrier())
composeDeviceUdiCarrierComponent(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false);
}
if (element.hasAvailabilityStatus()) {
composeCodeableConcept("availabilityStatus", element.getAvailabilityStatus());
}
if (element.hasBiologicalSourceEvent()) {
composeIdentifier("biologicalSourceEvent", element.getBiologicalSourceEvent());
}
if (element.hasManufacturerElement()) {
composeStringCore("manufacturer", element.getManufacturerElement(), false);
composeStringExtras("manufacturer", element.getManufacturerElement(), false);
}
if (element.hasManufactureDateElement()) {
composeDateTimeCore("manufactureDate", element.getManufactureDateElement(), false);
composeDateTimeExtras("manufactureDate", element.getManufactureDateElement(), false);
}
if (element.hasExpirationDateElement()) {
composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false);
composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false);
}
if (element.hasLotNumberElement()) {
composeStringCore("lotNumber", element.getLotNumberElement(), false);
composeStringExtras("lotNumber", element.getLotNumberElement(), false);
}
if (element.hasSerialNumberElement()) {
composeStringCore("serialNumber", element.getSerialNumberElement(), false);
composeStringExtras("serialNumber", element.getSerialNumberElement(), false);
}
if (element.hasName()) {
openArray("name");
for (Device.DeviceNameComponent e : element.getName())
composeDeviceNameComponent(null, e);
closeArray();
};
if (element.hasModelNumberElement()) {
composeStringCore("modelNumber", element.getModelNumberElement(), false);
composeStringExtras("modelNumber", element.getModelNumberElement(), false);
}
if (element.hasPartNumberElement()) {
composeStringCore("partNumber", element.getPartNumberElement(), false);
composeStringExtras("partNumber", element.getPartNumberElement(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasVersion()) {
openArray("version");
for (Device.DeviceVersionComponent e : element.getVersion())
composeDeviceVersionComponent(null, e);
closeArray();
};
if (element.hasConformsTo()) {
openArray("conformsTo");
for (Device.DeviceConformsToComponent e : element.getConformsTo())
composeDeviceConformsToComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (Device.DevicePropertyComponent e : element.getProperty())
composeDevicePropertyComponent(null, e);
closeArray();
};
if (element.hasMode()) {
composeCodeableConcept("mode", element.getMode());
}
if (element.hasCycle()) {
composeCount("cycle", element.getCycle());
}
if (element.hasDuration()) {
composeDuration("duration", element.getDuration());
}
if (element.hasOwner()) {
composeReference("owner", element.getOwner());
}
if (element.hasContact()) {
openArray("contact");
for (ContactPoint e : element.getContact())
composeContactPoint(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
if (element.hasGateway()) {
openArray("gateway");
for (CodeableReference e : element.getGateway())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasSafety()) {
openArray("safety");
for (CodeableConcept e : element.getSafety())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasParent()) {
composeReference("parent", element.getParent());
}
}
protected void composeDeviceUdiCarrierComponent(String name, Device.DeviceUdiCarrierComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceUdiCarrierComponentProperties(element);
close();
}
}
protected void composeDeviceUdiCarrierComponentProperties(Device.DeviceUdiCarrierComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDeviceIdentifierElement()) {
composeStringCore("deviceIdentifier", element.getDeviceIdentifierElement(), false);
composeStringExtras("deviceIdentifier", element.getDeviceIdentifierElement(), false);
}
if (element.hasIssuerElement()) {
composeUriCore("issuer", element.getIssuerElement(), false);
composeUriExtras("issuer", element.getIssuerElement(), false);
}
if (element.hasJurisdictionElement()) {
composeUriCore("jurisdiction", element.getJurisdictionElement(), false);
composeUriExtras("jurisdiction", element.getJurisdictionElement(), false);
}
if (element.hasCarrierAIDCElement()) {
composeBase64BinaryCore("carrierAIDC", element.getCarrierAIDCElement(), false);
composeBase64BinaryExtras("carrierAIDC", element.getCarrierAIDCElement(), false);
}
if (element.hasCarrierHRFElement()) {
composeStringCore("carrierHRF", element.getCarrierHRFElement(), false);
composeStringExtras("carrierHRF", element.getCarrierHRFElement(), false);
}
if (element.hasEntryTypeElement()) {
composeEnumerationCore("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory(), false);
composeEnumerationExtras("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory(), false);
}
}
protected void composeDeviceNameComponent(String name, Device.DeviceNameComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceNameComponentProperties(element);
close();
}
}
protected void composeDeviceNameComponentProperties(Device.DeviceNameComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.DeviceNameTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.DeviceNameTypeEnumFactory(), false);
}
if (element.hasDisplayElement()) {
composeBooleanCore("display", element.getDisplayElement(), false);
composeBooleanExtras("display", element.getDisplayElement(), false);
}
}
protected void composeDeviceVersionComponent(String name, Device.DeviceVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceVersionComponentProperties(element);
close();
}
}
protected void composeDeviceVersionComponentProperties(Device.DeviceVersionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasComponent()) {
composeIdentifier("component", element.getComponent());
}
if (element.hasInstallDateElement()) {
composeDateTimeCore("installDate", element.getInstallDateElement(), false);
composeDateTimeExtras("installDate", element.getInstallDateElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeDeviceConformsToComponent(String name, Device.DeviceConformsToComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceConformsToComponentProperties(element);
close();
}
}
protected void composeDeviceConformsToComponentProperties(Device.DeviceConformsToComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasSpecification()) {
composeCodeableConcept("specification", element.getSpecification());
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
}
protected void composeDevicePropertyComponent(String name, Device.DevicePropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeDevicePropertyComponentProperties(element);
close();
}
}
protected void composeDevicePropertyComponentProperties(Device.DevicePropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeDeviceAssociation(String name, DeviceAssociation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceAssociationProperties(element);
}
}
protected void composeDeviceAssociationProperties(DeviceAssociation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasStatusReason()) {
openArray("statusReason");
for (CodeableConcept e : element.getStatusReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasBodyStructure()) {
composeReference("bodyStructure", element.getBodyStructure());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasOperation()) {
openArray("operation");
for (DeviceAssociation.DeviceAssociationOperationComponent e : element.getOperation())
composeDeviceAssociationOperationComponent(null, e);
closeArray();
};
}
protected void composeDeviceAssociationOperationComponent(String name, DeviceAssociation.DeviceAssociationOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceAssociationOperationComponentProperties(element);
close();
}
}
protected void composeDeviceAssociationOperationComponentProperties(DeviceAssociation.DeviceAssociationOperationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasOperator()) {
openArray("operator");
for (Reference e : element.getOperator())
composeReference(null, e);
closeArray();
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeDeviceDefinition(String name, DeviceDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceDefinitionProperties(element);
}
}
protected void composeDeviceDefinitionProperties(DeviceDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasUdiDeviceIdentifier()) {
openArray("udiDeviceIdentifier");
for (DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent e : element.getUdiDeviceIdentifier())
composeDeviceDefinitionUdiDeviceIdentifierComponent(null, e);
closeArray();
};
if (element.hasRegulatoryIdentifier()) {
openArray("regulatoryIdentifier");
for (DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent e : element.getRegulatoryIdentifier())
composeDeviceDefinitionRegulatoryIdentifierComponent(null, e);
closeArray();
};
if (element.hasPartNumberElement()) {
composeStringCore("partNumber", element.getPartNumberElement(), false);
composeStringExtras("partNumber", element.getPartNumberElement(), false);
}
if (element.hasManufacturer()) {
composeReference("manufacturer", element.getManufacturer());
}
if (element.hasDeviceName()) {
openArray("deviceName");
for (DeviceDefinition.DeviceDefinitionDeviceNameComponent e : element.getDeviceName())
composeDeviceDefinitionDeviceNameComponent(null, e);
closeArray();
};
if (element.hasModelNumberElement()) {
composeStringCore("modelNumber", element.getModelNumberElement(), false);
composeStringExtras("modelNumber", element.getModelNumberElement(), false);
}
if (element.hasClassification()) {
openArray("classification");
for (DeviceDefinition.DeviceDefinitionClassificationComponent e : element.getClassification())
composeDeviceDefinitionClassificationComponent(null, e);
closeArray();
};
if (element.hasConformsTo()) {
openArray("conformsTo");
for (DeviceDefinition.DeviceDefinitionConformsToComponent e : element.getConformsTo())
composeDeviceDefinitionConformsToComponent(null, e);
closeArray();
};
if (element.hasHasPart()) {
openArray("hasPart");
for (DeviceDefinition.DeviceDefinitionHasPartComponent e : element.getHasPart())
composeDeviceDefinitionHasPartComponent(null, e);
closeArray();
};
if (element.hasPackaging()) {
openArray("packaging");
for (DeviceDefinition.DeviceDefinitionPackagingComponent e : element.getPackaging())
composeDeviceDefinitionPackagingComponent(null, e);
closeArray();
};
if (element.hasVersion()) {
openArray("version");
for (DeviceDefinition.DeviceDefinitionVersionComponent e : element.getVersion())
composeDeviceDefinitionVersionComponent(null, e);
closeArray();
};
if (element.hasSafety()) {
openArray("safety");
for (CodeableConcept e : element.getSafety())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasShelfLifeStorage()) {
openArray("shelfLifeStorage");
for (ProductShelfLife e : element.getShelfLifeStorage())
composeProductShelfLife(null, e);
closeArray();
};
if (element.hasLanguageCode()) {
openArray("languageCode");
for (CodeableConcept e : element.getLanguageCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (DeviceDefinition.DeviceDefinitionPropertyComponent e : element.getProperty())
composeDeviceDefinitionPropertyComponent(null, e);
closeArray();
};
if (element.hasOwner()) {
composeReference("owner", element.getOwner());
}
if (element.hasContact()) {
openArray("contact");
for (ContactPoint e : element.getContact())
composeContactPoint(null, e);
closeArray();
};
if (element.hasLink()) {
openArray("link");
for (DeviceDefinition.DeviceDefinitionLinkComponent e : element.getLink())
composeDeviceDefinitionLinkComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasMaterial()) {
openArray("material");
for (DeviceDefinition.DeviceDefinitionMaterialComponent e : element.getMaterial())
composeDeviceDefinitionMaterialComponent(null, e);
closeArray();
};
if (element.hasProductionIdentifierInUDI()) {
openArray("productionIdentifierInUDI");
for (Enumeration e : element.getProductionIdentifierInUDI())
composeEnumerationCore(null, e, new DeviceDefinition.DeviceProductionIdentifierInUDIEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getProductionIdentifierInUDI())) {
openArray("_productionIdentifierInUDI");
for (Enumeration e : element.getProductionIdentifierInUDI())
composeEnumerationExtras(null, e, new DeviceDefinition.DeviceProductionIdentifierInUDIEnumFactory(), true);
closeArray();
}
};
if (element.hasGuideline()) {
composeDeviceDefinitionGuidelineComponent("guideline", element.getGuideline());
}
if (element.hasCorrectiveAction()) {
composeDeviceDefinitionCorrectiveActionComponent("correctiveAction", element.getCorrectiveAction());
}
if (element.hasChargeItem()) {
openArray("chargeItem");
for (DeviceDefinition.DeviceDefinitionChargeItemComponent e : element.getChargeItem())
composeDeviceDefinitionChargeItemComponent(null, e);
closeArray();
};
}
protected void composeDeviceDefinitionUdiDeviceIdentifierComponent(String name, DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionUdiDeviceIdentifierComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionUdiDeviceIdentifierComponentProperties(DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDeviceIdentifierElement()) {
composeStringCore("deviceIdentifier", element.getDeviceIdentifierElement(), false);
composeStringExtras("deviceIdentifier", element.getDeviceIdentifierElement(), false);
}
if (element.hasIssuerElement()) {
composeUriCore("issuer", element.getIssuerElement(), false);
composeUriExtras("issuer", element.getIssuerElement(), false);
}
if (element.hasJurisdictionElement()) {
composeUriCore("jurisdiction", element.getJurisdictionElement(), false);
composeUriExtras("jurisdiction", element.getJurisdictionElement(), false);
}
if (element.hasMarketDistribution()) {
openArray("marketDistribution");
for (DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent e : element.getMarketDistribution())
composeUdiDeviceIdentifierMarketDistributionComponent(null, e);
closeArray();
};
}
protected void composeUdiDeviceIdentifierMarketDistributionComponent(String name, DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent element) throws IOException {
if (element != null) {
open(name);
composeUdiDeviceIdentifierMarketDistributionComponentProperties(element);
close();
}
}
protected void composeUdiDeviceIdentifierMarketDistributionComponentProperties(DeviceDefinition.UdiDeviceIdentifierMarketDistributionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMarketPeriod()) {
composePeriod("marketPeriod", element.getMarketPeriod());
}
if (element.hasSubJurisdictionElement()) {
composeUriCore("subJurisdiction", element.getSubJurisdictionElement(), false);
composeUriExtras("subJurisdiction", element.getSubJurisdictionElement(), false);
}
}
protected void composeDeviceDefinitionRegulatoryIdentifierComponent(String name, DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionRegulatoryIdentifierComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionRegulatoryIdentifierComponentProperties(DeviceDefinition.DeviceDefinitionRegulatoryIdentifierComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new DeviceDefinition.DeviceDefinitionRegulatoryIdentifierTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new DeviceDefinition.DeviceDefinitionRegulatoryIdentifierTypeEnumFactory(), false);
}
if (element.hasDeviceIdentifierElement()) {
composeStringCore("deviceIdentifier", element.getDeviceIdentifierElement(), false);
composeStringExtras("deviceIdentifier", element.getDeviceIdentifierElement(), false);
}
if (element.hasIssuerElement()) {
composeUriCore("issuer", element.getIssuerElement(), false);
composeUriExtras("issuer", element.getIssuerElement(), false);
}
if (element.hasJurisdictionElement()) {
composeUriCore("jurisdiction", element.getJurisdictionElement(), false);
composeUriExtras("jurisdiction", element.getJurisdictionElement(), false);
}
}
protected void composeDeviceDefinitionDeviceNameComponent(String name, DeviceDefinition.DeviceDefinitionDeviceNameComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceNameComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionDeviceNameComponentProperties(DeviceDefinition.DeviceDefinitionDeviceNameComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.DeviceNameTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.DeviceNameTypeEnumFactory(), false);
}
}
protected void composeDeviceDefinitionClassificationComponent(String name, DeviceDefinition.DeviceDefinitionClassificationComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionClassificationComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionClassificationComponentProperties(DeviceDefinition.DeviceDefinitionClassificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasJustification()) {
openArray("justification");
for (RelatedArtifact e : element.getJustification())
composeRelatedArtifact(null, e);
closeArray();
};
}
protected void composeDeviceDefinitionConformsToComponent(String name, DeviceDefinition.DeviceDefinitionConformsToComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionConformsToComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionConformsToComponentProperties(DeviceDefinition.DeviceDefinitionConformsToComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasSpecification()) {
composeCodeableConcept("specification", element.getSpecification());
}
if (element.hasVersion()) {
if (anyHasValue(element.getVersion())) {
openArray("version");
for (StringType e : element.getVersion())
composeStringCore(null, e, e != element.getVersion().get(element.getVersion().size()-1));
closeArray();
}
if (anyHasExtras(element.getVersion())) {
openArray("_version");
for (StringType e : element.getVersion())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSource()) {
openArray("source");
for (RelatedArtifact e : element.getSource())
composeRelatedArtifact(null, e);
closeArray();
};
}
protected void composeDeviceDefinitionHasPartComponent(String name, DeviceDefinition.DeviceDefinitionHasPartComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionHasPartComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionHasPartComponentProperties(DeviceDefinition.DeviceDefinitionHasPartComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasCountElement()) {
composeIntegerCore("count", element.getCountElement(), false);
composeIntegerExtras("count", element.getCountElement(), false);
}
}
protected void composeDeviceDefinitionPackagingComponent(String name, DeviceDefinition.DeviceDefinitionPackagingComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionPackagingComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionPackagingComponentProperties(DeviceDefinition.DeviceDefinitionPackagingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCountElement()) {
composeIntegerCore("count", element.getCountElement(), false);
composeIntegerExtras("count", element.getCountElement(), false);
}
if (element.hasDistributor()) {
openArray("distributor");
for (DeviceDefinition.PackagingDistributorComponent e : element.getDistributor())
composePackagingDistributorComponent(null, e);
closeArray();
};
if (element.hasUdiDeviceIdentifier()) {
openArray("udiDeviceIdentifier");
for (DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent e : element.getUdiDeviceIdentifier())
composeDeviceDefinitionUdiDeviceIdentifierComponent(null, e);
closeArray();
};
if (element.hasPackaging()) {
openArray("packaging");
for (DeviceDefinition.DeviceDefinitionPackagingComponent e : element.getPackaging())
composeDeviceDefinitionPackagingComponent(null, e);
closeArray();
};
}
protected void composePackagingDistributorComponent(String name, DeviceDefinition.PackagingDistributorComponent element) throws IOException {
if (element != null) {
open(name);
composePackagingDistributorComponentProperties(element);
close();
}
}
protected void composePackagingDistributorComponentProperties(DeviceDefinition.PackagingDistributorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasOrganizationReference()) {
openArray("organizationReference");
for (Reference e : element.getOrganizationReference())
composeReference(null, e);
closeArray();
};
}
protected void composeDeviceDefinitionVersionComponent(String name, DeviceDefinition.DeviceDefinitionVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionVersionComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionVersionComponentProperties(DeviceDefinition.DeviceDefinitionVersionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasComponent()) {
composeIdentifier("component", element.getComponent());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeDeviceDefinitionPropertyComponent(String name, DeviceDefinition.DeviceDefinitionPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionPropertyComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionPropertyComponentProperties(DeviceDefinition.DeviceDefinitionPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeDeviceDefinitionLinkComponent(String name, DeviceDefinition.DeviceDefinitionLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionLinkComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionLinkComponentProperties(DeviceDefinition.DeviceDefinitionLinkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRelation()) {
composeCoding("relation", element.getRelation());
}
if (element.hasRelatedDevice()) {
composeCodeableReference("relatedDevice", element.getRelatedDevice());
}
}
protected void composeDeviceDefinitionMaterialComponent(String name, DeviceDefinition.DeviceDefinitionMaterialComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionMaterialComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionMaterialComponentProperties(DeviceDefinition.DeviceDefinitionMaterialComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubstance()) {
composeCodeableConcept("substance", element.getSubstance());
}
if (element.hasAlternateElement()) {
composeBooleanCore("alternate", element.getAlternateElement(), false);
composeBooleanExtras("alternate", element.getAlternateElement(), false);
}
if (element.hasAllergenicIndicatorElement()) {
composeBooleanCore("allergenicIndicator", element.getAllergenicIndicatorElement(), false);
composeBooleanExtras("allergenicIndicator", element.getAllergenicIndicatorElement(), false);
}
}
protected void composeDeviceDefinitionGuidelineComponent(String name, DeviceDefinition.DeviceDefinitionGuidelineComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionGuidelineComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionGuidelineComponentProperties(DeviceDefinition.DeviceDefinitionGuidelineComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasUsageInstructionElement()) {
composeMarkdownCore("usageInstruction", element.getUsageInstructionElement(), false);
composeMarkdownExtras("usageInstruction", element.getUsageInstructionElement(), false);
}
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasIndication()) {
openArray("indication");
for (CodeableConcept e : element.getIndication())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasContraindication()) {
openArray("contraindication");
for (CodeableConcept e : element.getContraindication())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasWarning()) {
openArray("warning");
for (CodeableConcept e : element.getWarning())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasIntendedUseElement()) {
composeStringCore("intendedUse", element.getIntendedUseElement(), false);
composeStringExtras("intendedUse", element.getIntendedUseElement(), false);
}
}
protected void composeDeviceDefinitionCorrectiveActionComponent(String name, DeviceDefinition.DeviceDefinitionCorrectiveActionComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionCorrectiveActionComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionCorrectiveActionComponentProperties(DeviceDefinition.DeviceDefinitionCorrectiveActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRecallElement()) {
composeBooleanCore("recall", element.getRecallElement(), false);
composeBooleanExtras("recall", element.getRecallElement(), false);
}
if (element.hasScopeElement()) {
composeEnumerationCore("scope", element.getScopeElement(), new DeviceDefinition.DeviceCorrectiveActionScopeEnumFactory(), false);
composeEnumerationExtras("scope", element.getScopeElement(), new DeviceDefinition.DeviceCorrectiveActionScopeEnumFactory(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeDeviceDefinitionChargeItemComponent(String name, DeviceDefinition.DeviceDefinitionChargeItemComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionChargeItemComponentProperties(element);
close();
}
}
protected void composeDeviceDefinitionChargeItemComponentProperties(DeviceDefinition.DeviceDefinitionChargeItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasChargeItemCode()) {
composeCodeableReference("chargeItemCode", element.getChargeItemCode());
}
if (element.hasCount()) {
composeQuantity("count", element.getCount());
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
}
protected void composeDeviceDispense(String name, DeviceDispense element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceDispenseProperties(element);
}
}
protected void composeDeviceDispenseProperties(DeviceDispense element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new DeviceDispense.DeviceDispenseStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new DeviceDispense.DeviceDispenseStatusCodesEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableReference("statusReason", element.getStatusReason());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDevice()) {
composeCodeableReference("device", element.getDevice());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasReceiver()) {
composeReference("receiver", element.getReceiver());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasPerformer()) {
openArray("performer");
for (DeviceDispense.DeviceDispensePerformerComponent e : element.getPerformer())
composeDeviceDispensePerformerComponent(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasPreparedDateElement()) {
composeDateTimeCore("preparedDate", element.getPreparedDateElement(), false);
composeDateTimeExtras("preparedDate", element.getPreparedDateElement(), false);
}
if (element.hasWhenHandedOverElement()) {
composeDateTimeCore("whenHandedOver", element.getWhenHandedOverElement(), false);
composeDateTimeExtras("whenHandedOver", element.getWhenHandedOverElement(), false);
}
if (element.hasDestination()) {
composeReference("destination", element.getDestination());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasUsageInstructionElement()) {
composeMarkdownCore("usageInstruction", element.getUsageInstructionElement(), false);
composeMarkdownExtras("usageInstruction", element.getUsageInstructionElement(), false);
}
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
};
}
protected void composeDeviceDispensePerformerComponent(String name, DeviceDispense.DeviceDispensePerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDispensePerformerComponentProperties(element);
close();
}
}
protected void composeDeviceDispensePerformerComponentProperties(DeviceDispense.DeviceDispensePerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeDeviceMetric(String name, DeviceMetric element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceMetricProperties(element);
}
}
protected void composeDeviceMetricProperties(DeviceMetric element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasUnit()) {
composeCodeableConcept("unit", element.getUnit());
}
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasOperationalStatusElement()) {
composeEnumerationCore("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false);
composeEnumerationExtras("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false);
}
if (element.hasColorElement()) {
composeCodeCore("color", element.getColorElement(), false);
composeCodeExtras("color", element.getColorElement(), false);
}
if (element.hasCategoryElement()) {
composeEnumerationCore("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory(), false);
composeEnumerationExtras("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory(), false);
}
if (element.hasMeasurementFrequency()) {
composeQuantity("measurementFrequency", element.getMeasurementFrequency());
}
if (element.hasCalibration()) {
openArray("calibration");
for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration())
composeDeviceMetricCalibrationComponent(null, e);
closeArray();
};
}
protected void composeDeviceMetricCalibrationComponent(String name, DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceMetricCalibrationComponentProperties(element);
close();
}
}
protected void composeDeviceMetricCalibrationComponentProperties(DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory(), false);
}
if (element.hasStateElement()) {
composeEnumerationCore("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory(), false);
composeEnumerationExtras("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory(), false);
}
if (element.hasTimeElement()) {
composeInstantCore("time", element.getTimeElement(), false);
composeInstantExtras("time", element.getTimeElement(), false);
}
}
protected void composeDeviceRequest(String name, DeviceRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceRequestProperties(element);
}
}
protected void composeDeviceRequestProperties(DeviceRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasReplaces()) {
openArray("replaces");
for (Reference e : element.getReplaces())
composeReference(null, e);
closeArray();
};
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasCode()) {
composeCodeableReference("code", element.getCode());
}
if (element.hasQuantityElement()) {
composeIntegerCore("quantity", element.getQuantityElement(), false);
composeIntegerExtras("quantity", element.getQuantityElement(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (DeviceRequest.DeviceRequestParameterComponent e : element.getParameter())
composeDeviceRequestParameterComponent(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasPerformer()) {
composeCodeableReference("performer", element.getPerformer());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasAsNeededElement()) {
composeBooleanCore("asNeeded", element.getAsNeededElement(), false);
composeBooleanExtras("asNeeded", element.getAsNeededElement(), false);
}
if (element.hasAsNeededFor()) {
composeCodeableConcept("asNeededFor", element.getAsNeededFor());
}
if (element.hasInsurance()) {
openArray("insurance");
for (Reference e : element.getInsurance())
composeReference(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Reference e : element.getSupportingInfo())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRelevantHistory()) {
openArray("relevantHistory");
for (Reference e : element.getRelevantHistory())
composeReference(null, e);
closeArray();
};
}
protected void composeDeviceRequestParameterComponent(String name, DeviceRequest.DeviceRequestParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceRequestParameterComponentProperties(element);
close();
}
}
protected void composeDeviceRequestParameterComponentProperties(DeviceRequest.DeviceRequestParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeDeviceUsage(String name, DeviceUsage element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceUsageProperties(element);
}
}
protected void composeDeviceUsageProperties(DeviceUsage element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new DeviceUsage.DeviceUsageStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new DeviceUsage.DeviceUsageStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
};
if (element.hasContext()) {
composeReference("context", element.getContext());
}
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasDateAssertedElement()) {
composeDateTimeCore("dateAsserted", element.getDateAssertedElement(), false);
composeDateTimeExtras("dateAsserted", element.getDateAssertedElement(), false);
}
if (element.hasUsageStatus()) {
composeCodeableConcept("usageStatus", element.getUsageStatus());
}
if (element.hasUsageReason()) {
openArray("usageReason");
for (CodeableConcept e : element.getUsageReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAdherence()) {
composeDeviceUsageAdherenceComponent("adherence", element.getAdherence());
}
if (element.hasInformationSource()) {
composeReference("informationSource", element.getInformationSource());
}
if (element.hasDevice()) {
composeCodeableReference("device", element.getDevice());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
composeCodeableReference("bodySite", element.getBodySite());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeDeviceUsageAdherenceComponent(String name, DeviceUsage.DeviceUsageAdherenceComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceUsageAdherenceComponentProperties(element);
close();
}
}
protected void composeDeviceUsageAdherenceComponentProperties(DeviceUsage.DeviceUsageAdherenceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDiagnosticReportProperties(element);
}
}
protected void composeDiagnosticReportProperties(DiagnosticReport element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasEffective()) {
composeType("effective", element.getEffective());
}
if (element.hasIssuedElement()) {
composeInstantCore("issued", element.getIssuedElement(), false);
composeInstantExtras("issued", element.getIssuedElement(), false);
}
if (element.hasPerformer()) {
openArray("performer");
for (Reference e : element.getPerformer())
composeReference(null, e);
closeArray();
};
if (element.hasResultsInterpreter()) {
openArray("resultsInterpreter");
for (Reference e : element.getResultsInterpreter())
composeReference(null, e);
closeArray();
};
if (element.hasSpecimen()) {
openArray("specimen");
for (Reference e : element.getSpecimen())
composeReference(null, e);
closeArray();
};
if (element.hasResult()) {
openArray("result");
for (Reference e : element.getResult())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasStudy()) {
openArray("study");
for (Reference e : element.getStudy())
composeReference(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (DiagnosticReport.DiagnosticReportSupportingInfoComponent e : element.getSupportingInfo())
composeDiagnosticReportSupportingInfoComponent(null, e);
closeArray();
};
if (element.hasMedia()) {
openArray("media");
for (DiagnosticReport.DiagnosticReportMediaComponent e : element.getMedia())
composeDiagnosticReportMediaComponent(null, e);
closeArray();
};
if (element.hasComposition()) {
composeReference("composition", element.getComposition());
}
if (element.hasConclusionElement()) {
composeMarkdownCore("conclusion", element.getConclusionElement(), false);
composeMarkdownExtras("conclusion", element.getConclusionElement(), false);
}
if (element.hasConclusionCode()) {
openArray("conclusionCode");
for (CodeableConcept e : element.getConclusionCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPresentedForm()) {
openArray("presentedForm");
for (Attachment e : element.getPresentedForm())
composeAttachment(null, e);
closeArray();
};
}
protected void composeDiagnosticReportSupportingInfoComponent(String name, DiagnosticReport.DiagnosticReportSupportingInfoComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosticReportSupportingInfoComponentProperties(element);
close();
}
}
protected void composeDiagnosticReportSupportingInfoComponentProperties(DiagnosticReport.DiagnosticReportSupportingInfoComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeDiagnosticReportMediaComponent(String name, DiagnosticReport.DiagnosticReportMediaComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosticReportMediaComponentProperties(element);
close();
}
}
protected void composeDiagnosticReportMediaComponentProperties(DiagnosticReport.DiagnosticReportMediaComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasLink()) {
composeReference("link", element.getLink());
}
}
protected void composeDocumentReference(String name, DocumentReference element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDocumentReferenceProperties(element);
}
}
protected void composeDocumentReferenceProperties(DocumentReference element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new DocumentReference.DocumentReferenceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new DocumentReference.DocumentReferenceStatusEnumFactory(), false);
}
if (element.hasDocStatusElement()) {
composeEnumerationCore("docStatus", element.getDocStatusElement(), new Enumerations.CompositionStatusEnumFactory(), false);
composeEnumerationExtras("docStatus", element.getDocStatusElement(), new Enumerations.CompositionStatusEnumFactory(), false);
}
if (element.hasModality()) {
openArray("modality");
for (CodeableConcept e : element.getModality())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasContext()) {
openArray("context");
for (Reference e : element.getContext())
composeReference(null, e);
closeArray();
};
if (element.hasEvent()) {
openArray("event");
for (CodeableReference e : element.getEvent())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
openArray("bodySite");
for (CodeableReference e : element.getBodySite())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasFacilityType()) {
composeCodeableConcept("facilityType", element.getFacilityType());
}
if (element.hasPracticeSetting()) {
composeCodeableConcept("practiceSetting", element.getPracticeSetting());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasDateElement()) {
composeInstantCore("date", element.getDateElement(), false);
composeInstantExtras("date", element.getDateElement(), false);
}
if (element.hasAuthor()) {
openArray("author");
for (Reference e : element.getAuthor())
composeReference(null, e);
closeArray();
};
if (element.hasAttester()) {
openArray("attester");
for (DocumentReference.DocumentReferenceAttesterComponent e : element.getAttester())
composeDocumentReferenceAttesterComponent(null, e);
closeArray();
};
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
if (element.hasRelatesTo()) {
openArray("relatesTo");
for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo())
composeDocumentReferenceRelatesToComponent(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSecurityLabel()) {
openArray("securityLabel");
for (CodeableConcept e : element.getSecurityLabel())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasContent()) {
openArray("content");
for (DocumentReference.DocumentReferenceContentComponent e : element.getContent())
composeDocumentReferenceContentComponent(null, e);
closeArray();
};
}
protected void composeDocumentReferenceAttesterComponent(String name, DocumentReference.DocumentReferenceAttesterComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceAttesterComponentProperties(element);
close();
}
}
protected void composeDocumentReferenceAttesterComponentProperties(DocumentReference.DocumentReferenceAttesterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMode()) {
composeCodeableConcept("mode", element.getMode());
}
if (element.hasTimeElement()) {
composeDateTimeCore("time", element.getTimeElement(), false);
composeDateTimeExtras("time", element.getTimeElement(), false);
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeDocumentReferenceRelatesToComponent(String name, DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceRelatesToComponentProperties(element);
close();
}
}
protected void composeDocumentReferenceRelatesToComponentProperties(DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasTarget()) {
composeReference("target", element.getTarget());
}
}
protected void composeDocumentReferenceContentComponent(String name, DocumentReference.DocumentReferenceContentComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceContentComponentProperties(element);
close();
}
}
protected void composeDocumentReferenceContentComponentProperties(DocumentReference.DocumentReferenceContentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAttachment()) {
composeAttachment("attachment", element.getAttachment());
}
if (element.hasProfile()) {
openArray("profile");
for (DocumentReference.DocumentReferenceContentProfileComponent e : element.getProfile())
composeDocumentReferenceContentProfileComponent(null, e);
closeArray();
};
}
protected void composeDocumentReferenceContentProfileComponent(String name, DocumentReference.DocumentReferenceContentProfileComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceContentProfileComponentProperties(element);
close();
}
}
protected void composeDocumentReferenceContentProfileComponentProperties(DocumentReference.DocumentReferenceContentProfileComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeEncounter(String name, Encounter element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEncounterProperties(element);
}
}
protected void composeEncounterProperties(Encounter element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.EncounterStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.EncounterStatusEnumFactory(), false);
}
if (element.hasClass_()) {
openArray("class");
for (CodeableConcept e : element.getClass_())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiceType()) {
openArray("serviceType");
for (CodeableReference e : element.getServiceType())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasSubjectStatus()) {
composeCodeableConcept("subjectStatus", element.getSubjectStatus());
}
if (element.hasEpisodeOfCare()) {
openArray("episodeOfCare");
for (Reference e : element.getEpisodeOfCare())
composeReference(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasCareTeam()) {
openArray("careTeam");
for (Reference e : element.getCareTeam())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
if (element.hasServiceProvider()) {
composeReference("serviceProvider", element.getServiceProvider());
}
if (element.hasParticipant()) {
openArray("participant");
for (Encounter.EncounterParticipantComponent e : element.getParticipant())
composeEncounterParticipantComponent(null, e);
closeArray();
};
if (element.hasAppointment()) {
openArray("appointment");
for (Reference e : element.getAppointment())
composeReference(null, e);
closeArray();
};
if (element.hasVirtualService()) {
openArray("virtualService");
for (VirtualServiceDetail e : element.getVirtualService())
composeVirtualServiceDetail(null, e);
closeArray();
};
if (element.hasActualPeriod()) {
composePeriod("actualPeriod", element.getActualPeriod());
}
if (element.hasPlannedStartDateElement()) {
composeDateTimeCore("plannedStartDate", element.getPlannedStartDateElement(), false);
composeDateTimeExtras("plannedStartDate", element.getPlannedStartDateElement(), false);
}
if (element.hasPlannedEndDateElement()) {
composeDateTimeCore("plannedEndDate", element.getPlannedEndDateElement(), false);
composeDateTimeExtras("plannedEndDate", element.getPlannedEndDateElement(), false);
}
if (element.hasLength()) {
composeDuration("length", element.getLength());
}
if (element.hasReason()) {
openArray("reason");
for (Encounter.ReasonComponent e : element.getReason())
composeReasonComponent(null, e);
closeArray();
};
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (Encounter.DiagnosisComponent e : element.getDiagnosis())
composeDiagnosisComponent(null, e);
closeArray();
};
if (element.hasAccount()) {
openArray("account");
for (Reference e : element.getAccount())
composeReference(null, e);
closeArray();
};
if (element.hasDietPreference()) {
openArray("dietPreference");
for (CodeableConcept e : element.getDietPreference())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSpecialArrangement()) {
openArray("specialArrangement");
for (CodeableConcept e : element.getSpecialArrangement())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSpecialCourtesy()) {
openArray("specialCourtesy");
for (CodeableConcept e : element.getSpecialCourtesy())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAdmission()) {
composeEncounterAdmissionComponent("admission", element.getAdmission());
}
if (element.hasLocation()) {
openArray("location");
for (Encounter.EncounterLocationComponent e : element.getLocation())
composeEncounterLocationComponent(null, e);
closeArray();
};
}
protected void composeEncounterParticipantComponent(String name, Encounter.EncounterParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeEncounterParticipantComponentProperties(element);
close();
}
}
protected void composeEncounterParticipantComponentProperties(Encounter.EncounterParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeReasonComponent(String name, Encounter.ReasonComponent element) throws IOException {
if (element != null) {
open(name);
composeReasonComponentProperties(element);
close();
}
}
protected void composeReasonComponentProperties(Encounter.ReasonComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUse()) {
openArray("use");
for (CodeableConcept e : element.getUse())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasValue()) {
openArray("value");
for (CodeableReference e : element.getValue())
composeCodeableReference(null, e);
closeArray();
};
}
protected void composeDiagnosisComponent(String name, Encounter.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosisComponentProperties(element);
close();
}
}
protected void composeDiagnosisComponentProperties(Encounter.DiagnosisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCondition()) {
openArray("condition");
for (CodeableReference e : element.getCondition())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasUse()) {
openArray("use");
for (CodeableConcept e : element.getUse())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeEncounterAdmissionComponent(String name, Encounter.EncounterAdmissionComponent element) throws IOException {
if (element != null) {
open(name);
composeEncounterAdmissionComponentProperties(element);
close();
}
}
protected void composeEncounterAdmissionComponentProperties(Encounter.EncounterAdmissionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPreAdmissionIdentifier()) {
composeIdentifier("preAdmissionIdentifier", element.getPreAdmissionIdentifier());
}
if (element.hasOrigin()) {
composeReference("origin", element.getOrigin());
}
if (element.hasAdmitSource()) {
composeCodeableConcept("admitSource", element.getAdmitSource());
}
if (element.hasReAdmission()) {
composeCodeableConcept("reAdmission", element.getReAdmission());
}
if (element.hasDestination()) {
composeReference("destination", element.getDestination());
}
if (element.hasDischargeDisposition()) {
composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition());
}
}
protected void composeEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element) throws IOException {
if (element != null) {
open(name);
composeEncounterLocationComponentProperties(element);
close();
}
}
protected void composeEncounterLocationComponentProperties(Encounter.EncounterLocationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory(), false);
}
if (element.hasForm()) {
composeCodeableConcept("form", element.getForm());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeEncounterHistory(String name, EncounterHistory element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEncounterHistoryProperties(element);
}
}
protected void composeEncounterHistoryProperties(EncounterHistory element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.EncounterStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.EncounterStatusEnumFactory(), false);
}
if (element.hasClass_()) {
composeCodeableConcept("class", element.getClass_());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiceType()) {
openArray("serviceType");
for (CodeableReference e : element.getServiceType())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasSubjectStatus()) {
composeCodeableConcept("subjectStatus", element.getSubjectStatus());
}
if (element.hasActualPeriod()) {
composePeriod("actualPeriod", element.getActualPeriod());
}
if (element.hasPlannedStartDateElement()) {
composeDateTimeCore("plannedStartDate", element.getPlannedStartDateElement(), false);
composeDateTimeExtras("plannedStartDate", element.getPlannedStartDateElement(), false);
}
if (element.hasPlannedEndDateElement()) {
composeDateTimeCore("plannedEndDate", element.getPlannedEndDateElement(), false);
composeDateTimeExtras("plannedEndDate", element.getPlannedEndDateElement(), false);
}
if (element.hasLength()) {
composeDuration("length", element.getLength());
}
if (element.hasLocation()) {
openArray("location");
for (EncounterHistory.EncounterHistoryLocationComponent e : element.getLocation())
composeEncounterHistoryLocationComponent(null, e);
closeArray();
};
}
protected void composeEncounterHistoryLocationComponent(String name, EncounterHistory.EncounterHistoryLocationComponent element) throws IOException {
if (element != null) {
open(name);
composeEncounterHistoryLocationComponentProperties(element);
close();
}
}
protected void composeEncounterHistoryLocationComponentProperties(EncounterHistory.EncounterHistoryLocationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasForm()) {
composeCodeableConcept("form", element.getForm());
}
}
protected void composeEndpoint(String name, Endpoint element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEndpointProperties(element);
}
}
protected void composeEndpointProperties(Endpoint element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory(), false);
}
if (element.hasConnectionType()) {
openArray("connectionType");
for (CodeableConcept e : element.getConnectionType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasEnvironmentType()) {
openArray("environmentType");
for (CodeableConcept e : element.getEnvironmentType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasContact()) {
openArray("contact");
for (ContactPoint e : element.getContact())
composeContactPoint(null, e);
closeArray();
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasPayload()) {
openArray("payload");
for (Endpoint.EndpointPayloadComponent e : element.getPayload())
composeEndpointPayloadComponent(null, e);
closeArray();
};
if (element.hasAddressElement()) {
composeUrlCore("address", element.getAddressElement(), false);
composeUrlExtras("address", element.getAddressElement(), false);
}
if (element.hasHeader()) {
if (anyHasValue(element.getHeader())) {
openArray("header");
for (StringType e : element.getHeader())
composeStringCore(null, e, e != element.getHeader().get(element.getHeader().size()-1));
closeArray();
}
if (anyHasExtras(element.getHeader())) {
openArray("_header");
for (StringType e : element.getHeader())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeEndpointPayloadComponent(String name, Endpoint.EndpointPayloadComponent element) throws IOException {
if (element != null) {
open(name);
composeEndpointPayloadComponentProperties(element);
close();
}
}
protected void composeEndpointPayloadComponentProperties(Endpoint.EndpointPayloadComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMimeType()) {
if (anyHasValue(element.getMimeType())) {
openArray("mimeType");
for (CodeType e : element.getMimeType())
composeCodeCore(null, e, e != element.getMimeType().get(element.getMimeType().size()-1));
closeArray();
}
if (anyHasExtras(element.getMimeType())) {
openArray("_mimeType");
for (CodeType e : element.getMimeType())
composeCodeExtras(null, e, true);
closeArray();
}
};
}
protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEnrollmentRequestProperties(element);
}
}
protected void composeEnrollmentRequestProperties(EnrollmentRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasCandidate()) {
composeReference("candidate", element.getCandidate());
}
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
}
protected void composeEnrollmentResponse(String name, EnrollmentResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEnrollmentResponseProperties(element);
}
}
protected void composeEnrollmentResponseProperties(EnrollmentResponse element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new EnrollmentResponse.EnrollmentOutcomeEnumFactory(), false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new EnrollmentResponse.EnrollmentOutcomeEnumFactory(), false);
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
if (element.hasRequestProvider()) {
composeReference("requestProvider", element.getRequestProvider());
}
}
protected void composeEpisodeOfCare(String name, EpisodeOfCare element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEpisodeOfCareProperties(element);
}
}
protected void composeEpisodeOfCareProperties(EpisodeOfCare element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false);
}
if (element.hasStatusHistory()) {
openArray("statusHistory");
for (EpisodeOfCare.EpisodeOfCareStatusHistoryComponent e : element.getStatusHistory())
composeEpisodeOfCareStatusHistoryComponent(null, e);
closeArray();
};
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (EpisodeOfCare.ReasonComponent e : element.getReason())
composeReasonComponent(null, e);
closeArray();
};
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis())
composeDiagnosisComponent(null, e);
closeArray();
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasReferralRequest()) {
openArray("referralRequest");
for (Reference e : element.getReferralRequest())
composeReference(null, e);
closeArray();
};
if (element.hasCareManager()) {
composeReference("careManager", element.getCareManager());
}
if (element.hasCareTeam()) {
openArray("careTeam");
for (Reference e : element.getCareTeam())
composeReference(null, e);
closeArray();
};
if (element.hasAccount()) {
openArray("account");
for (Reference e : element.getAccount())
composeReference(null, e);
closeArray();
};
}
protected void composeEpisodeOfCareStatusHistoryComponent(String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException {
if (element != null) {
open(name);
composeEpisodeOfCareStatusHistoryComponentProperties(element);
close();
}
}
protected void composeEpisodeOfCareStatusHistoryComponentProperties(EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeReasonComponent(String name, EpisodeOfCare.ReasonComponent element) throws IOException {
if (element != null) {
open(name);
composeReasonComponentProperties(element);
close();
}
}
protected void composeReasonComponentProperties(EpisodeOfCare.ReasonComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUse()) {
composeCodeableConcept("use", element.getUse());
}
if (element.hasValue()) {
openArray("value");
for (CodeableReference e : element.getValue())
composeCodeableReference(null, e);
closeArray();
};
}
protected void composeDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosisComponentProperties(element);
close();
}
}
protected void composeDiagnosisComponentProperties(EpisodeOfCare.DiagnosisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCondition()) {
openArray("condition");
for (CodeableReference e : element.getCondition())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasUse()) {
composeCodeableConcept("use", element.getUse());
}
}
protected void composeEventDefinition(String name, EventDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEventDefinitionProperties(element);
}
}
protected void composeEventDefinitionProperties(EventDefinition element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasUsageElement()) {
composeMarkdownCore("usage", element.getUsageElement(), false);
composeMarkdownExtras("usage", element.getUsageElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasTrigger()) {
openArray("trigger");
for (TriggerDefinition e : element.getTrigger())
composeTriggerDefinition(null, e);
closeArray();
};
}
protected void composeEvidence(String name, Evidence element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEvidenceProperties(element);
}
}
protected void composeEvidenceProperties(Evidence element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasCiteAs()) {
composeType("citeAs", element.getCiteAs());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasAssertionElement()) {
composeMarkdownCore("assertion", element.getAssertionElement(), false);
composeMarkdownExtras("assertion", element.getAssertionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasVariableDefinition()) {
openArray("variableDefinition");
for (Evidence.EvidenceVariableDefinitionComponent e : element.getVariableDefinition())
composeEvidenceVariableDefinitionComponent(null, e);
closeArray();
};
if (element.hasSynthesisType()) {
composeCodeableConcept("synthesisType", element.getSynthesisType());
}
if (element.hasStudyDesign()) {
openArray("studyDesign");
for (CodeableConcept e : element.getStudyDesign())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasStatistic()) {
openArray("statistic");
for (Evidence.EvidenceStatisticComponent e : element.getStatistic())
composeEvidenceStatisticComponent(null, e);
closeArray();
};
if (element.hasCertainty()) {
openArray("certainty");
for (Evidence.EvidenceCertaintyComponent e : element.getCertainty())
composeEvidenceCertaintyComponent(null, e);
closeArray();
};
}
protected void composeEvidenceVariableDefinitionComponent(String name, Evidence.EvidenceVariableDefinitionComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableDefinitionComponentProperties(element);
close();
}
}
protected void composeEvidenceVariableDefinitionComponentProperties(Evidence.EvidenceVariableDefinitionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasVariableRole()) {
composeCodeableConcept("variableRole", element.getVariableRole());
}
if (element.hasObserved()) {
composeReference("observed", element.getObserved());
}
if (element.hasIntended()) {
composeReference("intended", element.getIntended());
}
if (element.hasDirectnessMatch()) {
composeCodeableConcept("directnessMatch", element.getDirectnessMatch());
}
}
protected void composeEvidenceStatisticComponent(String name, Evidence.EvidenceStatisticComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceStatisticComponentProperties(element);
close();
}
}
protected void composeEvidenceStatisticComponentProperties(Evidence.EvidenceStatisticComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasStatisticType()) {
composeCodeableConcept("statisticType", element.getStatisticType());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasNumberOfEventsElement()) {
composeUnsignedIntCore("numberOfEvents", element.getNumberOfEventsElement(), false);
composeUnsignedIntExtras("numberOfEvents", element.getNumberOfEventsElement(), false);
}
if (element.hasNumberAffectedElement()) {
composeUnsignedIntCore("numberAffected", element.getNumberAffectedElement(), false);
composeUnsignedIntExtras("numberAffected", element.getNumberAffectedElement(), false);
}
if (element.hasSampleSize()) {
composeEvidenceStatisticSampleSizeComponent("sampleSize", element.getSampleSize());
}
if (element.hasAttributeEstimate()) {
openArray("attributeEstimate");
for (Evidence.EvidenceStatisticAttributeEstimateComponent e : element.getAttributeEstimate())
composeEvidenceStatisticAttributeEstimateComponent(null, e);
closeArray();
};
if (element.hasModelCharacteristic()) {
openArray("modelCharacteristic");
for (Evidence.EvidenceStatisticModelCharacteristicComponent e : element.getModelCharacteristic())
composeEvidenceStatisticModelCharacteristicComponent(null, e);
closeArray();
};
}
protected void composeEvidenceStatisticSampleSizeComponent(String name, Evidence.EvidenceStatisticSampleSizeComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceStatisticSampleSizeComponentProperties(element);
close();
}
}
protected void composeEvidenceStatisticSampleSizeComponentProperties(Evidence.EvidenceStatisticSampleSizeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasNumberOfStudiesElement()) {
composeUnsignedIntCore("numberOfStudies", element.getNumberOfStudiesElement(), false);
composeUnsignedIntExtras("numberOfStudies", element.getNumberOfStudiesElement(), false);
}
if (element.hasNumberOfParticipantsElement()) {
composeUnsignedIntCore("numberOfParticipants", element.getNumberOfParticipantsElement(), false);
composeUnsignedIntExtras("numberOfParticipants", element.getNumberOfParticipantsElement(), false);
}
if (element.hasKnownDataCountElement()) {
composeUnsignedIntCore("knownDataCount", element.getKnownDataCountElement(), false);
composeUnsignedIntExtras("knownDataCount", element.getKnownDataCountElement(), false);
}
}
protected void composeEvidenceStatisticAttributeEstimateComponent(String name, Evidence.EvidenceStatisticAttributeEstimateComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceStatisticAttributeEstimateComponentProperties(element);
close();
}
}
protected void composeEvidenceStatisticAttributeEstimateComponentProperties(Evidence.EvidenceStatisticAttributeEstimateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasLevelElement()) {
composeDecimalCore("level", element.getLevelElement(), false);
composeDecimalExtras("level", element.getLevelElement(), false);
}
if (element.hasRange()) {
composeRange("range", element.getRange());
}
if (element.hasAttributeEstimate()) {
openArray("attributeEstimate");
for (Evidence.EvidenceStatisticAttributeEstimateComponent e : element.getAttributeEstimate())
composeEvidenceStatisticAttributeEstimateComponent(null, e);
closeArray();
};
}
protected void composeEvidenceStatisticModelCharacteristicComponent(String name, Evidence.EvidenceStatisticModelCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceStatisticModelCharacteristicComponentProperties(element);
close();
}
}
protected void composeEvidenceStatisticModelCharacteristicComponentProperties(Evidence.EvidenceStatisticModelCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeQuantity("value", element.getValue());
}
if (element.hasVariable()) {
openArray("variable");
for (Evidence.EvidenceStatisticModelCharacteristicVariableComponent e : element.getVariable())
composeEvidenceStatisticModelCharacteristicVariableComponent(null, e);
closeArray();
};
if (element.hasAttributeEstimate()) {
openArray("attributeEstimate");
for (Evidence.EvidenceStatisticAttributeEstimateComponent e : element.getAttributeEstimate())
composeEvidenceStatisticAttributeEstimateComponent(null, e);
closeArray();
};
}
protected void composeEvidenceStatisticModelCharacteristicVariableComponent(String name, Evidence.EvidenceStatisticModelCharacteristicVariableComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceStatisticModelCharacteristicVariableComponentProperties(element);
close();
}
}
protected void composeEvidenceStatisticModelCharacteristicVariableComponentProperties(Evidence.EvidenceStatisticModelCharacteristicVariableComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasVariableDefinition()) {
composeReference("variableDefinition", element.getVariableDefinition());
}
if (element.hasHandlingElement()) {
composeEnumerationCore("handling", element.getHandlingElement(), new Enumerations.EvidenceVariableHandlingEnumFactory(), false);
composeEnumerationExtras("handling", element.getHandlingElement(), new Enumerations.EvidenceVariableHandlingEnumFactory(), false);
}
if (element.hasValueCategory()) {
openArray("valueCategory");
for (CodeableConcept e : element.getValueCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasValueQuantity()) {
openArray("valueQuantity");
for (Quantity e : element.getValueQuantity())
composeQuantity(null, e);
closeArray();
};
if (element.hasValueRange()) {
openArray("valueRange");
for (Range e : element.getValueRange())
composeRange(null, e);
closeArray();
};
}
protected void composeEvidenceCertaintyComponent(String name, Evidence.EvidenceCertaintyComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceCertaintyComponentProperties(element);
close();
}
}
protected void composeEvidenceCertaintyComponentProperties(Evidence.EvidenceCertaintyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRating()) {
composeCodeableConcept("rating", element.getRating());
}
if (element.hasRaterElement()) {
composeStringCore("rater", element.getRaterElement(), false);
composeStringExtras("rater", element.getRaterElement(), false);
}
if (element.hasSubcomponent()) {
openArray("subcomponent");
for (Evidence.EvidenceCertaintyComponent e : element.getSubcomponent())
composeEvidenceCertaintyComponent(null, e);
closeArray();
};
}
protected void composeEvidenceReport(String name, EvidenceReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEvidenceReportProperties(element);
}
}
protected void composeEvidenceReportProperties(EvidenceReport element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRelatedIdentifier()) {
openArray("relatedIdentifier");
for (Identifier e : element.getRelatedIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCiteAs()) {
composeType("citeAs", element.getCiteAs());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasSubject()) {
composeEvidenceReportSubjectComponent("subject", element.getSubject());
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatesTo()) {
openArray("relatesTo");
for (EvidenceReport.EvidenceReportRelatesToComponent e : element.getRelatesTo())
composeEvidenceReportRelatesToComponent(null, e);
closeArray();
};
if (element.hasSection()) {
openArray("section");
for (EvidenceReport.SectionComponent e : element.getSection())
composeSectionComponent(null, e);
closeArray();
};
}
protected void composeEvidenceReportSubjectComponent(String name, EvidenceReport.EvidenceReportSubjectComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceReportSubjectComponentProperties(element);
close();
}
}
protected void composeEvidenceReportSubjectComponentProperties(EvidenceReport.EvidenceReportSubjectComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCharacteristic()) {
openArray("characteristic");
for (EvidenceReport.EvidenceReportSubjectCharacteristicComponent e : element.getCharacteristic())
composeEvidenceReportSubjectCharacteristicComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeEvidenceReportSubjectCharacteristicComponent(String name, EvidenceReport.EvidenceReportSubjectCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceReportSubjectCharacteristicComponentProperties(element);
close();
}
}
protected void composeEvidenceReportSubjectCharacteristicComponentProperties(EvidenceReport.EvidenceReportSubjectCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasExcludeElement()) {
composeBooleanCore("exclude", element.getExcludeElement(), false);
composeBooleanExtras("exclude", element.getExcludeElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeEvidenceReportRelatesToComponent(String name, EvidenceReport.EvidenceReportRelatesToComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceReportRelatesToComponentProperties(element);
close();
}
}
protected void composeEvidenceReportRelatesToComponentProperties(EvidenceReport.EvidenceReportRelatesToComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new EvidenceReport.ReportRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new EvidenceReport.ReportRelationshipTypeEnumFactory(), false);
}
if (element.hasTarget()) {
composeEvidenceReportRelatesToTargetComponent("target", element.getTarget());
}
}
protected void composeEvidenceReportRelatesToTargetComponent(String name, EvidenceReport.EvidenceReportRelatesToTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceReportRelatesToTargetComponentProperties(element);
close();
}
}
protected void composeEvidenceReportRelatesToTargetComponentProperties(EvidenceReport.EvidenceReportRelatesToTargetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasDisplayElement()) {
composeMarkdownCore("display", element.getDisplayElement(), false);
composeMarkdownExtras("display", element.getDisplayElement(), false);
}
if (element.hasResource()) {
composeReference("resource", element.getResource());
}
}
protected void composeSectionComponent(String name, EvidenceReport.SectionComponent element) throws IOException {
if (element != null) {
open(name);
composeSectionComponentProperties(element);
close();
}
}
protected void composeSectionComponentProperties(EvidenceReport.SectionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasFocus()) {
composeCodeableConcept("focus", element.getFocus());
}
if (element.hasFocusReference()) {
composeReference("focusReference", element.getFocusReference());
}
if (element.hasAuthor()) {
openArray("author");
for (Reference e : element.getAuthor())
composeReference(null, e);
closeArray();
};
if (element.hasText()) {
composeNarrative("text", element.getText());
}
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new Enumerations.ListModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new Enumerations.ListModeEnumFactory(), false);
}
if (element.hasOrderedBy()) {
composeCodeableConcept("orderedBy", element.getOrderedBy());
}
if (element.hasEntryClassifier()) {
openArray("entryClassifier");
for (CodeableConcept e : element.getEntryClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasEntryReference()) {
openArray("entryReference");
for (Reference e : element.getEntryReference())
composeReference(null, e);
closeArray();
};
if (element.hasEntryQuantity()) {
openArray("entryQuantity");
for (Quantity e : element.getEntryQuantity())
composeQuantity(null, e);
closeArray();
};
if (element.hasEmptyReason()) {
composeCodeableConcept("emptyReason", element.getEmptyReason());
}
if (element.hasSection()) {
openArray("section");
for (EvidenceReport.SectionComponent e : element.getSection())
composeSectionComponent(null, e);
closeArray();
};
}
protected void composeEvidenceVariable(String name, EvidenceVariable element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEvidenceVariableProperties(element);
}
}
protected void composeEvidenceVariableProperties(EvidenceVariable element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasShortTitleElement()) {
composeStringCore("shortTitle", element.getShortTitleElement(), false);
composeStringExtras("shortTitle", element.getShortTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasActualElement()) {
composeBooleanCore("actual", element.getActualElement(), false);
composeBooleanExtras("actual", element.getActualElement(), false);
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (EvidenceVariable.EvidenceVariableCharacteristicComponent e : element.getCharacteristic())
composeEvidenceVariableCharacteristicComponent(null, e);
closeArray();
};
if (element.hasHandlingElement()) {
composeEnumerationCore("handling", element.getHandlingElement(), new Enumerations.EvidenceVariableHandlingEnumFactory(), false);
composeEnumerationExtras("handling", element.getHandlingElement(), new Enumerations.EvidenceVariableHandlingEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (EvidenceVariable.EvidenceVariableCategoryComponent e : element.getCategory())
composeEvidenceVariableCategoryComponent(null, e);
closeArray();
};
}
protected void composeEvidenceVariableCharacteristicComponent(String name, EvidenceVariable.EvidenceVariableCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableCharacteristicComponentProperties(element);
close();
}
}
protected void composeEvidenceVariableCharacteristicComponentProperties(EvidenceVariable.EvidenceVariableCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeIdCore("linkId", element.getLinkIdElement(), false);
composeIdExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasExcludeElement()) {
composeBooleanCore("exclude", element.getExcludeElement(), false);
composeBooleanExtras("exclude", element.getExcludeElement(), false);
}
if (element.hasDefinitionReference()) {
composeReference("definitionReference", element.getDefinitionReference());
}
if (element.hasDefinitionCanonicalElement()) {
composeCanonicalCore("definitionCanonical", element.getDefinitionCanonicalElement(), false);
composeCanonicalExtras("definitionCanonical", element.getDefinitionCanonicalElement(), false);
}
if (element.hasDefinitionCodeableConcept()) {
composeCodeableConcept("definitionCodeableConcept", element.getDefinitionCodeableConcept());
}
if (element.hasDefinitionExpression()) {
composeExpression("definitionExpression", element.getDefinitionExpression());
}
if (element.hasDefinitionIdElement()) {
composeIdCore("definitionId", element.getDefinitionIdElement(), false);
composeIdExtras("definitionId", element.getDefinitionIdElement(), false);
}
if (element.hasDefinitionByTypeAndValue()) {
composeEvidenceVariableCharacteristicDefinitionByTypeAndValueComponent("definitionByTypeAndValue", element.getDefinitionByTypeAndValue());
}
if (element.hasDefinitionByCombination()) {
composeEvidenceVariableCharacteristicDefinitionByCombinationComponent("definitionByCombination", element.getDefinitionByCombination());
}
if (element.hasInstances()) {
composeType("instances", element.getInstances());
}
if (element.hasDuration()) {
composeType("duration", element.getDuration());
}
if (element.hasTimeFromEvent()) {
openArray("timeFromEvent");
for (EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent e : element.getTimeFromEvent())
composeEvidenceVariableCharacteristicTimeFromEventComponent(null, e);
closeArray();
};
}
protected void composeEvidenceVariableCharacteristicDefinitionByTypeAndValueComponent(String name, EvidenceVariable.EvidenceVariableCharacteristicDefinitionByTypeAndValueComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableCharacteristicDefinitionByTypeAndValueComponentProperties(element);
close();
}
}
protected void composeEvidenceVariableCharacteristicDefinitionByTypeAndValueComponentProperties(EvidenceVariable.EvidenceVariableCharacteristicDefinitionByTypeAndValueComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasMethod()) {
openArray("method");
for (CodeableConcept e : element.getMethod())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasOffset()) {
composeCodeableConcept("offset", element.getOffset());
}
}
protected void composeEvidenceVariableCharacteristicDefinitionByCombinationComponent(String name, EvidenceVariable.EvidenceVariableCharacteristicDefinitionByCombinationComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableCharacteristicDefinitionByCombinationComponentProperties(element);
close();
}
}
protected void composeEvidenceVariableCharacteristicDefinitionByCombinationComponentProperties(EvidenceVariable.EvidenceVariableCharacteristicDefinitionByCombinationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new EvidenceVariable.CharacteristicCombinationEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new EvidenceVariable.CharacteristicCombinationEnumFactory(), false);
}
if (element.hasThresholdElement()) {
composePositiveIntCore("threshold", element.getThresholdElement(), false);
composePositiveIntExtras("threshold", element.getThresholdElement(), false);
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (EvidenceVariable.EvidenceVariableCharacteristicComponent e : element.getCharacteristic())
composeEvidenceVariableCharacteristicComponent(null, e);
closeArray();
};
}
protected void composeEvidenceVariableCharacteristicTimeFromEventComponent(String name, EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableCharacteristicTimeFromEventComponentProperties(element);
close();
}
}
protected void composeEvidenceVariableCharacteristicTimeFromEventComponentProperties(EvidenceVariable.EvidenceVariableCharacteristicTimeFromEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasEvent()) {
composeType("event", element.getEvent());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasRange()) {
composeRange("range", element.getRange());
}
}
protected void composeEvidenceVariableCategoryComponent(String name, EvidenceVariable.EvidenceVariableCategoryComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableCategoryComponentProperties(element);
close();
}
}
protected void composeEvidenceVariableCategoryComponentProperties(EvidenceVariable.EvidenceVariableCategoryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeExampleScenario(String name, ExampleScenario element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeExampleScenarioProperties(element);
}
}
protected void composeExampleScenarioProperties(ExampleScenario element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasActor()) {
openArray("actor");
for (ExampleScenario.ExampleScenarioActorComponent e : element.getActor())
composeExampleScenarioActorComponent(null, e);
closeArray();
};
if (element.hasInstance()) {
openArray("instance");
for (ExampleScenario.ExampleScenarioInstanceComponent e : element.getInstance())
composeExampleScenarioInstanceComponent(null, e);
closeArray();
};
if (element.hasProcess()) {
openArray("process");
for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess())
composeExampleScenarioProcessComponent(null, e);
closeArray();
};
}
protected void composeExampleScenarioActorComponent(String name, ExampleScenario.ExampleScenarioActorComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioActorComponentProperties(element);
close();
}
}
protected void composeExampleScenarioActorComponentProperties(ExampleScenario.ExampleScenarioActorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKeyElement()) {
composeStringCore("key", element.getKeyElement(), false);
composeStringExtras("key", element.getKeyElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ExampleScenarioActorTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ExampleScenarioActorTypeEnumFactory(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeExampleScenarioInstanceComponent(String name, ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioInstanceComponentProperties(element);
close();
}
}
protected void composeExampleScenarioInstanceComponentProperties(ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKeyElement()) {
composeStringCore("key", element.getKeyElement(), false);
composeStringExtras("key", element.getKeyElement(), false);
}
if (element.hasStructureType()) {
composeCoding("structureType", element.getStructureType());
}
if (element.hasStructureVersionElement()) {
composeStringCore("structureVersion", element.getStructureVersionElement(), false);
composeStringExtras("structureVersion", element.getStructureVersionElement(), false);
}
if (element.hasStructureProfile()) {
composeType("structureProfile", element.getStructureProfile());
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasContent()) {
composeReference("content", element.getContent());
}
if (element.hasVersion()) {
openArray("version");
for (ExampleScenario.ExampleScenarioInstanceVersionComponent e : element.getVersion())
composeExampleScenarioInstanceVersionComponent(null, e);
closeArray();
};
if (element.hasContainedInstance()) {
openArray("containedInstance");
for (ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent e : element.getContainedInstance())
composeExampleScenarioInstanceContainedInstanceComponent(null, e);
closeArray();
};
}
protected void composeExampleScenarioInstanceVersionComponent(String name, ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioInstanceVersionComponentProperties(element);
close();
}
}
protected void composeExampleScenarioInstanceVersionComponentProperties(ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKeyElement()) {
composeStringCore("key", element.getKeyElement(), false);
composeStringExtras("key", element.getKeyElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasContent()) {
composeReference("content", element.getContent());
}
}
protected void composeExampleScenarioInstanceContainedInstanceComponent(String name, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioInstanceContainedInstanceComponentProperties(element);
close();
}
}
protected void composeExampleScenarioInstanceContainedInstanceComponentProperties(ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInstanceReferenceElement()) {
composeStringCore("instanceReference", element.getInstanceReferenceElement(), false);
composeStringExtras("instanceReference", element.getInstanceReferenceElement(), false);
}
if (element.hasVersionReferenceElement()) {
composeStringCore("versionReference", element.getVersionReferenceElement(), false);
composeStringExtras("versionReference", element.getVersionReferenceElement(), false);
}
}
protected void composeExampleScenarioProcessComponent(String name, ExampleScenario.ExampleScenarioProcessComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioProcessComponentProperties(element);
close();
}
}
protected void composeExampleScenarioProcessComponentProperties(ExampleScenario.ExampleScenarioProcessComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasPreConditionsElement()) {
composeMarkdownCore("preConditions", element.getPreConditionsElement(), false);
composeMarkdownExtras("preConditions", element.getPreConditionsElement(), false);
}
if (element.hasPostConditionsElement()) {
composeMarkdownCore("postConditions", element.getPostConditionsElement(), false);
composeMarkdownExtras("postConditions", element.getPostConditionsElement(), false);
}
if (element.hasStep()) {
openArray("step");
for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep())
composeExampleScenarioProcessStepComponent(null, e);
closeArray();
};
}
protected void composeExampleScenarioProcessStepComponent(String name, ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioProcessStepComponentProperties(element);
close();
}
}
protected void composeExampleScenarioProcessStepComponentProperties(ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNumberElement()) {
composeStringCore("number", element.getNumberElement(), false);
composeStringExtras("number", element.getNumberElement(), false);
}
if (element.hasProcess()) {
composeExampleScenarioProcessComponent("process", element.getProcess());
}
if (element.hasWorkflowElement()) {
composeCanonicalCore("workflow", element.getWorkflowElement(), false);
composeCanonicalExtras("workflow", element.getWorkflowElement(), false);
}
if (element.hasOperation()) {
composeExampleScenarioProcessStepOperationComponent("operation", element.getOperation());
}
if (element.hasAlternative()) {
openArray("alternative");
for (ExampleScenario.ExampleScenarioProcessStepAlternativeComponent e : element.getAlternative())
composeExampleScenarioProcessStepAlternativeComponent(null, e);
closeArray();
};
if (element.hasPauseElement()) {
composeBooleanCore("pause", element.getPauseElement(), false);
composeBooleanExtras("pause", element.getPauseElement(), false);
}
}
protected void composeExampleScenarioProcessStepOperationComponent(String name, ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioProcessStepOperationComponentProperties(element);
close();
}
}
protected void composeExampleScenarioProcessStepOperationComponentProperties(ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasInitiatorElement()) {
composeStringCore("initiator", element.getInitiatorElement(), false);
composeStringExtras("initiator", element.getInitiatorElement(), false);
}
if (element.hasReceiverElement()) {
composeStringCore("receiver", element.getReceiverElement(), false);
composeStringExtras("receiver", element.getReceiverElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasInitiatorActiveElement()) {
composeBooleanCore("initiatorActive", element.getInitiatorActiveElement(), false);
composeBooleanExtras("initiatorActive", element.getInitiatorActiveElement(), false);
}
if (element.hasReceiverActiveElement()) {
composeBooleanCore("receiverActive", element.getReceiverActiveElement(), false);
composeBooleanExtras("receiverActive", element.getReceiverActiveElement(), false);
}
if (element.hasRequest()) {
composeExampleScenarioInstanceContainedInstanceComponent("request", element.getRequest());
}
if (element.hasResponse()) {
composeExampleScenarioInstanceContainedInstanceComponent("response", element.getResponse());
}
}
protected void composeExampleScenarioProcessStepAlternativeComponent(String name, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioProcessStepAlternativeComponentProperties(element);
close();
}
}
protected void composeExampleScenarioProcessStepAlternativeComponentProperties(ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasStep()) {
openArray("step");
for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep())
composeExampleScenarioProcessStepComponent(null, e);
closeArray();
};
}
protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeExplanationOfBenefitProperties(element);
}
}
protected void composeExplanationOfBenefitProperties(ExplanationOfBenefit element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Enumerations.UseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Enumerations.UseEnumFactory(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasBillablePeriod()) {
composePeriod("billablePeriod", element.getBillablePeriod());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasEnterer()) {
composeReference("enterer", element.getEnterer());
}
if (element.hasInsurer()) {
composeReference("insurer", element.getInsurer());
}
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasFundsReserveRequested()) {
composeCodeableConcept("fundsReserveRequested", element.getFundsReserveRequested());
}
if (element.hasFundsReserve()) {
composeCodeableConcept("fundsReserve", element.getFundsReserve());
}
if (element.hasRelated()) {
openArray("related");
for (ExplanationOfBenefit.RelatedClaimComponent e : element.getRelated())
composeRelatedClaimComponent(null, e);
closeArray();
};
if (element.hasPrescription()) {
composeReference("prescription", element.getPrescription());
}
if (element.hasOriginalPrescription()) {
composeReference("originalPrescription", element.getOriginalPrescription());
}
if (element.hasEvent()) {
openArray("event");
for (ExplanationOfBenefit.ExplanationOfBenefitEventComponent e : element.getEvent())
composeExplanationOfBenefitEventComponent(null, e);
closeArray();
};
if (element.hasPayee()) {
composePayeeComponent("payee", element.getPayee());
}
if (element.hasReferral()) {
composeReference("referral", element.getReferral());
}
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
};
if (element.hasFacility()) {
composeReference("facility", element.getFacility());
}
if (element.hasClaim()) {
composeReference("claim", element.getClaim());
}
if (element.hasClaimResponse()) {
composeReference("claimResponse", element.getClaimResponse());
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new Enumerations.ClaimProcessingCodesEnumFactory(), false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.ClaimProcessingCodesEnumFactory(), false);
}
if (element.hasDecision()) {
composeCodeableConcept("decision", element.getDecision());
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasPreAuthRef()) {
if (anyHasValue(element.getPreAuthRef())) {
openArray("preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringCore(null, e, e != element.getPreAuthRef().get(element.getPreAuthRef().size()-1));
closeArray();
}
if (anyHasExtras(element.getPreAuthRef())) {
openArray("_preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasPreAuthRefPeriod()) {
openArray("preAuthRefPeriod");
for (Period e : element.getPreAuthRefPeriod())
composePeriod(null, e);
closeArray();
};
if (element.hasDiagnosisRelatedGroup()) {
composeCodeableConcept("diagnosisRelatedGroup", element.getDiagnosisRelatedGroup());
}
if (element.hasCareTeam()) {
openArray("careTeam");
for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam())
composeCareTeamComponent(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (ExplanationOfBenefit.SupportingInformationComponent e : element.getSupportingInfo())
composeSupportingInformationComponent(null, e);
closeArray();
};
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis())
composeDiagnosisComponent(null, e);
closeArray();
};
if (element.hasProcedure()) {
openArray("procedure");
for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure())
composeProcedureComponent(null, e);
closeArray();
};
if (element.hasPrecedenceElement()) {
composePositiveIntCore("precedence", element.getPrecedenceElement(), false);
composePositiveIntExtras("precedence", element.getPrecedenceElement(), false);
}
if (element.hasInsurance()) {
openArray("insurance");
for (ExplanationOfBenefit.InsuranceComponent e : element.getInsurance())
composeInsuranceComponent(null, e);
closeArray();
};
if (element.hasAccident()) {
composeAccidentComponent("accident", element.getAccident());
}
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasItem()) {
openArray("item");
for (ExplanationOfBenefit.ItemComponent e : element.getItem())
composeItemComponent(null, e);
closeArray();
};
if (element.hasAddItem()) {
openArray("addItem");
for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem())
composeAddedItemComponent(null, e);
closeArray();
};
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasTotal()) {
openArray("total");
for (ExplanationOfBenefit.TotalComponent e : element.getTotal())
composeTotalComponent(null, e);
closeArray();
};
if (element.hasPayment()) {
composePaymentComponent("payment", element.getPayment());
}
if (element.hasFormCode()) {
composeCodeableConcept("formCode", element.getFormCode());
}
if (element.hasForm()) {
composeAttachment("form", element.getForm());
}
if (element.hasProcessNote()) {
openArray("processNote");
for (ExplanationOfBenefit.NoteComponent e : element.getProcessNote())
composeNoteComponent(null, e);
closeArray();
};
if (element.hasBenefitPeriod()) {
composePeriod("benefitPeriod", element.getBenefitPeriod());
}
if (element.hasBenefitBalance()) {
openArray("benefitBalance");
for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance())
composeBenefitBalanceComponent(null, e);
closeArray();
};
}
protected void composeRelatedClaimComponent(String name, ExplanationOfBenefit.RelatedClaimComponent element) throws IOException {
if (element != null) {
open(name);
composeRelatedClaimComponentProperties(element);
close();
}
}
protected void composeRelatedClaimComponentProperties(ExplanationOfBenefit.RelatedClaimComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasClaim()) {
composeReference("claim", element.getClaim());
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasReference()) {
composeIdentifier("reference", element.getReference());
}
}
protected void composeExplanationOfBenefitEventComponent(String name, ExplanationOfBenefit.ExplanationOfBenefitEventComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitEventComponentProperties(element);
close();
}
}
protected void composeExplanationOfBenefitEventComponentProperties(ExplanationOfBenefit.ExplanationOfBenefitEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasWhen()) {
composeType("when", element.getWhen());
}
}
protected void composePayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element) throws IOException {
if (element != null) {
open(name);
composePayeeComponentProperties(element);
close();
}
}
protected void composePayeeComponentProperties(ExplanationOfBenefit.PayeeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeCareTeamComponent(String name, ExplanationOfBenefit.CareTeamComponent element) throws IOException {
if (element != null) {
open(name);
composeCareTeamComponentProperties(element);
close();
}
}
protected void composeCareTeamComponentProperties(ExplanationOfBenefit.CareTeamComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasProvider()) {
composeReference("provider", element.getProvider());
}
if (element.hasResponsibleElement()) {
composeBooleanCore("responsible", element.getResponsibleElement(), false);
composeBooleanExtras("responsible", element.getResponsibleElement(), false);
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasSpecialty()) {
composeCodeableConcept("specialty", element.getSpecialty());
}
}
protected void composeSupportingInformationComponent(String name, ExplanationOfBenefit.SupportingInformationComponent element) throws IOException {
if (element != null) {
open(name);
composeSupportingInformationComponentProperties(element);
close();
}
}
protected void composeSupportingInformationComponentProperties(ExplanationOfBenefit.SupportingInformationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasReason()) {
composeCoding("reason", element.getReason());
}
}
protected void composeDiagnosisComponent(String name, ExplanationOfBenefit.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosisComponentProperties(element);
close();
}
}
protected void composeDiagnosisComponentProperties(ExplanationOfBenefit.DiagnosisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasDiagnosis()) {
composeType("diagnosis", element.getDiagnosis());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasOnAdmission()) {
composeCodeableConcept("onAdmission", element.getOnAdmission());
}
}
protected void composeProcedureComponent(String name, ExplanationOfBenefit.ProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeProcedureComponentProperties(element);
close();
}
}
protected void composeProcedureComponentProperties(ExplanationOfBenefit.ProcedureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasProcedure()) {
composeType("procedure", element.getProcedure());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
}
protected void composeInsuranceComponent(String name, ExplanationOfBenefit.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeInsuranceComponentProperties(element);
close();
}
}
protected void composeInsuranceComponentProperties(ExplanationOfBenefit.InsuranceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFocalElement()) {
composeBooleanCore("focal", element.getFocalElement(), false);
composeBooleanExtras("focal", element.getFocalElement(), false);
}
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasPreAuthRef()) {
if (anyHasValue(element.getPreAuthRef())) {
openArray("preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringCore(null, e, e != element.getPreAuthRef().get(element.getPreAuthRef().size()-1));
closeArray();
}
if (anyHasExtras(element.getPreAuthRef())) {
openArray("_preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeAccidentComponent(String name, ExplanationOfBenefit.AccidentComponent element) throws IOException {
if (element != null) {
open(name);
composeAccidentComponentProperties(element);
close();
}
}
protected void composeAccidentComponentProperties(ExplanationOfBenefit.AccidentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasLocation()) {
composeType("location", element.getLocation());
}
}
protected void composeItemComponent(String name, ExplanationOfBenefit.ItemComponent element) throws IOException {
if (element != null) {
open(name);
composeItemComponentProperties(element);
close();
}
}
protected void composeItemComponentProperties(ExplanationOfBenefit.ItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCareTeamSequence()) {
if (anyHasValue(element.getCareTeamSequence())) {
openArray("careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntCore(null, e, e != element.getCareTeamSequence().get(element.getCareTeamSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getCareTeamSequence())) {
openArray("_careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasDiagnosisSequence()) {
if (anyHasValue(element.getDiagnosisSequence())) {
openArray("diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntCore(null, e, e != element.getDiagnosisSequence().get(element.getDiagnosisSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getDiagnosisSequence())) {
openArray("_diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasProcedureSequence()) {
if (anyHasValue(element.getProcedureSequence())) {
openArray("procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntCore(null, e, e != element.getProcedureSequence().get(element.getProcedureSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getProcedureSequence())) {
openArray("_procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasInformationSequence()) {
if (anyHasValue(element.getInformationSequence())) {
openArray("informationSequence");
for (PositiveIntType e : element.getInformationSequence())
composePositiveIntCore(null, e, e != element.getInformationSequence().get(element.getInformationSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getInformationSequence())) {
openArray("_informationSequence");
for (PositiveIntType e : element.getInformationSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
};
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasLocation()) {
composeType("location", element.getLocation());
}
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
openArray("bodySite");
for (ExplanationOfBenefit.ItemBodySiteComponent e : element.getBodySite())
composeItemBodySiteComponent(null, e);
closeArray();
};
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeItemReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (ExplanationOfBenefit.DetailComponent e : element.getDetail())
composeDetailComponent(null, e);
closeArray();
};
}
protected void composeItemBodySiteComponent(String name, ExplanationOfBenefit.ItemBodySiteComponent element) throws IOException {
if (element != null) {
open(name);
composeItemBodySiteComponentProperties(element);
close();
}
}
protected void composeItemBodySiteComponentProperties(ExplanationOfBenefit.ItemBodySiteComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSite()) {
openArray("site");
for (CodeableReference e : element.getSite())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeItemReviewOutcomeComponent(String name, ExplanationOfBenefit.ItemReviewOutcomeComponent element) throws IOException {
if (element != null) {
open(name);
composeItemReviewOutcomeComponentProperties(element);
close();
}
}
protected void composeItemReviewOutcomeComponentProperties(ExplanationOfBenefit.ItemReviewOutcomeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDecision()) {
composeCodeableConcept("decision", element.getDecision());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPreAuthRefElement()) {
composeStringCore("preAuthRef", element.getPreAuthRefElement(), false);
composeStringExtras("preAuthRef", element.getPreAuthRefElement(), false);
}
if (element.hasPreAuthPeriod()) {
composePeriod("preAuthPeriod", element.getPreAuthPeriod());
}
}
protected void composeAdjudicationComponent(String name, ExplanationOfBenefit.AdjudicationComponent element) throws IOException {
if (element != null) {
open(name);
composeAdjudicationComponentProperties(element);
close();
}
}
protected void composeAdjudicationComponentProperties(ExplanationOfBenefit.AdjudicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
}
protected void composeDetailComponent(String name, ExplanationOfBenefit.DetailComponent element) throws IOException {
if (element != null) {
open(name);
composeDetailComponentProperties(element);
close();
}
}
protected void composeDetailComponentProperties(ExplanationOfBenefit.DetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeItemReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasSubDetail()) {
openArray("subDetail");
for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail())
composeSubDetailComponent(null, e);
closeArray();
};
}
protected void composeSubDetailComponent(String name, ExplanationOfBenefit.SubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeSubDetailComponentProperties(element);
close();
}
}
protected void composeSubDetailComponentProperties(ExplanationOfBenefit.SubDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeItemReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
}
protected void composeAddedItemComponent(String name, ExplanationOfBenefit.AddedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemComponentProperties(element);
close();
}
}
protected void composeAddedItemComponentProperties(ExplanationOfBenefit.AddedItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItemSequence()) {
if (anyHasValue(element.getItemSequence())) {
openArray("itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntCore(null, e, e != element.getItemSequence().get(element.getItemSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getItemSequence())) {
openArray("_itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasDetailSequence()) {
if (anyHasValue(element.getDetailSequence())) {
openArray("detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntCore(null, e, e != element.getDetailSequence().get(element.getDetailSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getDetailSequence())) {
openArray("_detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasSubDetailSequence()) {
if (anyHasValue(element.getSubDetailSequence())) {
openArray("subDetailSequence");
for (PositiveIntType e : element.getSubDetailSequence())
composePositiveIntCore(null, e, e != element.getSubDetailSequence().get(element.getSubDetailSequence().size()-1));
closeArray();
}
if (anyHasExtras(element.getSubDetailSequence())) {
openArray("_subDetailSequence");
for (PositiveIntType e : element.getSubDetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasProvider()) {
openArray("provider");
for (Reference e : element.getProvider())
composeReference(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
};
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasLocation()) {
composeType("location", element.getLocation());
}
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasBodySite()) {
openArray("bodySite");
for (ExplanationOfBenefit.AddedItemBodySiteComponent e : element.getBodySite())
composeAddedItemBodySiteComponent(null, e);
closeArray();
};
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeItemReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasDetail()) {
openArray("detail");
for (ExplanationOfBenefit.AddedItemDetailComponent e : element.getDetail())
composeAddedItemDetailComponent(null, e);
closeArray();
};
}
protected void composeAddedItemBodySiteComponent(String name, ExplanationOfBenefit.AddedItemBodySiteComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemBodySiteComponentProperties(element);
close();
}
}
protected void composeAddedItemBodySiteComponentProperties(ExplanationOfBenefit.AddedItemBodySiteComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSite()) {
openArray("site");
for (CodeableReference e : element.getSite())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeAddedItemDetailComponent(String name, ExplanationOfBenefit.AddedItemDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemDetailComponentProperties(element);
close();
}
}
protected void composeAddedItemDetailComponentProperties(ExplanationOfBenefit.AddedItemDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeItemReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
if (element.hasSubDetail()) {
openArray("subDetail");
for (ExplanationOfBenefit.AddedItemDetailSubDetailComponent e : element.getSubDetail())
composeAddedItemDetailSubDetailComponent(null, e);
closeArray();
};
}
protected void composeAddedItemDetailSubDetailComponent(String name, ExplanationOfBenefit.AddedItemDetailSubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeAddedItemDetailSubDetailComponentProperties(element);
close();
}
}
protected void composeAddedItemDetailSubDetailComponentProperties(ExplanationOfBenefit.AddedItemDetailSubDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTraceNumber()) {
openArray("traceNumber");
for (Identifier e : element.getTraceNumber())
composeIdentifier(null, e);
closeArray();
};
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
if (element.hasProductOrServiceEnd()) {
composeCodeableConcept("productOrServiceEnd", element.getProductOrServiceEnd());
}
if (element.hasModifier()) {
openArray("modifier");
for (CodeableConcept e : element.getModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPatientPaid()) {
composeMoney("patientPaid", element.getPatientPaid());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasUnitPrice()) {
composeMoney("unitPrice", element.getUnitPrice());
}
if (element.hasFactorElement()) {
composeDecimalCore("factor", element.getFactorElement(), false);
composeDecimalExtras("factor", element.getFactorElement(), false);
}
if (element.hasTax()) {
composeMoney("tax", element.getTax());
}
if (element.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
if (anyHasValue(element.getNoteNumber())) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, e != element.getNoteNumber().get(element.getNoteNumber().size()-1));
closeArray();
}
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
};
if (element.hasReviewOutcome()) {
composeItemReviewOutcomeComponent("reviewOutcome", element.getReviewOutcome());
}
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeAdjudicationComponent(null, e);
closeArray();
};
}
protected void composeTotalComponent(String name, ExplanationOfBenefit.TotalComponent element) throws IOException {
if (element != null) {
open(name);
composeTotalComponentProperties(element);
close();
}
}
protected void composeTotalComponentProperties(ExplanationOfBenefit.TotalComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composePaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element) throws IOException {
if (element != null) {
open(name);
composePaymentComponentProperties(element);
close();
}
}
protected void composePaymentComponentProperties(ExplanationOfBenefit.PaymentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAdjustment()) {
composeMoney("adjustment", element.getAdjustment());
}
if (element.hasAdjustmentReason()) {
composeCodeableConcept("adjustmentReason", element.getAdjustmentReason());
}
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
}
protected void composeNoteComponent(String name, ExplanationOfBenefit.NoteComponent element) throws IOException {
if (element != null) {
open(name);
composeNoteComponentProperties(element);
close();
}
}
protected void composeNoteComponentProperties(ExplanationOfBenefit.NoteComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNumberElement()) {
composePositiveIntCore("number", element.getNumberElement(), false);
composePositiveIntExtras("number", element.getNumberElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
}
protected void composeBenefitBalanceComponent(String name, ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException {
if (element != null) {
open(name);
composeBenefitBalanceComponentProperties(element);
close();
}
}
protected void composeBenefitBalanceComponentProperties(ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasExcludedElement()) {
composeBooleanCore("excluded", element.getExcludedElement(), false);
composeBooleanExtras("excluded", element.getExcludedElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNetwork()) {
composeCodeableConcept("network", element.getNetwork());
}
if (element.hasUnit()) {
composeCodeableConcept("unit", element.getUnit());
}
if (element.hasTerm()) {
composeCodeableConcept("term", element.getTerm());
}
if (element.hasFinancial()) {
openArray("financial");
for (ExplanationOfBenefit.BenefitComponent e : element.getFinancial())
composeBenefitComponent(null, e);
closeArray();
};
}
protected void composeBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element) throws IOException {
if (element != null) {
open(name);
composeBenefitComponentProperties(element);
close();
}
}
protected void composeBenefitComponentProperties(ExplanationOfBenefit.BenefitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAllowed()) {
composeType("allowed", element.getAllowed());
}
if (element.hasUsed()) {
composeType("used", element.getUsed());
}
}
protected void composeFamilyMemberHistory(String name, FamilyMemberHistory element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeFamilyMemberHistoryProperties(element);
}
}
protected void composeFamilyMemberHistoryProperties(FamilyMemberHistory element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory(), false);
}
if (element.hasDataAbsentReason()) {
composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason());
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasParticipant()) {
openArray("participant");
for (FamilyMemberHistory.FamilyMemberHistoryParticipantComponent e : element.getParticipant())
composeFamilyMemberHistoryParticipantComponent(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasSex()) {
composeCodeableConcept("sex", element.getSex());
}
if (element.hasBorn()) {
composeType("born", element.getBorn());
}
if (element.hasAge()) {
composeType("age", element.getAge());
}
if (element.hasEstimatedAgeElement()) {
composeBooleanCore("estimatedAge", element.getEstimatedAgeElement(), false);
composeBooleanExtras("estimatedAge", element.getEstimatedAgeElement(), false);
}
if (element.hasDeceased()) {
composeType("deceased", element.getDeceased());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasCondition()) {
openArray("condition");
for (FamilyMemberHistory.FamilyMemberHistoryConditionComponent e : element.getCondition())
composeFamilyMemberHistoryConditionComponent(null, e);
closeArray();
};
if (element.hasProcedure()) {
openArray("procedure");
for (FamilyMemberHistory.FamilyMemberHistoryProcedureComponent e : element.getProcedure())
composeFamilyMemberHistoryProcedureComponent(null, e);
closeArray();
};
}
protected void composeFamilyMemberHistoryParticipantComponent(String name, FamilyMemberHistory.FamilyMemberHistoryParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeFamilyMemberHistoryParticipantComponentProperties(element);
close();
}
}
protected void composeFamilyMemberHistoryParticipantComponentProperties(FamilyMemberHistory.FamilyMemberHistoryParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeFamilyMemberHistoryConditionComponent(String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException {
if (element != null) {
open(name);
composeFamilyMemberHistoryConditionComponentProperties(element);
close();
}
}
protected void composeFamilyMemberHistoryConditionComponentProperties(FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasOutcome()) {
composeCodeableConcept("outcome", element.getOutcome());
}
if (element.hasContributedToDeathElement()) {
composeBooleanCore("contributedToDeath", element.getContributedToDeathElement(), false);
composeBooleanExtras("contributedToDeath", element.getContributedToDeathElement(), false);
}
if (element.hasOnset()) {
composeType("onset", element.getOnset());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeFamilyMemberHistoryProcedureComponent(String name, FamilyMemberHistory.FamilyMemberHistoryProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeFamilyMemberHistoryProcedureComponentProperties(element);
close();
}
}
protected void composeFamilyMemberHistoryProcedureComponentProperties(FamilyMemberHistory.FamilyMemberHistoryProcedureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasOutcome()) {
composeCodeableConcept("outcome", element.getOutcome());
}
if (element.hasContributedToDeathElement()) {
composeBooleanCore("contributedToDeath", element.getContributedToDeathElement(), false);
composeBooleanExtras("contributedToDeath", element.getContributedToDeathElement(), false);
}
if (element.hasPerformed()) {
composeType("performed", element.getPerformed());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeFlag(String name, Flag element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeFlagProperties(element);
}
}
protected void composeFlagProperties(Flag element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
}
protected void composeFormularyItem(String name, FormularyItem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeFormularyItemProperties(element);
}
}
protected void composeFormularyItemProperties(FormularyItem element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new FormularyItem.FormularyItemStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new FormularyItem.FormularyItemStatusCodesEnumFactory(), false);
}
}
protected void composeGenomicStudy(String name, GenomicStudy element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeGenomicStudyProperties(element);
}
}
protected void composeGenomicStudyProperties(GenomicStudy element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new GenomicStudy.GenomicStudyStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new GenomicStudy.GenomicStudyStatusEnumFactory(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasStartDateElement()) {
composeDateTimeCore("startDate", element.getStartDateElement(), false);
composeDateTimeExtras("startDate", element.getStartDateElement(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasReferrer()) {
composeReference("referrer", element.getReferrer());
}
if (element.hasInterpreter()) {
openArray("interpreter");
for (Reference e : element.getInterpreter())
composeReference(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasInstantiatesCanonicalElement()) {
composeCanonicalCore("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
composeCanonicalExtras("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
}
if (element.hasInstantiatesUriElement()) {
composeUriCore("instantiatesUri", element.getInstantiatesUriElement(), false);
composeUriExtras("instantiatesUri", element.getInstantiatesUriElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasAnalysis()) {
openArray("analysis");
for (GenomicStudy.GenomicStudyAnalysisComponent e : element.getAnalysis())
composeGenomicStudyAnalysisComponent(null, e);
closeArray();
};
}
protected void composeGenomicStudyAnalysisComponent(String name, GenomicStudy.GenomicStudyAnalysisComponent element) throws IOException {
if (element != null) {
open(name);
composeGenomicStudyAnalysisComponentProperties(element);
close();
}
}
protected void composeGenomicStudyAnalysisComponentProperties(GenomicStudy.GenomicStudyAnalysisComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasMethodType()) {
openArray("methodType");
for (CodeableConcept e : element.getMethodType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasChangeType()) {
openArray("changeType");
for (CodeableConcept e : element.getChangeType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasGenomeBuild()) {
composeCodeableConcept("genomeBuild", element.getGenomeBuild());
}
if (element.hasInstantiatesCanonicalElement()) {
composeCanonicalCore("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
composeCanonicalExtras("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
}
if (element.hasInstantiatesUriElement()) {
composeUriCore("instantiatesUri", element.getInstantiatesUriElement(), false);
composeUriExtras("instantiatesUri", element.getInstantiatesUriElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasFocus()) {
openArray("focus");
for (Reference e : element.getFocus())
composeReference(null, e);
closeArray();
};
if (element.hasSpecimen()) {
openArray("specimen");
for (Reference e : element.getSpecimen())
composeReference(null, e);
closeArray();
};
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasProtocolPerformed()) {
composeReference("protocolPerformed", element.getProtocolPerformed());
}
if (element.hasRegionsStudied()) {
openArray("regionsStudied");
for (Reference e : element.getRegionsStudied())
composeReference(null, e);
closeArray();
};
if (element.hasRegionsCalled()) {
openArray("regionsCalled");
for (Reference e : element.getRegionsCalled())
composeReference(null, e);
closeArray();
};
if (element.hasInput()) {
openArray("input");
for (GenomicStudy.GenomicStudyAnalysisInputComponent e : element.getInput())
composeGenomicStudyAnalysisInputComponent(null, e);
closeArray();
};
if (element.hasOutput()) {
openArray("output");
for (GenomicStudy.GenomicStudyAnalysisOutputComponent e : element.getOutput())
composeGenomicStudyAnalysisOutputComponent(null, e);
closeArray();
};
if (element.hasPerformer()) {
openArray("performer");
for (GenomicStudy.GenomicStudyAnalysisPerformerComponent e : element.getPerformer())
composeGenomicStudyAnalysisPerformerComponent(null, e);
closeArray();
};
if (element.hasDevice()) {
openArray("device");
for (GenomicStudy.GenomicStudyAnalysisDeviceComponent e : element.getDevice())
composeGenomicStudyAnalysisDeviceComponent(null, e);
closeArray();
};
}
protected void composeGenomicStudyAnalysisInputComponent(String name, GenomicStudy.GenomicStudyAnalysisInputComponent element) throws IOException {
if (element != null) {
open(name);
composeGenomicStudyAnalysisInputComponentProperties(element);
close();
}
}
protected void composeGenomicStudyAnalysisInputComponentProperties(GenomicStudy.GenomicStudyAnalysisInputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFile()) {
composeReference("file", element.getFile());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGeneratedBy()) {
composeType("generatedBy", element.getGeneratedBy());
}
}
protected void composeGenomicStudyAnalysisOutputComponent(String name, GenomicStudy.GenomicStudyAnalysisOutputComponent element) throws IOException {
if (element != null) {
open(name);
composeGenomicStudyAnalysisOutputComponentProperties(element);
close();
}
}
protected void composeGenomicStudyAnalysisOutputComponentProperties(GenomicStudy.GenomicStudyAnalysisOutputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFile()) {
composeReference("file", element.getFile());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
}
protected void composeGenomicStudyAnalysisPerformerComponent(String name, GenomicStudy.GenomicStudyAnalysisPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeGenomicStudyAnalysisPerformerComponentProperties(element);
close();
}
}
protected void composeGenomicStudyAnalysisPerformerComponentProperties(GenomicStudy.GenomicStudyAnalysisPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composeGenomicStudyAnalysisDeviceComponent(String name, GenomicStudy.GenomicStudyAnalysisDeviceComponent element) throws IOException {
if (element != null) {
open(name);
composeGenomicStudyAnalysisDeviceComponentProperties(element);
close();
}
}
protected void composeGenomicStudyAnalysisDeviceComponentProperties(GenomicStudy.GenomicStudyAnalysisDeviceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
}
protected void composeGoal(String name, Goal element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeGoalProperties(element);
}
}
protected void composeGoalProperties(Goal element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasLifecycleStatusElement()) {
composeEnumerationCore("lifecycleStatus", element.getLifecycleStatusElement(), new Goal.GoalLifecycleStatusEnumFactory(), false);
composeEnumerationExtras("lifecycleStatus", element.getLifecycleStatusElement(), new Goal.GoalLifecycleStatusEnumFactory(), false);
}
if (element.hasAchievementStatus()) {
composeCodeableConcept("achievementStatus", element.getAchievementStatus());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasContinuousElement()) {
composeBooleanCore("continuous", element.getContinuousElement(), false);
composeBooleanExtras("continuous", element.getContinuousElement(), false);
}
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasDescription()) {
composeCodeableConcept("description", element.getDescription());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasStart()) {
composeType("start", element.getStart());
}
if (element.hasTarget()) {
openArray("target");
for (Goal.GoalTargetComponent e : element.getTarget())
composeGoalTargetComponent(null, e);
closeArray();
};
if (element.hasStatusDateElement()) {
composeDateCore("statusDate", element.getStatusDateElement(), false);
composeDateExtras("statusDate", element.getStatusDateElement(), false);
}
if (element.hasStatusReasonElement()) {
composeStringCore("statusReason", element.getStatusReasonElement(), false);
composeStringExtras("statusReason", element.getStatusReasonElement(), false);
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasAddresses()) {
openArray("addresses");
for (Reference e : element.getAddresses())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasOutcome()) {
openArray("outcome");
for (CodeableReference e : element.getOutcome())
composeCodeableReference(null, e);
closeArray();
};
}
protected void composeGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeGoalTargetComponentProperties(element);
close();
}
}
protected void composeGoalTargetComponentProperties(Goal.GoalTargetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMeasure()) {
composeCodeableConcept("measure", element.getMeasure());
}
if (element.hasDetail()) {
composeType("detail", element.getDetail());
}
if (element.hasDue()) {
composeType("due", element.getDue());
}
}
protected void composeGraphDefinition(String name, GraphDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeGraphDefinitionProperties(element);
}
}
protected void composeGraphDefinitionProperties(GraphDefinition element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasStartElement()) {
composeIdCore("start", element.getStartElement(), false);
composeIdExtras("start", element.getStartElement(), false);
}
if (element.hasNode()) {
openArray("node");
for (GraphDefinition.GraphDefinitionNodeComponent e : element.getNode())
composeGraphDefinitionNodeComponent(null, e);
closeArray();
};
if (element.hasLink()) {
openArray("link");
for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink())
composeGraphDefinitionLinkComponent(null, e);
closeArray();
};
}
protected void composeGraphDefinitionNodeComponent(String name, GraphDefinition.GraphDefinitionNodeComponent element) throws IOException {
if (element != null) {
open(name);
composeGraphDefinitionNodeComponentProperties(element);
close();
}
}
protected void composeGraphDefinitionNodeComponentProperties(GraphDefinition.GraphDefinitionNodeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNodeIdElement()) {
composeIdCore("nodeId", element.getNodeIdElement(), false);
composeIdExtras("nodeId", element.getNodeIdElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
}
protected void composeGraphDefinitionLinkComponent(String name, GraphDefinition.GraphDefinitionLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeGraphDefinitionLinkComponentProperties(element);
close();
}
}
protected void composeGraphDefinitionLinkComponentProperties(GraphDefinition.GraphDefinitionLinkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasMinElement()) {
composeIntegerCore("min", element.getMinElement(), false);
composeIntegerExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
if (element.hasSourceIdElement()) {
composeIdCore("sourceId", element.getSourceIdElement(), false);
composeIdExtras("sourceId", element.getSourceIdElement(), false);
}
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasSliceNameElement()) {
composeStringCore("sliceName", element.getSliceNameElement(), false);
composeStringExtras("sliceName", element.getSliceNameElement(), false);
}
if (element.hasTargetIdElement()) {
composeIdCore("targetId", element.getTargetIdElement(), false);
composeIdExtras("targetId", element.getTargetIdElement(), false);
}
if (element.hasParamsElement()) {
composeStringCore("params", element.getParamsElement(), false);
composeStringExtras("params", element.getParamsElement(), false);
}
if (element.hasCompartment()) {
openArray("compartment");
for (GraphDefinition.GraphDefinitionLinkCompartmentComponent e : element.getCompartment())
composeGraphDefinitionLinkCompartmentComponent(null, e);
closeArray();
};
}
protected void composeGraphDefinitionLinkCompartmentComponent(String name, GraphDefinition.GraphDefinitionLinkCompartmentComponent element) throws IOException {
if (element != null) {
open(name);
composeGraphDefinitionLinkCompartmentComponentProperties(element);
close();
}
}
protected void composeGraphDefinitionLinkCompartmentComponentProperties(GraphDefinition.GraphDefinitionLinkCompartmentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory(), false);
}
if (element.hasRuleElement()) {
composeEnumerationCore("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(), false);
composeEnumerationExtras("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(), false);
}
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new Enumerations.CompartmentTypeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new Enumerations.CompartmentTypeEnumFactory(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeGroup(String name, Group element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeGroupProperties(element);
}
}
protected void composeGroupProperties(Group element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Group.GroupTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Group.GroupTypeEnumFactory(), false);
}
if (element.hasMembershipElement()) {
composeEnumerationCore("membership", element.getMembershipElement(), new Group.GroupMembershipBasisEnumFactory(), false);
composeEnumerationExtras("membership", element.getMembershipElement(), new Group.GroupMembershipBasisEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasQuantityElement()) {
composeUnsignedIntCore("quantity", element.getQuantityElement(), false);
composeUnsignedIntExtras("quantity", element.getQuantityElement(), false);
}
if (element.hasManagingEntity()) {
composeReference("managingEntity", element.getManagingEntity());
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (Group.GroupCharacteristicComponent e : element.getCharacteristic())
composeGroupCharacteristicComponent(null, e);
closeArray();
};
if (element.hasMember()) {
openArray("member");
for (Group.GroupMemberComponent e : element.getMember())
composeGroupMemberComponent(null, e);
closeArray();
};
}
protected void composeGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeGroupCharacteristicComponentProperties(element);
close();
}
}
protected void composeGroupCharacteristicComponentProperties(Group.GroupCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasExcludeElement()) {
composeBooleanCore("exclude", element.getExcludeElement(), false);
composeBooleanExtras("exclude", element.getExcludeElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException {
if (element != null) {
open(name);
composeGroupMemberComponentProperties(element);
close();
}
}
protected void composeGroupMemberComponentProperties(Group.GroupMemberComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEntity()) {
composeReference("entity", element.getEntity());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasInactiveElement()) {
composeBooleanCore("inactive", element.getInactiveElement(), false);
composeBooleanExtras("inactive", element.getInactiveElement(), false);
}
}
protected void composeGuidanceResponse(String name, GuidanceResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeGuidanceResponseProperties(element);
}
}
protected void composeGuidanceResponseProperties(GuidanceResponse element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasRequestIdentifier()) {
composeIdentifier("requestIdentifier", element.getRequestIdentifier());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasModule()) {
composeType("module", element.getModule());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrenceDateTimeElement()) {
composeDateTimeCore("occurrenceDateTime", element.getOccurrenceDateTimeElement(), false);
composeDateTimeExtras("occurrenceDateTime", element.getOccurrenceDateTimeElement(), false);
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasEvaluationMessage()) {
composeReference("evaluationMessage", element.getEvaluationMessage());
}
if (element.hasOutputParameters()) {
composeReference("outputParameters", element.getOutputParameters());
}
if (element.hasResult()) {
openArray("result");
for (Reference e : element.getResult())
composeReference(null, e);
closeArray();
};
if (element.hasDataRequirement()) {
openArray("dataRequirement");
for (DataRequirement e : element.getDataRequirement())
composeDataRequirement(null, e);
closeArray();
};
}
protected void composeHealthcareService(String name, HealthcareService element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeHealthcareServiceProperties(element);
}
}
protected void composeHealthcareServiceProperties(HealthcareService element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasProvidedBy()) {
composeReference("providedBy", element.getProvidedBy());
}
if (element.hasOfferedIn()) {
openArray("offeredIn");
for (Reference e : element.getOfferedIn())
composeReference(null, e);
closeArray();
};
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasLocation()) {
openArray("location");
for (Reference e : element.getLocation())
composeReference(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
if (element.hasExtraDetailsElement()) {
composeMarkdownCore("extraDetails", element.getExtraDetailsElement(), false);
composeMarkdownExtras("extraDetails", element.getExtraDetailsElement(), false);
}
if (element.hasPhoto()) {
composeAttachment("photo", element.getPhoto());
}
if (element.hasContact()) {
openArray("contact");
for (ExtendedContactDetail e : element.getContact())
composeExtendedContactDetail(null, e);
closeArray();
};
if (element.hasCoverageArea()) {
openArray("coverageArea");
for (Reference e : element.getCoverageArea())
composeReference(null, e);
closeArray();
};
if (element.hasServiceProvisionCode()) {
openArray("serviceProvisionCode");
for (CodeableConcept e : element.getServiceProvisionCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasEligibility()) {
openArray("eligibility");
for (HealthcareService.HealthcareServiceEligibilityComponent e : element.getEligibility())
composeHealthcareServiceEligibilityComponent(null, e);
closeArray();
};
if (element.hasProgram()) {
openArray("program");
for (CodeableConcept e : element.getProgram())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCharacteristic()) {
openArray("characteristic");
for (CodeableConcept e : element.getCharacteristic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCommunication()) {
openArray("communication");
for (CodeableConcept e : element.getCommunication())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasReferralMethod()) {
openArray("referralMethod");
for (CodeableConcept e : element.getReferralMethod())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAppointmentRequiredElement()) {
composeBooleanCore("appointmentRequired", element.getAppointmentRequiredElement(), false);
composeBooleanExtras("appointmentRequired", element.getAppointmentRequiredElement(), false);
}
if (element.hasAvailability()) {
openArray("availability");
for (Availability e : element.getAvailability())
composeAvailability(null, e);
closeArray();
};
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
}
protected void composeHealthcareServiceEligibilityComponent(String name, HealthcareService.HealthcareServiceEligibilityComponent element) throws IOException {
if (element != null) {
open(name);
composeHealthcareServiceEligibilityComponentProperties(element);
close();
}
}
protected void composeHealthcareServiceEligibilityComponentProperties(HealthcareService.HealthcareServiceEligibilityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
}
protected void composeImagingSelection(String name, ImagingSelection element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImagingSelectionProperties(element);
}
}
protected void composeImagingSelectionProperties(ImagingSelection element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ImagingSelection.ImagingSelectionStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new ImagingSelection.ImagingSelectionStatusEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasIssuedElement()) {
composeInstantCore("issued", element.getIssuedElement(), false);
composeInstantExtras("issued", element.getIssuedElement(), false);
}
if (element.hasPerformer()) {
openArray("performer");
for (ImagingSelection.ImagingSelectionPerformerComponent e : element.getPerformer())
composeImagingSelectionPerformerComponent(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStudyUidElement()) {
composeIdCore("studyUid", element.getStudyUidElement(), false);
composeIdExtras("studyUid", element.getStudyUidElement(), false);
}
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
};
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
if (element.hasSeriesUidElement()) {
composeIdCore("seriesUid", element.getSeriesUidElement(), false);
composeIdExtras("seriesUid", element.getSeriesUidElement(), false);
}
if (element.hasSeriesNumberElement()) {
composeUnsignedIntCore("seriesNumber", element.getSeriesNumberElement(), false);
composeUnsignedIntExtras("seriesNumber", element.getSeriesNumberElement(), false);
}
if (element.hasFrameOfReferenceUidElement()) {
composeIdCore("frameOfReferenceUid", element.getFrameOfReferenceUidElement(), false);
composeIdExtras("frameOfReferenceUid", element.getFrameOfReferenceUidElement(), false);
}
if (element.hasBodySite()) {
composeCodeableReference("bodySite", element.getBodySite());
}
if (element.hasFocus()) {
openArray("focus");
for (Reference e : element.getFocus())
composeReference(null, e);
closeArray();
};
if (element.hasInstance()) {
openArray("instance");
for (ImagingSelection.ImagingSelectionInstanceComponent e : element.getInstance())
composeImagingSelectionInstanceComponent(null, e);
closeArray();
};
}
protected void composeImagingSelectionPerformerComponent(String name, ImagingSelection.ImagingSelectionPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingSelectionPerformerComponentProperties(element);
close();
}
}
protected void composeImagingSelectionPerformerComponentProperties(ImagingSelection.ImagingSelectionPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeImagingSelectionInstanceComponent(String name, ImagingSelection.ImagingSelectionInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingSelectionInstanceComponentProperties(element);
close();
}
}
protected void composeImagingSelectionInstanceComponentProperties(ImagingSelection.ImagingSelectionInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUidElement()) {
composeIdCore("uid", element.getUidElement(), false);
composeIdExtras("uid", element.getUidElement(), false);
}
if (element.hasNumberElement()) {
composeUnsignedIntCore("number", element.getNumberElement(), false);
composeUnsignedIntExtras("number", element.getNumberElement(), false);
}
if (element.hasSopClass()) {
composeCoding("sopClass", element.getSopClass());
}
if (element.hasSubset()) {
if (anyHasValue(element.getSubset())) {
openArray("subset");
for (StringType e : element.getSubset())
composeStringCore(null, e, e != element.getSubset().get(element.getSubset().size()-1));
closeArray();
}
if (anyHasExtras(element.getSubset())) {
openArray("_subset");
for (StringType e : element.getSubset())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasImageRegion2D()) {
openArray("imageRegion2D");
for (ImagingSelection.ImageRegion2DComponent e : element.getImageRegion2D())
composeImageRegion2DComponent(null, e);
closeArray();
};
if (element.hasImageRegion3D()) {
openArray("imageRegion3D");
for (ImagingSelection.ImageRegion3DComponent e : element.getImageRegion3D())
composeImageRegion3DComponent(null, e);
closeArray();
};
}
protected void composeImageRegion2DComponent(String name, ImagingSelection.ImageRegion2DComponent element) throws IOException {
if (element != null) {
open(name);
composeImageRegion2DComponentProperties(element);
close();
}
}
protected void composeImageRegion2DComponentProperties(ImagingSelection.ImageRegion2DComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRegionTypeElement()) {
composeEnumerationCore("regionType", element.getRegionTypeElement(), new ImagingSelection.ImagingSelection2DGraphicTypeEnumFactory(), false);
composeEnumerationExtras("regionType", element.getRegionTypeElement(), new ImagingSelection.ImagingSelection2DGraphicTypeEnumFactory(), false);
}
if (element.hasCoordinate()) {
if (anyHasValue(element.getCoordinate())) {
openArray("coordinate");
for (DecimalType e : element.getCoordinate())
composeDecimalCore(null, e, e != element.getCoordinate().get(element.getCoordinate().size()-1));
closeArray();
}
if (anyHasExtras(element.getCoordinate())) {
openArray("_coordinate");
for (DecimalType e : element.getCoordinate())
composeDecimalExtras(null, e, true);
closeArray();
}
};
}
protected void composeImageRegion3DComponent(String name, ImagingSelection.ImageRegion3DComponent element) throws IOException {
if (element != null) {
open(name);
composeImageRegion3DComponentProperties(element);
close();
}
}
protected void composeImageRegion3DComponentProperties(ImagingSelection.ImageRegion3DComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRegionTypeElement()) {
composeEnumerationCore("regionType", element.getRegionTypeElement(), new ImagingSelection.ImagingSelection3DGraphicTypeEnumFactory(), false);
composeEnumerationExtras("regionType", element.getRegionTypeElement(), new ImagingSelection.ImagingSelection3DGraphicTypeEnumFactory(), false);
}
if (element.hasCoordinate()) {
if (anyHasValue(element.getCoordinate())) {
openArray("coordinate");
for (DecimalType e : element.getCoordinate())
composeDecimalCore(null, e, e != element.getCoordinate().get(element.getCoordinate().size()-1));
closeArray();
}
if (anyHasExtras(element.getCoordinate())) {
openArray("_coordinate");
for (DecimalType e : element.getCoordinate())
composeDecimalExtras(null, e, true);
closeArray();
}
};
}
protected void composeImagingStudy(String name, ImagingStudy element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImagingStudyProperties(element);
}
}
protected void composeImagingStudyProperties(ImagingStudy element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ImagingStudy.ImagingStudyStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new ImagingStudy.ImagingStudyStatusEnumFactory(), false);
}
if (element.hasModality()) {
openArray("modality");
for (CodeableConcept e : element.getModality())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasStartedElement()) {
composeDateTimeCore("started", element.getStartedElement(), false);
composeDateTimeExtras("started", element.getStartedElement(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasReferrer()) {
composeReference("referrer", element.getReferrer());
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
if (element.hasNumberOfSeriesElement()) {
composeUnsignedIntCore("numberOfSeries", element.getNumberOfSeriesElement(), false);
composeUnsignedIntExtras("numberOfSeries", element.getNumberOfSeriesElement(), false);
}
if (element.hasNumberOfInstancesElement()) {
composeUnsignedIntCore("numberOfInstances", element.getNumberOfInstancesElement(), false);
composeUnsignedIntExtras("numberOfInstances", element.getNumberOfInstancesElement(), false);
}
if (element.hasProcedure()) {
openArray("procedure");
for (CodeableReference e : element.getProcedure())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSeries()) {
openArray("series");
for (ImagingStudy.ImagingStudySeriesComponent e : element.getSeries())
composeImagingStudySeriesComponent(null, e);
closeArray();
};
}
protected void composeImagingStudySeriesComponent(String name, ImagingStudy.ImagingStudySeriesComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingStudySeriesComponentProperties(element);
close();
}
}
protected void composeImagingStudySeriesComponentProperties(ImagingStudy.ImagingStudySeriesComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUidElement()) {
composeIdCore("uid", element.getUidElement(), false);
composeIdExtras("uid", element.getUidElement(), false);
}
if (element.hasNumberElement()) {
composeUnsignedIntCore("number", element.getNumberElement(), false);
composeUnsignedIntExtras("number", element.getNumberElement(), false);
}
if (element.hasModality()) {
composeCodeableConcept("modality", element.getModality());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNumberOfInstancesElement()) {
composeUnsignedIntCore("numberOfInstances", element.getNumberOfInstancesElement(), false);
composeUnsignedIntExtras("numberOfInstances", element.getNumberOfInstancesElement(), false);
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
composeCodeableReference("bodySite", element.getBodySite());
}
if (element.hasLaterality()) {
composeCodeableConcept("laterality", element.getLaterality());
}
if (element.hasSpecimen()) {
openArray("specimen");
for (Reference e : element.getSpecimen())
composeReference(null, e);
closeArray();
};
if (element.hasStartedElement()) {
composeDateTimeCore("started", element.getStartedElement(), false);
composeDateTimeExtras("started", element.getStartedElement(), false);
}
if (element.hasPerformer()) {
openArray("performer");
for (ImagingStudy.ImagingStudySeriesPerformerComponent e : element.getPerformer())
composeImagingStudySeriesPerformerComponent(null, e);
closeArray();
};
if (element.hasInstance()) {
openArray("instance");
for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance())
composeImagingStudySeriesInstanceComponent(null, e);
closeArray();
};
}
protected void composeImagingStudySeriesPerformerComponent(String name, ImagingStudy.ImagingStudySeriesPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingStudySeriesPerformerComponentProperties(element);
close();
}
}
protected void composeImagingStudySeriesPerformerComponentProperties(ImagingStudy.ImagingStudySeriesPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeImagingStudySeriesInstanceComponent(String name, ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingStudySeriesInstanceComponentProperties(element);
close();
}
}
protected void composeImagingStudySeriesInstanceComponentProperties(ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUidElement()) {
composeIdCore("uid", element.getUidElement(), false);
composeIdExtras("uid", element.getUidElement(), false);
}
if (element.hasSopClass()) {
composeCoding("sopClass", element.getSopClass());
}
if (element.hasNumberElement()) {
composeUnsignedIntCore("number", element.getNumberElement(), false);
composeUnsignedIntExtras("number", element.getNumberElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
}
protected void composeImmunization(String name, Immunization element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImmunizationProperties(element);
}
}
protected void composeImmunizationProperties(Immunization element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Immunization.ImmunizationStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Immunization.ImmunizationStatusCodesEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasVaccineCode()) {
composeCodeableConcept("vaccineCode", element.getVaccineCode());
}
if (element.hasAdministeredProduct()) {
composeCodeableReference("administeredProduct", element.getAdministeredProduct());
}
if (element.hasManufacturer()) {
composeCodeableReference("manufacturer", element.getManufacturer());
}
if (element.hasLotNumberElement()) {
composeStringCore("lotNumber", element.getLotNumberElement(), false);
composeStringExtras("lotNumber", element.getLotNumberElement(), false);
}
if (element.hasExpirationDateElement()) {
composeDateCore("expirationDate", element.getExpirationDateElement(), false);
composeDateExtras("expirationDate", element.getExpirationDateElement(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasPrimarySourceElement()) {
composeBooleanCore("primarySource", element.getPrimarySourceElement(), false);
composeBooleanExtras("primarySource", element.getPrimarySourceElement(), false);
}
if (element.hasInformationSource()) {
composeCodeableReference("informationSource", element.getInformationSource());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasSite()) {
composeCodeableConcept("site", element.getSite());
}
if (element.hasRoute()) {
composeCodeableConcept("route", element.getRoute());
}
if (element.hasDoseQuantity()) {
composeQuantity("doseQuantity", element.getDoseQuantity());
}
if (element.hasPerformer()) {
openArray("performer");
for (Immunization.ImmunizationPerformerComponent e : element.getPerformer())
composeImmunizationPerformerComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasIsSubpotentElement()) {
composeBooleanCore("isSubpotent", element.getIsSubpotentElement(), false);
composeBooleanExtras("isSubpotent", element.getIsSubpotentElement(), false);
}
if (element.hasSubpotentReason()) {
openArray("subpotentReason");
for (CodeableConcept e : element.getSubpotentReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProgramEligibility()) {
openArray("programEligibility");
for (Immunization.ImmunizationProgramEligibilityComponent e : element.getProgramEligibility())
composeImmunizationProgramEligibilityComponent(null, e);
closeArray();
};
if (element.hasFundingSource()) {
composeCodeableConcept("fundingSource", element.getFundingSource());
}
if (element.hasReaction()) {
openArray("reaction");
for (Immunization.ImmunizationReactionComponent e : element.getReaction())
composeImmunizationReactionComponent(null, e);
closeArray();
};
if (element.hasProtocolApplied()) {
openArray("protocolApplied");
for (Immunization.ImmunizationProtocolAppliedComponent e : element.getProtocolApplied())
composeImmunizationProtocolAppliedComponent(null, e);
closeArray();
};
}
protected void composeImmunizationPerformerComponent(String name, Immunization.ImmunizationPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationPerformerComponentProperties(element);
close();
}
}
protected void composeImmunizationPerformerComponentProperties(Immunization.ImmunizationPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeImmunizationProgramEligibilityComponent(String name, Immunization.ImmunizationProgramEligibilityComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationProgramEligibilityComponentProperties(element);
close();
}
}
protected void composeImmunizationProgramEligibilityComponentProperties(Immunization.ImmunizationProgramEligibilityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasProgram()) {
composeCodeableConcept("program", element.getProgram());
}
if (element.hasProgramStatus()) {
composeCodeableConcept("programStatus", element.getProgramStatus());
}
}
protected void composeImmunizationReactionComponent(String name, Immunization.ImmunizationReactionComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationReactionComponentProperties(element);
close();
}
}
protected void composeImmunizationReactionComponentProperties(Immunization.ImmunizationReactionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasManifestation()) {
composeCodeableReference("manifestation", element.getManifestation());
}
if (element.hasReportedElement()) {
composeBooleanCore("reported", element.getReportedElement(), false);
composeBooleanExtras("reported", element.getReportedElement(), false);
}
}
protected void composeImmunizationProtocolAppliedComponent(String name, Immunization.ImmunizationProtocolAppliedComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationProtocolAppliedComponentProperties(element);
close();
}
}
protected void composeImmunizationProtocolAppliedComponentProperties(Immunization.ImmunizationProtocolAppliedComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSeriesElement()) {
composeStringCore("series", element.getSeriesElement(), false);
composeStringExtras("series", element.getSeriesElement(), false);
}
if (element.hasAuthority()) {
composeReference("authority", element.getAuthority());
}
if (element.hasTargetDisease()) {
openArray("targetDisease");
for (CodeableConcept e : element.getTargetDisease())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDoseNumberElement()) {
composeStringCore("doseNumber", element.getDoseNumberElement(), false);
composeStringExtras("doseNumber", element.getDoseNumberElement(), false);
}
if (element.hasSeriesDosesElement()) {
composeStringCore("seriesDoses", element.getSeriesDosesElement(), false);
composeStringExtras("seriesDoses", element.getSeriesDosesElement(), false);
}
}
protected void composeImmunizationEvaluation(String name, ImmunizationEvaluation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImmunizationEvaluationProperties(element);
}
}
protected void composeImmunizationEvaluationProperties(ImmunizationEvaluation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ImmunizationEvaluation.ImmunizationEvaluationStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new ImmunizationEvaluation.ImmunizationEvaluationStatusCodesEnumFactory(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasAuthority()) {
composeReference("authority", element.getAuthority());
}
if (element.hasTargetDisease()) {
composeCodeableConcept("targetDisease", element.getTargetDisease());
}
if (element.hasImmunizationEvent()) {
composeReference("immunizationEvent", element.getImmunizationEvent());
}
if (element.hasDoseStatus()) {
composeCodeableConcept("doseStatus", element.getDoseStatus());
}
if (element.hasDoseStatusReason()) {
openArray("doseStatusReason");
for (CodeableConcept e : element.getDoseStatusReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSeriesElement()) {
composeStringCore("series", element.getSeriesElement(), false);
composeStringExtras("series", element.getSeriesElement(), false);
}
if (element.hasDoseNumberElement()) {
composeStringCore("doseNumber", element.getDoseNumberElement(), false);
composeStringExtras("doseNumber", element.getDoseNumberElement(), false);
}
if (element.hasSeriesDosesElement()) {
composeStringCore("seriesDoses", element.getSeriesDosesElement(), false);
composeStringExtras("seriesDoses", element.getSeriesDosesElement(), false);
}
}
protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImmunizationRecommendationProperties(element);
}
}
protected void composeImmunizationRecommendationProperties(ImmunizationRecommendation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasAuthority()) {
composeReference("authority", element.getAuthority());
}
if (element.hasRecommendation()) {
openArray("recommendation");
for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent e : element.getRecommendation())
composeImmunizationRecommendationRecommendationComponent(null, e);
closeArray();
};
}
protected void composeImmunizationRecommendationRecommendationComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationRecommendationRecommendationComponentProperties(element);
close();
}
}
protected void composeImmunizationRecommendationRecommendationComponentProperties(ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasVaccineCode()) {
openArray("vaccineCode");
for (CodeableConcept e : element.getVaccineCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasTargetDisease()) {
openArray("targetDisease");
for (CodeableConcept e : element.getTargetDisease())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasContraindicatedVaccineCode()) {
openArray("contraindicatedVaccineCode");
for (CodeableConcept e : element.getContraindicatedVaccineCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasForecastStatus()) {
composeCodeableConcept("forecastStatus", element.getForecastStatus());
}
if (element.hasForecastReason()) {
openArray("forecastReason");
for (CodeableConcept e : element.getForecastReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDateCriterion()) {
openArray("dateCriterion");
for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element.getDateCriterion())
composeImmunizationRecommendationRecommendationDateCriterionComponent(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSeriesElement()) {
composeStringCore("series", element.getSeriesElement(), false);
composeStringExtras("series", element.getSeriesElement(), false);
}
if (element.hasDoseNumberElement()) {
composeStringCore("doseNumber", element.getDoseNumberElement(), false);
composeStringExtras("doseNumber", element.getDoseNumberElement(), false);
}
if (element.hasSeriesDosesElement()) {
composeStringCore("seriesDoses", element.getSeriesDosesElement(), false);
composeStringExtras("seriesDoses", element.getSeriesDosesElement(), false);
}
if (element.hasSupportingImmunization()) {
openArray("supportingImmunization");
for (Reference e : element.getSupportingImmunization())
composeReference(null, e);
closeArray();
};
if (element.hasSupportingPatientInformation()) {
openArray("supportingPatientInformation");
for (Reference e : element.getSupportingPatientInformation())
composeReference(null, e);
closeArray();
};
}
protected void composeImmunizationRecommendationRecommendationDateCriterionComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationRecommendationRecommendationDateCriterionComponentProperties(element);
close();
}
}
protected void composeImmunizationRecommendationRecommendationDateCriterionComponentProperties(ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValueElement()) {
composeDateTimeCore("value", element.getValueElement(), false);
composeDateTimeExtras("value", element.getValueElement(), false);
}
}
protected void composeImplementationGuide(String name, ImplementationGuide element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImplementationGuideProperties(element);
}
}
protected void composeImplementationGuideProperties(ImplementationGuide element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasPackageIdElement()) {
composeIdCore("packageId", element.getPackageIdElement(), false);
composeIdExtras("packageId", element.getPackageIdElement(), false);
}
if (element.hasLicenseElement()) {
composeEnumerationCore("license", element.getLicenseElement(), new ImplementationGuide.SPDXLicenseEnumFactory(), false);
composeEnumerationExtras("license", element.getLicenseElement(), new ImplementationGuide.SPDXLicenseEnumFactory(), false);
}
if (element.hasFhirVersion()) {
openArray("fhirVersion");
for (Enumeration e : element.getFhirVersion())
composeEnumerationCore(null, e, new Enumerations.FHIRVersionEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getFhirVersion())) {
openArray("_fhirVersion");
for (Enumeration e : element.getFhirVersion())
composeEnumerationExtras(null, e, new Enumerations.FHIRVersionEnumFactory(), true);
closeArray();
}
};
if (element.hasDependsOn()) {
openArray("dependsOn");
for (ImplementationGuide.ImplementationGuideDependsOnComponent e : element.getDependsOn())
composeImplementationGuideDependsOnComponent(null, e);
closeArray();
};
if (element.hasGlobal()) {
openArray("global");
for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal())
composeImplementationGuideGlobalComponent(null, e);
closeArray();
};
if (element.hasDefinition()) {
composeImplementationGuideDefinitionComponent("definition", element.getDefinition());
}
if (element.hasManifest()) {
composeImplementationGuideManifestComponent("manifest", element.getManifest());
}
}
protected void composeImplementationGuideDependsOnComponent(String name, ImplementationGuide.ImplementationGuideDependsOnComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDependsOnComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDependsOnComponentProperties(ImplementationGuide.ImplementationGuideDependsOnComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUriElement()) {
composeCanonicalCore("uri", element.getUriElement(), false);
composeCanonicalExtras("uri", element.getUriElement(), false);
}
if (element.hasPackageIdElement()) {
composeIdCore("packageId", element.getPackageIdElement(), false);
composeIdExtras("packageId", element.getPackageIdElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasReasonElement()) {
composeMarkdownCore("reason", element.getReasonElement(), false);
composeMarkdownExtras("reason", element.getReasonElement(), false);
}
}
protected void composeImplementationGuideGlobalComponent(String name, ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideGlobalComponentProperties(element);
close();
}
}
protected void composeImplementationGuideGlobalComponentProperties(ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeCodeCore("type", element.getTypeElement(), false);
composeCodeExtras("type", element.getTypeElement(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
}
protected void composeImplementationGuideDefinitionComponent(String name, ImplementationGuide.ImplementationGuideDefinitionComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDefinitionComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDefinitionComponentProperties(ImplementationGuide.ImplementationGuideDefinitionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasGrouping()) {
openArray("grouping");
for (ImplementationGuide.ImplementationGuideDefinitionGroupingComponent e : element.getGrouping())
composeImplementationGuideDefinitionGroupingComponent(null, e);
closeArray();
};
if (element.hasResource()) {
openArray("resource");
for (ImplementationGuide.ImplementationGuideDefinitionResourceComponent e : element.getResource())
composeImplementationGuideDefinitionResourceComponent(null, e);
closeArray();
};
if (element.hasPage()) {
composeImplementationGuideDefinitionPageComponent("page", element.getPage());
}
if (element.hasParameter()) {
openArray("parameter");
for (ImplementationGuide.ImplementationGuideDefinitionParameterComponent e : element.getParameter())
composeImplementationGuideDefinitionParameterComponent(null, e);
closeArray();
};
if (element.hasTemplate()) {
openArray("template");
for (ImplementationGuide.ImplementationGuideDefinitionTemplateComponent e : element.getTemplate())
composeImplementationGuideDefinitionTemplateComponent(null, e);
closeArray();
};
}
protected void composeImplementationGuideDefinitionGroupingComponent(String name, ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDefinitionGroupingComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDefinitionGroupingComponentProperties(ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeImplementationGuideDefinitionResourceComponent(String name, ImplementationGuide.ImplementationGuideDefinitionResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDefinitionResourceComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDefinitionResourceComponentProperties(ImplementationGuide.ImplementationGuideDefinitionResourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasFhirVersion()) {
openArray("fhirVersion");
for (Enumeration e : element.getFhirVersion())
composeEnumerationCore(null, e, new Enumerations.FHIRVersionEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getFhirVersion())) {
openArray("_fhirVersion");
for (Enumeration e : element.getFhirVersion())
composeEnumerationExtras(null, e, new Enumerations.FHIRVersionEnumFactory(), true);
closeArray();
}
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasIsExampleElement()) {
composeBooleanCore("isExample", element.getIsExampleElement(), false);
composeBooleanExtras("isExample", element.getIsExampleElement(), false);
}
if (element.hasProfile()) {
if (anyHasValue(element.getProfile())) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, e != element.getProfile().get(element.getProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasGroupingIdElement()) {
composeIdCore("groupingId", element.getGroupingIdElement(), false);
composeIdExtras("groupingId", element.getGroupingIdElement(), false);
}
}
protected void composeImplementationGuideDefinitionPageComponent(String name, ImplementationGuide.ImplementationGuideDefinitionPageComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDefinitionPageComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDefinitionPageComponentProperties(ImplementationGuide.ImplementationGuideDefinitionPageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSource()) {
composeType("source", element.getSource());
}
if (element.hasNameElement()) {
composeUrlCore("name", element.getNameElement(), false);
composeUrlExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasGenerationElement()) {
composeEnumerationCore("generation", element.getGenerationElement(), new ImplementationGuide.GuidePageGenerationEnumFactory(), false);
composeEnumerationExtras("generation", element.getGenerationElement(), new ImplementationGuide.GuidePageGenerationEnumFactory(), false);
}
if (element.hasPage()) {
openArray("page");
for (ImplementationGuide.ImplementationGuideDefinitionPageComponent e : element.getPage())
composeImplementationGuideDefinitionPageComponent(null, e);
closeArray();
};
}
protected void composeImplementationGuideDefinitionParameterComponent(String name, ImplementationGuide.ImplementationGuideDefinitionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDefinitionParameterComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDefinitionParameterComponentProperties(ImplementationGuide.ImplementationGuideDefinitionParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCoding("code", element.getCode());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeImplementationGuideDefinitionTemplateComponent(String name, ImplementationGuide.ImplementationGuideDefinitionTemplateComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideDefinitionTemplateComponentProperties(element);
close();
}
}
protected void composeImplementationGuideDefinitionTemplateComponentProperties(ImplementationGuide.ImplementationGuideDefinitionTemplateComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasSourceElement()) {
composeStringCore("source", element.getSourceElement(), false);
composeStringExtras("source", element.getSourceElement(), false);
}
if (element.hasScopeElement()) {
composeStringCore("scope", element.getScopeElement(), false);
composeStringExtras("scope", element.getScopeElement(), false);
}
}
protected void composeImplementationGuideManifestComponent(String name, ImplementationGuide.ImplementationGuideManifestComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideManifestComponentProperties(element);
close();
}
}
protected void composeImplementationGuideManifestComponentProperties(ImplementationGuide.ImplementationGuideManifestComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRenderingElement()) {
composeUrlCore("rendering", element.getRenderingElement(), false);
composeUrlExtras("rendering", element.getRenderingElement(), false);
}
if (element.hasResource()) {
openArray("resource");
for (ImplementationGuide.ManifestResourceComponent e : element.getResource())
composeManifestResourceComponent(null, e);
closeArray();
};
if (element.hasPage()) {
openArray("page");
for (ImplementationGuide.ManifestPageComponent e : element.getPage())
composeManifestPageComponent(null, e);
closeArray();
};
if (element.hasImage()) {
if (anyHasValue(element.getImage())) {
openArray("image");
for (StringType e : element.getImage())
composeStringCore(null, e, e != element.getImage().get(element.getImage().size()-1));
closeArray();
}
if (anyHasExtras(element.getImage())) {
openArray("_image");
for (StringType e : element.getImage())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasOther()) {
if (anyHasValue(element.getOther())) {
openArray("other");
for (StringType e : element.getOther())
composeStringCore(null, e, e != element.getOther().get(element.getOther().size()-1));
closeArray();
}
if (anyHasExtras(element.getOther())) {
openArray("_other");
for (StringType e : element.getOther())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeManifestResourceComponent(String name, ImplementationGuide.ManifestResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeManifestResourceComponentProperties(element);
close();
}
}
protected void composeManifestResourceComponentProperties(ImplementationGuide.ManifestResourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasIsExampleElement()) {
composeBooleanCore("isExample", element.getIsExampleElement(), false);
composeBooleanExtras("isExample", element.getIsExampleElement(), false);
}
if (element.hasProfile()) {
if (anyHasValue(element.getProfile())) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, e != element.getProfile().get(element.getProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasRelativePathElement()) {
composeUrlCore("relativePath", element.getRelativePathElement(), false);
composeUrlExtras("relativePath", element.getRelativePathElement(), false);
}
}
protected void composeManifestPageComponent(String name, ImplementationGuide.ManifestPageComponent element) throws IOException {
if (element != null) {
open(name);
composeManifestPageComponentProperties(element);
close();
}
}
protected void composeManifestPageComponentProperties(ImplementationGuide.ManifestPageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasAnchor()) {
if (anyHasValue(element.getAnchor())) {
openArray("anchor");
for (StringType e : element.getAnchor())
composeStringCore(null, e, e != element.getAnchor().get(element.getAnchor().size()-1));
closeArray();
}
if (anyHasExtras(element.getAnchor())) {
openArray("_anchor");
for (StringType e : element.getAnchor())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeIngredient(String name, Ingredient element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeIngredientProperties(element);
}
}
protected void composeIngredientProperties(Ingredient element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasFor()) {
openArray("for");
for (Reference e : element.getFor())
composeReference(null, e);
closeArray();
};
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasFunction()) {
openArray("function");
for (CodeableConcept e : element.getFunction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasGroup()) {
composeCodeableConcept("group", element.getGroup());
}
if (element.hasAllergenicIndicatorElement()) {
composeBooleanCore("allergenicIndicator", element.getAllergenicIndicatorElement(), false);
composeBooleanExtras("allergenicIndicator", element.getAllergenicIndicatorElement(), false);
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Ingredient.IngredientManufacturerComponent e : element.getManufacturer())
composeIngredientManufacturerComponent(null, e);
closeArray();
};
if (element.hasSubstance()) {
composeIngredientSubstanceComponent("substance", element.getSubstance());
}
}
protected void composeIngredientManufacturerComponent(String name, Ingredient.IngredientManufacturerComponent element) throws IOException {
if (element != null) {
open(name);
composeIngredientManufacturerComponentProperties(element);
close();
}
}
protected void composeIngredientManufacturerComponentProperties(Ingredient.IngredientManufacturerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRoleElement()) {
composeEnumerationCore("role", element.getRoleElement(), new Ingredient.IngredientManufacturerRoleEnumFactory(), false);
composeEnumerationExtras("role", element.getRoleElement(), new Ingredient.IngredientManufacturerRoleEnumFactory(), false);
}
if (element.hasManufacturer()) {
composeReference("manufacturer", element.getManufacturer());
}
}
protected void composeIngredientSubstanceComponent(String name, Ingredient.IngredientSubstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeIngredientSubstanceComponentProperties(element);
close();
}
}
protected void composeIngredientSubstanceComponentProperties(Ingredient.IngredientSubstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableReference("code", element.getCode());
}
if (element.hasStrength()) {
openArray("strength");
for (Ingredient.IngredientSubstanceStrengthComponent e : element.getStrength())
composeIngredientSubstanceStrengthComponent(null, e);
closeArray();
};
}
protected void composeIngredientSubstanceStrengthComponent(String name, Ingredient.IngredientSubstanceStrengthComponent element) throws IOException {
if (element != null) {
open(name);
composeIngredientSubstanceStrengthComponentProperties(element);
close();
}
}
protected void composeIngredientSubstanceStrengthComponentProperties(Ingredient.IngredientSubstanceStrengthComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPresentation()) {
composeType("presentation", element.getPresentation());
}
if (element.hasTextPresentationElement()) {
composeStringCore("textPresentation", element.getTextPresentationElement(), false);
composeStringExtras("textPresentation", element.getTextPresentationElement(), false);
}
if (element.hasConcentration()) {
composeType("concentration", element.getConcentration());
}
if (element.hasTextConcentrationElement()) {
composeStringCore("textConcentration", element.getTextConcentrationElement(), false);
composeStringExtras("textConcentration", element.getTextConcentrationElement(), false);
}
if (element.hasBasis()) {
composeCodeableConcept("basis", element.getBasis());
}
if (element.hasMeasurementPointElement()) {
composeStringCore("measurementPoint", element.getMeasurementPointElement(), false);
composeStringExtras("measurementPoint", element.getMeasurementPointElement(), false);
}
if (element.hasCountry()) {
openArray("country");
for (CodeableConcept e : element.getCountry())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasReferenceStrength()) {
openArray("referenceStrength");
for (Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent e : element.getReferenceStrength())
composeIngredientSubstanceStrengthReferenceStrengthComponent(null, e);
closeArray();
};
}
protected void composeIngredientSubstanceStrengthReferenceStrengthComponent(String name, Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent element) throws IOException {
if (element != null) {
open(name);
composeIngredientSubstanceStrengthReferenceStrengthComponentProperties(element);
close();
}
}
protected void composeIngredientSubstanceStrengthReferenceStrengthComponentProperties(Ingredient.IngredientSubstanceStrengthReferenceStrengthComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubstance()) {
composeCodeableReference("substance", element.getSubstance());
}
if (element.hasStrength()) {
composeType("strength", element.getStrength());
}
if (element.hasMeasurementPointElement()) {
composeStringCore("measurementPoint", element.getMeasurementPointElement(), false);
composeStringExtras("measurementPoint", element.getMeasurementPointElement(), false);
}
if (element.hasCountry()) {
openArray("country");
for (CodeableConcept e : element.getCountry())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeInsurancePlan(String name, InsurancePlan element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeInsurancePlanProperties(element);
}
}
protected void composeInsurancePlanProperties(InsurancePlan element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasAlias()) {
if (anyHasValue(element.getAlias())) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, e != element.getAlias().get(element.getAlias().size()-1));
closeArray();
}
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasOwnedBy()) {
composeReference("ownedBy", element.getOwnedBy());
}
if (element.hasAdministeredBy()) {
composeReference("administeredBy", element.getAdministeredBy());
}
if (element.hasCoverageArea()) {
openArray("coverageArea");
for (Reference e : element.getCoverageArea())
composeReference(null, e);
closeArray();
};
if (element.hasContact()) {
openArray("contact");
for (ExtendedContactDetail e : element.getContact())
composeExtendedContactDetail(null, e);
closeArray();
};
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
if (element.hasNetwork()) {
openArray("network");
for (Reference e : element.getNetwork())
composeReference(null, e);
closeArray();
};
if (element.hasCoverage()) {
openArray("coverage");
for (InsurancePlan.InsurancePlanCoverageComponent e : element.getCoverage())
composeInsurancePlanCoverageComponent(null, e);
closeArray();
};
if (element.hasPlan()) {
openArray("plan");
for (InsurancePlan.InsurancePlanPlanComponent e : element.getPlan())
composeInsurancePlanPlanComponent(null, e);
closeArray();
};
}
protected void composeInsurancePlanCoverageComponent(String name, InsurancePlan.InsurancePlanCoverageComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanCoverageComponentProperties(element);
close();
}
}
protected void composeInsurancePlanCoverageComponentProperties(InsurancePlan.InsurancePlanCoverageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasNetwork()) {
openArray("network");
for (Reference e : element.getNetwork())
composeReference(null, e);
closeArray();
};
if (element.hasBenefit()) {
openArray("benefit");
for (InsurancePlan.CoverageBenefitComponent e : element.getBenefit())
composeCoverageBenefitComponent(null, e);
closeArray();
};
}
protected void composeCoverageBenefitComponent(String name, InsurancePlan.CoverageBenefitComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageBenefitComponentProperties(element);
close();
}
}
protected void composeCoverageBenefitComponentProperties(InsurancePlan.CoverageBenefitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRequirementElement()) {
composeStringCore("requirement", element.getRequirementElement(), false);
composeStringExtras("requirement", element.getRequirementElement(), false);
}
if (element.hasLimit()) {
openArray("limit");
for (InsurancePlan.CoverageBenefitLimitComponent e : element.getLimit())
composeCoverageBenefitLimitComponent(null, e);
closeArray();
};
}
protected void composeCoverageBenefitLimitComponent(String name, InsurancePlan.CoverageBenefitLimitComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageBenefitLimitComponentProperties(element);
close();
}
}
protected void composeCoverageBenefitLimitComponentProperties(InsurancePlan.CoverageBenefitLimitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeQuantity("value", element.getValue());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeInsurancePlanPlanComponent(String name, InsurancePlan.InsurancePlanPlanComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanPlanComponentProperties(element);
close();
}
}
protected void composeInsurancePlanPlanComponentProperties(InsurancePlan.InsurancePlanPlanComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCoverageArea()) {
openArray("coverageArea");
for (Reference e : element.getCoverageArea())
composeReference(null, e);
closeArray();
};
if (element.hasNetwork()) {
openArray("network");
for (Reference e : element.getNetwork())
composeReference(null, e);
closeArray();
};
if (element.hasGeneralCost()) {
openArray("generalCost");
for (InsurancePlan.InsurancePlanPlanGeneralCostComponent e : element.getGeneralCost())
composeInsurancePlanPlanGeneralCostComponent(null, e);
closeArray();
};
if (element.hasSpecificCost()) {
openArray("specificCost");
for (InsurancePlan.InsurancePlanPlanSpecificCostComponent e : element.getSpecificCost())
composeInsurancePlanPlanSpecificCostComponent(null, e);
closeArray();
};
}
protected void composeInsurancePlanPlanGeneralCostComponent(String name, InsurancePlan.InsurancePlanPlanGeneralCostComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanPlanGeneralCostComponentProperties(element);
close();
}
}
protected void composeInsurancePlanPlanGeneralCostComponentProperties(InsurancePlan.InsurancePlanPlanGeneralCostComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGroupSizeElement()) {
composePositiveIntCore("groupSize", element.getGroupSizeElement(), false);
composePositiveIntExtras("groupSize", element.getGroupSizeElement(), false);
}
if (element.hasCost()) {
composeMoney("cost", element.getCost());
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeInsurancePlanPlanSpecificCostComponent(String name, InsurancePlan.InsurancePlanPlanSpecificCostComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanPlanSpecificCostComponentProperties(element);
close();
}
}
protected void composeInsurancePlanPlanSpecificCostComponentProperties(InsurancePlan.InsurancePlanPlanSpecificCostComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasBenefit()) {
openArray("benefit");
for (InsurancePlan.PlanBenefitComponent e : element.getBenefit())
composePlanBenefitComponent(null, e);
closeArray();
};
}
protected void composePlanBenefitComponent(String name, InsurancePlan.PlanBenefitComponent element) throws IOException {
if (element != null) {
open(name);
composePlanBenefitComponentProperties(element);
close();
}
}
protected void composePlanBenefitComponentProperties(InsurancePlan.PlanBenefitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCost()) {
openArray("cost");
for (InsurancePlan.PlanBenefitCostComponent e : element.getCost())
composePlanBenefitCostComponent(null, e);
closeArray();
};
}
protected void composePlanBenefitCostComponent(String name, InsurancePlan.PlanBenefitCostComponent element) throws IOException {
if (element != null) {
open(name);
composePlanBenefitCostComponentProperties(element);
close();
}
}
protected void composePlanBenefitCostComponentProperties(InsurancePlan.PlanBenefitCostComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasApplicability()) {
composeCodeableConcept("applicability", element.getApplicability());
}
if (element.hasQualifiers()) {
openArray("qualifiers");
for (CodeableConcept e : element.getQualifiers())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasValue()) {
composeQuantity("value", element.getValue());
}
}
protected void composeInventoryItem(String name, InventoryItem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeInventoryItemProperties(element);
}
}
protected void composeInventoryItemProperties(InventoryItem element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new InventoryItem.InventoryItemStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new InventoryItem.InventoryItemStatusCodesEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasName()) {
openArray("name");
for (InventoryItem.InventoryItemNameComponent e : element.getName())
composeInventoryItemNameComponent(null, e);
closeArray();
};
if (element.hasResponsibleOrganization()) {
openArray("responsibleOrganization");
for (InventoryItem.InventoryItemResponsibleOrganizationComponent e : element.getResponsibleOrganization())
composeInventoryItemResponsibleOrganizationComponent(null, e);
closeArray();
};
if (element.hasDescription()) {
composeInventoryItemDescriptionComponent("description", element.getDescription());
}
if (element.hasInventoryStatus()) {
openArray("inventoryStatus");
for (CodeableConcept e : element.getInventoryStatus())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasBaseUnit()) {
composeCodeableConcept("baseUnit", element.getBaseUnit());
}
if (element.hasNetContent()) {
composeQuantity("netContent", element.getNetContent());
}
if (element.hasAssociation()) {
openArray("association");
for (InventoryItem.InventoryItemAssociationComponent e : element.getAssociation())
composeInventoryItemAssociationComponent(null, e);
closeArray();
};
if (element.hasCharacteristic()) {
openArray("characteristic");
for (InventoryItem.InventoryItemCharacteristicComponent e : element.getCharacteristic())
composeInventoryItemCharacteristicComponent(null, e);
closeArray();
};
if (element.hasInstance()) {
composeInventoryItemInstanceComponent("instance", element.getInstance());
}
if (element.hasProductReference()) {
composeReference("productReference", element.getProductReference());
}
}
protected void composeInventoryItemNameComponent(String name, InventoryItem.InventoryItemNameComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryItemNameComponentProperties(element);
close();
}
}
protected void composeInventoryItemNameComponentProperties(InventoryItem.InventoryItemNameComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameType()) {
composeCoding("nameType", element.getNameType());
}
if (element.hasLanguageElement()) {
composeEnumerationCore("language", element.getLanguageElement(), new Enumerations.CommonLanguagesEnumFactory(), false);
composeEnumerationExtras("language", element.getLanguageElement(), new Enumerations.CommonLanguagesEnumFactory(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
}
protected void composeInventoryItemResponsibleOrganizationComponent(String name, InventoryItem.InventoryItemResponsibleOrganizationComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryItemResponsibleOrganizationComponentProperties(element);
close();
}
}
protected void composeInventoryItemResponsibleOrganizationComponentProperties(InventoryItem.InventoryItemResponsibleOrganizationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
}
protected void composeInventoryItemDescriptionComponent(String name, InventoryItem.InventoryItemDescriptionComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryItemDescriptionComponentProperties(element);
close();
}
}
protected void composeInventoryItemDescriptionComponentProperties(InventoryItem.InventoryItemDescriptionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguageElement()) {
composeEnumerationCore("language", element.getLanguageElement(), new Enumerations.CommonLanguagesEnumFactory(), false);
composeEnumerationExtras("language", element.getLanguageElement(), new Enumerations.CommonLanguagesEnumFactory(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeInventoryItemAssociationComponent(String name, InventoryItem.InventoryItemAssociationComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryItemAssociationComponentProperties(element);
close();
}
}
protected void composeInventoryItemAssociationComponentProperties(InventoryItem.InventoryItemAssociationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAssociationType()) {
composeCodeableConcept("associationType", element.getAssociationType());
}
if (element.hasRelatedItem()) {
composeReference("relatedItem", element.getRelatedItem());
}
if (element.hasQuantity()) {
composeRatio("quantity", element.getQuantity());
}
}
protected void composeInventoryItemCharacteristicComponent(String name, InventoryItem.InventoryItemCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryItemCharacteristicComponentProperties(element);
close();
}
}
protected void composeInventoryItemCharacteristicComponentProperties(InventoryItem.InventoryItemCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCharacteristicType()) {
composeCodeableConcept("characteristicType", element.getCharacteristicType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeInventoryItemInstanceComponent(String name, InventoryItem.InventoryItemInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryItemInstanceComponentProperties(element);
close();
}
}
protected void composeInventoryItemInstanceComponentProperties(InventoryItem.InventoryItemInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasLotNumberElement()) {
composeStringCore("lotNumber", element.getLotNumberElement(), false);
composeStringExtras("lotNumber", element.getLotNumberElement(), false);
}
if (element.hasExpiryElement()) {
composeDateTimeCore("expiry", element.getExpiryElement(), false);
composeDateTimeExtras("expiry", element.getExpiryElement(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
}
protected void composeInventoryReport(String name, InventoryReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeInventoryReportProperties(element);
}
}
protected void composeInventoryReportProperties(InventoryReport element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new InventoryReport.InventoryReportStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new InventoryReport.InventoryReportStatusEnumFactory(), false);
}
if (element.hasCountTypeElement()) {
composeEnumerationCore("countType", element.getCountTypeElement(), new InventoryReport.InventoryCountTypeEnumFactory(), false);
composeEnumerationExtras("countType", element.getCountTypeElement(), new InventoryReport.InventoryCountTypeEnumFactory(), false);
}
if (element.hasOperationType()) {
composeCodeableConcept("operationType", element.getOperationType());
}
if (element.hasOperationTypeReason()) {
composeCodeableConcept("operationTypeReason", element.getOperationTypeReason());
}
if (element.hasReportedDateTimeElement()) {
composeDateTimeCore("reportedDateTime", element.getReportedDateTimeElement(), false);
composeDateTimeExtras("reportedDateTime", element.getReportedDateTimeElement(), false);
}
if (element.hasReporter()) {
composeReference("reporter", element.getReporter());
}
if (element.hasReportingPeriod()) {
composePeriod("reportingPeriod", element.getReportingPeriod());
}
if (element.hasInventoryListing()) {
openArray("inventoryListing");
for (InventoryReport.InventoryReportInventoryListingComponent e : element.getInventoryListing())
composeInventoryReportInventoryListingComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeInventoryReportInventoryListingComponent(String name, InventoryReport.InventoryReportInventoryListingComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryReportInventoryListingComponentProperties(element);
close();
}
}
protected void composeInventoryReportInventoryListingComponentProperties(InventoryReport.InventoryReportInventoryListingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasItemStatus()) {
composeCodeableConcept("itemStatus", element.getItemStatus());
}
if (element.hasCountingDateTimeElement()) {
composeDateTimeCore("countingDateTime", element.getCountingDateTimeElement(), false);
composeDateTimeExtras("countingDateTime", element.getCountingDateTimeElement(), false);
}
if (element.hasItem()) {
openArray("item");
for (InventoryReport.InventoryReportInventoryListingItemComponent e : element.getItem())
composeInventoryReportInventoryListingItemComponent(null, e);
closeArray();
};
}
protected void composeInventoryReportInventoryListingItemComponent(String name, InventoryReport.InventoryReportInventoryListingItemComponent element) throws IOException {
if (element != null) {
open(name);
composeInventoryReportInventoryListingItemComponentProperties(element);
close();
}
}
protected void composeInventoryReportInventoryListingItemComponentProperties(InventoryReport.InventoryReportInventoryListingItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
}
protected void composeInvoice(String name, Invoice element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeInvoiceProperties(element);
}
}
protected void composeInvoiceProperties(Invoice element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Invoice.InvoiceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Invoice.InvoiceStatusEnumFactory(), false);
}
if (element.hasCancelledReasonElement()) {
composeStringCore("cancelledReason", element.getCancelledReasonElement(), false);
composeStringExtras("cancelledReason", element.getCancelledReasonElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasRecipient()) {
composeReference("recipient", element.getRecipient());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasCreationElement()) {
composeDateTimeCore("creation", element.getCreationElement(), false);
composeDateTimeExtras("creation", element.getCreationElement(), false);
}
if (element.hasPeriod()) {
composeType("period", element.getPeriod());
}
if (element.hasParticipant()) {
openArray("participant");
for (Invoice.InvoiceParticipantComponent e : element.getParticipant())
composeInvoiceParticipantComponent(null, e);
closeArray();
};
if (element.hasIssuer()) {
composeReference("issuer", element.getIssuer());
}
if (element.hasAccount()) {
composeReference("account", element.getAccount());
}
if (element.hasLineItem()) {
openArray("lineItem");
for (Invoice.InvoiceLineItemComponent e : element.getLineItem())
composeInvoiceLineItemComponent(null, e);
closeArray();
};
if (element.hasTotalPriceComponent()) {
openArray("totalPriceComponent");
for (MonetaryComponent e : element.getTotalPriceComponent())
composeMonetaryComponent(null, e);
closeArray();
};
if (element.hasTotalNet()) {
composeMoney("totalNet", element.getTotalNet());
}
if (element.hasTotalGross()) {
composeMoney("totalGross", element.getTotalGross());
}
if (element.hasPaymentTermsElement()) {
composeMarkdownCore("paymentTerms", element.getPaymentTermsElement(), false);
composeMarkdownExtras("paymentTerms", element.getPaymentTermsElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeInvoiceParticipantComponent(String name, Invoice.InvoiceParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeInvoiceParticipantComponentProperties(element);
close();
}
}
protected void composeInvoiceParticipantComponentProperties(Invoice.InvoiceParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeInvoiceLineItemComponent(String name, Invoice.InvoiceLineItemComponent element) throws IOException {
if (element != null) {
open(name);
composeInvoiceLineItemComponentProperties(element);
close();
}
}
protected void composeInvoiceLineItemComponentProperties(Invoice.InvoiceLineItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasServiced()) {
composeType("serviced", element.getServiced());
}
if (element.hasChargeItem()) {
composeType("chargeItem", element.getChargeItem());
}
if (element.hasPriceComponent()) {
openArray("priceComponent");
for (MonetaryComponent e : element.getPriceComponent())
composeMonetaryComponent(null, e);
closeArray();
};
}
protected void composeLibrary(String name, Library element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeLibraryProperties(element);
}
}
protected void composeLibraryProperties(Library element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasUsageElement()) {
composeMarkdownCore("usage", element.getUsageElement(), false);
composeMarkdownExtras("usage", element.getUsageElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasParameter()) {
openArray("parameter");
for (ParameterDefinition e : element.getParameter())
composeParameterDefinition(null, e);
closeArray();
};
if (element.hasDataRequirement()) {
openArray("dataRequirement");
for (DataRequirement e : element.getDataRequirement())
composeDataRequirement(null, e);
closeArray();
};
if (element.hasContent()) {
openArray("content");
for (Attachment e : element.getContent())
composeAttachment(null, e);
closeArray();
};
}
protected void composeLinkage(String name, Linkage element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeLinkageProperties(element);
}
}
protected void composeLinkageProperties(Linkage element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasItem()) {
openArray("item");
for (Linkage.LinkageItemComponent e : element.getItem())
composeLinkageItemComponent(null, e);
closeArray();
};
}
protected void composeLinkageItemComponent(String name, Linkage.LinkageItemComponent element) throws IOException {
if (element != null) {
open(name);
composeLinkageItemComponentProperties(element);
close();
}
}
protected void composeLinkageItemComponentProperties(Linkage.LinkageItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory(), false);
}
if (element.hasResource()) {
composeReference("resource", element.getResource());
}
}
protected void composeListResource(String name, ListResource element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeListResourceProperties(element);
}
}
protected void composeListResourceProperties(ListResource element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory(), false);
}
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new Enumerations.ListModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new Enumerations.ListModeEnumFactory(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasOrderedBy()) {
composeCodeableConcept("orderedBy", element.getOrderedBy());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasEntry()) {
openArray("entry");
for (ListResource.ListResourceEntryComponent e : element.getEntry())
composeListResourceEntryComponent(null, e);
closeArray();
};
if (element.hasEmptyReason()) {
composeCodeableConcept("emptyReason", element.getEmptyReason());
}
}
protected void composeListResourceEntryComponent(String name, ListResource.ListResourceEntryComponent element) throws IOException {
if (element != null) {
open(name);
composeListResourceEntryComponentProperties(element);
close();
}
}
protected void composeListResourceEntryComponentProperties(ListResource.ListResourceEntryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFlag()) {
composeCodeableConcept("flag", element.getFlag());
}
if (element.hasDeletedElement()) {
composeBooleanCore("deleted", element.getDeletedElement(), false);
composeBooleanExtras("deleted", element.getDeletedElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasItem()) {
composeReference("item", element.getItem());
}
}
protected void composeLocation(String name, Location element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeLocationProperties(element);
}
}
protected void composeLocationProperties(Location element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Location.LocationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Location.LocationStatusEnumFactory(), false);
}
if (element.hasOperationalStatus()) {
composeCoding("operationalStatus", element.getOperationalStatus());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasAlias()) {
if (anyHasValue(element.getAlias())) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, e != element.getAlias().get(element.getAlias().size()-1));
closeArray();
}
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new Location.LocationModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new Location.LocationModeEnumFactory(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasContact()) {
openArray("contact");
for (ExtendedContactDetail e : element.getContact())
composeExtendedContactDetail(null, e);
closeArray();
};
if (element.hasAddress()) {
composeAddress("address", element.getAddress());
}
if (element.hasForm()) {
composeCodeableConcept("form", element.getForm());
}
if (element.hasPosition()) {
composeLocationPositionComponent("position", element.getPosition());
}
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (CodeableConcept e : element.getCharacteristic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasHoursOfOperation()) {
openArray("hoursOfOperation");
for (Availability e : element.getHoursOfOperation())
composeAvailability(null, e);
closeArray();
};
if (element.hasVirtualService()) {
openArray("virtualService");
for (VirtualServiceDetail e : element.getVirtualService())
composeVirtualServiceDetail(null, e);
closeArray();
};
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
}
protected void composeLocationPositionComponent(String name, Location.LocationPositionComponent element) throws IOException {
if (element != null) {
open(name);
composeLocationPositionComponentProperties(element);
close();
}
}
protected void composeLocationPositionComponentProperties(Location.LocationPositionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLongitudeElement()) {
composeDecimalCore("longitude", element.getLongitudeElement(), false);
composeDecimalExtras("longitude", element.getLongitudeElement(), false);
}
if (element.hasLatitudeElement()) {
composeDecimalCore("latitude", element.getLatitudeElement(), false);
composeDecimalExtras("latitude", element.getLatitudeElement(), false);
}
if (element.hasAltitudeElement()) {
composeDecimalCore("altitude", element.getAltitudeElement(), false);
composeDecimalExtras("altitude", element.getAltitudeElement(), false);
}
}
protected void composeManufacturedItemDefinition(String name, ManufacturedItemDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeManufacturedItemDefinitionProperties(element);
}
}
protected void composeManufacturedItemDefinitionProperties(ManufacturedItemDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasManufacturedDoseForm()) {
composeCodeableConcept("manufacturedDoseForm", element.getManufacturedDoseForm());
}
if (element.hasUnitOfPresentation()) {
composeCodeableConcept("unitOfPresentation", element.getUnitOfPresentation());
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
};
if (element.hasMarketingStatus()) {
openArray("marketingStatus");
for (MarketingStatus e : element.getMarketingStatus())
composeMarketingStatus(null, e);
closeArray();
};
if (element.hasIngredient()) {
openArray("ingredient");
for (CodeableConcept e : element.getIngredient())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent e : element.getProperty())
composeManufacturedItemDefinitionPropertyComponent(null, e);
closeArray();
};
if (element.hasComponent()) {
openArray("component");
for (ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent e : element.getComponent())
composeManufacturedItemDefinitionComponentComponent(null, e);
closeArray();
};
}
protected void composeManufacturedItemDefinitionPropertyComponent(String name, ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeManufacturedItemDefinitionPropertyComponentProperties(element);
close();
}
}
protected void composeManufacturedItemDefinitionPropertyComponentProperties(ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeManufacturedItemDefinitionComponentComponent(String name, ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeManufacturedItemDefinitionComponentComponentProperties(element);
close();
}
}
protected void composeManufacturedItemDefinitionComponentComponentProperties(ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasFunction()) {
openArray("function");
for (CodeableConcept e : element.getFunction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAmount()) {
openArray("amount");
for (Quantity e : element.getAmount())
composeQuantity(null, e);
closeArray();
};
if (element.hasConstituent()) {
openArray("constituent");
for (ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent e : element.getConstituent())
composeManufacturedItemDefinitionComponentConstituentComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (ManufacturedItemDefinition.ManufacturedItemDefinitionPropertyComponent e : element.getProperty())
composeManufacturedItemDefinitionPropertyComponent(null, e);
closeArray();
};
if (element.hasComponent()) {
openArray("component");
for (ManufacturedItemDefinition.ManufacturedItemDefinitionComponentComponent e : element.getComponent())
composeManufacturedItemDefinitionComponentComponent(null, e);
closeArray();
};
}
protected void composeManufacturedItemDefinitionComponentConstituentComponent(String name, ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent element) throws IOException {
if (element != null) {
open(name);
composeManufacturedItemDefinitionComponentConstituentComponentProperties(element);
close();
}
}
protected void composeManufacturedItemDefinitionComponentConstituentComponentProperties(ManufacturedItemDefinition.ManufacturedItemDefinitionComponentConstituentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAmount()) {
openArray("amount");
for (Quantity e : element.getAmount())
composeQuantity(null, e);
closeArray();
};
if (element.hasLocation()) {
openArray("location");
for (CodeableConcept e : element.getLocation())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasFunction()) {
openArray("function");
for (CodeableConcept e : element.getFunction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasHasIngredient()) {
openArray("hasIngredient");
for (CodeableReference e : element.getHasIngredient())
composeCodeableReference(null, e);
closeArray();
};
}
protected void composeMeasure(String name, Measure element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMeasureProperties(element);
}
}
protected void composeMeasureProperties(Measure element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasBasisElement()) {
composeEnumerationCore("basis", element.getBasisElement(), new Enumerations.FHIRTypesEnumFactory(), false);
composeEnumerationExtras("basis", element.getBasisElement(), new Enumerations.FHIRTypesEnumFactory(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasUsageElement()) {
composeMarkdownCore("usage", element.getUsageElement(), false);
composeMarkdownExtras("usage", element.getUsageElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasLibrary()) {
if (anyHasValue(element.getLibrary())) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, e != element.getLibrary().get(element.getLibrary().size()-1));
closeArray();
}
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasDisclaimerElement()) {
composeMarkdownCore("disclaimer", element.getDisclaimerElement(), false);
composeMarkdownExtras("disclaimer", element.getDisclaimerElement(), false);
}
if (element.hasScoring()) {
composeCodeableConcept("scoring", element.getScoring());
}
if (element.hasScoringUnit()) {
composeCodeableConcept("scoringUnit", element.getScoringUnit());
}
if (element.hasCompositeScoring()) {
composeCodeableConcept("compositeScoring", element.getCompositeScoring());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasRiskAdjustmentElement()) {
composeMarkdownCore("riskAdjustment", element.getRiskAdjustmentElement(), false);
composeMarkdownExtras("riskAdjustment", element.getRiskAdjustmentElement(), false);
}
if (element.hasRateAggregationElement()) {
composeMarkdownCore("rateAggregation", element.getRateAggregationElement(), false);
composeMarkdownExtras("rateAggregation", element.getRateAggregationElement(), false);
}
if (element.hasRationaleElement()) {
composeMarkdownCore("rationale", element.getRationaleElement(), false);
composeMarkdownExtras("rationale", element.getRationaleElement(), false);
}
if (element.hasClinicalRecommendationStatementElement()) {
composeMarkdownCore("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), false);
composeMarkdownExtras("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), false);
}
if (element.hasImprovementNotation()) {
composeCodeableConcept("improvementNotation", element.getImprovementNotation());
}
if (element.hasTerm()) {
openArray("term");
for (Measure.MeasureTermComponent e : element.getTerm())
composeMeasureTermComponent(null, e);
closeArray();
};
if (element.hasGuidanceElement()) {
composeMarkdownCore("guidance", element.getGuidanceElement(), false);
composeMarkdownExtras("guidance", element.getGuidanceElement(), false);
}
if (element.hasGroup()) {
openArray("group");
for (Measure.MeasureGroupComponent e : element.getGroup())
composeMeasureGroupComponent(null, e);
closeArray();
};
if (element.hasSupplementalData()) {
openArray("supplementalData");
for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData())
composeMeasureSupplementalDataComponent(null, e);
closeArray();
};
}
protected void composeMeasureTermComponent(String name, Measure.MeasureTermComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureTermComponentProperties(element);
close();
}
}
protected void composeMeasureTermComponentProperties(Measure.MeasureTermComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDefinitionElement()) {
composeMarkdownCore("definition", element.getDefinitionElement(), false);
composeMarkdownExtras("definition", element.getDefinitionElement(), false);
}
}
protected void composeMeasureGroupComponent(String name, Measure.MeasureGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureGroupComponentProperties(element);
close();
}
}
protected void composeMeasureGroupComponentProperties(Measure.MeasureGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasBasisElement()) {
composeEnumerationCore("basis", element.getBasisElement(), new Enumerations.FHIRTypesEnumFactory(), false);
composeEnumerationExtras("basis", element.getBasisElement(), new Enumerations.FHIRTypesEnumFactory(), false);
}
if (element.hasScoring()) {
composeCodeableConcept("scoring", element.getScoring());
}
if (element.hasScoringUnit()) {
composeCodeableConcept("scoringUnit", element.getScoringUnit());
}
if (element.hasRateAggregationElement()) {
composeMarkdownCore("rateAggregation", element.getRateAggregationElement(), false);
composeMarkdownExtras("rateAggregation", element.getRateAggregationElement(), false);
}
if (element.hasImprovementNotation()) {
composeCodeableConcept("improvementNotation", element.getImprovementNotation());
}
if (element.hasLibrary()) {
if (anyHasValue(element.getLibrary())) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, e != element.getLibrary().get(element.getLibrary().size()-1));
closeArray();
}
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasPopulation()) {
openArray("population");
for (Measure.MeasureGroupPopulationComponent e : element.getPopulation())
composeMeasureGroupPopulationComponent(null, e);
closeArray();
};
if (element.hasStratifier()) {
openArray("stratifier");
for (Measure.MeasureGroupStratifierComponent e : element.getStratifier())
composeMeasureGroupStratifierComponent(null, e);
closeArray();
};
}
protected void composeMeasureGroupPopulationComponent(String name, Measure.MeasureGroupPopulationComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureGroupPopulationComponentProperties(element);
close();
}
}
protected void composeMeasureGroupPopulationComponentProperties(Measure.MeasureGroupPopulationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
if (element.hasGroupDefinition()) {
composeReference("groupDefinition", element.getGroupDefinition());
}
if (element.hasInputPopulationIdElement()) {
composeStringCore("inputPopulationId", element.getInputPopulationIdElement(), false);
composeStringExtras("inputPopulationId", element.getInputPopulationIdElement(), false);
}
if (element.hasAggregateMethod()) {
composeCodeableConcept("aggregateMethod", element.getAggregateMethod());
}
}
protected void composeMeasureGroupStratifierComponent(String name, Measure.MeasureGroupStratifierComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureGroupStratifierComponentProperties(element);
close();
}
}
protected void composeMeasureGroupStratifierComponentProperties(Measure.MeasureGroupStratifierComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
if (element.hasGroupDefinition()) {
composeReference("groupDefinition", element.getGroupDefinition());
}
if (element.hasComponent()) {
openArray("component");
for (Measure.MeasureGroupStratifierComponentComponent e : element.getComponent())
composeMeasureGroupStratifierComponentComponent(null, e);
closeArray();
};
}
protected void composeMeasureGroupStratifierComponentComponent(String name, Measure.MeasureGroupStratifierComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureGroupStratifierComponentComponentProperties(element);
close();
}
}
protected void composeMeasureGroupStratifierComponentComponentProperties(Measure.MeasureGroupStratifierComponentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
if (element.hasGroupDefinition()) {
composeReference("groupDefinition", element.getGroupDefinition());
}
}
protected void composeMeasureSupplementalDataComponent(String name, Measure.MeasureSupplementalDataComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureSupplementalDataComponentProperties(element);
close();
}
}
protected void composeMeasureSupplementalDataComponentProperties(Measure.MeasureSupplementalDataComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasUsage()) {
openArray("usage");
for (CodeableConcept e : element.getUsage())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
}
protected void composeMeasureReport(String name, MeasureReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMeasureReportProperties(element);
}
}
protected void composeMeasureReportProperties(MeasureReport element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory(), false);
}
if (element.hasDataUpdateTypeElement()) {
composeEnumerationCore("dataUpdateType", element.getDataUpdateTypeElement(), new MeasureReport.SubmitDataUpdateTypeEnumFactory(), false);
composeEnumerationExtras("dataUpdateType", element.getDataUpdateTypeElement(), new MeasureReport.SubmitDataUpdateTypeEnumFactory(), false);
}
if (element.hasMeasureElement()) {
composeCanonicalCore("measure", element.getMeasureElement(), false);
composeCanonicalExtras("measure", element.getMeasureElement(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasReporter()) {
composeReference("reporter", element.getReporter());
}
if (element.hasReportingVendor()) {
composeReference("reportingVendor", element.getReportingVendor());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasInputParameters()) {
composeReference("inputParameters", element.getInputParameters());
}
if (element.hasScoring()) {
composeCodeableConcept("scoring", element.getScoring());
}
if (element.hasImprovementNotation()) {
composeCodeableConcept("improvementNotation", element.getImprovementNotation());
}
if (element.hasGroup()) {
openArray("group");
for (MeasureReport.MeasureReportGroupComponent e : element.getGroup())
composeMeasureReportGroupComponent(null, e);
closeArray();
};
if (element.hasSupplementalData()) {
openArray("supplementalData");
for (Reference e : element.getSupplementalData())
composeReference(null, e);
closeArray();
};
if (element.hasEvaluatedResource()) {
openArray("evaluatedResource");
for (Reference e : element.getEvaluatedResource())
composeReference(null, e);
closeArray();
};
}
protected void composeMeasureReportGroupComponent(String name, MeasureReport.MeasureReportGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportGroupComponentProperties(element);
close();
}
}
protected void composeMeasureReportGroupComponentProperties(MeasureReport.MeasureReportGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasPopulation()) {
openArray("population");
for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation())
composeMeasureReportGroupPopulationComponent(null, e);
closeArray();
};
if (element.hasMeasureScore()) {
composeType("measureScore", element.getMeasureScore());
}
if (element.hasStratifier()) {
openArray("stratifier");
for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier())
composeMeasureReportGroupStratifierComponent(null, e);
closeArray();
};
}
protected void composeMeasureReportGroupPopulationComponent(String name, MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportGroupPopulationComponentProperties(element);
close();
}
}
protected void composeMeasureReportGroupPopulationComponentProperties(MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasCountElement()) {
composeIntegerCore("count", element.getCountElement(), false);
composeIntegerExtras("count", element.getCountElement(), false);
}
if (element.hasSubjectResults()) {
composeReference("subjectResults", element.getSubjectResults());
}
if (element.hasSubjectReport()) {
openArray("subjectReport");
for (Reference e : element.getSubjectReport())
composeReference(null, e);
closeArray();
};
if (element.hasSubjects()) {
composeReference("subjects", element.getSubjects());
}
}
protected void composeMeasureReportGroupStratifierComponent(String name, MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportGroupStratifierComponentProperties(element);
close();
}
}
protected void composeMeasureReportGroupStratifierComponentProperties(MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStratum()) {
openArray("stratum");
for (MeasureReport.StratifierGroupComponent e : element.getStratum())
composeStratifierGroupComponent(null, e);
closeArray();
};
}
protected void composeStratifierGroupComponent(String name, MeasureReport.StratifierGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeStratifierGroupComponentProperties(element);
close();
}
}
protected void composeStratifierGroupComponentProperties(MeasureReport.StratifierGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasComponent()) {
openArray("component");
for (MeasureReport.StratifierGroupComponentComponent e : element.getComponent())
composeStratifierGroupComponentComponent(null, e);
closeArray();
};
if (element.hasPopulation()) {
openArray("population");
for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation())
composeStratifierGroupPopulationComponent(null, e);
closeArray();
};
if (element.hasMeasureScore()) {
composeType("measureScore", element.getMeasureScore());
}
}
protected void composeStratifierGroupComponentComponent(String name, MeasureReport.StratifierGroupComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeStratifierGroupComponentComponentProperties(element);
close();
}
}
protected void composeStratifierGroupComponentComponentProperties(MeasureReport.StratifierGroupComponentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeStratifierGroupPopulationComponent(String name, MeasureReport.StratifierGroupPopulationComponent element) throws IOException {
if (element != null) {
open(name);
composeStratifierGroupPopulationComponentProperties(element);
close();
}
}
protected void composeStratifierGroupPopulationComponentProperties(MeasureReport.StratifierGroupPopulationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasCountElement()) {
composeIntegerCore("count", element.getCountElement(), false);
composeIntegerExtras("count", element.getCountElement(), false);
}
if (element.hasSubjectResults()) {
composeReference("subjectResults", element.getSubjectResults());
}
if (element.hasSubjectReport()) {
openArray("subjectReport");
for (Reference e : element.getSubjectReport())
composeReference(null, e);
closeArray();
};
if (element.hasSubjects()) {
composeReference("subjects", element.getSubjects());
}
}
protected void composeMedication(String name, Medication element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationProperties(element);
}
}
protected void composeMedicationProperties(Medication element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Medication.MedicationStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Medication.MedicationStatusCodesEnumFactory(), false);
}
if (element.hasMarketingAuthorizationHolder()) {
composeReference("marketingAuthorizationHolder", element.getMarketingAuthorizationHolder());
}
if (element.hasDoseForm()) {
composeCodeableConcept("doseForm", element.getDoseForm());
}
if (element.hasTotalVolume()) {
composeQuantity("totalVolume", element.getTotalVolume());
}
if (element.hasIngredient()) {
openArray("ingredient");
for (Medication.MedicationIngredientComponent e : element.getIngredient())
composeMedicationIngredientComponent(null, e);
closeArray();
};
if (element.hasBatch()) {
composeMedicationBatchComponent("batch", element.getBatch());
}
if (element.hasDefinition()) {
composeReference("definition", element.getDefinition());
}
}
protected void composeMedicationIngredientComponent(String name, Medication.MedicationIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationIngredientComponentProperties(element);
close();
}
}
protected void composeMedicationIngredientComponentProperties(Medication.MedicationIngredientComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasIsActiveElement()) {
composeBooleanCore("isActive", element.getIsActiveElement(), false);
composeBooleanExtras("isActive", element.getIsActiveElement(), false);
}
if (element.hasStrength()) {
composeType("strength", element.getStrength());
}
}
protected void composeMedicationBatchComponent(String name, Medication.MedicationBatchComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationBatchComponentProperties(element);
close();
}
}
protected void composeMedicationBatchComponentProperties(Medication.MedicationBatchComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLotNumberElement()) {
composeStringCore("lotNumber", element.getLotNumberElement(), false);
composeStringExtras("lotNumber", element.getLotNumberElement(), false);
}
if (element.hasExpirationDateElement()) {
composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false);
composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false);
}
}
protected void composeMedicationAdministration(String name, MedicationAdministration element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationAdministrationProperties(element);
}
}
protected void composeMedicationAdministrationProperties(MedicationAdministration element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusCodesEnumFactory(), false);
}
if (element.hasStatusReason()) {
openArray("statusReason");
for (CodeableConcept e : element.getStatusReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMedication()) {
composeCodeableReference("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasOccurence()) {
composeType("occurence", element.getOccurence());
}
if (element.hasRecordedElement()) {
composeDateTimeCore("recorded", element.getRecordedElement(), false);
composeDateTimeExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasIsSubPotentElement()) {
composeBooleanCore("isSubPotent", element.getIsSubPotentElement(), false);
composeBooleanExtras("isSubPotent", element.getIsSubPotentElement(), false);
}
if (element.hasSubPotentReason()) {
openArray("subPotentReason");
for (CodeableConcept e : element.getSubPotentReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPerformer()) {
openArray("performer");
for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer())
composeMedicationAdministrationPerformerComponent(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasDevice()) {
openArray("device");
for (CodeableReference e : element.getDevice())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasDosage()) {
composeMedicationAdministrationDosageComponent("dosage", element.getDosage());
}
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
};
}
protected void composeMedicationAdministrationPerformerComponent(String name, MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationAdministrationPerformerComponentProperties(element);
close();
}
}
protected void composeMedicationAdministrationPerformerComponentProperties(MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeCodeableReference("actor", element.getActor());
}
}
protected void composeMedicationAdministrationDosageComponent(String name, MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationAdministrationDosageComponentProperties(element);
close();
}
}
protected void composeMedicationAdministrationDosageComponentProperties(MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasSite()) {
composeCodeableConcept("site", element.getSite());
}
if (element.hasRoute()) {
composeCodeableConcept("route", element.getRoute());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasDose()) {
composeQuantity("dose", element.getDose());
}
if (element.hasRate()) {
composeType("rate", element.getRate());
}
}
protected void composeMedicationDispense(String name, MedicationDispense element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationDispenseProperties(element);
}
}
protected void composeMedicationDispenseProperties(MedicationDispense element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusCodesEnumFactory(), false);
}
if (element.hasNotPerformedReason()) {
composeCodeableReference("notPerformedReason", element.getNotPerformedReason());
}
if (element.hasStatusChangedElement()) {
composeDateTimeCore("statusChanged", element.getStatusChangedElement(), false);
composeDateTimeExtras("statusChanged", element.getStatusChangedElement(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMedication()) {
composeCodeableReference("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasPerformer()) {
openArray("performer");
for (MedicationDispense.MedicationDispensePerformerComponent e : element.getPerformer())
composeMedicationDispensePerformerComponent(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasAuthorizingPrescription()) {
openArray("authorizingPrescription");
for (Reference e : element.getAuthorizingPrescription())
composeReference(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasDaysSupply()) {
composeQuantity("daysSupply", element.getDaysSupply());
}
if (element.hasRecordedElement()) {
composeDateTimeCore("recorded", element.getRecordedElement(), false);
composeDateTimeExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasWhenPreparedElement()) {
composeDateTimeCore("whenPrepared", element.getWhenPreparedElement(), false);
composeDateTimeExtras("whenPrepared", element.getWhenPreparedElement(), false);
}
if (element.hasWhenHandedOverElement()) {
composeDateTimeCore("whenHandedOver", element.getWhenHandedOverElement(), false);
composeDateTimeExtras("whenHandedOver", element.getWhenHandedOverElement(), false);
}
if (element.hasDestination()) {
composeReference("destination", element.getDestination());
}
if (element.hasReceiver()) {
openArray("receiver");
for (Reference e : element.getReceiver())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRenderedDosageInstructionElement()) {
composeMarkdownCore("renderedDosageInstruction", element.getRenderedDosageInstructionElement(), false);
composeMarkdownExtras("renderedDosageInstruction", element.getRenderedDosageInstructionElement(), false);
}
if (element.hasDosageInstruction()) {
openArray("dosageInstruction");
for (Dosage e : element.getDosageInstruction())
composeDosage(null, e);
closeArray();
};
if (element.hasSubstitution()) {
composeMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution());
}
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
};
}
protected void composeMedicationDispensePerformerComponent(String name, MedicationDispense.MedicationDispensePerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationDispensePerformerComponentProperties(element);
close();
}
}
protected void composeMedicationDispensePerformerComponentProperties(MedicationDispense.MedicationDispensePerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeMedicationDispenseSubstitutionComponent(String name, MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationDispenseSubstitutionComponentProperties(element);
close();
}
}
protected void composeMedicationDispenseSubstitutionComponentProperties(MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasWasSubstitutedElement()) {
composeBooleanCore("wasSubstituted", element.getWasSubstitutedElement(), false);
composeBooleanExtras("wasSubstituted", element.getWasSubstitutedElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasResponsibleParty()) {
composeReference("responsibleParty", element.getResponsibleParty());
}
}
protected void composeMedicationKnowledge(String name, MedicationKnowledge element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationKnowledgeProperties(element);
}
}
protected void composeMedicationKnowledgeProperties(MedicationKnowledge element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new MedicationKnowledge.MedicationKnowledgeStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new MedicationKnowledge.MedicationKnowledgeStatusCodesEnumFactory(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasIntendedJurisdiction()) {
openArray("intendedJurisdiction");
for (CodeableConcept e : element.getIntendedJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasName()) {
if (anyHasValue(element.getName())) {
openArray("name");
for (StringType e : element.getName())
composeStringCore(null, e, e != element.getName().get(element.getName().size()-1));
closeArray();
}
if (anyHasExtras(element.getName())) {
openArray("_name");
for (StringType e : element.getName())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasRelatedMedicationKnowledge()) {
openArray("relatedMedicationKnowledge");
for (MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent e : element.getRelatedMedicationKnowledge())
composeMedicationKnowledgeRelatedMedicationKnowledgeComponent(null, e);
closeArray();
};
if (element.hasAssociatedMedication()) {
openArray("associatedMedication");
for (Reference e : element.getAssociatedMedication())
composeReference(null, e);
closeArray();
};
if (element.hasProductType()) {
openArray("productType");
for (CodeableConcept e : element.getProductType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMonograph()) {
openArray("monograph");
for (MedicationKnowledge.MedicationKnowledgeMonographComponent e : element.getMonograph())
composeMedicationKnowledgeMonographComponent(null, e);
closeArray();
};
if (element.hasPreparationInstructionElement()) {
composeMarkdownCore("preparationInstruction", element.getPreparationInstructionElement(), false);
composeMarkdownExtras("preparationInstruction", element.getPreparationInstructionElement(), false);
}
if (element.hasCost()) {
openArray("cost");
for (MedicationKnowledge.MedicationKnowledgeCostComponent e : element.getCost())
composeMedicationKnowledgeCostComponent(null, e);
closeArray();
};
if (element.hasMonitoringProgram()) {
openArray("monitoringProgram");
for (MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent e : element.getMonitoringProgram())
composeMedicationKnowledgeMonitoringProgramComponent(null, e);
closeArray();
};
if (element.hasIndicationGuideline()) {
openArray("indicationGuideline");
for (MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent e : element.getIndicationGuideline())
composeMedicationKnowledgeIndicationGuidelineComponent(null, e);
closeArray();
};
if (element.hasMedicineClassification()) {
openArray("medicineClassification");
for (MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent e : element.getMedicineClassification())
composeMedicationKnowledgeMedicineClassificationComponent(null, e);
closeArray();
};
if (element.hasPackaging()) {
openArray("packaging");
for (MedicationKnowledge.MedicationKnowledgePackagingComponent e : element.getPackaging())
composeMedicationKnowledgePackagingComponent(null, e);
closeArray();
};
if (element.hasClinicalUseIssue()) {
openArray("clinicalUseIssue");
for (Reference e : element.getClinicalUseIssue())
composeReference(null, e);
closeArray();
};
if (element.hasStorageGuideline()) {
openArray("storageGuideline");
for (MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent e : element.getStorageGuideline())
composeMedicationKnowledgeStorageGuidelineComponent(null, e);
closeArray();
};
if (element.hasRegulatory()) {
openArray("regulatory");
for (MedicationKnowledge.MedicationKnowledgeRegulatoryComponent e : element.getRegulatory())
composeMedicationKnowledgeRegulatoryComponent(null, e);
closeArray();
};
if (element.hasDefinitional()) {
composeMedicationKnowledgeDefinitionalComponent("definitional", element.getDefinitional());
}
}
protected void composeMedicationKnowledgeRelatedMedicationKnowledgeComponent(String name, MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeRelatedMedicationKnowledgeComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeRelatedMedicationKnowledgeComponentProperties(MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasReference()) {
openArray("reference");
for (Reference e : element.getReference())
composeReference(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgeMonographComponent(String name, MedicationKnowledge.MedicationKnowledgeMonographComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMonographComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeMonographComponentProperties(MedicationKnowledge.MedicationKnowledgeMonographComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
}
protected void composeMedicationKnowledgeCostComponent(String name, MedicationKnowledge.MedicationKnowledgeCostComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeCostComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeCostComponentProperties(MedicationKnowledge.MedicationKnowledgeCostComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEffectiveDate()) {
openArray("effectiveDate");
for (Period e : element.getEffectiveDate())
composePeriod(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSourceElement()) {
composeStringCore("source", element.getSourceElement(), false);
composeStringExtras("source", element.getSourceElement(), false);
}
if (element.hasCost()) {
composeType("cost", element.getCost());
}
}
protected void composeMedicationKnowledgeMonitoringProgramComponent(String name, MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMonitoringProgramComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeMonitoringProgramComponentProperties(MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
}
protected void composeMedicationKnowledgeIndicationGuidelineComponent(String name, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeIndicationGuidelineComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeIndicationGuidelineComponentProperties(MedicationKnowledge.MedicationKnowledgeIndicationGuidelineComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIndication()) {
openArray("indication");
for (CodeableReference e : element.getIndication())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasDosingGuideline()) {
openArray("dosingGuideline");
for (MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent e : element.getDosingGuideline())
composeMedicationKnowledgeIndicationGuidelineDosingGuidelineComponent(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgeIndicationGuidelineDosingGuidelineComponent(String name, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeIndicationGuidelineDosingGuidelineComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeIndicationGuidelineDosingGuidelineComponentProperties(MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTreatmentIntent()) {
composeCodeableConcept("treatmentIntent", element.getTreatmentIntent());
}
if (element.hasDosage()) {
openArray("dosage");
for (MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent e : element.getDosage())
composeMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent(null, e);
closeArray();
};
if (element.hasAdministrationTreatment()) {
composeCodeableConcept("administrationTreatment", element.getAdministrationTreatment());
}
if (element.hasPatientCharacteristic()) {
openArray("patientCharacteristic");
for (MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent e : element.getPatientCharacteristic())
composeMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent(String name, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponentProperties(MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelineDosageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDosage()) {
openArray("dosage");
for (Dosage e : element.getDosage())
composeDosage(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent(String name, MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponentProperties(MedicationKnowledge.MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeMedicationKnowledgeMedicineClassificationComponent(String name, MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicineClassificationComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeMedicineClassificationComponentProperties(MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSource()) {
composeType("source", element.getSource());
}
if (element.hasClassification()) {
openArray("classification");
for (CodeableConcept e : element.getClassification())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgePackagingComponent(String name, MedicationKnowledge.MedicationKnowledgePackagingComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgePackagingComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgePackagingComponentProperties(MedicationKnowledge.MedicationKnowledgePackagingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCost()) {
openArray("cost");
for (MedicationKnowledge.MedicationKnowledgeCostComponent e : element.getCost())
composeMedicationKnowledgeCostComponent(null, e);
closeArray();
};
if (element.hasPackagedProduct()) {
composeReference("packagedProduct", element.getPackagedProduct());
}
}
protected void composeMedicationKnowledgeStorageGuidelineComponent(String name, MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeStorageGuidelineComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeStorageGuidelineComponentProperties(MedicationKnowledge.MedicationKnowledgeStorageGuidelineComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasReferenceElement()) {
composeUriCore("reference", element.getReferenceElement(), false);
composeUriExtras("reference", element.getReferenceElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasStabilityDuration()) {
composeDuration("stabilityDuration", element.getStabilityDuration());
}
if (element.hasEnvironmentalSetting()) {
openArray("environmentalSetting");
for (MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent e : element.getEnvironmentalSetting())
composeMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent(String name, MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeStorageGuidelineEnvironmentalSettingComponentProperties(MedicationKnowledge.MedicationKnowledgeStorageGuidelineEnvironmentalSettingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeMedicationKnowledgeRegulatoryComponent(String name, MedicationKnowledge.MedicationKnowledgeRegulatoryComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeRegulatoryComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeRegulatoryComponentProperties(MedicationKnowledge.MedicationKnowledgeRegulatoryComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRegulatoryAuthority()) {
composeReference("regulatoryAuthority", element.getRegulatoryAuthority());
}
if (element.hasSubstitution()) {
openArray("substitution");
for (MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent e : element.getSubstitution())
composeMedicationKnowledgeRegulatorySubstitutionComponent(null, e);
closeArray();
};
if (element.hasSchedule()) {
openArray("schedule");
for (CodeableConcept e : element.getSchedule())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMaxDispense()) {
composeMedicationKnowledgeRegulatoryMaxDispenseComponent("maxDispense", element.getMaxDispense());
}
}
protected void composeMedicationKnowledgeRegulatorySubstitutionComponent(String name, MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeRegulatorySubstitutionComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeRegulatorySubstitutionComponentProperties(MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAllowedElement()) {
composeBooleanCore("allowed", element.getAllowedElement(), false);
composeBooleanExtras("allowed", element.getAllowedElement(), false);
}
}
protected void composeMedicationKnowledgeRegulatoryMaxDispenseComponent(String name, MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeRegulatoryMaxDispenseComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeRegulatoryMaxDispenseComponentProperties(MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasPeriod()) {
composeDuration("period", element.getPeriod());
}
}
protected void composeMedicationKnowledgeDefinitionalComponent(String name, MedicationKnowledge.MedicationKnowledgeDefinitionalComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeDefinitionalComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeDefinitionalComponentProperties(MedicationKnowledge.MedicationKnowledgeDefinitionalComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDefinition()) {
openArray("definition");
for (Reference e : element.getDefinition())
composeReference(null, e);
closeArray();
};
if (element.hasDoseForm()) {
composeCodeableConcept("doseForm", element.getDoseForm());
}
if (element.hasIntendedRoute()) {
openArray("intendedRoute");
for (CodeableConcept e : element.getIntendedRoute())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasIngredient()) {
openArray("ingredient");
for (MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent e : element.getIngredient())
composeMedicationKnowledgeDefinitionalIngredientComponent(null, e);
closeArray();
};
if (element.hasDrugCharacteristic()) {
openArray("drugCharacteristic");
for (MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent e : element.getDrugCharacteristic())
composeMedicationKnowledgeDefinitionalDrugCharacteristicComponent(null, e);
closeArray();
};
}
protected void composeMedicationKnowledgeDefinitionalIngredientComponent(String name, MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeDefinitionalIngredientComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeDefinitionalIngredientComponentProperties(MedicationKnowledge.MedicationKnowledgeDefinitionalIngredientComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStrength()) {
composeType("strength", element.getStrength());
}
}
protected void composeMedicationKnowledgeDefinitionalDrugCharacteristicComponent(String name, MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeDefinitionalDrugCharacteristicComponentProperties(element);
close();
}
}
protected void composeMedicationKnowledgeDefinitionalDrugCharacteristicComponentProperties(MedicationKnowledge.MedicationKnowledgeDefinitionalDrugCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationRequestProperties(element);
}
}
protected void composeMedicationRequestProperties(MedicationRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPriorPrescription()) {
composeReference("priorPrescription", element.getPriorPrescription());
}
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new MedicationRequest.MedicationrequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new MedicationRequest.MedicationrequestStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasStatusChangedElement()) {
composeDateTimeCore("statusChanged", element.getStatusChangedElement(), false);
composeDateTimeExtras("statusChanged", element.getStatusChangedElement(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasMedication()) {
composeCodeableReference("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasInformationSource()) {
openArray("informationSource");
for (Reference e : element.getInformationSource())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasReportedElement()) {
composeBooleanCore("reported", element.getReportedElement(), false);
composeBooleanExtras("reported", element.getReportedElement(), false);
}
if (element.hasPerformerType()) {
composeCodeableConcept("performerType", element.getPerformerType());
}
if (element.hasPerformer()) {
openArray("performer");
for (Reference e : element.getPerformer())
composeReference(null, e);
closeArray();
};
if (element.hasDevice()) {
openArray("device");
for (CodeableReference e : element.getDevice())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasCourseOfTherapyType()) {
composeCodeableConcept("courseOfTherapyType", element.getCourseOfTherapyType());
}
if (element.hasInsurance()) {
openArray("insurance");
for (Reference e : element.getInsurance())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRenderedDosageInstructionElement()) {
composeMarkdownCore("renderedDosageInstruction", element.getRenderedDosageInstructionElement(), false);
composeMarkdownExtras("renderedDosageInstruction", element.getRenderedDosageInstructionElement(), false);
}
if (element.hasEffectiveDosePeriod()) {
composePeriod("effectiveDosePeriod", element.getEffectiveDosePeriod());
}
if (element.hasDosageInstruction()) {
openArray("dosageInstruction");
for (Dosage e : element.getDosageInstruction())
composeDosage(null, e);
closeArray();
};
if (element.hasDispenseRequest()) {
composeMedicationRequestDispenseRequestComponent("dispenseRequest", element.getDispenseRequest());
}
if (element.hasSubstitution()) {
composeMedicationRequestSubstitutionComponent("substitution", element.getSubstitution());
}
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
};
}
protected void composeMedicationRequestDispenseRequestComponent(String name, MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationRequestDispenseRequestComponentProperties(element);
close();
}
}
protected void composeMedicationRequestDispenseRequestComponentProperties(MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInitialFill()) {
composeMedicationRequestDispenseRequestInitialFillComponent("initialFill", element.getInitialFill());
}
if (element.hasDispenseInterval()) {
composeDuration("dispenseInterval", element.getDispenseInterval());
}
if (element.hasValidityPeriod()) {
composePeriod("validityPeriod", element.getValidityPeriod());
}
if (element.hasNumberOfRepeatsAllowedElement()) {
composeUnsignedIntCore("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), false);
composeUnsignedIntExtras("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), false);
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasExpectedSupplyDuration()) {
composeDuration("expectedSupplyDuration", element.getExpectedSupplyDuration());
}
if (element.hasDispenser()) {
composeReference("dispenser", element.getDispenser());
}
if (element.hasDispenserInstruction()) {
openArray("dispenserInstruction");
for (Annotation e : element.getDispenserInstruction())
composeAnnotation(null, e);
closeArray();
};
if (element.hasDoseAdministrationAid()) {
composeCodeableConcept("doseAdministrationAid", element.getDoseAdministrationAid());
}
}
protected void composeMedicationRequestDispenseRequestInitialFillComponent(String name, MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationRequestDispenseRequestInitialFillComponentProperties(element);
close();
}
}
protected void composeMedicationRequestDispenseRequestInitialFillComponentProperties(MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasDuration()) {
composeDuration("duration", element.getDuration());
}
}
protected void composeMedicationRequestSubstitutionComponent(String name, MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationRequestSubstitutionComponentProperties(element);
close();
}
}
protected void composeMedicationRequestSubstitutionComponentProperties(MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAllowed()) {
composeType("allowed", element.getAllowed());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
}
protected void composeMedicationStatement(String name, MedicationStatement element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationStatementProperties(element);
}
}
protected void composeMedicationStatementProperties(MedicationStatement element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusCodesEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMedication()) {
composeCodeableReference("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasEffective()) {
composeType("effective", element.getEffective());
}
if (element.hasDateAssertedElement()) {
composeDateTimeCore("dateAsserted", element.getDateAssertedElement(), false);
composeDateTimeExtras("dateAsserted", element.getDateAssertedElement(), false);
}
if (element.hasInformationSource()) {
openArray("informationSource");
for (Reference e : element.getInformationSource())
composeReference(null, e);
closeArray();
};
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRelatedClinicalInformation()) {
openArray("relatedClinicalInformation");
for (Reference e : element.getRelatedClinicalInformation())
composeReference(null, e);
closeArray();
};
if (element.hasRenderedDosageInstructionElement()) {
composeMarkdownCore("renderedDosageInstruction", element.getRenderedDosageInstructionElement(), false);
composeMarkdownExtras("renderedDosageInstruction", element.getRenderedDosageInstructionElement(), false);
}
if (element.hasDosage()) {
openArray("dosage");
for (Dosage e : element.getDosage())
composeDosage(null, e);
closeArray();
};
if (element.hasAdherence()) {
composeMedicationStatementAdherenceComponent("adherence", element.getAdherence());
}
}
protected void composeMedicationStatementAdherenceComponent(String name, MedicationStatement.MedicationStatementAdherenceComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationStatementAdherenceComponentProperties(element);
close();
}
}
protected void composeMedicationStatementAdherenceComponentProperties(MedicationStatement.MedicationStatementAdherenceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
}
protected void composeMedicinalProductDefinition(String name, MedicinalProductDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductDefinitionProperties(element);
}
}
protected void composeMedicinalProductDefinitionProperties(MedicinalProductDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDomain()) {
composeCodeableConcept("domain", element.getDomain());
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasStatusDateElement()) {
composeDateTimeCore("statusDate", element.getStatusDateElement(), false);
composeDateTimeExtras("statusDate", element.getStatusDateElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCombinedPharmaceuticalDoseForm()) {
composeCodeableConcept("combinedPharmaceuticalDoseForm", element.getCombinedPharmaceuticalDoseForm());
}
if (element.hasRoute()) {
openArray("route");
for (CodeableConcept e : element.getRoute())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasIndicationElement()) {
composeMarkdownCore("indication", element.getIndicationElement(), false);
composeMarkdownExtras("indication", element.getIndicationElement(), false);
}
if (element.hasLegalStatusOfSupply()) {
composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply());
}
if (element.hasAdditionalMonitoringIndicator()) {
composeCodeableConcept("additionalMonitoringIndicator", element.getAdditionalMonitoringIndicator());
}
if (element.hasSpecialMeasures()) {
openArray("specialMeasures");
for (CodeableConcept e : element.getSpecialMeasures())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPediatricUseIndicator()) {
composeCodeableConcept("pediatricUseIndicator", element.getPediatricUseIndicator());
}
if (element.hasClassification()) {
openArray("classification");
for (CodeableConcept e : element.getClassification())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasMarketingStatus()) {
openArray("marketingStatus");
for (MarketingStatus e : element.getMarketingStatus())
composeMarketingStatus(null, e);
closeArray();
};
if (element.hasPackagedMedicinalProduct()) {
openArray("packagedMedicinalProduct");
for (CodeableConcept e : element.getPackagedMedicinalProduct())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasComprisedOf()) {
openArray("comprisedOf");
for (Reference e : element.getComprisedOf())
composeReference(null, e);
closeArray();
};
if (element.hasIngredient()) {
openArray("ingredient");
for (CodeableConcept e : element.getIngredient())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasImpurity()) {
openArray("impurity");
for (CodeableReference e : element.getImpurity())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasAttachedDocument()) {
openArray("attachedDocument");
for (Reference e : element.getAttachedDocument())
composeReference(null, e);
closeArray();
};
if (element.hasMasterFile()) {
openArray("masterFile");
for (Reference e : element.getMasterFile())
composeReference(null, e);
closeArray();
};
if (element.hasContact()) {
openArray("contact");
for (MedicinalProductDefinition.MedicinalProductDefinitionContactComponent e : element.getContact())
composeMedicinalProductDefinitionContactComponent(null, e);
closeArray();
};
if (element.hasClinicalTrial()) {
openArray("clinicalTrial");
for (Reference e : element.getClinicalTrial())
composeReference(null, e);
closeArray();
};
if (element.hasCode()) {
openArray("code");
for (Coding e : element.getCode())
composeCoding(null, e);
closeArray();
};
if (element.hasName()) {
openArray("name");
for (MedicinalProductDefinition.MedicinalProductDefinitionNameComponent e : element.getName())
composeMedicinalProductDefinitionNameComponent(null, e);
closeArray();
};
if (element.hasCrossReference()) {
openArray("crossReference");
for (MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent e : element.getCrossReference())
composeMedicinalProductDefinitionCrossReferenceComponent(null, e);
closeArray();
};
if (element.hasOperation()) {
openArray("operation");
for (MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent e : element.getOperation())
composeMedicinalProductDefinitionOperationComponent(null, e);
closeArray();
};
if (element.hasCharacteristic()) {
openArray("characteristic");
for (MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent e : element.getCharacteristic())
composeMedicinalProductDefinitionCharacteristicComponent(null, e);
closeArray();
};
}
protected void composeMedicinalProductDefinitionContactComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionContactComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionContactComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionContactComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionContactComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasContact()) {
composeReference("contact", element.getContact());
}
}
protected void composeMedicinalProductDefinitionNameComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionNameComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionNameComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionNameComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionNameComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasProductNameElement()) {
composeStringCore("productName", element.getProductNameElement(), false);
composeStringExtras("productName", element.getProductNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPart()) {
openArray("part");
for (MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent e : element.getPart())
composeMedicinalProductDefinitionNamePartComponent(null, e);
closeArray();
};
if (element.hasUsage()) {
openArray("usage");
for (MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent e : element.getUsage())
composeMedicinalProductDefinitionNameUsageComponent(null, e);
closeArray();
};
}
protected void composeMedicinalProductDefinitionNamePartComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionNamePartComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionNamePartComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionNamePartComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPartElement()) {
composeStringCore("part", element.getPartElement(), false);
composeStringExtras("part", element.getPartElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
}
protected void composeMedicinalProductDefinitionNameUsageComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionNameUsageComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionNameUsageComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionNameUsageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCountry()) {
composeCodeableConcept("country", element.getCountry());
}
if (element.hasJurisdiction()) {
composeCodeableConcept("jurisdiction", element.getJurisdiction());
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
}
protected void composeMedicinalProductDefinitionCrossReferenceComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionCrossReferenceComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionCrossReferenceComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionCrossReferenceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasProduct()) {
composeCodeableReference("product", element.getProduct());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
}
protected void composeMedicinalProductDefinitionOperationComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionOperationComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionOperationComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionOperationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableReference("type", element.getType());
}
if (element.hasEffectiveDate()) {
composePeriod("effectiveDate", element.getEffectiveDate());
}
if (element.hasOrganization()) {
openArray("organization");
for (Reference e : element.getOrganization())
composeReference(null, e);
closeArray();
};
if (element.hasConfidentialityIndicator()) {
composeCodeableConcept("confidentialityIndicator", element.getConfidentialityIndicator());
}
}
protected void composeMedicinalProductDefinitionCharacteristicComponent(String name, MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductDefinitionCharacteristicComponentProperties(element);
close();
}
}
protected void composeMedicinalProductDefinitionCharacteristicComponentProperties(MedicinalProductDefinition.MedicinalProductDefinitionCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMessageDefinitionProperties(element);
}
}
protected void composeMessageDefinitionProperties(MessageDefinition element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasReplaces()) {
if (anyHasValue(element.getReplaces())) {
openArray("replaces");
for (CanonicalType e : element.getReplaces())
composeCanonicalCore(null, e, e != element.getReplaces().get(element.getReplaces().size()-1));
closeArray();
}
if (anyHasExtras(element.getReplaces())) {
openArray("_replaces");
for (CanonicalType e : element.getReplaces())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasBaseElement()) {
composeCanonicalCore("base", element.getBaseElement(), false);
composeCanonicalExtras("base", element.getBaseElement(), false);
}
if (element.hasParent()) {
if (anyHasValue(element.getParent())) {
openArray("parent");
for (CanonicalType e : element.getParent())
composeCanonicalCore(null, e, e != element.getParent().get(element.getParent().size()-1));
closeArray();
}
if (anyHasExtras(element.getParent())) {
openArray("_parent");
for (CanonicalType e : element.getParent())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasEvent()) {
composeType("event", element.getEvent());
}
if (element.hasCategoryElement()) {
composeEnumerationCore("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory(), false);
composeEnumerationExtras("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory(), false);
}
if (element.hasFocus()) {
openArray("focus");
for (MessageDefinition.MessageDefinitionFocusComponent e : element.getFocus())
composeMessageDefinitionFocusComponent(null, e);
closeArray();
};
if (element.hasResponseRequiredElement()) {
composeEnumerationCore("responseRequired", element.getResponseRequiredElement(), new MessageDefinition.MessageheaderResponseRequestEnumFactory(), false);
composeEnumerationExtras("responseRequired", element.getResponseRequiredElement(), new MessageDefinition.MessageheaderResponseRequestEnumFactory(), false);
}
if (element.hasAllowedResponse()) {
openArray("allowedResponse");
for (MessageDefinition.MessageDefinitionAllowedResponseComponent e : element.getAllowedResponse())
composeMessageDefinitionAllowedResponseComponent(null, e);
closeArray();
};
if (element.hasGraphElement()) {
composeCanonicalCore("graph", element.getGraphElement(), false);
composeCanonicalExtras("graph", element.getGraphElement(), false);
}
}
protected void composeMessageDefinitionFocusComponent(String name, MessageDefinition.MessageDefinitionFocusComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageDefinitionFocusComponentProperties(element);
close();
}
}
protected void composeMessageDefinitionFocusComponentProperties(MessageDefinition.MessageDefinitionFocusComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
if (element.hasMinElement()) {
composeUnsignedIntCore("min", element.getMinElement(), false);
composeUnsignedIntExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
}
protected void composeMessageDefinitionAllowedResponseComponent(String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageDefinitionAllowedResponseComponentProperties(element);
close();
}
}
protected void composeMessageDefinitionAllowedResponseComponentProperties(MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMessageElement()) {
composeCanonicalCore("message", element.getMessageElement(), false);
composeCanonicalExtras("message", element.getMessageElement(), false);
}
if (element.hasSituationElement()) {
composeMarkdownCore("situation", element.getSituationElement(), false);
composeMarkdownExtras("situation", element.getSituationElement(), false);
}
}
protected void composeMessageHeader(String name, MessageHeader element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMessageHeaderProperties(element);
}
}
protected void composeMessageHeaderProperties(MessageHeader element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasEvent()) {
composeType("event", element.getEvent());
}
if (element.hasDestination()) {
openArray("destination");
for (MessageHeader.MessageDestinationComponent e : element.getDestination())
composeMessageDestinationComponent(null, e);
closeArray();
};
if (element.hasSender()) {
composeReference("sender", element.getSender());
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasSource()) {
composeMessageSourceComponent("source", element.getSource());
}
if (element.hasResponsible()) {
composeReference("responsible", element.getResponsible());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasResponse()) {
composeMessageHeaderResponseComponent("response", element.getResponse());
}
if (element.hasFocus()) {
openArray("focus");
for (Reference e : element.getFocus())
composeReference(null, e);
closeArray();
};
if (element.hasDefinitionElement()) {
composeCanonicalCore("definition", element.getDefinitionElement(), false);
composeCanonicalExtras("definition", element.getDefinitionElement(), false);
}
}
protected void composeMessageDestinationComponent(String name, MessageHeader.MessageDestinationComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageDestinationComponentProperties(element);
close();
}
}
protected void composeMessageDestinationComponentProperties(MessageHeader.MessageDestinationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEndpoint()) {
composeType("endpoint", element.getEndpoint());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTarget()) {
composeReference("target", element.getTarget());
}
if (element.hasReceiver()) {
composeReference("receiver", element.getReceiver());
}
}
protected void composeMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageSourceComponentProperties(element);
close();
}
}
protected void composeMessageSourceComponentProperties(MessageHeader.MessageSourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEndpoint()) {
composeType("endpoint", element.getEndpoint());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasSoftwareElement()) {
composeStringCore("software", element.getSoftwareElement(), false);
composeStringExtras("software", element.getSoftwareElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasContact()) {
composeContactPoint("contact", element.getContact());
}
}
protected void composeMessageHeaderResponseComponent(String name, MessageHeader.MessageHeaderResponseComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageHeaderResponseComponentProperties(element);
close();
}
}
protected void composeMessageHeaderResponseComponentProperties(MessageHeader.MessageHeaderResponseComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory(), false);
}
if (element.hasDetails()) {
composeReference("details", element.getDetails());
}
}
protected void composeMolecularSequence(String name, MolecularSequence element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMolecularSequenceProperties(element);
}
}
protected void composeMolecularSequenceProperties(MolecularSequence element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new MolecularSequence.SequenceTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new MolecularSequence.SequenceTypeEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasFocus()) {
openArray("focus");
for (Reference e : element.getFocus())
composeReference(null, e);
closeArray();
};
if (element.hasSpecimen()) {
composeReference("specimen", element.getSpecimen());
}
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasLiteralElement()) {
composeStringCore("literal", element.getLiteralElement(), false);
composeStringExtras("literal", element.getLiteralElement(), false);
}
if (element.hasFormatted()) {
openArray("formatted");
for (Attachment e : element.getFormatted())
composeAttachment(null, e);
closeArray();
};
if (element.hasRelative()) {
openArray("relative");
for (MolecularSequence.MolecularSequenceRelativeComponent e : element.getRelative())
composeMolecularSequenceRelativeComponent(null, e);
closeArray();
};
}
protected void composeMolecularSequenceRelativeComponent(String name, MolecularSequence.MolecularSequenceRelativeComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceRelativeComponentProperties(element);
close();
}
}
protected void composeMolecularSequenceRelativeComponentProperties(MolecularSequence.MolecularSequenceRelativeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCoordinateSystem()) {
composeCodeableConcept("coordinateSystem", element.getCoordinateSystem());
}
if (element.hasOrdinalPositionElement()) {
composeIntegerCore("ordinalPosition", element.getOrdinalPositionElement(), false);
composeIntegerExtras("ordinalPosition", element.getOrdinalPositionElement(), false);
}
if (element.hasSequenceRange()) {
composeRange("sequenceRange", element.getSequenceRange());
}
if (element.hasStartingSequence()) {
composeMolecularSequenceRelativeStartingSequenceComponent("startingSequence", element.getStartingSequence());
}
if (element.hasEdit()) {
openArray("edit");
for (MolecularSequence.MolecularSequenceRelativeEditComponent e : element.getEdit())
composeMolecularSequenceRelativeEditComponent(null, e);
closeArray();
};
}
protected void composeMolecularSequenceRelativeStartingSequenceComponent(String name, MolecularSequence.MolecularSequenceRelativeStartingSequenceComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceRelativeStartingSequenceComponentProperties(element);
close();
}
}
protected void composeMolecularSequenceRelativeStartingSequenceComponentProperties(MolecularSequence.MolecularSequenceRelativeStartingSequenceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasGenomeAssembly()) {
composeCodeableConcept("genomeAssembly", element.getGenomeAssembly());
}
if (element.hasChromosome()) {
composeCodeableConcept("chromosome", element.getChromosome());
}
if (element.hasSequence()) {
composeType("sequence", element.getSequence());
}
if (element.hasWindowStartElement()) {
composeIntegerCore("windowStart", element.getWindowStartElement(), false);
composeIntegerExtras("windowStart", element.getWindowStartElement(), false);
}
if (element.hasWindowEndElement()) {
composeIntegerCore("windowEnd", element.getWindowEndElement(), false);
composeIntegerExtras("windowEnd", element.getWindowEndElement(), false);
}
if (element.hasOrientationElement()) {
composeEnumerationCore("orientation", element.getOrientationElement(), new MolecularSequence.OrientationTypeEnumFactory(), false);
composeEnumerationExtras("orientation", element.getOrientationElement(), new MolecularSequence.OrientationTypeEnumFactory(), false);
}
if (element.hasStrandElement()) {
composeEnumerationCore("strand", element.getStrandElement(), new MolecularSequence.StrandTypeEnumFactory(), false);
composeEnumerationExtras("strand", element.getStrandElement(), new MolecularSequence.StrandTypeEnumFactory(), false);
}
}
protected void composeMolecularSequenceRelativeEditComponent(String name, MolecularSequence.MolecularSequenceRelativeEditComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceRelativeEditComponentProperties(element);
close();
}
}
protected void composeMolecularSequenceRelativeEditComponentProperties(MolecularSequence.MolecularSequenceRelativeEditComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStartElement()) {
composeIntegerCore("start", element.getStartElement(), false);
composeIntegerExtras("start", element.getStartElement(), false);
}
if (element.hasEndElement()) {
composeIntegerCore("end", element.getEndElement(), false);
composeIntegerExtras("end", element.getEndElement(), false);
}
if (element.hasReplacementSequenceElement()) {
composeStringCore("replacementSequence", element.getReplacementSequenceElement(), false);
composeStringExtras("replacementSequence", element.getReplacementSequenceElement(), false);
}
if (element.hasReplacedSequenceElement()) {
composeStringCore("replacedSequence", element.getReplacedSequenceElement(), false);
composeStringExtras("replacedSequence", element.getReplacedSequenceElement(), false);
}
}
protected void composeNamingSystem(String name, NamingSystem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeNamingSystemProperties(element);
}
}
protected void composeNamingSystemProperties(NamingSystem element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasResponsibleElement()) {
composeStringCore("responsible", element.getResponsibleElement(), false);
composeStringExtras("responsible", element.getResponsibleElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasUsageElement()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), false);
}
if (element.hasUniqueId()) {
openArray("uniqueId");
for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId())
composeNamingSystemUniqueIdComponent(null, e);
closeArray();
};
}
protected void composeNamingSystemUniqueIdComponent(String name, NamingSystem.NamingSystemUniqueIdComponent element) throws IOException {
if (element != null) {
open(name);
composeNamingSystemUniqueIdComponentProperties(element);
close();
}
}
protected void composeNamingSystemUniqueIdComponentProperties(NamingSystem.NamingSystemUniqueIdComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasAuthoritativeElement()) {
composeBooleanCore("authoritative", element.getAuthoritativeElement(), false);
composeBooleanExtras("authoritative", element.getAuthoritativeElement(), false);
}
}
protected void composeNutritionIntake(String name, NutritionIntake element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeNutritionIntakeProperties(element);
}
}
protected void composeNutritionIntakeProperties(NutritionIntake element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
openArray("statusReason");
for (CodeableConcept e : element.getStatusReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasRecordedElement()) {
composeDateTimeCore("recorded", element.getRecordedElement(), false);
composeDateTimeExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasReported()) {
composeType("reported", element.getReported());
}
if (element.hasConsumedItem()) {
openArray("consumedItem");
for (NutritionIntake.NutritionIntakeConsumedItemComponent e : element.getConsumedItem())
composeNutritionIntakeConsumedItemComponent(null, e);
closeArray();
};
if (element.hasIngredientLabel()) {
openArray("ingredientLabel");
for (NutritionIntake.NutritionIntakeIngredientLabelComponent e : element.getIngredientLabel())
composeNutritionIntakeIngredientLabelComponent(null, e);
closeArray();
};
if (element.hasPerformer()) {
openArray("performer");
for (NutritionIntake.NutritionIntakePerformerComponent e : element.getPerformer())
composeNutritionIntakePerformerComponent(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeNutritionIntakeConsumedItemComponent(String name, NutritionIntake.NutritionIntakeConsumedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionIntakeConsumedItemComponentProperties(element);
close();
}
}
protected void composeNutritionIntakeConsumedItemComponentProperties(NutritionIntake.NutritionIntakeConsumedItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasNutritionProduct()) {
composeCodeableReference("nutritionProduct", element.getNutritionProduct());
}
if (element.hasSchedule()) {
composeTiming("schedule", element.getSchedule());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
if (element.hasRate()) {
composeQuantity("rate", element.getRate());
}
if (element.hasNotConsumedElement()) {
composeBooleanCore("notConsumed", element.getNotConsumedElement(), false);
composeBooleanExtras("notConsumed", element.getNotConsumedElement(), false);
}
if (element.hasNotConsumedReason()) {
composeCodeableConcept("notConsumedReason", element.getNotConsumedReason());
}
}
protected void composeNutritionIntakeIngredientLabelComponent(String name, NutritionIntake.NutritionIntakeIngredientLabelComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionIntakeIngredientLabelComponentProperties(element);
close();
}
}
protected void composeNutritionIntakeIngredientLabelComponentProperties(NutritionIntake.NutritionIntakeIngredientLabelComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNutrient()) {
composeCodeableReference("nutrient", element.getNutrient());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeNutritionIntakePerformerComponent(String name, NutritionIntake.NutritionIntakePerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionIntakePerformerComponentProperties(element);
close();
}
}
protected void composeNutritionIntakePerformerComponentProperties(NutritionIntake.NutritionIntakePerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeNutritionOrderProperties(element);
}
}
protected void composeNutritionOrderProperties(NutritionOrder element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiates()) {
if (anyHasValue(element.getInstantiates())) {
openArray("instantiates");
for (UriType e : element.getInstantiates())
composeUriCore(null, e, e != element.getInstantiates().get(element.getInstantiates().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiates())) {
openArray("_instantiates");
for (UriType e : element.getInstantiates())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
};
if (element.hasDateTimeElement()) {
composeDateTimeCore("dateTime", element.getDateTimeElement(), false);
composeDateTimeExtras("dateTime", element.getDateTimeElement(), false);
}
if (element.hasOrderer()) {
composeReference("orderer", element.getOrderer());
}
if (element.hasPerformer()) {
openArray("performer");
for (CodeableReference e : element.getPerformer())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasAllergyIntolerance()) {
openArray("allergyIntolerance");
for (Reference e : element.getAllergyIntolerance())
composeReference(null, e);
closeArray();
};
if (element.hasFoodPreferenceModifier()) {
openArray("foodPreferenceModifier");
for (CodeableConcept e : element.getFoodPreferenceModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasExcludeFoodModifier()) {
openArray("excludeFoodModifier");
for (CodeableConcept e : element.getExcludeFoodModifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasOutsideFoodAllowedElement()) {
composeBooleanCore("outsideFoodAllowed", element.getOutsideFoodAllowedElement(), false);
composeBooleanExtras("outsideFoodAllowed", element.getOutsideFoodAllowedElement(), false);
}
if (element.hasOralDiet()) {
composeNutritionOrderOralDietComponent("oralDiet", element.getOralDiet());
}
if (element.hasSupplement()) {
openArray("supplement");
for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement())
composeNutritionOrderSupplementComponent(null, e);
closeArray();
};
if (element.hasEnteralFormula()) {
composeNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeNutritionOrderOralDietComponent(String name, NutritionOrder.NutritionOrderOralDietComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderOralDietComponentProperties(element);
close();
}
}
protected void composeNutritionOrderOralDietComponentProperties(NutritionOrder.NutritionOrderOralDietComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSchedule()) {
composeOralDietScheduleComponent("schedule", element.getSchedule());
}
if (element.hasNutrient()) {
openArray("nutrient");
for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient())
composeNutritionOrderOralDietNutrientComponent(null, e);
closeArray();
};
if (element.hasTexture()) {
openArray("texture");
for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture())
composeNutritionOrderOralDietTextureComponent(null, e);
closeArray();
};
if (element.hasFluidConsistencyType()) {
openArray("fluidConsistencyType");
for (CodeableConcept e : element.getFluidConsistencyType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasInstructionElement()) {
composeStringCore("instruction", element.getInstructionElement(), false);
composeStringExtras("instruction", element.getInstructionElement(), false);
}
}
protected void composeOralDietScheduleComponent(String name, NutritionOrder.OralDietScheduleComponent element) throws IOException {
if (element != null) {
open(name);
composeOralDietScheduleComponentProperties(element);
close();
}
}
protected void composeOralDietScheduleComponentProperties(NutritionOrder.OralDietScheduleComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTiming()) {
openArray("timing");
for (Timing e : element.getTiming())
composeTiming(null, e);
closeArray();
};
if (element.hasAsNeededElement()) {
composeBooleanCore("asNeeded", element.getAsNeededElement(), false);
composeBooleanExtras("asNeeded", element.getAsNeededElement(), false);
}
if (element.hasAsNeededFor()) {
composeCodeableConcept("asNeededFor", element.getAsNeededFor());
}
}
protected void composeNutritionOrderOralDietNutrientComponent(String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderOralDietNutrientComponentProperties(element);
close();
}
}
protected void composeNutritionOrderOralDietNutrientComponentProperties(NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModifier()) {
composeCodeableConcept("modifier", element.getModifier());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeNutritionOrderOralDietTextureComponent(String name, NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderOralDietTextureComponentProperties(element);
close();
}
}
protected void composeNutritionOrderOralDietTextureComponentProperties(NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasModifier()) {
composeCodeableConcept("modifier", element.getModifier());
}
if (element.hasFoodType()) {
composeCodeableConcept("foodType", element.getFoodType());
}
}
protected void composeNutritionOrderSupplementComponent(String name, NutritionOrder.NutritionOrderSupplementComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderSupplementComponentProperties(element);
close();
}
}
protected void composeNutritionOrderSupplementComponentProperties(NutritionOrder.NutritionOrderSupplementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableReference("type", element.getType());
}
if (element.hasProductNameElement()) {
composeStringCore("productName", element.getProductNameElement(), false);
composeStringExtras("productName", element.getProductNameElement(), false);
}
if (element.hasSchedule()) {
composeSupplementScheduleComponent("schedule", element.getSchedule());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasInstructionElement()) {
composeStringCore("instruction", element.getInstructionElement(), false);
composeStringExtras("instruction", element.getInstructionElement(), false);
}
}
protected void composeSupplementScheduleComponent(String name, NutritionOrder.SupplementScheduleComponent element) throws IOException {
if (element != null) {
open(name);
composeSupplementScheduleComponentProperties(element);
close();
}
}
protected void composeSupplementScheduleComponentProperties(NutritionOrder.SupplementScheduleComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTiming()) {
openArray("timing");
for (Timing e : element.getTiming())
composeTiming(null, e);
closeArray();
};
if (element.hasAsNeededElement()) {
composeBooleanCore("asNeeded", element.getAsNeededElement(), false);
composeBooleanExtras("asNeeded", element.getAsNeededElement(), false);
}
if (element.hasAsNeededFor()) {
composeCodeableConcept("asNeededFor", element.getAsNeededFor());
}
}
protected void composeNutritionOrderEnteralFormulaComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderEnteralFormulaComponentProperties(element);
close();
}
}
protected void composeNutritionOrderEnteralFormulaComponentProperties(NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasBaseFormulaType()) {
composeCodeableReference("baseFormulaType", element.getBaseFormulaType());
}
if (element.hasBaseFormulaProductNameElement()) {
composeStringCore("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false);
composeStringExtras("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false);
}
if (element.hasDeliveryDevice()) {
openArray("deliveryDevice");
for (CodeableReference e : element.getDeliveryDevice())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasAdditive()) {
openArray("additive");
for (NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent e : element.getAdditive())
composeNutritionOrderEnteralFormulaAdditiveComponent(null, e);
closeArray();
};
if (element.hasCaloricDensity()) {
composeQuantity("caloricDensity", element.getCaloricDensity());
}
if (element.hasRouteOfAdministration()) {
composeCodeableConcept("routeOfAdministration", element.getRouteOfAdministration());
}
if (element.hasAdministration()) {
openArray("administration");
for (NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent e : element.getAdministration())
composeNutritionOrderEnteralFormulaAdministrationComponent(null, e);
closeArray();
};
if (element.hasMaxVolumeToDeliver()) {
composeQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver());
}
if (element.hasAdministrationInstructionElement()) {
composeMarkdownCore("administrationInstruction", element.getAdministrationInstructionElement(), false);
composeMarkdownExtras("administrationInstruction", element.getAdministrationInstructionElement(), false);
}
}
protected void composeNutritionOrderEnteralFormulaAdditiveComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderEnteralFormulaAdditiveComponentProperties(element);
close();
}
}
protected void composeNutritionOrderEnteralFormulaAdditiveComponentProperties(NutritionOrder.NutritionOrderEnteralFormulaAdditiveComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableReference("type", element.getType());
}
if (element.hasProductNameElement()) {
composeStringCore("productName", element.getProductNameElement(), false);
composeStringExtras("productName", element.getProductNameElement(), false);
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
}
protected void composeNutritionOrderEnteralFormulaAdministrationComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderEnteralFormulaAdministrationComponentProperties(element);
close();
}
}
protected void composeNutritionOrderEnteralFormulaAdministrationComponentProperties(NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSchedule()) {
composeEnteralFormulaScheduleComponent("schedule", element.getSchedule());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasRate()) {
composeType("rate", element.getRate());
}
}
protected void composeEnteralFormulaScheduleComponent(String name, NutritionOrder.EnteralFormulaScheduleComponent element) throws IOException {
if (element != null) {
open(name);
composeEnteralFormulaScheduleComponentProperties(element);
close();
}
}
protected void composeEnteralFormulaScheduleComponentProperties(NutritionOrder.EnteralFormulaScheduleComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTiming()) {
openArray("timing");
for (Timing e : element.getTiming())
composeTiming(null, e);
closeArray();
};
if (element.hasAsNeededElement()) {
composeBooleanCore("asNeeded", element.getAsNeededElement(), false);
composeBooleanExtras("asNeeded", element.getAsNeededElement(), false);
}
if (element.hasAsNeededFor()) {
composeCodeableConcept("asNeededFor", element.getAsNeededFor());
}
}
protected void composeNutritionProduct(String name, NutritionProduct element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeNutritionProductProperties(element);
}
}
protected void composeNutritionProductProperties(NutritionProduct element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new NutritionProduct.NutritionProductStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new NutritionProduct.NutritionProductStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
};
if (element.hasNutrient()) {
openArray("nutrient");
for (NutritionProduct.NutritionProductNutrientComponent e : element.getNutrient())
composeNutritionProductNutrientComponent(null, e);
closeArray();
};
if (element.hasIngredient()) {
openArray("ingredient");
for (NutritionProduct.NutritionProductIngredientComponent e : element.getIngredient())
composeNutritionProductIngredientComponent(null, e);
closeArray();
};
if (element.hasKnownAllergen()) {
openArray("knownAllergen");
for (CodeableReference e : element.getKnownAllergen())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasCharacteristic()) {
openArray("characteristic");
for (NutritionProduct.NutritionProductCharacteristicComponent e : element.getCharacteristic())
composeNutritionProductCharacteristicComponent(null, e);
closeArray();
};
if (element.hasInstance()) {
openArray("instance");
for (NutritionProduct.NutritionProductInstanceComponent e : element.getInstance())
composeNutritionProductInstanceComponent(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeNutritionProductNutrientComponent(String name, NutritionProduct.NutritionProductNutrientComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionProductNutrientComponentProperties(element);
close();
}
}
protected void composeNutritionProductNutrientComponentProperties(NutritionProduct.NutritionProductNutrientComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasAmount()) {
openArray("amount");
for (Ratio e : element.getAmount())
composeRatio(null, e);
closeArray();
};
}
protected void composeNutritionProductIngredientComponent(String name, NutritionProduct.NutritionProductIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionProductIngredientComponentProperties(element);
close();
}
}
protected void composeNutritionProductIngredientComponentProperties(NutritionProduct.NutritionProductIngredientComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasAmount()) {
openArray("amount");
for (Ratio e : element.getAmount())
composeRatio(null, e);
closeArray();
};
}
protected void composeNutritionProductCharacteristicComponent(String name, NutritionProduct.NutritionProductCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionProductCharacteristicComponentProperties(element);
close();
}
}
protected void composeNutritionProductCharacteristicComponentProperties(NutritionProduct.NutritionProductCharacteristicComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeNutritionProductInstanceComponent(String name, NutritionProduct.NutritionProductInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionProductInstanceComponentProperties(element);
close();
}
}
protected void composeNutritionProductInstanceComponentProperties(NutritionProduct.NutritionProductInstanceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasLotNumberElement()) {
composeStringCore("lotNumber", element.getLotNumberElement(), false);
composeStringExtras("lotNumber", element.getLotNumberElement(), false);
}
if (element.hasExpiryElement()) {
composeDateTimeCore("expiry", element.getExpiryElement(), false);
composeDateTimeExtras("expiry", element.getExpiryElement(), false);
}
if (element.hasUseByElement()) {
composeDateTimeCore("useBy", element.getUseByElement(), false);
composeDateTimeExtras("useBy", element.getUseByElement(), false);
}
if (element.hasBiologicalSourceEvent()) {
composeIdentifier("biologicalSourceEvent", element.getBiologicalSourceEvent());
}
}
protected void composeObservation(String name, Observation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeObservationProperties(element);
}
}
protected void composeObservationProperties(Observation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiates()) {
composeType("instantiates", element.getInstantiates());
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasTriggeredBy()) {
openArray("triggeredBy");
for (Observation.ObservationTriggeredByComponent e : element.getTriggeredBy())
composeObservationTriggeredByComponent(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.ObservationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.ObservationStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasFocus()) {
openArray("focus");
for (Reference e : element.getFocus())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasEffective()) {
composeType("effective", element.getEffective());
}
if (element.hasIssuedElement()) {
composeInstantCore("issued", element.getIssuedElement(), false);
composeInstantExtras("issued", element.getIssuedElement(), false);
}
if (element.hasPerformer()) {
openArray("performer");
for (Reference e : element.getPerformer())
composeReference(null, e);
closeArray();
};
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasDataAbsentReason()) {
composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason());
}
if (element.hasInterpretation()) {
openArray("interpretation");
for (CodeableConcept e : element.getInterpretation())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasBodyStructure()) {
composeReference("bodyStructure", element.getBodyStructure());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasSpecimen()) {
composeReference("specimen", element.getSpecimen());
}
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasReferenceRange()) {
openArray("referenceRange");
for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange())
composeObservationReferenceRangeComponent(null, e);
closeArray();
};
if (element.hasHasMember()) {
openArray("hasMember");
for (Reference e : element.getHasMember())
composeReference(null, e);
closeArray();
};
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
};
if (element.hasComponent()) {
openArray("component");
for (Observation.ObservationComponentComponent e : element.getComponent())
composeObservationComponentComponent(null, e);
closeArray();
};
}
protected void composeObservationTriggeredByComponent(String name, Observation.ObservationTriggeredByComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationTriggeredByComponentProperties(element);
close();
}
}
protected void composeObservationTriggeredByComponentProperties(Observation.ObservationTriggeredByComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasObservation()) {
composeReference("observation", element.getObservation());
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Observation.TriggeredBytypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Observation.TriggeredBytypeEnumFactory(), false);
}
if (element.hasReasonElement()) {
composeStringCore("reason", element.getReasonElement(), false);
composeStringExtras("reason", element.getReasonElement(), false);
}
}
protected void composeObservationReferenceRangeComponent(String name, Observation.ObservationReferenceRangeComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationReferenceRangeComponentProperties(element);
close();
}
}
protected void composeObservationReferenceRangeComponentProperties(Observation.ObservationReferenceRangeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLow()) {
composeQuantity("low", element.getLow());
}
if (element.hasHigh()) {
composeQuantity("high", element.getHigh());
}
if (element.hasNormalValue()) {
composeCodeableConcept("normalValue", element.getNormalValue());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAppliesTo()) {
openArray("appliesTo");
for (CodeableConcept e : element.getAppliesTo())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAge()) {
composeRange("age", element.getAge());
}
if (element.hasTextElement()) {
composeMarkdownCore("text", element.getTextElement(), false);
composeMarkdownExtras("text", element.getTextElement(), false);
}
}
protected void composeObservationComponentComponent(String name, Observation.ObservationComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationComponentComponentProperties(element);
close();
}
}
protected void composeObservationComponentComponentProperties(Observation.ObservationComponentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasDataAbsentReason()) {
composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason());
}
if (element.hasInterpretation()) {
openArray("interpretation");
for (CodeableConcept e : element.getInterpretation())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasReferenceRange()) {
openArray("referenceRange");
for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange())
composeObservationReferenceRangeComponent(null, e);
closeArray();
};
}
protected void composeObservationDefinition(String name, ObservationDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeObservationDefinitionProperties(element);
}
}
protected void composeObservationDefinitionProperties(ObservationDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasDerivedFromCanonical()) {
if (anyHasValue(element.getDerivedFromCanonical())) {
openArray("derivedFromCanonical");
for (CanonicalType e : element.getDerivedFromCanonical())
composeCanonicalCore(null, e, e != element.getDerivedFromCanonical().get(element.getDerivedFromCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFromCanonical())) {
openArray("_derivedFromCanonical");
for (CanonicalType e : element.getDerivedFromCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasDerivedFromUri()) {
if (anyHasValue(element.getDerivedFromUri())) {
openArray("derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriCore(null, e, e != element.getDerivedFromUri().get(element.getDerivedFromUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFromUri())) {
openArray("_derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasSubject()) {
openArray("subject");
for (CodeableConcept e : element.getSubject())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPerformerType()) {
composeCodeableConcept("performerType", element.getPerformerType());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasPermittedDataType()) {
openArray("permittedDataType");
for (Enumeration e : element.getPermittedDataType())
composeEnumerationCore(null, e, new ObservationDefinition.ObservationDataTypeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getPermittedDataType())) {
openArray("_permittedDataType");
for (Enumeration e : element.getPermittedDataType())
composeEnumerationExtras(null, e, new ObservationDefinition.ObservationDataTypeEnumFactory(), true);
closeArray();
}
};
if (element.hasMultipleResultsAllowedElement()) {
composeBooleanCore("multipleResultsAllowed", element.getMultipleResultsAllowedElement(), false);
composeBooleanExtras("multipleResultsAllowed", element.getMultipleResultsAllowedElement(), false);
}
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasSpecimen()) {
openArray("specimen");
for (Reference e : element.getSpecimen())
composeReference(null, e);
closeArray();
};
if (element.hasDevice()) {
openArray("device");
for (Reference e : element.getDevice())
composeReference(null, e);
closeArray();
};
if (element.hasPreferredReportNameElement()) {
composeStringCore("preferredReportName", element.getPreferredReportNameElement(), false);
composeStringExtras("preferredReportName", element.getPreferredReportNameElement(), false);
}
if (element.hasPermittedUnit()) {
openArray("permittedUnit");
for (Coding e : element.getPermittedUnit())
composeCoding(null, e);
closeArray();
};
if (element.hasQualifiedValue()) {
openArray("qualifiedValue");
for (ObservationDefinition.ObservationDefinitionQualifiedValueComponent e : element.getQualifiedValue())
composeObservationDefinitionQualifiedValueComponent(null, e);
closeArray();
};
if (element.hasHasMember()) {
openArray("hasMember");
for (Reference e : element.getHasMember())
composeReference(null, e);
closeArray();
};
if (element.hasComponent()) {
openArray("component");
for (ObservationDefinition.ObservationDefinitionComponentComponent e : element.getComponent())
composeObservationDefinitionComponentComponent(null, e);
closeArray();
};
}
protected void composeObservationDefinitionQualifiedValueComponent(String name, ObservationDefinition.ObservationDefinitionQualifiedValueComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationDefinitionQualifiedValueComponentProperties(element);
close();
}
}
protected void composeObservationDefinitionQualifiedValueComponentProperties(ObservationDefinition.ObservationDefinitionQualifiedValueComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContext()) {
composeCodeableConcept("context", element.getContext());
}
if (element.hasAppliesTo()) {
openArray("appliesTo");
for (CodeableConcept e : element.getAppliesTo())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasGenderElement()) {
composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
}
if (element.hasAge()) {
composeRange("age", element.getAge());
}
if (element.hasGestationalAge()) {
composeRange("gestationalAge", element.getGestationalAge());
}
if (element.hasConditionElement()) {
composeStringCore("condition", element.getConditionElement(), false);
composeStringExtras("condition", element.getConditionElement(), false);
}
if (element.hasRangeCategoryElement()) {
composeEnumerationCore("rangeCategory", element.getRangeCategoryElement(), new ObservationDefinition.ObservationRangeCategoryEnumFactory(), false);
composeEnumerationExtras("rangeCategory", element.getRangeCategoryElement(), new ObservationDefinition.ObservationRangeCategoryEnumFactory(), false);
}
if (element.hasRange()) {
composeRange("range", element.getRange());
}
if (element.hasValidCodedValueSetElement()) {
composeCanonicalCore("validCodedValueSet", element.getValidCodedValueSetElement(), false);
composeCanonicalExtras("validCodedValueSet", element.getValidCodedValueSetElement(), false);
}
if (element.hasNormalCodedValueSetElement()) {
composeCanonicalCore("normalCodedValueSet", element.getNormalCodedValueSetElement(), false);
composeCanonicalExtras("normalCodedValueSet", element.getNormalCodedValueSetElement(), false);
}
if (element.hasAbnormalCodedValueSetElement()) {
composeCanonicalCore("abnormalCodedValueSet", element.getAbnormalCodedValueSetElement(), false);
composeCanonicalExtras("abnormalCodedValueSet", element.getAbnormalCodedValueSetElement(), false);
}
if (element.hasCriticalCodedValueSetElement()) {
composeCanonicalCore("criticalCodedValueSet", element.getCriticalCodedValueSetElement(), false);
composeCanonicalExtras("criticalCodedValueSet", element.getCriticalCodedValueSetElement(), false);
}
}
protected void composeObservationDefinitionComponentComponent(String name, ObservationDefinition.ObservationDefinitionComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationDefinitionComponentComponentProperties(element);
close();
}
}
protected void composeObservationDefinitionComponentComponentProperties(ObservationDefinition.ObservationDefinitionComponentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasPermittedDataType()) {
openArray("permittedDataType");
for (Enumeration e : element.getPermittedDataType())
composeEnumerationCore(null, e, new ObservationDefinition.ObservationDataTypeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getPermittedDataType())) {
openArray("_permittedDataType");
for (Enumeration e : element.getPermittedDataType())
composeEnumerationExtras(null, e, new ObservationDefinition.ObservationDataTypeEnumFactory(), true);
closeArray();
}
};
if (element.hasPermittedUnit()) {
openArray("permittedUnit");
for (Coding e : element.getPermittedUnit())
composeCoding(null, e);
closeArray();
};
if (element.hasQualifiedValue()) {
openArray("qualifiedValue");
for (ObservationDefinition.ObservationDefinitionQualifiedValueComponent e : element.getQualifiedValue())
composeObservationDefinitionQualifiedValueComponent(null, e);
closeArray();
};
}
protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeOperationDefinitionProperties(element);
}
}
protected void composeOperationDefinitionProperties(OperationDefinition element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasAffectsStateElement()) {
composeBooleanCore("affectsState", element.getAffectsStateElement(), false);
composeBooleanExtras("affectsState", element.getAffectsStateElement(), false);
}
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
if (element.hasBaseElement()) {
composeCanonicalCore("base", element.getBaseElement(), false);
composeCanonicalExtras("base", element.getBaseElement(), false);
}
if (element.hasResource()) {
openArray("resource");
for (Enumeration e : element.getResource())
composeEnumerationCore(null, e, new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getResource())) {
openArray("_resource");
for (Enumeration e : element.getResource())
composeEnumerationExtras(null, e, new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), true);
closeArray();
}
};
if (element.hasSystemElement()) {
composeBooleanCore("system", element.getSystemElement(), false);
composeBooleanExtras("system", element.getSystemElement(), false);
}
if (element.hasTypeElement()) {
composeBooleanCore("type", element.getTypeElement(), false);
composeBooleanExtras("type", element.getTypeElement(), false);
}
if (element.hasInstanceElement()) {
composeBooleanCore("instance", element.getInstanceElement(), false);
composeBooleanExtras("instance", element.getInstanceElement(), false);
}
if (element.hasInputProfileElement()) {
composeCanonicalCore("inputProfile", element.getInputProfileElement(), false);
composeCanonicalExtras("inputProfile", element.getInputProfileElement(), false);
}
if (element.hasOutputProfileElement()) {
composeCanonicalCore("outputProfile", element.getOutputProfileElement(), false);
composeCanonicalExtras("outputProfile", element.getOutputProfileElement(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (OperationDefinition.OperationDefinitionParameterComponent e : element.getParameter())
composeOperationDefinitionParameterComponent(null, e);
closeArray();
};
if (element.hasOverload()) {
openArray("overload");
for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload())
composeOperationDefinitionOverloadComponent(null, e);
closeArray();
};
}
protected void composeOperationDefinitionParameterComponent(String name, OperationDefinition.OperationDefinitionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionParameterComponentProperties(element);
close();
}
}
protected void composeOperationDefinitionParameterComponentProperties(OperationDefinition.OperationDefinitionParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeCodeCore("name", element.getNameElement(), false);
composeCodeExtras("name", element.getNameElement(), false);
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Enumerations.OperationParameterUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Enumerations.OperationParameterUseEnumFactory(), false);
}
if (element.hasScope()) {
openArray("scope");
for (Enumeration e : element.getScope())
composeEnumerationCore(null, e, new OperationDefinition.OperationParameterScopeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getScope())) {
openArray("_scope");
for (Enumeration e : element.getScope())
composeEnumerationExtras(null, e, new OperationDefinition.OperationParameterScopeEnumFactory(), true);
closeArray();
}
};
if (element.hasMinElement()) {
composeIntegerCore("min", element.getMinElement(), false);
composeIntegerExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
if (element.hasDocumentationElement()) {
composeMarkdownCore("documentation", element.getDocumentationElement(), false);
composeMarkdownExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.FHIRTypesEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.FHIRTypesEnumFactory(), false);
}
if (element.hasAllowedType()) {
openArray("allowedType");
for (Enumeration e : element.getAllowedType())
composeEnumerationCore(null, e, new Enumerations.FHIRTypesEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getAllowedType())) {
openArray("_allowedType");
for (Enumeration e : element.getAllowedType())
composeEnumerationExtras(null, e, new Enumerations.FHIRTypesEnumFactory(), true);
closeArray();
}
};
if (element.hasTargetProfile()) {
if (anyHasValue(element.getTargetProfile())) {
openArray("targetProfile");
for (CanonicalType e : element.getTargetProfile())
composeCanonicalCore(null, e, e != element.getTargetProfile().get(element.getTargetProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getTargetProfile())) {
openArray("_targetProfile");
for (CanonicalType e : element.getTargetProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasSearchTypeElement()) {
composeEnumerationCore("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false);
composeEnumerationExtras("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false);
}
if (element.hasBinding()) {
composeOperationDefinitionParameterBindingComponent("binding", element.getBinding());
}
if (element.hasReferencedFrom()) {
openArray("referencedFrom");
for (OperationDefinition.OperationDefinitionParameterReferencedFromComponent e : element.getReferencedFrom())
composeOperationDefinitionParameterReferencedFromComponent(null, e);
closeArray();
};
if (element.hasPart()) {
openArray("part");
for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart())
composeOperationDefinitionParameterComponent(null, e);
closeArray();
};
}
protected void composeOperationDefinitionParameterBindingComponent(String name, OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionParameterBindingComponentProperties(element);
close();
}
}
protected void composeOperationDefinitionParameterBindingComponentProperties(OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStrengthElement()) {
composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false);
composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
}
protected void composeOperationDefinitionParameterReferencedFromComponent(String name, OperationDefinition.OperationDefinitionParameterReferencedFromComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionParameterReferencedFromComponentProperties(element);
close();
}
}
protected void composeOperationDefinitionParameterReferencedFromComponentProperties(OperationDefinition.OperationDefinitionParameterReferencedFromComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSourceElement()) {
composeStringCore("source", element.getSourceElement(), false);
composeStringExtras("source", element.getSourceElement(), false);
}
if (element.hasSourceIdElement()) {
composeStringCore("sourceId", element.getSourceIdElement(), false);
composeStringExtras("sourceId", element.getSourceIdElement(), false);
}
}
protected void composeOperationDefinitionOverloadComponent(String name, OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionOverloadComponentProperties(element);
close();
}
}
protected void composeOperationDefinitionOverloadComponentProperties(OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasParameterName()) {
if (anyHasValue(element.getParameterName())) {
openArray("parameterName");
for (StringType e : element.getParameterName())
composeStringCore(null, e, e != element.getParameterName().get(element.getParameterName().size()-1));
closeArray();
}
if (anyHasExtras(element.getParameterName())) {
openArray("_parameterName");
for (StringType e : element.getParameterName())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeOperationOutcome(String name, OperationOutcome element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeOperationOutcomeProperties(element);
}
}
protected void composeOperationOutcomeProperties(OperationOutcome element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIssue()) {
openArray("issue");
for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue())
composeOperationOutcomeIssueComponent(null, e);
closeArray();
};
}
protected void composeOperationOutcomeIssueComponent(String name, OperationOutcome.OperationOutcomeIssueComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationOutcomeIssueComponentProperties(element);
close();
}
}
protected void composeOperationOutcomeIssueComponentProperties(OperationOutcome.OperationOutcomeIssueComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSeverityElement()) {
composeEnumerationCore("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory(), false);
composeEnumerationExtras("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory(), false);
}
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory(), false);
}
if (element.hasDetails()) {
composeCodeableConcept("details", element.getDetails());
}
if (element.hasDiagnosticsElement()) {
composeStringCore("diagnostics", element.getDiagnosticsElement(), false);
composeStringExtras("diagnostics", element.getDiagnosticsElement(), false);
}
if (element.hasLocation()) {
if (anyHasValue(element.getLocation())) {
openArray("location");
for (StringType e : element.getLocation())
composeStringCore(null, e, e != element.getLocation().get(element.getLocation().size()-1));
closeArray();
}
if (anyHasExtras(element.getLocation())) {
openArray("_location");
for (StringType e : element.getLocation())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasExpression()) {
if (anyHasValue(element.getExpression())) {
openArray("expression");
for (StringType e : element.getExpression())
composeStringCore(null, e, e != element.getExpression().get(element.getExpression().size()-1));
closeArray();
}
if (anyHasExtras(element.getExpression())) {
openArray("_expression");
for (StringType e : element.getExpression())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeOrganization(String name, Organization element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeOrganizationProperties(element);
}
}
protected void composeOrganizationProperties(Organization element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasAlias()) {
if (anyHasValue(element.getAlias())) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, e != element.getAlias().get(element.getAlias().size()-1));
closeArray();
}
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ExtendedContactDetail e : element.getContact())
composeExtendedContactDetail(null, e);
closeArray();
};
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
if (element.hasQualification()) {
openArray("qualification");
for (Organization.OrganizationQualificationComponent e : element.getQualification())
composeOrganizationQualificationComponent(null, e);
closeArray();
};
}
protected void composeOrganizationQualificationComponent(String name, Organization.OrganizationQualificationComponent element) throws IOException {
if (element != null) {
open(name);
composeOrganizationQualificationComponentProperties(element);
close();
}
}
protected void composeOrganizationQualificationComponentProperties(Organization.OrganizationQualificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasIssuer()) {
composeReference("issuer", element.getIssuer());
}
}
protected void composeOrganizationAffiliation(String name, OrganizationAffiliation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeOrganizationAffiliationProperties(element);
}
}
protected void composeOrganizationAffiliationProperties(OrganizationAffiliation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
if (element.hasParticipatingOrganization()) {
composeReference("participatingOrganization", element.getParticipatingOrganization());
}
if (element.hasNetwork()) {
openArray("network");
for (Reference e : element.getNetwork())
composeReference(null, e);
closeArray();
};
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasLocation()) {
openArray("location");
for (Reference e : element.getLocation())
composeReference(null, e);
closeArray();
};
if (element.hasHealthcareService()) {
openArray("healthcareService");
for (Reference e : element.getHealthcareService())
composeReference(null, e);
closeArray();
};
if (element.hasContact()) {
openArray("contact");
for (ExtendedContactDetail e : element.getContact())
composeExtendedContactDetail(null, e);
closeArray();
};
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
}
protected void composePackagedProductDefinition(String name, PackagedProductDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePackagedProductDefinitionProperties(element);
}
}
protected void composePackagedProductDefinitionProperties(PackagedProductDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPackageFor()) {
openArray("packageFor");
for (Reference e : element.getPackageFor())
composeReference(null, e);
closeArray();
};
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasStatusDateElement()) {
composeDateTimeCore("statusDate", element.getStatusDateElement(), false);
composeDateTimeExtras("statusDate", element.getStatusDateElement(), false);
}
if (element.hasContainedItemQuantity()) {
openArray("containedItemQuantity");
for (Quantity e : element.getContainedItemQuantity())
composeQuantity(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasLegalStatusOfSupply()) {
openArray("legalStatusOfSupply");
for (PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent e : element.getLegalStatusOfSupply())
composePackagedProductDefinitionLegalStatusOfSupplyComponent(null, e);
closeArray();
};
if (element.hasMarketingStatus()) {
openArray("marketingStatus");
for (MarketingStatus e : element.getMarketingStatus())
composeMarketingStatus(null, e);
closeArray();
};
if (element.hasCopackagedIndicatorElement()) {
composeBooleanCore("copackagedIndicator", element.getCopackagedIndicatorElement(), false);
composeBooleanExtras("copackagedIndicator", element.getCopackagedIndicatorElement(), false);
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
};
if (element.hasAttachedDocument()) {
openArray("attachedDocument");
for (Reference e : element.getAttachedDocument())
composeReference(null, e);
closeArray();
};
if (element.hasPackaging()) {
composePackagedProductDefinitionPackagingComponent("packaging", element.getPackaging());
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent e : element.getCharacteristic())
composePackagedProductDefinitionPackagingPropertyComponent(null, e);
closeArray();
};
}
protected void composePackagedProductDefinitionLegalStatusOfSupplyComponent(String name, PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent element) throws IOException {
if (element != null) {
open(name);
composePackagedProductDefinitionLegalStatusOfSupplyComponentProperties(element);
close();
}
}
protected void composePackagedProductDefinitionLegalStatusOfSupplyComponentProperties(PackagedProductDefinition.PackagedProductDefinitionLegalStatusOfSupplyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasJurisdiction()) {
composeCodeableConcept("jurisdiction", element.getJurisdiction());
}
}
protected void composePackagedProductDefinitionPackagingComponent(String name, PackagedProductDefinition.PackagedProductDefinitionPackagingComponent element) throws IOException {
if (element != null) {
open(name);
composePackagedProductDefinitionPackagingComponentProperties(element);
close();
}
}
protected void composePackagedProductDefinitionPackagingComponentProperties(PackagedProductDefinition.PackagedProductDefinitionPackagingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasComponentPartElement()) {
composeBooleanCore("componentPart", element.getComponentPartElement(), false);
composeBooleanExtras("componentPart", element.getComponentPartElement(), false);
}
if (element.hasQuantityElement()) {
composeIntegerCore("quantity", element.getQuantityElement(), false);
composeIntegerExtras("quantity", element.getQuantityElement(), false);
}
if (element.hasMaterial()) {
openArray("material");
for (CodeableConcept e : element.getMaterial())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAlternateMaterial()) {
openArray("alternateMaterial");
for (CodeableConcept e : element.getAlternateMaterial())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasShelfLifeStorage()) {
openArray("shelfLifeStorage");
for (ProductShelfLife e : element.getShelfLifeStorage())
composeProductShelfLife(null, e);
closeArray();
};
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent e : element.getProperty())
composePackagedProductDefinitionPackagingPropertyComponent(null, e);
closeArray();
};
if (element.hasContainedItem()) {
openArray("containedItem");
for (PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent e : element.getContainedItem())
composePackagedProductDefinitionPackagingContainedItemComponent(null, e);
closeArray();
};
if (element.hasPackaging()) {
openArray("packaging");
for (PackagedProductDefinition.PackagedProductDefinitionPackagingComponent e : element.getPackaging())
composePackagedProductDefinitionPackagingComponent(null, e);
closeArray();
};
}
protected void composePackagedProductDefinitionPackagingPropertyComponent(String name, PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composePackagedProductDefinitionPackagingPropertyComponentProperties(element);
close();
}
}
protected void composePackagedProductDefinitionPackagingPropertyComponentProperties(PackagedProductDefinition.PackagedProductDefinitionPackagingPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composePackagedProductDefinitionPackagingContainedItemComponent(String name, PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent element) throws IOException {
if (element != null) {
open(name);
composePackagedProductDefinitionPackagingContainedItemComponentProperties(element);
close();
}
}
protected void composePackagedProductDefinitionPackagingContainedItemComponentProperties(PackagedProductDefinition.PackagedProductDefinitionPackagingContainedItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeParameters(String name, Parameters element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeParametersProperties(element);
}
}
protected void composeParametersProperties(Parameters element) throws IOException {
composeResourceProperties(element);
if (element.hasParameter()) {
openArray("parameter");
for (Parameters.ParametersParameterComponent e : element.getParameter())
composeParametersParameterComponent(null, e);
closeArray();
};
}
protected void composeParametersParameterComponent(String name, Parameters.ParametersParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeParametersParameterComponentProperties(element);
close();
}
}
protected void composeParametersParameterComponentProperties(Parameters.ParametersParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasResource()) {
open("resource");
composeResource(element.getResource());
close();
}
if (element.hasPart()) {
openArray("part");
for (Parameters.ParametersParameterComponent e : element.getPart())
composeParametersParameterComponent(null, e);
closeArray();
};
}
protected void composePatient(String name, Patient element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePatientProperties(element);
}
}
protected void composePatientProperties(Patient element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasName()) {
openArray("name");
for (HumanName e : element.getName())
composeHumanName(null, e);
closeArray();
};
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasGenderElement()) {
composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
}
if (element.hasBirthDateElement()) {
composeDateCore("birthDate", element.getBirthDateElement(), false);
composeDateExtras("birthDate", element.getBirthDateElement(), false);
}
if (element.hasDeceased()) {
composeType("deceased", element.getDeceased());
}
if (element.hasAddress()) {
openArray("address");
for (Address e : element.getAddress())
composeAddress(null, e);
closeArray();
};
if (element.hasMaritalStatus()) {
composeCodeableConcept("maritalStatus", element.getMaritalStatus());
}
if (element.hasMultipleBirth()) {
composeType("multipleBirth", element.getMultipleBirth());
}
if (element.hasPhoto()) {
openArray("photo");
for (Attachment e : element.getPhoto())
composeAttachment(null, e);
closeArray();
};
if (element.hasContact()) {
openArray("contact");
for (Patient.ContactComponent e : element.getContact())
composeContactComponent(null, e);
closeArray();
};
if (element.hasCommunication()) {
openArray("communication");
for (Patient.PatientCommunicationComponent e : element.getCommunication())
composePatientCommunicationComponent(null, e);
closeArray();
};
if (element.hasGeneralPractitioner()) {
openArray("generalPractitioner");
for (Reference e : element.getGeneralPractitioner())
composeReference(null, e);
closeArray();
};
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasLink()) {
openArray("link");
for (Patient.PatientLinkComponent e : element.getLink())
composePatientLinkComponent(null, e);
closeArray();
};
}
protected void composeContactComponent(String name, Patient.ContactComponent element) throws IOException {
if (element != null) {
open(name);
composeContactComponentProperties(element);
close();
}
}
protected void composeContactComponentProperties(Patient.ContactComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRelationship()) {
openArray("relationship");
for (CodeableConcept e : element.getRelationship())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasName()) {
composeHumanName("name", element.getName());
}
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasAddress()) {
composeAddress("address", element.getAddress());
}
if (element.hasGenderElement()) {
composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
}
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composePatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element) throws IOException {
if (element != null) {
open(name);
composePatientCommunicationComponentProperties(element);
close();
}
}
protected void composePatientCommunicationComponentProperties(Patient.PatientCommunicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
}
protected void composePatientLinkComponent(String name, Patient.PatientLinkComponent element) throws IOException {
if (element != null) {
open(name);
composePatientLinkComponentProperties(element);
close();
}
}
protected void composePatientLinkComponentProperties(Patient.PatientLinkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOther()) {
composeReference("other", element.getOther());
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory(), false);
}
}
protected void composePaymentNotice(String name, PaymentNotice element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePaymentNoticeProperties(element);
}
}
protected void composePaymentNoticeProperties(PaymentNotice element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasResponse()) {
composeReference("response", element.getResponse());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasReporter()) {
composeReference("reporter", element.getReporter());
}
if (element.hasPayment()) {
composeReference("payment", element.getPayment());
}
if (element.hasPaymentDateElement()) {
composeDateCore("paymentDate", element.getPaymentDateElement(), false);
composeDateExtras("paymentDate", element.getPaymentDateElement(), false);
}
if (element.hasPayee()) {
composeReference("payee", element.getPayee());
}
if (element.hasRecipient()) {
composeReference("recipient", element.getRecipient());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasPaymentStatus()) {
composeCodeableConcept("paymentStatus", element.getPaymentStatus());
}
}
protected void composePaymentReconciliation(String name, PaymentReconciliation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePaymentReconciliationProperties(element);
}
}
protected void composePaymentReconciliationProperties(PaymentReconciliation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasKind()) {
composeCodeableConcept("kind", element.getKind());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasEnterer()) {
composeReference("enterer", element.getEnterer());
}
if (element.hasIssuerType()) {
composeCodeableConcept("issuerType", element.getIssuerType());
}
if (element.hasPaymentIssuer()) {
composeReference("paymentIssuer", element.getPaymentIssuer());
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasRequestor()) {
composeReference("requestor", element.getRequestor());
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new PaymentReconciliation.PaymentOutcomeEnumFactory(), false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new PaymentReconciliation.PaymentOutcomeEnumFactory(), false);
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasCardBrandElement()) {
composeStringCore("cardBrand", element.getCardBrandElement(), false);
composeStringExtras("cardBrand", element.getCardBrandElement(), false);
}
if (element.hasAccountNumberElement()) {
composeStringCore("accountNumber", element.getAccountNumberElement(), false);
composeStringExtras("accountNumber", element.getAccountNumberElement(), false);
}
if (element.hasExpirationDateElement()) {
composeDateCore("expirationDate", element.getExpirationDateElement(), false);
composeDateExtras("expirationDate", element.getExpirationDateElement(), false);
}
if (element.hasProcessorElement()) {
composeStringCore("processor", element.getProcessorElement(), false);
composeStringExtras("processor", element.getProcessorElement(), false);
}
if (element.hasReferenceNumberElement()) {
composeStringCore("referenceNumber", element.getReferenceNumberElement(), false);
composeStringExtras("referenceNumber", element.getReferenceNumberElement(), false);
}
if (element.hasAuthorizationElement()) {
composeStringCore("authorization", element.getAuthorizationElement(), false);
composeStringExtras("authorization", element.getAuthorizationElement(), false);
}
if (element.hasTenderedAmount()) {
composeMoney("tenderedAmount", element.getTenderedAmount());
}
if (element.hasReturnedAmount()) {
composeMoney("returnedAmount", element.getReturnedAmount());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasPaymentIdentifier()) {
composeIdentifier("paymentIdentifier", element.getPaymentIdentifier());
}
if (element.hasAllocation()) {
openArray("allocation");
for (PaymentReconciliation.PaymentReconciliationAllocationComponent e : element.getAllocation())
composePaymentReconciliationAllocationComponent(null, e);
closeArray();
};
if (element.hasFormCode()) {
composeCodeableConcept("formCode", element.getFormCode());
}
if (element.hasProcessNote()) {
openArray("processNote");
for (PaymentReconciliation.NotesComponent e : element.getProcessNote())
composeNotesComponent(null, e);
closeArray();
};
}
protected void composePaymentReconciliationAllocationComponent(String name, PaymentReconciliation.PaymentReconciliationAllocationComponent element) throws IOException {
if (element != null) {
open(name);
composePaymentReconciliationAllocationComponentProperties(element);
close();
}
}
protected void composePaymentReconciliationAllocationComponentProperties(PaymentReconciliation.PaymentReconciliationAllocationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasPredecessor()) {
composeIdentifier("predecessor", element.getPredecessor());
}
if (element.hasTarget()) {
composeReference("target", element.getTarget());
}
if (element.hasTargetItem()) {
composeType("targetItem", element.getTargetItem());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasAccount()) {
composeReference("account", element.getAccount());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubmitter()) {
composeReference("submitter", element.getSubmitter());
}
if (element.hasResponse()) {
composeReference("response", element.getResponse());
}
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasResponsible()) {
composeReference("responsible", element.getResponsible());
}
if (element.hasPayee()) {
composeReference("payee", element.getPayee());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composeNotesComponent(String name, PaymentReconciliation.NotesComponent element) throws IOException {
if (element != null) {
open(name);
composeNotesComponentProperties(element);
close();
}
}
protected void composeNotesComponentProperties(PaymentReconciliation.NotesComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new PaymentReconciliation.NoteTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new PaymentReconciliation.NoteTypeEnumFactory(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
}
protected void composePermission(String name, Permission element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePermissionProperties(element);
}
}
protected void composePermissionProperties(Permission element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Permission.PermissionStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Permission.PermissionStatusEnumFactory(), false);
}
if (element.hasAsserter()) {
composeReference("asserter", element.getAsserter());
}
if (element.hasDate()) {
if (anyHasValue(element.getDate())) {
openArray("date");
for (DateTimeType e : element.getDate())
composeDateTimeCore(null, e, e != element.getDate().get(element.getDate().size()-1));
closeArray();
}
if (anyHasExtras(element.getDate())) {
openArray("_date");
for (DateTimeType e : element.getDate())
composeDateTimeExtras(null, e, true);
closeArray();
}
};
if (element.hasValidity()) {
composePeriod("validity", element.getValidity());
}
if (element.hasJustification()) {
composePermissionJustificationComponent("justification", element.getJustification());
}
if (element.hasCombiningElement()) {
composeEnumerationCore("combining", element.getCombiningElement(), new Permission.PermissionRuleCombiningEnumFactory(), false);
composeEnumerationExtras("combining", element.getCombiningElement(), new Permission.PermissionRuleCombiningEnumFactory(), false);
}
if (element.hasRule()) {
openArray("rule");
for (Permission.RuleComponent e : element.getRule())
composeRuleComponent(null, e);
closeArray();
};
}
protected void composePermissionJustificationComponent(String name, Permission.PermissionJustificationComponent element) throws IOException {
if (element != null) {
open(name);
composePermissionJustificationComponentProperties(element);
close();
}
}
protected void composePermissionJustificationComponentProperties(Permission.PermissionJustificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasBasis()) {
openArray("basis");
for (CodeableConcept e : element.getBasis())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasEvidence()) {
openArray("evidence");
for (Reference e : element.getEvidence())
composeReference(null, e);
closeArray();
};
}
protected void composeRuleComponent(String name, Permission.RuleComponent element) throws IOException {
if (element != null) {
open(name);
composeRuleComponentProperties(element);
close();
}
}
protected void composeRuleComponentProperties(Permission.RuleComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ConsentProvisionTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ConsentProvisionTypeEnumFactory(), false);
}
if (element.hasData()) {
openArray("data");
for (Permission.RuleDataComponent e : element.getData())
composeRuleDataComponent(null, e);
closeArray();
};
if (element.hasActivity()) {
openArray("activity");
for (Permission.RuleActivityComponent e : element.getActivity())
composeRuleActivityComponent(null, e);
closeArray();
};
if (element.hasLimit()) {
openArray("limit");
for (CodeableConcept e : element.getLimit())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeRuleDataComponent(String name, Permission.RuleDataComponent element) throws IOException {
if (element != null) {
open(name);
composeRuleDataComponentProperties(element);
close();
}
}
protected void composeRuleDataComponentProperties(Permission.RuleDataComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasResource()) {
openArray("resource");
for (Permission.RuleDataResourceComponent e : element.getResource())
composeRuleDataResourceComponent(null, e);
closeArray();
};
if (element.hasSecurity()) {
openArray("security");
for (Coding e : element.getSecurity())
composeCoding(null, e);
closeArray();
};
if (element.hasPeriod()) {
openArray("period");
for (Period e : element.getPeriod())
composePeriod(null, e);
closeArray();
};
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composeRuleDataResourceComponent(String name, Permission.RuleDataResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeRuleDataResourceComponentProperties(element);
close();
}
}
protected void composeRuleDataResourceComponentProperties(Permission.RuleDataResourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMeaningElement()) {
composeEnumerationCore("meaning", element.getMeaningElement(), new Enumerations.ConsentDataMeaningEnumFactory(), false);
composeEnumerationExtras("meaning", element.getMeaningElement(), new Enumerations.ConsentDataMeaningEnumFactory(), false);
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeRuleActivityComponent(String name, Permission.RuleActivityComponent element) throws IOException {
if (element != null) {
open(name);
composeRuleActivityComponentProperties(element);
close();
}
}
protected void composeRuleActivityComponentProperties(Permission.RuleActivityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasActor()) {
openArray("actor");
for (Reference e : element.getActor())
composeReference(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (CodeableConcept e : element.getAction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurpose()) {
openArray("purpose");
for (CodeableConcept e : element.getPurpose())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composePerson(String name, Person element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePersonProperties(element);
}
}
protected void composePersonProperties(Person element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasName()) {
openArray("name");
for (HumanName e : element.getName())
composeHumanName(null, e);
closeArray();
};
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasGenderElement()) {
composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
}
if (element.hasBirthDateElement()) {
composeDateCore("birthDate", element.getBirthDateElement(), false);
composeDateExtras("birthDate", element.getBirthDateElement(), false);
}
if (element.hasDeceased()) {
composeType("deceased", element.getDeceased());
}
if (element.hasAddress()) {
openArray("address");
for (Address e : element.getAddress())
composeAddress(null, e);
closeArray();
};
if (element.hasMaritalStatus()) {
composeCodeableConcept("maritalStatus", element.getMaritalStatus());
}
if (element.hasPhoto()) {
openArray("photo");
for (Attachment e : element.getPhoto())
composeAttachment(null, e);
closeArray();
};
if (element.hasCommunication()) {
openArray("communication");
for (Person.PersonCommunicationComponent e : element.getCommunication())
composePersonCommunicationComponent(null, e);
closeArray();
};
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasLink()) {
openArray("link");
for (Person.PersonLinkComponent e : element.getLink())
composePersonLinkComponent(null, e);
closeArray();
};
}
protected void composePersonCommunicationComponent(String name, Person.PersonCommunicationComponent element) throws IOException {
if (element != null) {
open(name);
composePersonCommunicationComponentProperties(element);
close();
}
}
protected void composePersonCommunicationComponentProperties(Person.PersonCommunicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
}
protected void composePersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException {
if (element != null) {
open(name);
composePersonLinkComponentProperties(element);
close();
}
}
protected void composePersonLinkComponentProperties(Person.PersonLinkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTarget()) {
composeReference("target", element.getTarget());
}
if (element.hasAssuranceElement()) {
composeEnumerationCore("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory(), false);
composeEnumerationExtras("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory(), false);
}
}
protected void composePlanDefinition(String name, PlanDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePlanDefinitionProperties(element);
}
}
protected void composePlanDefinitionProperties(PlanDefinition element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasSubtitleElement()) {
composeStringCore("subtitle", element.getSubtitleElement(), false);
composeStringExtras("subtitle", element.getSubtitleElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasUsageElement()) {
composeMarkdownCore("usage", element.getUsageElement(), false);
composeMarkdownExtras("usage", element.getUsageElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasLibrary()) {
if (anyHasValue(element.getLibrary())) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, e != element.getLibrary().get(element.getLibrary().size()-1));
closeArray();
}
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasGoal()) {
openArray("goal");
for (PlanDefinition.PlanDefinitionGoalComponent e : element.getGoal())
composePlanDefinitionGoalComponent(null, e);
closeArray();
};
if (element.hasActor()) {
openArray("actor");
for (PlanDefinition.PlanDefinitionActorComponent e : element.getActor())
composePlanDefinitionActorComponent(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction())
composePlanDefinitionActionComponent(null, e);
closeArray();
};
if (element.hasAsNeeded()) {
composeType("asNeeded", element.getAsNeeded());
}
}
protected void composePlanDefinitionGoalComponent(String name, PlanDefinition.PlanDefinitionGoalComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionGoalComponentProperties(element);
close();
}
}
protected void composePlanDefinitionGoalComponentProperties(PlanDefinition.PlanDefinitionGoalComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasDescription()) {
composeCodeableConcept("description", element.getDescription());
}
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasStart()) {
composeCodeableConcept("start", element.getStart());
}
if (element.hasAddresses()) {
openArray("addresses");
for (CodeableConcept e : element.getAddresses())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDocumentation()) {
openArray("documentation");
for (RelatedArtifact e : element.getDocumentation())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasTarget()) {
openArray("target");
for (PlanDefinition.PlanDefinitionGoalTargetComponent e : element.getTarget())
composePlanDefinitionGoalTargetComponent(null, e);
closeArray();
};
}
protected void composePlanDefinitionGoalTargetComponent(String name, PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionGoalTargetComponentProperties(element);
close();
}
}
protected void composePlanDefinitionGoalTargetComponentProperties(PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMeasure()) {
composeCodeableConcept("measure", element.getMeasure());
}
if (element.hasDetail()) {
composeType("detail", element.getDetail());
}
if (element.hasDue()) {
composeDuration("due", element.getDue());
}
}
protected void composePlanDefinitionActorComponent(String name, PlanDefinition.PlanDefinitionActorComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActorComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActorComponentProperties(PlanDefinition.PlanDefinitionActorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasOption()) {
openArray("option");
for (PlanDefinition.PlanDefinitionActorOptionComponent e : element.getOption())
composePlanDefinitionActorOptionComponent(null, e);
closeArray();
};
}
protected void composePlanDefinitionActorOptionComponent(String name, PlanDefinition.PlanDefinitionActorOptionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActorOptionComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActorOptionComponentProperties(PlanDefinition.PlanDefinitionActorOptionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
}
if (element.hasTypeCanonicalElement()) {
composeCanonicalCore("typeCanonical", element.getTypeCanonicalElement(), false);
composeCanonicalExtras("typeCanonical", element.getTypeCanonicalElement(), false);
}
if (element.hasTypeReference()) {
composeReference("typeReference", element.getTypeReference());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composePlanDefinitionActionComponent(String name, PlanDefinition.PlanDefinitionActionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionComponentProperties(PlanDefinition.PlanDefinitionActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasPrefixElement()) {
composeStringCore("prefix", element.getPrefixElement(), false);
composeStringExtras("prefix", element.getPrefixElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTextEquivalentElement()) {
composeMarkdownCore("textEquivalent", element.getTextEquivalentElement(), false);
composeMarkdownExtras("textEquivalent", element.getTextEquivalentElement(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDocumentation()) {
openArray("documentation");
for (RelatedArtifact e : element.getDocumentation())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasGoalId()) {
if (anyHasValue(element.getGoalId())) {
openArray("goalId");
for (IdType e : element.getGoalId())
composeIdCore(null, e, e != element.getGoalId().get(element.getGoalId().size()-1));
closeArray();
}
if (anyHasExtras(element.getGoalId())) {
openArray("_goalId");
for (IdType e : element.getGoalId())
composeIdExtras(null, e, true);
closeArray();
}
};
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasTrigger()) {
openArray("trigger");
for (TriggerDefinition e : element.getTrigger())
composeTriggerDefinition(null, e);
closeArray();
};
if (element.hasCondition()) {
openArray("condition");
for (PlanDefinition.PlanDefinitionActionConditionComponent e : element.getCondition())
composePlanDefinitionActionConditionComponent(null, e);
closeArray();
};
if (element.hasInput()) {
openArray("input");
for (PlanDefinition.PlanDefinitionActionInputComponent e : element.getInput())
composePlanDefinitionActionInputComponent(null, e);
closeArray();
};
if (element.hasOutput()) {
openArray("output");
for (PlanDefinition.PlanDefinitionActionOutputComponent e : element.getOutput())
composePlanDefinitionActionOutputComponent(null, e);
closeArray();
};
if (element.hasRelatedAction()) {
openArray("relatedAction");
for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction())
composePlanDefinitionActionRelatedActionComponent(null, e);
closeArray();
};
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasLocation()) {
composeCodeableReference("location", element.getLocation());
}
if (element.hasParticipant()) {
openArray("participant");
for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant())
composePlanDefinitionActionParticipantComponent(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGroupingBehaviorElement()) {
composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(), new Enumerations.ActionGroupingBehaviorEnumFactory(), false);
composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(), new Enumerations.ActionGroupingBehaviorEnumFactory(), false);
}
if (element.hasSelectionBehaviorElement()) {
composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(), new Enumerations.ActionSelectionBehaviorEnumFactory(), false);
composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(), new Enumerations.ActionSelectionBehaviorEnumFactory(), false);
}
if (element.hasRequiredBehaviorElement()) {
composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(), new Enumerations.ActionRequiredBehaviorEnumFactory(), false);
composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(), new Enumerations.ActionRequiredBehaviorEnumFactory(), false);
}
if (element.hasPrecheckBehaviorElement()) {
composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(), new Enumerations.ActionPrecheckBehaviorEnumFactory(), false);
composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(), new Enumerations.ActionPrecheckBehaviorEnumFactory(), false);
}
if (element.hasCardinalityBehaviorElement()) {
composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(), new Enumerations.ActionCardinalityBehaviorEnumFactory(), false);
composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(), new Enumerations.ActionCardinalityBehaviorEnumFactory(), false);
}
if (element.hasDefinition()) {
composeType("definition", element.getDefinition());
}
if (element.hasTransformElement()) {
composeCanonicalCore("transform", element.getTransformElement(), false);
composeCanonicalExtras("transform", element.getTransformElement(), false);
}
if (element.hasDynamicValue()) {
openArray("dynamicValue");
for (PlanDefinition.PlanDefinitionActionDynamicValueComponent e : element.getDynamicValue())
composePlanDefinitionActionDynamicValueComponent(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction())
composePlanDefinitionActionComponent(null, e);
closeArray();
};
}
protected void composePlanDefinitionActionConditionComponent(String name, PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionConditionComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionConditionComponentProperties(PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new Enumerations.ActionConditionKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new Enumerations.ActionConditionKindEnumFactory(), false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composePlanDefinitionActionInputComponent(String name, PlanDefinition.PlanDefinitionActionInputComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionInputComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionInputComponentProperties(PlanDefinition.PlanDefinitionActionInputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasRequirement()) {
composeDataRequirement("requirement", element.getRequirement());
}
if (element.hasRelatedDataElement()) {
composeIdCore("relatedData", element.getRelatedDataElement(), false);
composeIdExtras("relatedData", element.getRelatedDataElement(), false);
}
}
protected void composePlanDefinitionActionOutputComponent(String name, PlanDefinition.PlanDefinitionActionOutputComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionOutputComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionOutputComponentProperties(PlanDefinition.PlanDefinitionActionOutputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasRequirement()) {
composeDataRequirement("requirement", element.getRequirement());
}
if (element.hasRelatedDataElement()) {
composeStringCore("relatedData", element.getRelatedDataElement(), false);
composeStringExtras("relatedData", element.getRelatedDataElement(), false);
}
}
protected void composePlanDefinitionActionRelatedActionComponent(String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionRelatedActionComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionRelatedActionComponentProperties(PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTargetIdElement()) {
composeIdCore("targetId", element.getTargetIdElement(), false);
composeIdExtras("targetId", element.getTargetIdElement(), false);
}
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
}
if (element.hasEndRelationshipElement()) {
composeEnumerationCore("endRelationship", element.getEndRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("endRelationship", element.getEndRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
}
if (element.hasOffset()) {
composeType("offset", element.getOffset());
}
}
protected void composePlanDefinitionActionParticipantComponent(String name, PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionParticipantComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionParticipantComponentProperties(PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasActorIdElement()) {
composeStringCore("actorId", element.getActorIdElement(), false);
composeStringExtras("actorId", element.getActorIdElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
}
if (element.hasTypeCanonicalElement()) {
composeCanonicalCore("typeCanonical", element.getTypeCanonicalElement(), false);
composeCanonicalExtras("typeCanonical", element.getTypeCanonicalElement(), false);
}
if (element.hasTypeReference()) {
composeReference("typeReference", element.getTypeReference());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
}
protected void composePlanDefinitionActionDynamicValueComponent(String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionActionDynamicValueComponentProperties(element);
close();
}
}
protected void composePlanDefinitionActionDynamicValueComponentProperties(PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composePractitioner(String name, Practitioner element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePractitionerProperties(element);
}
}
protected void composePractitionerProperties(Practitioner element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasName()) {
openArray("name");
for (HumanName e : element.getName())
composeHumanName(null, e);
closeArray();
};
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasGenderElement()) {
composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
}
if (element.hasBirthDateElement()) {
composeDateCore("birthDate", element.getBirthDateElement(), false);
composeDateExtras("birthDate", element.getBirthDateElement(), false);
}
if (element.hasDeceased()) {
composeType("deceased", element.getDeceased());
}
if (element.hasAddress()) {
openArray("address");
for (Address e : element.getAddress())
composeAddress(null, e);
closeArray();
};
if (element.hasPhoto()) {
openArray("photo");
for (Attachment e : element.getPhoto())
composeAttachment(null, e);
closeArray();
};
if (element.hasQualification()) {
openArray("qualification");
for (Practitioner.PractitionerQualificationComponent e : element.getQualification())
composePractitionerQualificationComponent(null, e);
closeArray();
};
if (element.hasCommunication()) {
openArray("communication");
for (Practitioner.PractitionerCommunicationComponent e : element.getCommunication())
composePractitionerCommunicationComponent(null, e);
closeArray();
};
}
protected void composePractitionerQualificationComponent(String name, Practitioner.PractitionerQualificationComponent element) throws IOException {
if (element != null) {
open(name);
composePractitionerQualificationComponentProperties(element);
close();
}
}
protected void composePractitionerQualificationComponentProperties(Practitioner.PractitionerQualificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasIssuer()) {
composeReference("issuer", element.getIssuer());
}
}
protected void composePractitionerCommunicationComponent(String name, Practitioner.PractitionerCommunicationComponent element) throws IOException {
if (element != null) {
open(name);
composePractitionerCommunicationComponentProperties(element);
close();
}
}
protected void composePractitionerCommunicationComponentProperties(Practitioner.PractitionerCommunicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
}
protected void composePractitionerRole(String name, PractitionerRole element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePractitionerRoleProperties(element);
}
}
protected void composePractitionerRoleProperties(PractitionerRole element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasPractitioner()) {
composeReference("practitioner", element.getPractitioner());
}
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasLocation()) {
openArray("location");
for (Reference e : element.getLocation())
composeReference(null, e);
closeArray();
};
if (element.hasHealthcareService()) {
openArray("healthcareService");
for (Reference e : element.getHealthcareService())
composeReference(null, e);
closeArray();
};
if (element.hasContact()) {
openArray("contact");
for (ExtendedContactDetail e : element.getContact())
composeExtendedContactDetail(null, e);
closeArray();
};
if (element.hasCharacteristic()) {
openArray("characteristic");
for (CodeableConcept e : element.getCharacteristic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCommunication()) {
openArray("communication");
for (CodeableConcept e : element.getCommunication())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAvailability()) {
openArray("availability");
for (Availability e : element.getAvailability())
composeAvailability(null, e);
closeArray();
};
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
};
}
protected void composeProcedure(String name, Procedure element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeProcedureProperties(element);
}
}
protected void composeProcedureProperties(Procedure element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.EventStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasFocus()) {
composeReference("focus", element.getFocus());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasRecordedElement()) {
composeDateTimeCore("recorded", element.getRecordedElement(), false);
composeDateTimeExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasReported()) {
composeType("reported", element.getReported());
}
if (element.hasPerformer()) {
openArray("performer");
for (Procedure.ProcedurePerformerComponent e : element.getPerformer())
composeProcedurePerformerComponent(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
openArray("bodySite");
for (CodeableConcept e : element.getBodySite())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasOutcome()) {
composeCodeableConcept("outcome", element.getOutcome());
}
if (element.hasReport()) {
openArray("report");
for (Reference e : element.getReport())
composeReference(null, e);
closeArray();
};
if (element.hasComplication()) {
openArray("complication");
for (CodeableReference e : element.getComplication())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasFollowUp()) {
openArray("followUp");
for (CodeableConcept e : element.getFollowUp())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasFocalDevice()) {
openArray("focalDevice");
for (Procedure.ProcedureFocalDeviceComponent e : element.getFocalDevice())
composeProcedureFocalDeviceComponent(null, e);
closeArray();
};
if (element.hasUsed()) {
openArray("used");
for (CodeableReference e : element.getUsed())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Reference e : element.getSupportingInfo())
composeReference(null, e);
closeArray();
};
}
protected void composeProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeProcedurePerformerComponentProperties(element);
close();
}
}
protected void composeProcedurePerformerComponentProperties(Procedure.ProcedurePerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeProcedureFocalDeviceComponent(String name, Procedure.ProcedureFocalDeviceComponent element) throws IOException {
if (element != null) {
open(name);
composeProcedureFocalDeviceComponentProperties(element);
close();
}
}
protected void composeProcedureFocalDeviceComponentProperties(Procedure.ProcedureFocalDeviceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAction()) {
composeCodeableConcept("action", element.getAction());
}
if (element.hasManipulated()) {
composeReference("manipulated", element.getManipulated());
}
}
protected void composeProvenance(String name, Provenance element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeProvenanceProperties(element);
}
}
protected void composeProvenanceProperties(Provenance element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasTarget()) {
openArray("target");
for (Reference e : element.getTarget())
composeReference(null, e);
closeArray();
};
if (element.hasOccurred()) {
composeType("occurred", element.getOccurred());
}
if (element.hasRecordedElement()) {
composeInstantCore("recorded", element.getRecordedElement(), false);
composeInstantExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasPolicy()) {
if (anyHasValue(element.getPolicy())) {
openArray("policy");
for (UriType e : element.getPolicy())
composeUriCore(null, e, e != element.getPolicy().get(element.getPolicy().size()-1));
closeArray();
}
if (anyHasExtras(element.getPolicy())) {
openArray("_policy");
for (UriType e : element.getPolicy())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasAuthorization()) {
openArray("authorization");
for (CodeableReference e : element.getAuthorization())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasActivity()) {
composeCodeableConcept("activity", element.getActivity());
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasAgent()) {
openArray("agent");
for (Provenance.ProvenanceAgentComponent e : element.getAgent())
composeProvenanceAgentComponent(null, e);
closeArray();
};
if (element.hasEntity()) {
openArray("entity");
for (Provenance.ProvenanceEntityComponent e : element.getEntity())
composeProvenanceEntityComponent(null, e);
closeArray();
};
if (element.hasSignature()) {
openArray("signature");
for (Signature e : element.getSignature())
composeSignature(null, e);
closeArray();
};
}
protected void composeProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element) throws IOException {
if (element != null) {
open(name);
composeProvenanceAgentComponentProperties(element);
close();
}
}
protected void composeProvenanceAgentComponentProperties(Provenance.ProvenanceAgentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRole()) {
openArray("role");
for (CodeableConcept e : element.getRole())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasWho()) {
composeReference("who", element.getWho());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
}
protected void composeProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element) throws IOException {
if (element != null) {
open(name);
composeProvenanceEntityComponentProperties(element);
close();
}
}
protected void composeProvenanceEntityComponentProperties(Provenance.ProvenanceEntityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRoleElement()) {
composeEnumerationCore("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory(), false);
composeEnumerationExtras("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory(), false);
}
if (element.hasWhat()) {
composeReference("what", element.getWhat());
}
if (element.hasAgent()) {
openArray("agent");
for (Provenance.ProvenanceAgentComponent e : element.getAgent())
composeProvenanceAgentComponent(null, e);
closeArray();
};
}
protected void composeQuestionnaire(String name, Questionnaire element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeQuestionnaireProperties(element);
}
}
protected void composeQuestionnaireProperties(Questionnaire element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDerivedFrom()) {
if (anyHasValue(element.getDerivedFrom())) {
openArray("derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalCore(null, e, e != element.getDerivedFrom().get(element.getDerivedFrom().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFrom())) {
openArray("_derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasSubjectType()) {
if (anyHasValue(element.getSubjectType())) {
openArray("subjectType");
for (CodeType e : element.getSubjectType())
composeCodeCore(null, e, e != element.getSubjectType().get(element.getSubjectType().size()-1));
closeArray();
}
if (anyHasExtras(element.getSubjectType())) {
openArray("_subjectType");
for (CodeType e : element.getSubjectType())
composeCodeExtras(null, e, true);
closeArray();
}
};
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasCode()) {
openArray("code");
for (Coding e : element.getCode())
composeCoding(null, e);
closeArray();
};
if (element.hasItem()) {
openArray("item");
for (Questionnaire.QuestionnaireItemComponent e : element.getItem())
composeQuestionnaireItemComponent(null, e);
closeArray();
};
}
protected void composeQuestionnaireItemComponent(String name, Questionnaire.QuestionnaireItemComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireItemComponentProperties(element);
close();
}
}
protected void composeQuestionnaireItemComponentProperties(Questionnaire.QuestionnaireItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasDefinitionElement()) {
composeUriCore("definition", element.getDefinitionElement(), false);
composeUriExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasCode()) {
openArray("code");
for (Coding e : element.getCode())
composeCoding(null, e);
closeArray();
};
if (element.hasPrefixElement()) {
composeStringCore("prefix", element.getPrefixElement(), false);
composeStringExtras("prefix", element.getPrefixElement(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory(), false);
}
if (element.hasEnableWhen()) {
openArray("enableWhen");
for (Questionnaire.QuestionnaireItemEnableWhenComponent e : element.getEnableWhen())
composeQuestionnaireItemEnableWhenComponent(null, e);
closeArray();
};
if (element.hasEnableBehaviorElement()) {
composeEnumerationCore("enableBehavior", element.getEnableBehaviorElement(), new Questionnaire.EnableWhenBehaviorEnumFactory(), false);
composeEnumerationExtras("enableBehavior", element.getEnableBehaviorElement(), new Questionnaire.EnableWhenBehaviorEnumFactory(), false);
}
if (element.hasDisabledDisplayElement()) {
composeEnumerationCore("disabledDisplay", element.getDisabledDisplayElement(), new Questionnaire.QuestionnaireItemDisabledDisplayEnumFactory(), false);
composeEnumerationExtras("disabledDisplay", element.getDisabledDisplayElement(), new Questionnaire.QuestionnaireItemDisabledDisplayEnumFactory(), false);
}
if (element.hasRequiredElement()) {
composeBooleanCore("required", element.getRequiredElement(), false);
composeBooleanExtras("required", element.getRequiredElement(), false);
}
if (element.hasRepeatsElement()) {
composeBooleanCore("repeats", element.getRepeatsElement(), false);
composeBooleanExtras("repeats", element.getRepeatsElement(), false);
}
if (element.hasReadOnlyElement()) {
composeBooleanCore("readOnly", element.getReadOnlyElement(), false);
composeBooleanExtras("readOnly", element.getReadOnlyElement(), false);
}
if (element.hasMaxLengthElement()) {
composeIntegerCore("maxLength", element.getMaxLengthElement(), false);
composeIntegerExtras("maxLength", element.getMaxLengthElement(), false);
}
if (element.hasAnswerConstraintElement()) {
composeEnumerationCore("answerConstraint", element.getAnswerConstraintElement(), new Questionnaire.QuestionnaireAnswerConstraintEnumFactory(), false);
composeEnumerationExtras("answerConstraint", element.getAnswerConstraintElement(), new Questionnaire.QuestionnaireAnswerConstraintEnumFactory(), false);
}
if (element.hasAnswerValueSetElement()) {
composeCanonicalCore("answerValueSet", element.getAnswerValueSetElement(), false);
composeCanonicalExtras("answerValueSet", element.getAnswerValueSetElement(), false);
}
if (element.hasAnswerOption()) {
openArray("answerOption");
for (Questionnaire.QuestionnaireItemAnswerOptionComponent e : element.getAnswerOption())
composeQuestionnaireItemAnswerOptionComponent(null, e);
closeArray();
};
if (element.hasInitial()) {
openArray("initial");
for (Questionnaire.QuestionnaireItemInitialComponent e : element.getInitial())
composeQuestionnaireItemInitialComponent(null, e);
closeArray();
};
if (element.hasItem()) {
openArray("item");
for (Questionnaire.QuestionnaireItemComponent e : element.getItem())
composeQuestionnaireItemComponent(null, e);
closeArray();
};
}
protected void composeQuestionnaireItemEnableWhenComponent(String name, Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireItemEnableWhenComponentProperties(element);
close();
}
}
protected void composeQuestionnaireItemEnableWhenComponentProperties(Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasQuestionElement()) {
composeStringCore("question", element.getQuestionElement(), false);
composeStringExtras("question", element.getQuestionElement(), false);
}
if (element.hasOperatorElement()) {
composeEnumerationCore("operator", element.getOperatorElement(), new Questionnaire.QuestionnaireItemOperatorEnumFactory(), false);
composeEnumerationExtras("operator", element.getOperatorElement(), new Questionnaire.QuestionnaireItemOperatorEnumFactory(), false);
}
if (element.hasAnswer()) {
composeType("answer", element.getAnswer());
}
}
protected void composeQuestionnaireItemAnswerOptionComponent(String name, Questionnaire.QuestionnaireItemAnswerOptionComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireItemAnswerOptionComponentProperties(element);
close();
}
}
protected void composeQuestionnaireItemAnswerOptionComponentProperties(Questionnaire.QuestionnaireItemAnswerOptionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasInitialSelectedElement()) {
composeBooleanCore("initialSelected", element.getInitialSelectedElement(), false);
composeBooleanExtras("initialSelected", element.getInitialSelectedElement(), false);
}
}
protected void composeQuestionnaireItemInitialComponent(String name, Questionnaire.QuestionnaireItemInitialComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireItemInitialComponentProperties(element);
close();
}
}
protected void composeQuestionnaireItemInitialComponentProperties(Questionnaire.QuestionnaireItemInitialComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeQuestionnaireResponseProperties(element);
}
}
protected void composeQuestionnaireResponseProperties(QuestionnaireResponse element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasQuestionnaireElement()) {
composeCanonicalCore("questionnaire", element.getQuestionnaireElement(), false);
composeCanonicalExtras("questionnaire", element.getQuestionnaireElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasAuthoredElement()) {
composeDateTimeCore("authored", element.getAuthoredElement(), false);
composeDateTimeExtras("authored", element.getAuthoredElement(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasItem()) {
openArray("item");
for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem())
composeQuestionnaireResponseItemComponent(null, e);
closeArray();
};
}
protected void composeQuestionnaireResponseItemComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireResponseItemComponentProperties(element);
close();
}
}
protected void composeQuestionnaireResponseItemComponentProperties(QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasDefinitionElement()) {
composeUriCore("definition", element.getDefinitionElement(), false);
composeUriExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasAnswer()) {
openArray("answer");
for (QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent e : element.getAnswer())
composeQuestionnaireResponseItemAnswerComponent(null, e);
closeArray();
};
if (element.hasItem()) {
openArray("item");
for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem())
composeQuestionnaireResponseItemComponent(null, e);
closeArray();
};
}
protected void composeQuestionnaireResponseItemAnswerComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireResponseItemAnswerComponentProperties(element);
close();
}
}
protected void composeQuestionnaireResponseItemAnswerComponentProperties(QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasItem()) {
openArray("item");
for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem())
composeQuestionnaireResponseItemComponent(null, e);
closeArray();
};
}
protected void composeRegulatedAuthorization(String name, RegulatedAuthorization element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRegulatedAuthorizationProperties(element);
}
}
protected void composeRegulatedAuthorizationProperties(RegulatedAuthorization element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasRegion()) {
openArray("region");
for (CodeableConcept e : element.getRegion())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasStatusDateElement()) {
composeDateTimeCore("statusDate", element.getStatusDateElement(), false);
composeDateTimeExtras("statusDate", element.getStatusDateElement(), false);
}
if (element.hasValidityPeriod()) {
composePeriod("validityPeriod", element.getValidityPeriod());
}
if (element.hasIndication()) {
openArray("indication");
for (CodeableReference e : element.getIndication())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasIntendedUse()) {
composeCodeableConcept("intendedUse", element.getIntendedUse());
}
if (element.hasBasis()) {
openArray("basis");
for (CodeableConcept e : element.getBasis())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasHolder()) {
composeReference("holder", element.getHolder());
}
if (element.hasRegulator()) {
composeReference("regulator", element.getRegulator());
}
if (element.hasAttachedDocument()) {
openArray("attachedDocument");
for (Reference e : element.getAttachedDocument())
composeReference(null, e);
closeArray();
};
if (element.hasCase()) {
composeRegulatedAuthorizationCaseComponent("case", element.getCase());
}
}
protected void composeRegulatedAuthorizationCaseComponent(String name, RegulatedAuthorization.RegulatedAuthorizationCaseComponent element) throws IOException {
if (element != null) {
open(name);
composeRegulatedAuthorizationCaseComponentProperties(element);
close();
}
}
protected void composeRegulatedAuthorizationCaseComponentProperties(RegulatedAuthorization.RegulatedAuthorizationCaseComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasDate()) {
composeType("date", element.getDate());
}
if (element.hasApplication()) {
openArray("application");
for (RegulatedAuthorization.RegulatedAuthorizationCaseComponent e : element.getApplication())
composeRegulatedAuthorizationCaseComponent(null, e);
closeArray();
};
}
protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRelatedPersonProperties(element);
}
}
protected void composeRelatedPersonProperties(RelatedPerson element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasRelationship()) {
openArray("relationship");
for (CodeableConcept e : element.getRelationship())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasName()) {
openArray("name");
for (HumanName e : element.getName())
composeHumanName(null, e);
closeArray();
};
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
};
if (element.hasGenderElement()) {
composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false);
}
if (element.hasBirthDateElement()) {
composeDateCore("birthDate", element.getBirthDateElement(), false);
composeDateExtras("birthDate", element.getBirthDateElement(), false);
}
if (element.hasAddress()) {
openArray("address");
for (Address e : element.getAddress())
composeAddress(null, e);
closeArray();
};
if (element.hasPhoto()) {
openArray("photo");
for (Attachment e : element.getPhoto())
composeAttachment(null, e);
closeArray();
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasCommunication()) {
openArray("communication");
for (RelatedPerson.RelatedPersonCommunicationComponent e : element.getCommunication())
composeRelatedPersonCommunicationComponent(null, e);
closeArray();
};
}
protected void composeRelatedPersonCommunicationComponent(String name, RelatedPerson.RelatedPersonCommunicationComponent element) throws IOException {
if (element != null) {
open(name);
composeRelatedPersonCommunicationComponentProperties(element);
close();
}
}
protected void composeRelatedPersonCommunicationComponentProperties(RelatedPerson.RelatedPersonCommunicationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
}
protected void composeRequestOrchestration(String name, RequestOrchestration element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRequestOrchestrationProperties(element);
}
}
protected void composeRequestOrchestrationProperties(RequestOrchestration element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasReplaces()) {
openArray("replaces");
for (Reference e : element.getReplaces())
composeReference(null, e);
closeArray();
};
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasGoal()) {
openArray("goal");
for (Reference e : element.getGoal())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (RequestOrchestration.RequestOrchestrationActionComponent e : element.getAction())
composeRequestOrchestrationActionComponent(null, e);
closeArray();
};
}
protected void composeRequestOrchestrationActionComponent(String name, RequestOrchestration.RequestOrchestrationActionComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionComponentProperties(RequestOrchestration.RequestOrchestrationActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeStringCore("linkId", element.getLinkIdElement(), false);
composeStringExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasPrefixElement()) {
composeStringCore("prefix", element.getPrefixElement(), false);
composeStringExtras("prefix", element.getPrefixElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTextEquivalentElement()) {
composeMarkdownCore("textEquivalent", element.getTextEquivalentElement(), false);
composeMarkdownExtras("textEquivalent", element.getTextEquivalentElement(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDocumentation()) {
openArray("documentation");
for (RelatedArtifact e : element.getDocumentation())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasGoal()) {
openArray("goal");
for (Reference e : element.getGoal())
composeReference(null, e);
closeArray();
};
if (element.hasCondition()) {
openArray("condition");
for (RequestOrchestration.RequestOrchestrationActionConditionComponent e : element.getCondition())
composeRequestOrchestrationActionConditionComponent(null, e);
closeArray();
};
if (element.hasInput()) {
openArray("input");
for (RequestOrchestration.RequestOrchestrationActionInputComponent e : element.getInput())
composeRequestOrchestrationActionInputComponent(null, e);
closeArray();
};
if (element.hasOutput()) {
openArray("output");
for (RequestOrchestration.RequestOrchestrationActionOutputComponent e : element.getOutput())
composeRequestOrchestrationActionOutputComponent(null, e);
closeArray();
};
if (element.hasRelatedAction()) {
openArray("relatedAction");
for (RequestOrchestration.RequestOrchestrationActionRelatedActionComponent e : element.getRelatedAction())
composeRequestOrchestrationActionRelatedActionComponent(null, e);
closeArray();
};
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasLocation()) {
composeCodeableReference("location", element.getLocation());
}
if (element.hasParticipant()) {
openArray("participant");
for (RequestOrchestration.RequestOrchestrationActionParticipantComponent e : element.getParticipant())
composeRequestOrchestrationActionParticipantComponent(null, e);
closeArray();
};
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGroupingBehaviorElement()) {
composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(), new Enumerations.ActionGroupingBehaviorEnumFactory(), false);
composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(), new Enumerations.ActionGroupingBehaviorEnumFactory(), false);
}
if (element.hasSelectionBehaviorElement()) {
composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(), new Enumerations.ActionSelectionBehaviorEnumFactory(), false);
composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(), new Enumerations.ActionSelectionBehaviorEnumFactory(), false);
}
if (element.hasRequiredBehaviorElement()) {
composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(), new Enumerations.ActionRequiredBehaviorEnumFactory(), false);
composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(), new Enumerations.ActionRequiredBehaviorEnumFactory(), false);
}
if (element.hasPrecheckBehaviorElement()) {
composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(), new Enumerations.ActionPrecheckBehaviorEnumFactory(), false);
composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(), new Enumerations.ActionPrecheckBehaviorEnumFactory(), false);
}
if (element.hasCardinalityBehaviorElement()) {
composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(), new Enumerations.ActionCardinalityBehaviorEnumFactory(), false);
composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(), new Enumerations.ActionCardinalityBehaviorEnumFactory(), false);
}
if (element.hasResource()) {
composeReference("resource", element.getResource());
}
if (element.hasDefinition()) {
composeType("definition", element.getDefinition());
}
if (element.hasTransformElement()) {
composeCanonicalCore("transform", element.getTransformElement(), false);
composeCanonicalExtras("transform", element.getTransformElement(), false);
}
if (element.hasDynamicValue()) {
openArray("dynamicValue");
for (RequestOrchestration.RequestOrchestrationActionDynamicValueComponent e : element.getDynamicValue())
composeRequestOrchestrationActionDynamicValueComponent(null, e);
closeArray();
};
if (element.hasAction()) {
openArray("action");
for (RequestOrchestration.RequestOrchestrationActionComponent e : element.getAction())
composeRequestOrchestrationActionComponent(null, e);
closeArray();
};
}
protected void composeRequestOrchestrationActionConditionComponent(String name, RequestOrchestration.RequestOrchestrationActionConditionComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionConditionComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionConditionComponentProperties(RequestOrchestration.RequestOrchestrationActionConditionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new Enumerations.ActionConditionKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new Enumerations.ActionConditionKindEnumFactory(), false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composeRequestOrchestrationActionInputComponent(String name, RequestOrchestration.RequestOrchestrationActionInputComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionInputComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionInputComponentProperties(RequestOrchestration.RequestOrchestrationActionInputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasRequirement()) {
composeDataRequirement("requirement", element.getRequirement());
}
if (element.hasRelatedDataElement()) {
composeIdCore("relatedData", element.getRelatedDataElement(), false);
composeIdExtras("relatedData", element.getRelatedDataElement(), false);
}
}
protected void composeRequestOrchestrationActionOutputComponent(String name, RequestOrchestration.RequestOrchestrationActionOutputComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionOutputComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionOutputComponentProperties(RequestOrchestration.RequestOrchestrationActionOutputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasRequirement()) {
composeDataRequirement("requirement", element.getRequirement());
}
if (element.hasRelatedDataElement()) {
composeStringCore("relatedData", element.getRelatedDataElement(), false);
composeStringExtras("relatedData", element.getRelatedDataElement(), false);
}
}
protected void composeRequestOrchestrationActionRelatedActionComponent(String name, RequestOrchestration.RequestOrchestrationActionRelatedActionComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionRelatedActionComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionRelatedActionComponentProperties(RequestOrchestration.RequestOrchestrationActionRelatedActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTargetIdElement()) {
composeIdCore("targetId", element.getTargetIdElement(), false);
composeIdExtras("targetId", element.getTargetIdElement(), false);
}
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
}
if (element.hasEndRelationshipElement()) {
composeEnumerationCore("endRelationship", element.getEndRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("endRelationship", element.getEndRelationshipElement(), new Enumerations.ActionRelationshipTypeEnumFactory(), false);
}
if (element.hasOffset()) {
composeType("offset", element.getOffset());
}
}
protected void composeRequestOrchestrationActionParticipantComponent(String name, RequestOrchestration.RequestOrchestrationActionParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionParticipantComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionParticipantComponentProperties(RequestOrchestration.RequestOrchestrationActionParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.ActionParticipantTypeEnumFactory(), false);
}
if (element.hasTypeCanonicalElement()) {
composeCanonicalCore("typeCanonical", element.getTypeCanonicalElement(), false);
composeCanonicalExtras("typeCanonical", element.getTypeCanonicalElement(), false);
}
if (element.hasTypeReference()) {
composeReference("typeReference", element.getTypeReference());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeType("actor", element.getActor());
}
}
protected void composeRequestOrchestrationActionDynamicValueComponent(String name, RequestOrchestration.RequestOrchestrationActionDynamicValueComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestOrchestrationActionDynamicValueComponentProperties(element);
close();
}
}
protected void composeRequestOrchestrationActionDynamicValueComponentProperties(RequestOrchestration.RequestOrchestrationActionDynamicValueComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composeRequirements(String name, Requirements element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRequirementsProperties(element);
}
}
protected void composeRequirementsProperties(Requirements element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasDerivedFrom()) {
if (anyHasValue(element.getDerivedFrom())) {
openArray("derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalCore(null, e, e != element.getDerivedFrom().get(element.getDerivedFrom().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFrom())) {
openArray("_derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasReference()) {
if (anyHasValue(element.getReference())) {
openArray("reference");
for (UrlType e : element.getReference())
composeUrlCore(null, e, e != element.getReference().get(element.getReference().size()-1));
closeArray();
}
if (anyHasExtras(element.getReference())) {
openArray("_reference");
for (UrlType e : element.getReference())
composeUrlExtras(null, e, true);
closeArray();
}
};
if (element.hasActor()) {
if (anyHasValue(element.getActor())) {
openArray("actor");
for (CanonicalType e : element.getActor())
composeCanonicalCore(null, e, e != element.getActor().get(element.getActor().size()-1));
closeArray();
}
if (anyHasExtras(element.getActor())) {
openArray("_actor");
for (CanonicalType e : element.getActor())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasStatement()) {
openArray("statement");
for (Requirements.RequirementsStatementComponent e : element.getStatement())
composeRequirementsStatementComponent(null, e);
closeArray();
};
}
protected void composeRequirementsStatementComponent(String name, Requirements.RequirementsStatementComponent element) throws IOException {
if (element != null) {
open(name);
composeRequirementsStatementComponentProperties(element);
close();
}
}
protected void composeRequirementsStatementComponentProperties(Requirements.RequirementsStatementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKeyElement()) {
composeIdCore("key", element.getKeyElement(), false);
composeIdExtras("key", element.getKeyElement(), false);
}
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasConformance()) {
openArray("conformance");
for (Enumeration e : element.getConformance())
composeEnumerationCore(null, e, new Requirements.ConformanceExpectationEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getConformance())) {
openArray("_conformance");
for (Enumeration e : element.getConformance())
composeEnumerationExtras(null, e, new Requirements.ConformanceExpectationEnumFactory(), true);
closeArray();
}
};
if (element.hasConditionalityElement()) {
composeBooleanCore("conditionality", element.getConditionalityElement(), false);
composeBooleanExtras("conditionality", element.getConditionalityElement(), false);
}
if (element.hasRequirementElement()) {
composeMarkdownCore("requirement", element.getRequirementElement(), false);
composeMarkdownExtras("requirement", element.getRequirementElement(), false);
}
if (element.hasDerivedFromElement()) {
composeStringCore("derivedFrom", element.getDerivedFromElement(), false);
composeStringExtras("derivedFrom", element.getDerivedFromElement(), false);
}
if (element.hasParentElement()) {
composeStringCore("parent", element.getParentElement(), false);
composeStringExtras("parent", element.getParentElement(), false);
}
if (element.hasSatisfiedBy()) {
if (anyHasValue(element.getSatisfiedBy())) {
openArray("satisfiedBy");
for (UrlType e : element.getSatisfiedBy())
composeUrlCore(null, e, e != element.getSatisfiedBy().get(element.getSatisfiedBy().size()-1));
closeArray();
}
if (anyHasExtras(element.getSatisfiedBy())) {
openArray("_satisfiedBy");
for (UrlType e : element.getSatisfiedBy())
composeUrlExtras(null, e, true);
closeArray();
}
};
if (element.hasReference()) {
if (anyHasValue(element.getReference())) {
openArray("reference");
for (UrlType e : element.getReference())
composeUrlCore(null, e, e != element.getReference().get(element.getReference().size()-1));
closeArray();
}
if (anyHasExtras(element.getReference())) {
openArray("_reference");
for (UrlType e : element.getReference())
composeUrlExtras(null, e, true);
closeArray();
}
};
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeResearchStudy(String name, ResearchStudy element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeResearchStudyProperties(element);
}
}
protected void composeResearchStudyProperties(ResearchStudy element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasLabel()) {
openArray("label");
for (ResearchStudy.ResearchStudyLabelComponent e : element.getLabel())
composeResearchStudyLabelComponent(null, e);
closeArray();
};
if (element.hasProtocol()) {
openArray("protocol");
for (Reference e : element.getProtocol())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasPrimaryPurposeType()) {
composeCodeableConcept("primaryPurposeType", element.getPrimaryPurposeType());
}
if (element.hasPhase()) {
composeCodeableConcept("phase", element.getPhase());
}
if (element.hasStudyDesign()) {
openArray("studyDesign");
for (CodeableConcept e : element.getStudyDesign())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasFocus()) {
openArray("focus");
for (CodeableReference e : element.getFocus())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasCondition()) {
openArray("condition");
for (CodeableConcept e : element.getCondition())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasKeyword()) {
openArray("keyword");
for (CodeableConcept e : element.getKeyword())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasRegion()) {
openArray("region");
for (CodeableConcept e : element.getRegion())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDescriptionSummaryElement()) {
composeMarkdownCore("descriptionSummary", element.getDescriptionSummaryElement(), false);
composeMarkdownExtras("descriptionSummary", element.getDescriptionSummaryElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasSite()) {
openArray("site");
for (Reference e : element.getSite())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAssociatedParty()) {
openArray("associatedParty");
for (ResearchStudy.ResearchStudyAssociatedPartyComponent e : element.getAssociatedParty())
composeResearchStudyAssociatedPartyComponent(null, e);
closeArray();
};
if (element.hasProgressStatus()) {
openArray("progressStatus");
for (ResearchStudy.ResearchStudyProgressStatusComponent e : element.getProgressStatus())
composeResearchStudyProgressStatusComponent(null, e);
closeArray();
};
if (element.hasWhyStopped()) {
composeCodeableConcept("whyStopped", element.getWhyStopped());
}
if (element.hasRecruitment()) {
composeResearchStudyRecruitmentComponent("recruitment", element.getRecruitment());
}
if (element.hasComparisonGroup()) {
openArray("comparisonGroup");
for (ResearchStudy.ResearchStudyComparisonGroupComponent e : element.getComparisonGroup())
composeResearchStudyComparisonGroupComponent(null, e);
closeArray();
};
if (element.hasObjective()) {
openArray("objective");
for (ResearchStudy.ResearchStudyObjectiveComponent e : element.getObjective())
composeResearchStudyObjectiveComponent(null, e);
closeArray();
};
if (element.hasOutcomeMeasure()) {
openArray("outcomeMeasure");
for (ResearchStudy.ResearchStudyOutcomeMeasureComponent e : element.getOutcomeMeasure())
composeResearchStudyOutcomeMeasureComponent(null, e);
closeArray();
};
if (element.hasResult()) {
openArray("result");
for (Reference e : element.getResult())
composeReference(null, e);
closeArray();
};
}
protected void composeResearchStudyLabelComponent(String name, ResearchStudy.ResearchStudyLabelComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyLabelComponentProperties(element);
close();
}
}
protected void composeResearchStudyLabelComponentProperties(ResearchStudy.ResearchStudyLabelComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeResearchStudyAssociatedPartyComponent(String name, ResearchStudy.ResearchStudyAssociatedPartyComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyAssociatedPartyComponentProperties(element);
close();
}
}
protected void composeResearchStudyAssociatedPartyComponentProperties(ResearchStudy.ResearchStudyAssociatedPartyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasPeriod()) {
openArray("period");
for (Period e : element.getPeriod())
composePeriod(null, e);
closeArray();
};
if (element.hasClassifier()) {
openArray("classifier");
for (CodeableConcept e : element.getClassifier())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeResearchStudyProgressStatusComponent(String name, ResearchStudy.ResearchStudyProgressStatusComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyProgressStatusComponentProperties(element);
close();
}
}
protected void composeResearchStudyProgressStatusComponentProperties(ResearchStudy.ResearchStudyProgressStatusComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasState()) {
composeCodeableConcept("state", element.getState());
}
if (element.hasActualElement()) {
composeBooleanCore("actual", element.getActualElement(), false);
composeBooleanExtras("actual", element.getActualElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeResearchStudyRecruitmentComponent(String name, ResearchStudy.ResearchStudyRecruitmentComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyRecruitmentComponentProperties(element);
close();
}
}
protected void composeResearchStudyRecruitmentComponentProperties(ResearchStudy.ResearchStudyRecruitmentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTargetNumberElement()) {
composeUnsignedIntCore("targetNumber", element.getTargetNumberElement(), false);
composeUnsignedIntExtras("targetNumber", element.getTargetNumberElement(), false);
}
if (element.hasActualNumberElement()) {
composeUnsignedIntCore("actualNumber", element.getActualNumberElement(), false);
composeUnsignedIntExtras("actualNumber", element.getActualNumberElement(), false);
}
if (element.hasEligibility()) {
composeReference("eligibility", element.getEligibility());
}
if (element.hasActualGroup()) {
composeReference("actualGroup", element.getActualGroup());
}
}
protected void composeResearchStudyComparisonGroupComponent(String name, ResearchStudy.ResearchStudyComparisonGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyComparisonGroupComponentProperties(element);
close();
}
}
protected void composeResearchStudyComparisonGroupComponentProperties(ResearchStudy.ResearchStudyComparisonGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLinkIdElement()) {
composeIdCore("linkId", element.getLinkIdElement(), false);
composeIdExtras("linkId", element.getLinkIdElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasIntendedExposure()) {
openArray("intendedExposure");
for (Reference e : element.getIntendedExposure())
composeReference(null, e);
closeArray();
};
if (element.hasObservedGroup()) {
composeReference("observedGroup", element.getObservedGroup());
}
}
protected void composeResearchStudyObjectiveComponent(String name, ResearchStudy.ResearchStudyObjectiveComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyObjectiveComponentProperties(element);
close();
}
}
protected void composeResearchStudyObjectiveComponentProperties(ResearchStudy.ResearchStudyObjectiveComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeResearchStudyOutcomeMeasureComponent(String name, ResearchStudy.ResearchStudyOutcomeMeasureComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyOutcomeMeasureComponentProperties(element);
close();
}
}
protected void composeResearchStudyOutcomeMeasureComponentProperties(ResearchStudy.ResearchStudyOutcomeMeasureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeResearchSubject(String name, ResearchSubject element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeResearchSubjectProperties(element);
}
}
protected void composeResearchSubjectProperties(ResearchSubject element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasProgress()) {
openArray("progress");
for (ResearchSubject.ResearchSubjectProgressComponent e : element.getProgress())
composeResearchSubjectProgressComponent(null, e);
closeArray();
};
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasStudy()) {
composeReference("study", element.getStudy());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasAssignedComparisonGroupElement()) {
composeIdCore("assignedComparisonGroup", element.getAssignedComparisonGroupElement(), false);
composeIdExtras("assignedComparisonGroup", element.getAssignedComparisonGroupElement(), false);
}
if (element.hasActualComparisonGroupElement()) {
composeIdCore("actualComparisonGroup", element.getActualComparisonGroupElement(), false);
composeIdExtras("actualComparisonGroup", element.getActualComparisonGroupElement(), false);
}
if (element.hasConsent()) {
openArray("consent");
for (Reference e : element.getConsent())
composeReference(null, e);
closeArray();
};
}
protected void composeResearchSubjectProgressComponent(String name, ResearchSubject.ResearchSubjectProgressComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchSubjectProgressComponentProperties(element);
close();
}
}
protected void composeResearchSubjectProgressComponentProperties(ResearchSubject.ResearchSubjectProgressComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubjectState()) {
composeCodeableConcept("subjectState", element.getSubjectState());
}
if (element.hasMilestone()) {
composeCodeableConcept("milestone", element.getMilestone());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasStartDateElement()) {
composeDateTimeCore("startDate", element.getStartDateElement(), false);
composeDateTimeExtras("startDate", element.getStartDateElement(), false);
}
if (element.hasEndDateElement()) {
composeDateTimeCore("endDate", element.getEndDateElement(), false);
composeDateTimeExtras("endDate", element.getEndDateElement(), false);
}
}
protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRiskAssessmentProperties(element);
}
}
protected void composeRiskAssessmentProperties(RiskAssessment element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
composeReference("basedOn", element.getBasedOn());
}
if (element.hasParent()) {
composeReference("parent", element.getParent());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.ObservationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.ObservationStatusEnumFactory(), false);
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasCondition()) {
composeReference("condition", element.getCondition());
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasBasis()) {
openArray("basis");
for (Reference e : element.getBasis())
composeReference(null, e);
closeArray();
};
if (element.hasPrediction()) {
openArray("prediction");
for (RiskAssessment.RiskAssessmentPredictionComponent e : element.getPrediction())
composeRiskAssessmentPredictionComponent(null, e);
closeArray();
};
if (element.hasMitigationElement()) {
composeStringCore("mitigation", element.getMitigationElement(), false);
composeStringExtras("mitigation", element.getMitigationElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeRiskAssessmentPredictionComponent(String name, RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskAssessmentPredictionComponentProperties(element);
close();
}
}
protected void composeRiskAssessmentPredictionComponentProperties(RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOutcome()) {
composeCodeableConcept("outcome", element.getOutcome());
}
if (element.hasProbability()) {
composeType("probability", element.getProbability());
}
if (element.hasQualitativeRisk()) {
composeCodeableConcept("qualitativeRisk", element.getQualitativeRisk());
}
if (element.hasRelativeRiskElement()) {
composeDecimalCore("relativeRisk", element.getRelativeRiskElement(), false);
composeDecimalExtras("relativeRisk", element.getRelativeRiskElement(), false);
}
if (element.hasWhen()) {
composeType("when", element.getWhen());
}
if (element.hasRationaleElement()) {
composeStringCore("rationale", element.getRationaleElement(), false);
composeStringExtras("rationale", element.getRationaleElement(), false);
}
}
protected void composeSchedule(String name, Schedule element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeScheduleProperties(element);
}
}
protected void composeScheduleProperties(Schedule element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasServiceCategory()) {
openArray("serviceCategory");
for (CodeableConcept e : element.getServiceCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiceType()) {
openArray("serviceType");
for (CodeableReference e : element.getServiceType())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasActor()) {
openArray("actor");
for (Reference e : element.getActor())
composeReference(null, e);
closeArray();
};
if (element.hasPlanningHorizon()) {
composePeriod("planningHorizon", element.getPlanningHorizon());
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
}
protected void composeSearchParameter(String name, SearchParameter element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSearchParameterProperties(element);
}
}
protected void composeSearchParameterProperties(SearchParameter element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDerivedFromElement()) {
composeCanonicalCore("derivedFrom", element.getDerivedFromElement(), false);
composeCanonicalExtras("derivedFrom", element.getDerivedFromElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasBase()) {
openArray("base");
for (Enumeration e : element.getBase())
composeEnumerationCore(null, e, new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getBase())) {
openArray("_base");
for (Enumeration e : element.getBase())
composeEnumerationExtras(null, e, new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), true);
closeArray();
}
};
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
if (element.hasProcessingModeElement()) {
composeEnumerationCore("processingMode", element.getProcessingModeElement(), new SearchParameter.SearchProcessingModeTypeEnumFactory(), false);
composeEnumerationExtras("processingMode", element.getProcessingModeElement(), new SearchParameter.SearchProcessingModeTypeEnumFactory(), false);
}
if (element.hasConstraintElement()) {
composeStringCore("constraint", element.getConstraintElement(), false);
composeStringExtras("constraint", element.getConstraintElement(), false);
}
if (element.hasTarget()) {
openArray("target");
for (Enumeration e : element.getTarget())
composeEnumerationCore(null, e, new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getTarget())) {
openArray("_target");
for (Enumeration e : element.getTarget())
composeEnumerationExtras(null, e, new Enumerations.VersionIndependentResourceTypesAllEnumFactory(), true);
closeArray();
}
};
if (element.hasMultipleOrElement()) {
composeBooleanCore("multipleOr", element.getMultipleOrElement(), false);
composeBooleanExtras("multipleOr", element.getMultipleOrElement(), false);
}
if (element.hasMultipleAndElement()) {
composeBooleanCore("multipleAnd", element.getMultipleAndElement(), false);
composeBooleanExtras("multipleAnd", element.getMultipleAndElement(), false);
}
if (element.hasComparator()) {
openArray("comparator");
for (Enumeration e : element.getComparator())
composeEnumerationCore(null, e, new Enumerations.SearchComparatorEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getComparator())) {
openArray("_comparator");
for (Enumeration e : element.getComparator())
composeEnumerationExtras(null, e, new Enumerations.SearchComparatorEnumFactory(), true);
closeArray();
}
};
if (element.hasModifier()) {
openArray("modifier");
for (Enumeration e : element.getModifier())
composeEnumerationCore(null, e, new Enumerations.SearchModifierCodeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getModifier())) {
openArray("_modifier");
for (Enumeration e : element.getModifier())
composeEnumerationExtras(null, e, new Enumerations.SearchModifierCodeEnumFactory(), true);
closeArray();
}
};
if (element.hasChain()) {
if (anyHasValue(element.getChain())) {
openArray("chain");
for (StringType e : element.getChain())
composeStringCore(null, e, e != element.getChain().get(element.getChain().size()-1));
closeArray();
}
if (anyHasExtras(element.getChain())) {
openArray("_chain");
for (StringType e : element.getChain())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasComponent()) {
openArray("component");
for (SearchParameter.SearchParameterComponentComponent e : element.getComponent())
composeSearchParameterComponentComponent(null, e);
closeArray();
};
}
protected void composeSearchParameterComponentComponent(String name, SearchParameter.SearchParameterComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeSearchParameterComponentComponentProperties(element);
close();
}
}
protected void composeSearchParameterComponentComponentProperties(SearchParameter.SearchParameterComponentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDefinitionElement()) {
composeCanonicalCore("definition", element.getDefinitionElement(), false);
composeCanonicalExtras("definition", element.getDefinitionElement(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
}
protected void composeServiceRequest(String name, ServiceRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeServiceRequestProperties(element);
}
}
protected void composeServiceRequestProperties(ServiceRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonical()) {
if (anyHasValue(element.getInstantiatesCanonical())) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, e != element.getInstantiatesCanonical().get(element.getInstantiatesCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasInstantiatesUri()) {
if (anyHasValue(element.getInstantiatesUri())) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, e != element.getInstantiatesUri().get(element.getInstantiatesUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasReplaces()) {
openArray("replaces");
for (Reference e : element.getReplaces())
composeReference(null, e);
closeArray();
};
if (element.hasRequisition()) {
composeIdentifier("requisition", element.getRequisition());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.RequestStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Enumerations.RequestIntentEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasCode()) {
composeCodeableReference("code", element.getCode());
}
if (element.hasOrderDetail()) {
openArray("orderDetail");
for (ServiceRequest.ServiceRequestOrderDetailComponent e : element.getOrderDetail())
composeServiceRequestOrderDetailComponent(null, e);
closeArray();
};
if (element.hasQuantity()) {
composeType("quantity", element.getQuantity());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasFocus()) {
openArray("focus");
for (Reference e : element.getFocus())
composeReference(null, e);
closeArray();
};
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasAsNeeded()) {
composeType("asNeeded", element.getAsNeeded());
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasPerformerType()) {
composeCodeableConcept("performerType", element.getPerformerType());
}
if (element.hasPerformer()) {
openArray("performer");
for (Reference e : element.getPerformer())
composeReference(null, e);
closeArray();
};
if (element.hasLocation()) {
openArray("location");
for (CodeableReference e : element.getLocation())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasInsurance()) {
openArray("insurance");
for (Reference e : element.getInsurance())
composeReference(null, e);
closeArray();
};
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (CodeableReference e : element.getSupportingInfo())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSpecimen()) {
openArray("specimen");
for (Reference e : element.getSpecimen())
composeReference(null, e);
closeArray();
};
if (element.hasBodySite()) {
openArray("bodySite");
for (CodeableConcept e : element.getBodySite())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasBodyStructure()) {
composeReference("bodyStructure", element.getBodyStructure());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasPatientInstruction()) {
openArray("patientInstruction");
for (ServiceRequest.ServiceRequestPatientInstructionComponent e : element.getPatientInstruction())
composeServiceRequestPatientInstructionComponent(null, e);
closeArray();
};
if (element.hasRelevantHistory()) {
openArray("relevantHistory");
for (Reference e : element.getRelevantHistory())
composeReference(null, e);
closeArray();
};
}
protected void composeServiceRequestOrderDetailComponent(String name, ServiceRequest.ServiceRequestOrderDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeServiceRequestOrderDetailComponentProperties(element);
close();
}
}
protected void composeServiceRequestOrderDetailComponentProperties(ServiceRequest.ServiceRequestOrderDetailComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasParameterFocus()) {
composeCodeableReference("parameterFocus", element.getParameterFocus());
}
if (element.hasParameter()) {
openArray("parameter");
for (ServiceRequest.ServiceRequestOrderDetailParameterComponent e : element.getParameter())
composeServiceRequestOrderDetailParameterComponent(null, e);
closeArray();
};
}
protected void composeServiceRequestOrderDetailParameterComponent(String name, ServiceRequest.ServiceRequestOrderDetailParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeServiceRequestOrderDetailParameterComponentProperties(element);
close();
}
}
protected void composeServiceRequestOrderDetailParameterComponentProperties(ServiceRequest.ServiceRequestOrderDetailParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeServiceRequestPatientInstructionComponent(String name, ServiceRequest.ServiceRequestPatientInstructionComponent element) throws IOException {
if (element != null) {
open(name);
composeServiceRequestPatientInstructionComponentProperties(element);
close();
}
}
protected void composeServiceRequestPatientInstructionComponentProperties(ServiceRequest.ServiceRequestPatientInstructionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInstruction()) {
composeType("instruction", element.getInstruction());
}
}
protected void composeSlot(String name, Slot element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSlotProperties(element);
}
}
protected void composeSlotProperties(Slot element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasServiceCategory()) {
openArray("serviceCategory");
for (CodeableConcept e : element.getServiceCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasServiceType()) {
openArray("serviceType");
for (CodeableReference e : element.getServiceType())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAppointmentType()) {
openArray("appointmentType");
for (CodeableConcept e : element.getAppointmentType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSchedule()) {
composeReference("schedule", element.getSchedule());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory(), false);
}
if (element.hasStartElement()) {
composeInstantCore("start", element.getStartElement(), false);
composeInstantExtras("start", element.getStartElement(), false);
}
if (element.hasEndElement()) {
composeInstantCore("end", element.getEndElement(), false);
composeInstantExtras("end", element.getEndElement(), false);
}
if (element.hasOverbookedElement()) {
composeBooleanCore("overbooked", element.getOverbookedElement(), false);
composeBooleanExtras("overbooked", element.getOverbookedElement(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeSpecimen(String name, Specimen element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSpecimenProperties(element);
}
}
protected void composeSpecimenProperties(Specimen element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasAccessionIdentifier()) {
composeIdentifier("accessionIdentifier", element.getAccessionIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasReceivedTimeElement()) {
composeDateTimeCore("receivedTime", element.getReceivedTimeElement(), false);
composeDateTimeExtras("receivedTime", element.getReceivedTimeElement(), false);
}
if (element.hasParent()) {
openArray("parent");
for (Reference e : element.getParent())
composeReference(null, e);
closeArray();
};
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
};
if (element.hasCombinedElement()) {
composeEnumerationCore("combined", element.getCombinedElement(), new Specimen.SpecimenCombinedEnumFactory(), false);
composeEnumerationExtras("combined", element.getCombinedElement(), new Specimen.SpecimenCombinedEnumFactory(), false);
}
if (element.hasRole()) {
openArray("role");
for (CodeableConcept e : element.getRole())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasFeature()) {
openArray("feature");
for (Specimen.SpecimenFeatureComponent e : element.getFeature())
composeSpecimenFeatureComponent(null, e);
closeArray();
};
if (element.hasCollection()) {
composeSpecimenCollectionComponent("collection", element.getCollection());
}
if (element.hasProcessing()) {
openArray("processing");
for (Specimen.SpecimenProcessingComponent e : element.getProcessing())
composeSpecimenProcessingComponent(null, e);
closeArray();
};
if (element.hasContainer()) {
openArray("container");
for (Specimen.SpecimenContainerComponent e : element.getContainer())
composeSpecimenContainerComponent(null, e);
closeArray();
};
if (element.hasCondition()) {
openArray("condition");
for (CodeableConcept e : element.getCondition())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composeSpecimenFeatureComponent(String name, Specimen.SpecimenFeatureComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenFeatureComponentProperties(element);
close();
}
}
protected void composeSpecimenFeatureComponentProperties(Specimen.SpecimenFeatureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenCollectionComponentProperties(element);
close();
}
}
protected void composeSpecimenCollectionComponentProperties(Specimen.SpecimenCollectionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCollector()) {
composeReference("collector", element.getCollector());
}
if (element.hasCollected()) {
composeType("collected", element.getCollected());
}
if (element.hasDuration()) {
composeDuration("duration", element.getDuration());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasDevice()) {
composeCodeableReference("device", element.getDevice());
}
if (element.hasProcedure()) {
composeReference("procedure", element.getProcedure());
}
if (element.hasBodySite()) {
composeCodeableReference("bodySite", element.getBodySite());
}
if (element.hasFastingStatus()) {
composeType("fastingStatus", element.getFastingStatus());
}
}
protected void composeSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenProcessingComponentProperties(element);
close();
}
}
protected void composeSpecimenProcessingComponentProperties(Specimen.SpecimenProcessingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasAdditive()) {
openArray("additive");
for (Reference e : element.getAdditive())
composeReference(null, e);
closeArray();
};
if (element.hasTime()) {
composeType("time", element.getTime());
}
}
protected void composeSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenContainerComponentProperties(element);
close();
}
}
protected void composeSpecimenContainerComponentProperties(Specimen.SpecimenContainerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasSpecimenQuantity()) {
composeQuantity("specimenQuantity", element.getSpecimenQuantity());
}
}
protected void composeSpecimenDefinition(String name, SpecimenDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSpecimenDefinitionProperties(element);
}
}
protected void composeSpecimenDefinitionProperties(SpecimenDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDerivedFromCanonical()) {
if (anyHasValue(element.getDerivedFromCanonical())) {
openArray("derivedFromCanonical");
for (CanonicalType e : element.getDerivedFromCanonical())
composeCanonicalCore(null, e, e != element.getDerivedFromCanonical().get(element.getDerivedFromCanonical().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFromCanonical())) {
openArray("_derivedFromCanonical");
for (CanonicalType e : element.getDerivedFromCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasDerivedFromUri()) {
if (anyHasValue(element.getDerivedFromUri())) {
openArray("derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriCore(null, e, e != element.getDerivedFromUri().get(element.getDerivedFromUri().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFromUri())) {
openArray("_derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasSubject()) {
composeType("subject", element.getSubject());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTypeCollected()) {
composeCodeableConcept("typeCollected", element.getTypeCollected());
}
if (element.hasPatientPreparation()) {
openArray("patientPreparation");
for (CodeableConcept e : element.getPatientPreparation())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasTimeAspectElement()) {
composeStringCore("timeAspect", element.getTimeAspectElement(), false);
composeStringExtras("timeAspect", element.getTimeAspectElement(), false);
}
if (element.hasCollection()) {
openArray("collection");
for (CodeableConcept e : element.getCollection())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasTypeTested()) {
openArray("typeTested");
for (SpecimenDefinition.SpecimenDefinitionTypeTestedComponent e : element.getTypeTested())
composeSpecimenDefinitionTypeTestedComponent(null, e);
closeArray();
};
}
protected void composeSpecimenDefinitionTypeTestedComponent(String name, SpecimenDefinition.SpecimenDefinitionTypeTestedComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionTypeTestedComponentProperties(element);
close();
}
}
protected void composeSpecimenDefinitionTypeTestedComponentProperties(SpecimenDefinition.SpecimenDefinitionTypeTestedComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIsDerivedElement()) {
composeBooleanCore("isDerived", element.getIsDerivedElement(), false);
composeBooleanExtras("isDerived", element.getIsDerivedElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPreferenceElement()) {
composeEnumerationCore("preference", element.getPreferenceElement(), new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory(), false);
composeEnumerationExtras("preference", element.getPreferenceElement(), new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory(), false);
}
if (element.hasContainer()) {
composeSpecimenDefinitionTypeTestedContainerComponent("container", element.getContainer());
}
if (element.hasRequirementElement()) {
composeMarkdownCore("requirement", element.getRequirementElement(), false);
composeMarkdownExtras("requirement", element.getRequirementElement(), false);
}
if (element.hasRetentionTime()) {
composeDuration("retentionTime", element.getRetentionTime());
}
if (element.hasSingleUseElement()) {
composeBooleanCore("singleUse", element.getSingleUseElement(), false);
composeBooleanExtras("singleUse", element.getSingleUseElement(), false);
}
if (element.hasRejectionCriterion()) {
openArray("rejectionCriterion");
for (CodeableConcept e : element.getRejectionCriterion())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasHandling()) {
openArray("handling");
for (SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent e : element.getHandling())
composeSpecimenDefinitionTypeTestedHandlingComponent(null, e);
closeArray();
};
if (element.hasTestingDestination()) {
openArray("testingDestination");
for (CodeableConcept e : element.getTestingDestination())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeSpecimenDefinitionTypeTestedContainerComponent(String name, SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionTypeTestedContainerComponentProperties(element);
close();
}
}
protected void composeSpecimenDefinitionTypeTestedContainerComponentProperties(SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMaterial()) {
composeCodeableConcept("material", element.getMaterial());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCap()) {
composeCodeableConcept("cap", element.getCap());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCapacity()) {
composeQuantity("capacity", element.getCapacity());
}
if (element.hasMinimumVolume()) {
composeType("minimumVolume", element.getMinimumVolume());
}
if (element.hasAdditive()) {
openArray("additive");
for (SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent e : element.getAdditive())
composeSpecimenDefinitionTypeTestedContainerAdditiveComponent(null, e);
closeArray();
};
if (element.hasPreparationElement()) {
composeMarkdownCore("preparation", element.getPreparationElement(), false);
composeMarkdownExtras("preparation", element.getPreparationElement(), false);
}
}
protected void composeSpecimenDefinitionTypeTestedContainerAdditiveComponent(String name, SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionTypeTestedContainerAdditiveComponentProperties(element);
close();
}
}
protected void composeSpecimenDefinitionTypeTestedContainerAdditiveComponentProperties(SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAdditive()) {
composeType("additive", element.getAdditive());
}
}
protected void composeSpecimenDefinitionTypeTestedHandlingComponent(String name, SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionTypeTestedHandlingComponentProperties(element);
close();
}
}
protected void composeSpecimenDefinitionTypeTestedHandlingComponentProperties(SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTemperatureQualifier()) {
composeCodeableConcept("temperatureQualifier", element.getTemperatureQualifier());
}
if (element.hasTemperatureRange()) {
composeRange("temperatureRange", element.getTemperatureRange());
}
if (element.hasMaxDuration()) {
composeDuration("maxDuration", element.getMaxDuration());
}
if (element.hasInstructionElement()) {
composeMarkdownCore("instruction", element.getInstructionElement(), false);
composeMarkdownExtras("instruction", element.getInstructionElement(), false);
}
}
protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeStructureDefinitionProperties(element);
}
}
protected void composeStructureDefinitionProperties(StructureDefinition element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasKeyword()) {
openArray("keyword");
for (Coding e : element.getKeyword())
composeCoding(null, e);
closeArray();
};
if (element.hasFhirVersionElement()) {
composeEnumerationCore("fhirVersion", element.getFhirVersionElement(), new Enumerations.FHIRVersionEnumFactory(), false);
composeEnumerationExtras("fhirVersion", element.getFhirVersionElement(), new Enumerations.FHIRVersionEnumFactory(), false);
}
if (element.hasMapping()) {
openArray("mapping");
for (StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping())
composeStructureDefinitionMappingComponent(null, e);
closeArray();
};
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory(), false);
}
if (element.hasAbstractElement()) {
composeBooleanCore("abstract", element.getAbstractElement(), false);
composeBooleanExtras("abstract", element.getAbstractElement(), false);
}
if (element.hasContext()) {
openArray("context");
for (StructureDefinition.StructureDefinitionContextComponent e : element.getContext())
composeStructureDefinitionContextComponent(null, e);
closeArray();
};
if (element.hasContextInvariant()) {
if (anyHasValue(element.getContextInvariant())) {
openArray("contextInvariant");
for (StringType e : element.getContextInvariant())
composeStringCore(null, e, e != element.getContextInvariant().get(element.getContextInvariant().size()-1));
closeArray();
}
if (anyHasExtras(element.getContextInvariant())) {
openArray("_contextInvariant");
for (StringType e : element.getContextInvariant())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasTypeElement()) {
composeUriCore("type", element.getTypeElement(), false);
composeUriExtras("type", element.getTypeElement(), false);
}
if (element.hasBaseDefinitionElement()) {
composeCanonicalCore("baseDefinition", element.getBaseDefinitionElement(), false);
composeCanonicalExtras("baseDefinition", element.getBaseDefinitionElement(), false);
}
if (element.hasDerivationElement()) {
composeEnumerationCore("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory(), false);
composeEnumerationExtras("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory(), false);
}
if (element.hasSnapshot()) {
composeStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot());
}
if (element.hasDifferential()) {
composeStructureDefinitionDifferentialComponent("differential", element.getDifferential());
}
}
protected void composeStructureDefinitionMappingComponent(String name, StructureDefinition.StructureDefinitionMappingComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionMappingComponentProperties(element);
close();
}
}
protected void composeStructureDefinitionMappingComponentProperties(StructureDefinition.StructureDefinitionMappingComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentityElement()) {
composeIdCore("identity", element.getIdentityElement(), false);
composeIdExtras("identity", element.getIdentityElement(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeStructureDefinitionContextComponent(String name, StructureDefinition.StructureDefinitionContextComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionContextComponentProperties(element);
close();
}
}
protected void composeStructureDefinitionContextComponentProperties(StructureDefinition.StructureDefinitionContextComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new StructureDefinition.ExtensionContextTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new StructureDefinition.ExtensionContextTypeEnumFactory(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
}
protected void composeStructureDefinitionSnapshotComponent(String name, StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionSnapshotComponentProperties(element);
close();
}
}
protected void composeStructureDefinitionSnapshotComponentProperties(StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasElement()) {
openArray("element");
for (ElementDefinition e : element.getElement())
composeElementDefinition(null, e);
closeArray();
};
}
protected void composeStructureDefinitionDifferentialComponent(String name, StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionDifferentialComponentProperties(element);
close();
}
}
protected void composeStructureDefinitionDifferentialComponentProperties(StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasElement()) {
openArray("element");
for (ElementDefinition e : element.getElement())
composeElementDefinition(null, e);
closeArray();
};
}
protected void composeStructureMap(String name, StructureMap element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeStructureMapProperties(element);
}
}
protected void composeStructureMapProperties(StructureMap element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasStructure()) {
openArray("structure");
for (StructureMap.StructureMapStructureComponent e : element.getStructure())
composeStructureMapStructureComponent(null, e);
closeArray();
};
if (element.hasImport()) {
if (anyHasValue(element.getImport())) {
openArray("import");
for (CanonicalType e : element.getImport())
composeCanonicalCore(null, e, e != element.getImport().get(element.getImport().size()-1));
closeArray();
}
if (anyHasExtras(element.getImport())) {
openArray("_import");
for (CanonicalType e : element.getImport())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasConst()) {
openArray("const");
for (StructureMap.StructureMapConstComponent e : element.getConst())
composeStructureMapConstComponent(null, e);
closeArray();
};
if (element.hasGroup()) {
openArray("group");
for (StructureMap.StructureMapGroupComponent e : element.getGroup())
composeStructureMapGroupComponent(null, e);
closeArray();
};
}
protected void composeStructureMapStructureComponent(String name, StructureMap.StructureMapStructureComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureComponentProperties(element);
close();
}
}
protected void composeStructureMapStructureComponentProperties(StructureMap.StructureMapStructureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUrlElement()) {
composeCanonicalCore("url", element.getUrlElement(), false);
composeCanonicalExtras("url", element.getUrlElement(), false);
}
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory(), false);
}
if (element.hasAliasElement()) {
composeStringCore("alias", element.getAliasElement(), false);
composeStringExtras("alias", element.getAliasElement(), false);
}
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeStructureMapConstComponent(String name, StructureMap.StructureMapConstComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapConstComponentProperties(element);
close();
}
}
protected void composeStructureMapConstComponentProperties(StructureMap.StructureMapConstComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("name", element.getNameElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeStructureMapGroupComponent(String name, StructureMap.StructureMapGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupComponentProperties(StructureMap.StructureMapGroupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("name", element.getNameElement(), false);
}
if (element.hasExtendsElement()) {
composeIdCore("extends", element.getExtendsElement(), false);
composeIdExtras("extends", element.getExtendsElement(), false);
}
if (element.hasTypeModeElement()) {
composeEnumerationCore("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory(), false);
composeEnumerationExtras("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
if (element.hasInput()) {
openArray("input");
for (StructureMap.StructureMapGroupInputComponent e : element.getInput())
composeStructureMapGroupInputComponent(null, e);
closeArray();
};
if (element.hasRule()) {
openArray("rule");
for (StructureMap.StructureMapGroupRuleComponent e : element.getRule())
composeStructureMapGroupRuleComponent(null, e);
closeArray();
};
}
protected void composeStructureMapGroupInputComponent(String name, StructureMap.StructureMapGroupInputComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupInputComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupInputComponentProperties(StructureMap.StructureMapGroupInputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("name", element.getNameElement(), false);
}
if (element.hasTypeElement()) {
composeStringCore("type", element.getTypeElement(), false);
composeStringExtras("type", element.getTypeElement(), false);
}
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory(), false);
}
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeStructureMapGroupRuleComponent(String name, StructureMap.StructureMapGroupRuleComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupRuleComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupRuleComponentProperties(StructureMap.StructureMapGroupRuleComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("name", element.getNameElement(), false);
}
if (element.hasSource()) {
openArray("source");
for (StructureMap.StructureMapGroupRuleSourceComponent e : element.getSource())
composeStructureMapGroupRuleSourceComponent(null, e);
closeArray();
};
if (element.hasTarget()) {
openArray("target");
for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget())
composeStructureMapGroupRuleTargetComponent(null, e);
closeArray();
};
if (element.hasRule()) {
openArray("rule");
for (StructureMap.StructureMapGroupRuleComponent e : element.getRule())
composeStructureMapGroupRuleComponent(null, e);
closeArray();
};
if (element.hasDependent()) {
openArray("dependent");
for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent())
composeStructureMapGroupRuleDependentComponent(null, e);
closeArray();
};
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeStructureMapGroupRuleSourceComponent(String name, StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupRuleSourceComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupRuleSourceComponentProperties(StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContextElement()) {
composeIdCore("context", element.getContextElement(), false);
composeIdExtras("context", element.getContextElement(), false);
}
if (element.hasMinElement()) {
composeIntegerCore("min", element.getMinElement(), false);
composeIntegerExtras("min", element.getMinElement(), false);
}
if (element.hasMaxElement()) {
composeStringCore("max", element.getMaxElement(), false);
composeStringExtras("max", element.getMaxElement(), false);
}
if (element.hasTypeElement()) {
composeStringCore("type", element.getTypeElement(), false);
composeStringExtras("type", element.getTypeElement(), false);
}
if (element.hasDefaultValueElement()) {
composeStringCore("defaultValue", element.getDefaultValueElement(), false);
composeStringExtras("defaultValue", element.getDefaultValueElement(), false);
}
if (element.hasElementElement()) {
composeStringCore("element", element.getElementElement(), false);
composeStringExtras("element", element.getElementElement(), false);
}
if (element.hasListModeElement()) {
composeEnumerationCore("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory(), false);
composeEnumerationExtras("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory(), false);
}
if (element.hasVariableElement()) {
composeIdCore("variable", element.getVariableElement(), false);
composeIdExtras("variable", element.getVariableElement(), false);
}
if (element.hasConditionElement()) {
composeStringCore("condition", element.getConditionElement(), false);
composeStringExtras("condition", element.getConditionElement(), false);
}
if (element.hasCheckElement()) {
composeStringCore("check", element.getCheckElement(), false);
composeStringExtras("check", element.getCheckElement(), false);
}
if (element.hasLogMessageElement()) {
composeStringCore("logMessage", element.getLogMessageElement(), false);
composeStringExtras("logMessage", element.getLogMessageElement(), false);
}
}
protected void composeStructureMapGroupRuleTargetComponent(String name, StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupRuleTargetComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupRuleTargetComponentProperties(StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasContextElement()) {
composeStringCore("context", element.getContextElement(), false);
composeStringExtras("context", element.getContextElement(), false);
}
if (element.hasElementElement()) {
composeStringCore("element", element.getElementElement(), false);
composeStringExtras("element", element.getElementElement(), false);
}
if (element.hasVariableElement()) {
composeIdCore("variable", element.getVariableElement(), false);
composeIdExtras("variable", element.getVariableElement(), false);
}
if (element.hasListMode()) {
openArray("listMode");
for (Enumeration e : element.getListMode())
composeEnumerationCore(null, e, new StructureMap.StructureMapTargetListModeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getListMode())) {
openArray("_listMode");
for (Enumeration e : element.getListMode())
composeEnumerationExtras(null, e, new StructureMap.StructureMapTargetListModeEnumFactory(), true);
closeArray();
}
};
if (element.hasListRuleIdElement()) {
composeIdCore("listRuleId", element.getListRuleIdElement(), false);
composeIdExtras("listRuleId", element.getListRuleIdElement(), false);
}
if (element.hasTransformElement()) {
composeEnumerationCore("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory(), false);
composeEnumerationExtras("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter())
composeStructureMapGroupRuleTargetParameterComponent(null, e);
closeArray();
};
}
protected void composeStructureMapGroupRuleTargetParameterComponent(String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupRuleTargetParameterComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupRuleTargetParameterComponentProperties(StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeStructureMapGroupRuleDependentComponent(String name, StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapGroupRuleDependentComponentProperties(element);
close();
}
}
protected void composeStructureMapGroupRuleDependentComponentProperties(StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("name", element.getNameElement(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter())
composeStructureMapGroupRuleTargetParameterComponent(null, e);
closeArray();
};
}
protected void composeSubscription(String name, Subscription element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubscriptionProperties(element);
}
}
protected void composeSubscriptionProperties(Subscription element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.SubscriptionStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.SubscriptionStatusCodesEnumFactory(), false);
}
if (element.hasTopicElement()) {
composeCanonicalCore("topic", element.getTopicElement(), false);
composeCanonicalExtras("topic", element.getTopicElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactPoint e : element.getContact())
composeContactPoint(null, e);
closeArray();
};
if (element.hasEndElement()) {
composeInstantCore("end", element.getEndElement(), false);
composeInstantExtras("end", element.getEndElement(), false);
}
if (element.hasManagingEntity()) {
composeReference("managingEntity", element.getManagingEntity());
}
if (element.hasReasonElement()) {
composeStringCore("reason", element.getReasonElement(), false);
composeStringExtras("reason", element.getReasonElement(), false);
}
if (element.hasFilterBy()) {
openArray("filterBy");
for (Subscription.SubscriptionFilterByComponent e : element.getFilterBy())
composeSubscriptionFilterByComponent(null, e);
closeArray();
};
if (element.hasChannelType()) {
composeCoding("channelType", element.getChannelType());
}
if (element.hasEndpointElement()) {
composeUrlCore("endpoint", element.getEndpointElement(), false);
composeUrlExtras("endpoint", element.getEndpointElement(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (Subscription.SubscriptionParameterComponent e : element.getParameter())
composeSubscriptionParameterComponent(null, e);
closeArray();
};
if (element.hasHeartbeatPeriodElement()) {
composeUnsignedIntCore("heartbeatPeriod", element.getHeartbeatPeriodElement(), false);
composeUnsignedIntExtras("heartbeatPeriod", element.getHeartbeatPeriodElement(), false);
}
if (element.hasTimeoutElement()) {
composeUnsignedIntCore("timeout", element.getTimeoutElement(), false);
composeUnsignedIntExtras("timeout", element.getTimeoutElement(), false);
}
if (element.hasContentTypeElement()) {
composeCodeCore("contentType", element.getContentTypeElement(), false);
composeCodeExtras("contentType", element.getContentTypeElement(), false);
}
if (element.hasContentElement()) {
composeEnumerationCore("content", element.getContentElement(), new Subscription.SubscriptionPayloadContentEnumFactory(), false);
composeEnumerationExtras("content", element.getContentElement(), new Subscription.SubscriptionPayloadContentEnumFactory(), false);
}
if (element.hasMaxCountElement()) {
composePositiveIntCore("maxCount", element.getMaxCountElement(), false);
composePositiveIntExtras("maxCount", element.getMaxCountElement(), false);
}
}
protected void composeSubscriptionFilterByComponent(String name, Subscription.SubscriptionFilterByComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionFilterByComponentProperties(element);
close();
}
}
protected void composeSubscriptionFilterByComponentProperties(Subscription.SubscriptionFilterByComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasResourceTypeElement()) {
composeUriCore("resourceType", element.getResourceTypeElement(), false);
composeUriExtras("resourceType", element.getResourceTypeElement(), false);
}
if (element.hasFilterParameterElement()) {
composeStringCore("filterParameter", element.getFilterParameterElement(), false);
composeStringExtras("filterParameter", element.getFilterParameterElement(), false);
}
if (element.hasComparatorElement()) {
composeEnumerationCore("comparator", element.getComparatorElement(), new Enumerations.SearchComparatorEnumFactory(), false);
composeEnumerationExtras("comparator", element.getComparatorElement(), new Enumerations.SearchComparatorEnumFactory(), false);
}
if (element.hasModifierElement()) {
composeEnumerationCore("modifier", element.getModifierElement(), new Enumerations.SearchModifierCodeEnumFactory(), false);
composeEnumerationExtras("modifier", element.getModifierElement(), new Enumerations.SearchModifierCodeEnumFactory(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeSubscriptionParameterComponent(String name, Subscription.SubscriptionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionParameterComponentProperties(element);
close();
}
}
protected void composeSubscriptionParameterComponentProperties(Subscription.SubscriptionParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeSubscriptionStatus(String name, SubscriptionStatus element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubscriptionStatusProperties(element);
}
}
protected void composeSubscriptionStatusProperties(SubscriptionStatus element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.SubscriptionStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.SubscriptionStatusCodesEnumFactory(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new SubscriptionStatus.SubscriptionNotificationTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new SubscriptionStatus.SubscriptionNotificationTypeEnumFactory(), false);
}
if (element.hasEventsSinceSubscriptionStartElement()) {
composeInteger64Core("eventsSinceSubscriptionStart", element.getEventsSinceSubscriptionStartElement(), false);
composeInteger64Extras("eventsSinceSubscriptionStart", element.getEventsSinceSubscriptionStartElement(), false);
}
if (element.hasNotificationEvent()) {
openArray("notificationEvent");
for (SubscriptionStatus.SubscriptionStatusNotificationEventComponent e : element.getNotificationEvent())
composeSubscriptionStatusNotificationEventComponent(null, e);
closeArray();
};
if (element.hasSubscription()) {
composeReference("subscription", element.getSubscription());
}
if (element.hasTopicElement()) {
composeCanonicalCore("topic", element.getTopicElement(), false);
composeCanonicalExtras("topic", element.getTopicElement(), false);
}
if (element.hasError()) {
openArray("error");
for (CodeableConcept e : element.getError())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeSubscriptionStatusNotificationEventComponent(String name, SubscriptionStatus.SubscriptionStatusNotificationEventComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionStatusNotificationEventComponentProperties(element);
close();
}
}
protected void composeSubscriptionStatusNotificationEventComponentProperties(SubscriptionStatus.SubscriptionStatusNotificationEventComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasEventNumberElement()) {
composeInteger64Core("eventNumber", element.getEventNumberElement(), false);
composeInteger64Extras("eventNumber", element.getEventNumberElement(), false);
}
if (element.hasTimestampElement()) {
composeInstantCore("timestamp", element.getTimestampElement(), false);
composeInstantExtras("timestamp", element.getTimestampElement(), false);
}
if (element.hasFocus()) {
composeReference("focus", element.getFocus());
}
if (element.hasAdditionalContext()) {
openArray("additionalContext");
for (Reference e : element.getAdditionalContext())
composeReference(null, e);
closeArray();
};
}
protected void composeSubscriptionTopic(String name, SubscriptionTopic element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubscriptionTopicProperties(element);
}
}
protected void composeSubscriptionTopicProperties(SubscriptionTopic element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDerivedFrom()) {
if (anyHasValue(element.getDerivedFrom())) {
openArray("derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalCore(null, e, e != element.getDerivedFrom().get(element.getDerivedFrom().size()-1));
closeArray();
}
if (anyHasExtras(element.getDerivedFrom())) {
openArray("_derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasResourceTrigger()) {
openArray("resourceTrigger");
for (SubscriptionTopic.SubscriptionTopicResourceTriggerComponent e : element.getResourceTrigger())
composeSubscriptionTopicResourceTriggerComponent(null, e);
closeArray();
};
if (element.hasEventTrigger()) {
openArray("eventTrigger");
for (SubscriptionTopic.SubscriptionTopicEventTriggerComponent e : element.getEventTrigger())
composeSubscriptionTopicEventTriggerComponent(null, e);
closeArray();
};
if (element.hasCanFilterBy()) {
openArray("canFilterBy");
for (SubscriptionTopic.SubscriptionTopicCanFilterByComponent e : element.getCanFilterBy())
composeSubscriptionTopicCanFilterByComponent(null, e);
closeArray();
};
if (element.hasNotificationShape()) {
openArray("notificationShape");
for (SubscriptionTopic.SubscriptionTopicNotificationShapeComponent e : element.getNotificationShape())
composeSubscriptionTopicNotificationShapeComponent(null, e);
closeArray();
};
}
protected void composeSubscriptionTopicResourceTriggerComponent(String name, SubscriptionTopic.SubscriptionTopicResourceTriggerComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionTopicResourceTriggerComponentProperties(element);
close();
}
}
protected void composeSubscriptionTopicResourceTriggerComponentProperties(SubscriptionTopic.SubscriptionTopicResourceTriggerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasResourceElement()) {
composeUriCore("resource", element.getResourceElement(), false);
composeUriExtras("resource", element.getResourceElement(), false);
}
if (element.hasSupportedInteraction()) {
openArray("supportedInteraction");
for (Enumeration e : element.getSupportedInteraction())
composeEnumerationCore(null, e, new SubscriptionTopic.InteractionTriggerEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getSupportedInteraction())) {
openArray("_supportedInteraction");
for (Enumeration e : element.getSupportedInteraction())
composeEnumerationExtras(null, e, new SubscriptionTopic.InteractionTriggerEnumFactory(), true);
closeArray();
}
};
if (element.hasQueryCriteria()) {
composeSubscriptionTopicResourceTriggerQueryCriteriaComponent("queryCriteria", element.getQueryCriteria());
}
if (element.hasFhirPathCriteriaElement()) {
composeStringCore("fhirPathCriteria", element.getFhirPathCriteriaElement(), false);
composeStringExtras("fhirPathCriteria", element.getFhirPathCriteriaElement(), false);
}
}
protected void composeSubscriptionTopicResourceTriggerQueryCriteriaComponent(String name, SubscriptionTopic.SubscriptionTopicResourceTriggerQueryCriteriaComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionTopicResourceTriggerQueryCriteriaComponentProperties(element);
close();
}
}
protected void composeSubscriptionTopicResourceTriggerQueryCriteriaComponentProperties(SubscriptionTopic.SubscriptionTopicResourceTriggerQueryCriteriaComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPreviousElement()) {
composeStringCore("previous", element.getPreviousElement(), false);
composeStringExtras("previous", element.getPreviousElement(), false);
}
if (element.hasResultForCreateElement()) {
composeEnumerationCore("resultForCreate", element.getResultForCreateElement(), new SubscriptionTopic.CriteriaNotExistsBehaviorEnumFactory(), false);
composeEnumerationExtras("resultForCreate", element.getResultForCreateElement(), new SubscriptionTopic.CriteriaNotExistsBehaviorEnumFactory(), false);
}
if (element.hasCurrentElement()) {
composeStringCore("current", element.getCurrentElement(), false);
composeStringExtras("current", element.getCurrentElement(), false);
}
if (element.hasResultForDeleteElement()) {
composeEnumerationCore("resultForDelete", element.getResultForDeleteElement(), new SubscriptionTopic.CriteriaNotExistsBehaviorEnumFactory(), false);
composeEnumerationExtras("resultForDelete", element.getResultForDeleteElement(), new SubscriptionTopic.CriteriaNotExistsBehaviorEnumFactory(), false);
}
if (element.hasRequireBothElement()) {
composeBooleanCore("requireBoth", element.getRequireBothElement(), false);
composeBooleanExtras("requireBoth", element.getRequireBothElement(), false);
}
}
protected void composeSubscriptionTopicEventTriggerComponent(String name, SubscriptionTopic.SubscriptionTopicEventTriggerComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionTopicEventTriggerComponentProperties(element);
close();
}
}
protected void composeSubscriptionTopicEventTriggerComponentProperties(SubscriptionTopic.SubscriptionTopicEventTriggerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasEvent()) {
composeCodeableConcept("event", element.getEvent());
}
if (element.hasResourceElement()) {
composeUriCore("resource", element.getResourceElement(), false);
composeUriExtras("resource", element.getResourceElement(), false);
}
}
protected void composeSubscriptionTopicCanFilterByComponent(String name, SubscriptionTopic.SubscriptionTopicCanFilterByComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionTopicCanFilterByComponentProperties(element);
close();
}
}
protected void composeSubscriptionTopicCanFilterByComponentProperties(SubscriptionTopic.SubscriptionTopicCanFilterByComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasResourceElement()) {
composeUriCore("resource", element.getResourceElement(), false);
composeUriExtras("resource", element.getResourceElement(), false);
}
if (element.hasFilterParameterElement()) {
composeStringCore("filterParameter", element.getFilterParameterElement(), false);
composeStringExtras("filterParameter", element.getFilterParameterElement(), false);
}
if (element.hasFilterDefinitionElement()) {
composeUriCore("filterDefinition", element.getFilterDefinitionElement(), false);
composeUriExtras("filterDefinition", element.getFilterDefinitionElement(), false);
}
if (element.hasComparator()) {
openArray("comparator");
for (Enumeration e : element.getComparator())
composeEnumerationCore(null, e, new Enumerations.SearchComparatorEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getComparator())) {
openArray("_comparator");
for (Enumeration e : element.getComparator())
composeEnumerationExtras(null, e, new Enumerations.SearchComparatorEnumFactory(), true);
closeArray();
}
};
if (element.hasModifier()) {
openArray("modifier");
for (Enumeration e : element.getModifier())
composeEnumerationCore(null, e, new Enumerations.SearchModifierCodeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getModifier())) {
openArray("_modifier");
for (Enumeration e : element.getModifier())
composeEnumerationExtras(null, e, new Enumerations.SearchModifierCodeEnumFactory(), true);
closeArray();
}
};
}
protected void composeSubscriptionTopicNotificationShapeComponent(String name, SubscriptionTopic.SubscriptionTopicNotificationShapeComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionTopicNotificationShapeComponentProperties(element);
close();
}
}
protected void composeSubscriptionTopicNotificationShapeComponentProperties(SubscriptionTopic.SubscriptionTopicNotificationShapeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasResourceElement()) {
composeUriCore("resource", element.getResourceElement(), false);
composeUriExtras("resource", element.getResourceElement(), false);
}
if (element.hasInclude()) {
if (anyHasValue(element.getInclude())) {
openArray("include");
for (StringType e : element.getInclude())
composeStringCore(null, e, e != element.getInclude().get(element.getInclude().size()-1));
closeArray();
}
if (anyHasExtras(element.getInclude())) {
openArray("_include");
for (StringType e : element.getInclude())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasRevInclude()) {
if (anyHasValue(element.getRevInclude())) {
openArray("revInclude");
for (StringType e : element.getRevInclude())
composeStringCore(null, e, e != element.getRevInclude().get(element.getRevInclude().size()-1));
closeArray();
}
if (anyHasExtras(element.getRevInclude())) {
openArray("_revInclude");
for (StringType e : element.getRevInclude())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeSubstance(String name, Substance element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceProperties(element);
}
}
protected void composeSubstanceProperties(Substance element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstanceElement()) {
composeBooleanCore("instance", element.getInstanceElement(), false);
composeBooleanExtras("instance", element.getInstanceElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCode()) {
composeCodeableReference("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasExpiryElement()) {
composeDateTimeCore("expiry", element.getExpiryElement(), false);
composeDateTimeExtras("expiry", element.getExpiryElement(), false);
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasIngredient()) {
openArray("ingredient");
for (Substance.SubstanceIngredientComponent e : element.getIngredient())
composeSubstanceIngredientComponent(null, e);
closeArray();
};
}
protected void composeSubstanceIngredientComponent(String name, Substance.SubstanceIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceIngredientComponentProperties(element);
close();
}
}
protected void composeSubstanceIngredientComponentProperties(Substance.SubstanceIngredientComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasQuantity()) {
composeRatio("quantity", element.getQuantity());
}
if (element.hasSubstance()) {
composeType("substance", element.getSubstance());
}
}
protected void composeSubstanceDefinition(String name, SubstanceDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceDefinitionProperties(element);
}
}
protected void composeSubstanceDefinitionProperties(SubstanceDefinition element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasClassification()) {
openArray("classification");
for (CodeableConcept e : element.getClassification())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDomain()) {
composeCodeableConcept("domain", element.getDomain());
}
if (element.hasGrade()) {
openArray("grade");
for (CodeableConcept e : element.getGrade())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasInformationSource()) {
openArray("informationSource");
for (Reference e : element.getInformationSource())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
};
if (element.hasSupplier()) {
openArray("supplier");
for (Reference e : element.getSupplier())
composeReference(null, e);
closeArray();
};
if (element.hasMoiety()) {
openArray("moiety");
for (SubstanceDefinition.SubstanceDefinitionMoietyComponent e : element.getMoiety())
composeSubstanceDefinitionMoietyComponent(null, e);
closeArray();
};
if (element.hasCharacterization()) {
openArray("characterization");
for (SubstanceDefinition.SubstanceDefinitionCharacterizationComponent e : element.getCharacterization())
composeSubstanceDefinitionCharacterizationComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (SubstanceDefinition.SubstanceDefinitionPropertyComponent e : element.getProperty())
composeSubstanceDefinitionPropertyComponent(null, e);
closeArray();
};
if (element.hasReferenceInformation()) {
composeReference("referenceInformation", element.getReferenceInformation());
}
if (element.hasMolecularWeight()) {
openArray("molecularWeight");
for (SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent e : element.getMolecularWeight())
composeSubstanceDefinitionMolecularWeightComponent(null, e);
closeArray();
};
if (element.hasStructure()) {
composeSubstanceDefinitionStructureComponent("structure", element.getStructure());
}
if (element.hasCode()) {
openArray("code");
for (SubstanceDefinition.SubstanceDefinitionCodeComponent e : element.getCode())
composeSubstanceDefinitionCodeComponent(null, e);
closeArray();
};
if (element.hasName()) {
openArray("name");
for (SubstanceDefinition.SubstanceDefinitionNameComponent e : element.getName())
composeSubstanceDefinitionNameComponent(null, e);
closeArray();
};
if (element.hasRelationship()) {
openArray("relationship");
for (SubstanceDefinition.SubstanceDefinitionRelationshipComponent e : element.getRelationship())
composeSubstanceDefinitionRelationshipComponent(null, e);
closeArray();
};
if (element.hasNucleicAcid()) {
composeReference("nucleicAcid", element.getNucleicAcid());
}
if (element.hasPolymer()) {
composeReference("polymer", element.getPolymer());
}
if (element.hasProtein()) {
composeReference("protein", element.getProtein());
}
if (element.hasSourceMaterial()) {
composeSubstanceDefinitionSourceMaterialComponent("sourceMaterial", element.getSourceMaterial());
}
}
protected void composeSubstanceDefinitionMoietyComponent(String name, SubstanceDefinition.SubstanceDefinitionMoietyComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionMoietyComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionMoietyComponentProperties(SubstanceDefinition.SubstanceDefinitionMoietyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasStereochemistry()) {
composeCodeableConcept("stereochemistry", element.getStereochemistry());
}
if (element.hasOpticalActivity()) {
composeCodeableConcept("opticalActivity", element.getOpticalActivity());
}
if (element.hasMolecularFormulaElement()) {
composeStringCore("molecularFormula", element.getMolecularFormulaElement(), false);
composeStringExtras("molecularFormula", element.getMolecularFormulaElement(), false);
}
if (element.hasAmount()) {
composeType("amount", element.getAmount());
}
if (element.hasMeasurementType()) {
composeCodeableConcept("measurementType", element.getMeasurementType());
}
}
protected void composeSubstanceDefinitionCharacterizationComponent(String name, SubstanceDefinition.SubstanceDefinitionCharacterizationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionCharacterizationComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionCharacterizationComponentProperties(SubstanceDefinition.SubstanceDefinitionCharacterizationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTechnique()) {
composeCodeableConcept("technique", element.getTechnique());
}
if (element.hasForm()) {
composeCodeableConcept("form", element.getForm());
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasFile()) {
openArray("file");
for (Attachment e : element.getFile())
composeAttachment(null, e);
closeArray();
};
}
protected void composeSubstanceDefinitionPropertyComponent(String name, SubstanceDefinition.SubstanceDefinitionPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionPropertyComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionPropertyComponentProperties(SubstanceDefinition.SubstanceDefinitionPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeSubstanceDefinitionMolecularWeightComponent(String name, SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionMolecularWeightComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionMolecularWeightComponentProperties(SubstanceDefinition.SubstanceDefinitionMolecularWeightComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeSubstanceDefinitionStructureComponent(String name, SubstanceDefinition.SubstanceDefinitionStructureComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionStructureComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionStructureComponentProperties(SubstanceDefinition.SubstanceDefinitionStructureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasStereochemistry()) {
composeCodeableConcept("stereochemistry", element.getStereochemistry());
}
if (element.hasOpticalActivity()) {
composeCodeableConcept("opticalActivity", element.getOpticalActivity());
}
if (element.hasMolecularFormulaElement()) {
composeStringCore("molecularFormula", element.getMolecularFormulaElement(), false);
composeStringExtras("molecularFormula", element.getMolecularFormulaElement(), false);
}
if (element.hasMolecularFormulaByMoietyElement()) {
composeStringCore("molecularFormulaByMoiety", element.getMolecularFormulaByMoietyElement(), false);
composeStringExtras("molecularFormulaByMoiety", element.getMolecularFormulaByMoietyElement(), false);
}
if (element.hasMolecularWeight()) {
composeSubstanceDefinitionMolecularWeightComponent("molecularWeight", element.getMolecularWeight());
}
if (element.hasTechnique()) {
openArray("technique");
for (CodeableConcept e : element.getTechnique())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSourceDocument()) {
openArray("sourceDocument");
for (Reference e : element.getSourceDocument())
composeReference(null, e);
closeArray();
};
if (element.hasRepresentation()) {
openArray("representation");
for (SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent e : element.getRepresentation())
composeSubstanceDefinitionStructureRepresentationComponent(null, e);
closeArray();
};
}
protected void composeSubstanceDefinitionStructureRepresentationComponent(String name, SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionStructureRepresentationComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionStructureRepresentationComponentProperties(SubstanceDefinition.SubstanceDefinitionStructureRepresentationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRepresentationElement()) {
composeStringCore("representation", element.getRepresentationElement(), false);
composeStringExtras("representation", element.getRepresentationElement(), false);
}
if (element.hasFormat()) {
composeCodeableConcept("format", element.getFormat());
}
if (element.hasDocument()) {
composeReference("document", element.getDocument());
}
}
protected void composeSubstanceDefinitionCodeComponent(String name, SubstanceDefinition.SubstanceDefinitionCodeComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionCodeComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionCodeComponentProperties(SubstanceDefinition.SubstanceDefinitionCodeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasStatusDateElement()) {
composeDateTimeCore("statusDate", element.getStatusDateElement(), false);
composeDateTimeExtras("statusDate", element.getStatusDateElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeSubstanceDefinitionNameComponent(String name, SubstanceDefinition.SubstanceDefinitionNameComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionNameComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionNameComponentProperties(SubstanceDefinition.SubstanceDefinitionNameComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
if (element.hasLanguage()) {
openArray("language");
for (CodeableConcept e : element.getLanguage())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasDomain()) {
openArray("domain");
for (CodeableConcept e : element.getDomain())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasSynonym()) {
openArray("synonym");
for (SubstanceDefinition.SubstanceDefinitionNameComponent e : element.getSynonym())
composeSubstanceDefinitionNameComponent(null, e);
closeArray();
};
if (element.hasTranslation()) {
openArray("translation");
for (SubstanceDefinition.SubstanceDefinitionNameComponent e : element.getTranslation())
composeSubstanceDefinitionNameComponent(null, e);
closeArray();
};
if (element.hasOfficial()) {
openArray("official");
for (SubstanceDefinition.SubstanceDefinitionNameOfficialComponent e : element.getOfficial())
composeSubstanceDefinitionNameOfficialComponent(null, e);
closeArray();
};
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeSubstanceDefinitionNameOfficialComponent(String name, SubstanceDefinition.SubstanceDefinitionNameOfficialComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionNameOfficialComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionNameOfficialComponentProperties(SubstanceDefinition.SubstanceDefinitionNameOfficialComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAuthority()) {
composeCodeableConcept("authority", element.getAuthority());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
}
protected void composeSubstanceDefinitionRelationshipComponent(String name, SubstanceDefinition.SubstanceDefinitionRelationshipComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionRelationshipComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionRelationshipComponentProperties(SubstanceDefinition.SubstanceDefinitionRelationshipComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubstanceDefinition()) {
composeType("substanceDefinition", element.getSubstanceDefinition());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasIsDefiningElement()) {
composeBooleanCore("isDefining", element.getIsDefiningElement(), false);
composeBooleanExtras("isDefining", element.getIsDefiningElement(), false);
}
if (element.hasAmount()) {
composeType("amount", element.getAmount());
}
if (element.hasRatioHighLimitAmount()) {
composeRatio("ratioHighLimitAmount", element.getRatioHighLimitAmount());
}
if (element.hasComparator()) {
composeCodeableConcept("comparator", element.getComparator());
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeSubstanceDefinitionSourceMaterialComponent(String name, SubstanceDefinition.SubstanceDefinitionSourceMaterialComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceDefinitionSourceMaterialComponentProperties(element);
close();
}
}
protected void composeSubstanceDefinitionSourceMaterialComponentProperties(SubstanceDefinition.SubstanceDefinitionSourceMaterialComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGenus()) {
composeCodeableConcept("genus", element.getGenus());
}
if (element.hasSpecies()) {
composeCodeableConcept("species", element.getSpecies());
}
if (element.hasPart()) {
composeCodeableConcept("part", element.getPart());
}
if (element.hasCountryOfOrigin()) {
openArray("countryOfOrigin");
for (CodeableConcept e : element.getCountryOfOrigin())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeSubstanceNucleicAcid(String name, SubstanceNucleicAcid element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceNucleicAcidProperties(element);
}
}
protected void composeSubstanceNucleicAcidProperties(SubstanceNucleicAcid element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasSequenceType()) {
composeCodeableConcept("sequenceType", element.getSequenceType());
}
if (element.hasNumberOfSubunitsElement()) {
composeIntegerCore("numberOfSubunits", element.getNumberOfSubunitsElement(), false);
composeIntegerExtras("numberOfSubunits", element.getNumberOfSubunitsElement(), false);
}
if (element.hasAreaOfHybridisationElement()) {
composeStringCore("areaOfHybridisation", element.getAreaOfHybridisationElement(), false);
composeStringExtras("areaOfHybridisation", element.getAreaOfHybridisationElement(), false);
}
if (element.hasOligoNucleotideType()) {
composeCodeableConcept("oligoNucleotideType", element.getOligoNucleotideType());
}
if (element.hasSubunit()) {
openArray("subunit");
for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent e : element.getSubunit())
composeSubstanceNucleicAcidSubunitComponent(null, e);
closeArray();
};
}
protected void composeSubstanceNucleicAcidSubunitComponent(String name, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceNucleicAcidSubunitComponentProperties(element);
close();
}
}
protected void composeSubstanceNucleicAcidSubunitComponentProperties(SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubunitElement()) {
composeIntegerCore("subunit", element.getSubunitElement(), false);
composeIntegerExtras("subunit", element.getSubunitElement(), false);
}
if (element.hasSequenceElement()) {
composeStringCore("sequence", element.getSequenceElement(), false);
composeStringExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasLengthElement()) {
composeIntegerCore("length", element.getLengthElement(), false);
composeIntegerExtras("length", element.getLengthElement(), false);
}
if (element.hasSequenceAttachment()) {
composeAttachment("sequenceAttachment", element.getSequenceAttachment());
}
if (element.hasFivePrime()) {
composeCodeableConcept("fivePrime", element.getFivePrime());
}
if (element.hasThreePrime()) {
composeCodeableConcept("threePrime", element.getThreePrime());
}
if (element.hasLinkage()) {
openArray("linkage");
for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent e : element.getLinkage())
composeSubstanceNucleicAcidSubunitLinkageComponent(null, e);
closeArray();
};
if (element.hasSugar()) {
openArray("sugar");
for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent e : element.getSugar())
composeSubstanceNucleicAcidSubunitSugarComponent(null, e);
closeArray();
};
}
protected void composeSubstanceNucleicAcidSubunitLinkageComponent(String name, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceNucleicAcidSubunitLinkageComponentProperties(element);
close();
}
}
protected void composeSubstanceNucleicAcidSubunitLinkageComponentProperties(SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasConnectivityElement()) {
composeStringCore("connectivity", element.getConnectivityElement(), false);
composeStringExtras("connectivity", element.getConnectivityElement(), false);
}
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasResidueSiteElement()) {
composeStringCore("residueSite", element.getResidueSiteElement(), false);
composeStringExtras("residueSite", element.getResidueSiteElement(), false);
}
}
protected void composeSubstanceNucleicAcidSubunitSugarComponent(String name, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceNucleicAcidSubunitSugarComponentProperties(element);
close();
}
}
protected void composeSubstanceNucleicAcidSubunitSugarComponentProperties(SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasResidueSiteElement()) {
composeStringCore("residueSite", element.getResidueSiteElement(), false);
composeStringExtras("residueSite", element.getResidueSiteElement(), false);
}
}
protected void composeSubstancePolymer(String name, SubstancePolymer element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstancePolymerProperties(element);
}
}
protected void composeSubstancePolymerProperties(SubstancePolymer element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasClass_()) {
composeCodeableConcept("class", element.getClass_());
}
if (element.hasGeometry()) {
composeCodeableConcept("geometry", element.getGeometry());
}
if (element.hasCopolymerConnectivity()) {
openArray("copolymerConnectivity");
for (CodeableConcept e : element.getCopolymerConnectivity())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasModificationElement()) {
composeStringCore("modification", element.getModificationElement(), false);
composeStringExtras("modification", element.getModificationElement(), false);
}
if (element.hasMonomerSet()) {
openArray("monomerSet");
for (SubstancePolymer.SubstancePolymerMonomerSetComponent e : element.getMonomerSet())
composeSubstancePolymerMonomerSetComponent(null, e);
closeArray();
};
if (element.hasRepeat()) {
openArray("repeat");
for (SubstancePolymer.SubstancePolymerRepeatComponent e : element.getRepeat())
composeSubstancePolymerRepeatComponent(null, e);
closeArray();
};
}
protected void composeSubstancePolymerMonomerSetComponent(String name, SubstancePolymer.SubstancePolymerMonomerSetComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerMonomerSetComponentProperties(element);
close();
}
}
protected void composeSubstancePolymerMonomerSetComponentProperties(SubstancePolymer.SubstancePolymerMonomerSetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRatioType()) {
composeCodeableConcept("ratioType", element.getRatioType());
}
if (element.hasStartingMaterial()) {
openArray("startingMaterial");
for (SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent e : element.getStartingMaterial())
composeSubstancePolymerMonomerSetStartingMaterialComponent(null, e);
closeArray();
};
}
protected void composeSubstancePolymerMonomerSetStartingMaterialComponent(String name, SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerMonomerSetStartingMaterialComponentProperties(element);
close();
}
}
protected void composeSubstancePolymerMonomerSetStartingMaterialComponentProperties(SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasIsDefiningElement()) {
composeBooleanCore("isDefining", element.getIsDefiningElement(), false);
composeBooleanExtras("isDefining", element.getIsDefiningElement(), false);
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeSubstancePolymerRepeatComponent(String name, SubstancePolymer.SubstancePolymerRepeatComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerRepeatComponentProperties(element);
close();
}
}
protected void composeSubstancePolymerRepeatComponentProperties(SubstancePolymer.SubstancePolymerRepeatComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAverageMolecularFormulaElement()) {
composeStringCore("averageMolecularFormula", element.getAverageMolecularFormulaElement(), false);
composeStringExtras("averageMolecularFormula", element.getAverageMolecularFormulaElement(), false);
}
if (element.hasRepeatUnitAmountType()) {
composeCodeableConcept("repeatUnitAmountType", element.getRepeatUnitAmountType());
}
if (element.hasRepeatUnit()) {
openArray("repeatUnit");
for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent e : element.getRepeatUnit())
composeSubstancePolymerRepeatRepeatUnitComponent(null, e);
closeArray();
};
}
protected void composeSubstancePolymerRepeatRepeatUnitComponent(String name, SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerRepeatRepeatUnitComponentProperties(element);
close();
}
}
protected void composeSubstancePolymerRepeatRepeatUnitComponentProperties(SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUnitElement()) {
composeStringCore("unit", element.getUnitElement(), false);
composeStringExtras("unit", element.getUnitElement(), false);
}
if (element.hasOrientation()) {
composeCodeableConcept("orientation", element.getOrientation());
}
if (element.hasAmountElement()) {
composeIntegerCore("amount", element.getAmountElement(), false);
composeIntegerExtras("amount", element.getAmountElement(), false);
}
if (element.hasDegreeOfPolymerisation()) {
openArray("degreeOfPolymerisation");
for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent e : element.getDegreeOfPolymerisation())
composeSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(null, e);
closeArray();
};
if (element.hasStructuralRepresentation()) {
openArray("structuralRepresentation");
for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent e : element.getStructuralRepresentation())
composeSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(null, e);
closeArray();
};
}
protected void composeSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(String name, SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentProperties(element);
close();
}
}
protected void composeSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentProperties(SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAverageElement()) {
composeIntegerCore("average", element.getAverageElement(), false);
composeIntegerExtras("average", element.getAverageElement(), false);
}
if (element.hasLowElement()) {
composeIntegerCore("low", element.getLowElement(), false);
composeIntegerExtras("low", element.getLowElement(), false);
}
if (element.hasHighElement()) {
composeIntegerCore("high", element.getHighElement(), false);
composeIntegerExtras("high", element.getHighElement(), false);
}
}
protected void composeSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(String name, SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentProperties(element);
close();
}
}
protected void composeSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentProperties(SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRepresentationElement()) {
composeStringCore("representation", element.getRepresentationElement(), false);
composeStringExtras("representation", element.getRepresentationElement(), false);
}
if (element.hasFormat()) {
composeCodeableConcept("format", element.getFormat());
}
if (element.hasAttachment()) {
composeAttachment("attachment", element.getAttachment());
}
}
protected void composeSubstanceProtein(String name, SubstanceProtein element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceProteinProperties(element);
}
}
protected void composeSubstanceProteinProperties(SubstanceProtein element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasSequenceType()) {
composeCodeableConcept("sequenceType", element.getSequenceType());
}
if (element.hasNumberOfSubunitsElement()) {
composeIntegerCore("numberOfSubunits", element.getNumberOfSubunitsElement(), false);
composeIntegerExtras("numberOfSubunits", element.getNumberOfSubunitsElement(), false);
}
if (element.hasDisulfideLinkage()) {
if (anyHasValue(element.getDisulfideLinkage())) {
openArray("disulfideLinkage");
for (StringType e : element.getDisulfideLinkage())
composeStringCore(null, e, e != element.getDisulfideLinkage().get(element.getDisulfideLinkage().size()-1));
closeArray();
}
if (anyHasExtras(element.getDisulfideLinkage())) {
openArray("_disulfideLinkage");
for (StringType e : element.getDisulfideLinkage())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasSubunit()) {
openArray("subunit");
for (SubstanceProtein.SubstanceProteinSubunitComponent e : element.getSubunit())
composeSubstanceProteinSubunitComponent(null, e);
closeArray();
};
}
protected void composeSubstanceProteinSubunitComponent(String name, SubstanceProtein.SubstanceProteinSubunitComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceProteinSubunitComponentProperties(element);
close();
}
}
protected void composeSubstanceProteinSubunitComponentProperties(SubstanceProtein.SubstanceProteinSubunitComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSubunitElement()) {
composeIntegerCore("subunit", element.getSubunitElement(), false);
composeIntegerExtras("subunit", element.getSubunitElement(), false);
}
if (element.hasSequenceElement()) {
composeStringCore("sequence", element.getSequenceElement(), false);
composeStringExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasLengthElement()) {
composeIntegerCore("length", element.getLengthElement(), false);
composeIntegerExtras("length", element.getLengthElement(), false);
}
if (element.hasSequenceAttachment()) {
composeAttachment("sequenceAttachment", element.getSequenceAttachment());
}
if (element.hasNTerminalModificationId()) {
composeIdentifier("nTerminalModificationId", element.getNTerminalModificationId());
}
if (element.hasNTerminalModificationElement()) {
composeStringCore("nTerminalModification", element.getNTerminalModificationElement(), false);
composeStringExtras("nTerminalModification", element.getNTerminalModificationElement(), false);
}
if (element.hasCTerminalModificationId()) {
composeIdentifier("cTerminalModificationId", element.getCTerminalModificationId());
}
if (element.hasCTerminalModificationElement()) {
composeStringCore("cTerminalModification", element.getCTerminalModificationElement(), false);
composeStringExtras("cTerminalModification", element.getCTerminalModificationElement(), false);
}
}
protected void composeSubstanceReferenceInformation(String name, SubstanceReferenceInformation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceReferenceInformationProperties(element);
}
}
protected void composeSubstanceReferenceInformationProperties(SubstanceReferenceInformation element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasGene()) {
openArray("gene");
for (SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent e : element.getGene())
composeSubstanceReferenceInformationGeneComponent(null, e);
closeArray();
};
if (element.hasGeneElement()) {
openArray("geneElement");
for (SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent e : element.getGeneElement())
composeSubstanceReferenceInformationGeneElementComponent(null, e);
closeArray();
};
if (element.hasTarget()) {
openArray("target");
for (SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent e : element.getTarget())
composeSubstanceReferenceInformationTargetComponent(null, e);
closeArray();
};
}
protected void composeSubstanceReferenceInformationGeneComponent(String name, SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationGeneComponentProperties(element);
close();
}
}
protected void composeSubstanceReferenceInformationGeneComponentProperties(SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasGeneSequenceOrigin()) {
composeCodeableConcept("geneSequenceOrigin", element.getGeneSequenceOrigin());
}
if (element.hasGene()) {
composeCodeableConcept("gene", element.getGene());
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeSubstanceReferenceInformationGeneElementComponent(String name, SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationGeneElementComponentProperties(element);
close();
}
}
protected void composeSubstanceReferenceInformationGeneElementComponentProperties(SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasElement()) {
composeIdentifier("element", element.getElement());
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeSubstanceReferenceInformationTargetComponent(String name, SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationTargetComponentProperties(element);
close();
}
}
protected void composeSubstanceReferenceInformationTargetComponentProperties(SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTarget()) {
composeIdentifier("target", element.getTarget());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasInteraction()) {
composeCodeableConcept("interaction", element.getInteraction());
}
if (element.hasOrganism()) {
composeCodeableConcept("organism", element.getOrganism());
}
if (element.hasOrganismType()) {
composeCodeableConcept("organismType", element.getOrganismType());
}
if (element.hasAmount()) {
composeType("amount", element.getAmount());
}
if (element.hasAmountType()) {
composeCodeableConcept("amountType", element.getAmountType());
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
};
}
protected void composeSubstanceSourceMaterial(String name, SubstanceSourceMaterial element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceSourceMaterialProperties(element);
}
}
protected void composeSubstanceSourceMaterialProperties(SubstanceSourceMaterial element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasSourceMaterialClass()) {
composeCodeableConcept("sourceMaterialClass", element.getSourceMaterialClass());
}
if (element.hasSourceMaterialType()) {
composeCodeableConcept("sourceMaterialType", element.getSourceMaterialType());
}
if (element.hasSourceMaterialState()) {
composeCodeableConcept("sourceMaterialState", element.getSourceMaterialState());
}
if (element.hasOrganismId()) {
composeIdentifier("organismId", element.getOrganismId());
}
if (element.hasOrganismNameElement()) {
composeStringCore("organismName", element.getOrganismNameElement(), false);
composeStringExtras("organismName", element.getOrganismNameElement(), false);
}
if (element.hasParentSubstanceId()) {
openArray("parentSubstanceId");
for (Identifier e : element.getParentSubstanceId())
composeIdentifier(null, e);
closeArray();
};
if (element.hasParentSubstanceName()) {
if (anyHasValue(element.getParentSubstanceName())) {
openArray("parentSubstanceName");
for (StringType e : element.getParentSubstanceName())
composeStringCore(null, e, e != element.getParentSubstanceName().get(element.getParentSubstanceName().size()-1));
closeArray();
}
if (anyHasExtras(element.getParentSubstanceName())) {
openArray("_parentSubstanceName");
for (StringType e : element.getParentSubstanceName())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasCountryOfOrigin()) {
openArray("countryOfOrigin");
for (CodeableConcept e : element.getCountryOfOrigin())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasGeographicalLocation()) {
if (anyHasValue(element.getGeographicalLocation())) {
openArray("geographicalLocation");
for (StringType e : element.getGeographicalLocation())
composeStringCore(null, e, e != element.getGeographicalLocation().get(element.getGeographicalLocation().size()-1));
closeArray();
}
if (anyHasExtras(element.getGeographicalLocation())) {
openArray("_geographicalLocation");
for (StringType e : element.getGeographicalLocation())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasDevelopmentStage()) {
composeCodeableConcept("developmentStage", element.getDevelopmentStage());
}
if (element.hasFractionDescription()) {
openArray("fractionDescription");
for (SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent e : element.getFractionDescription())
composeSubstanceSourceMaterialFractionDescriptionComponent(null, e);
closeArray();
};
if (element.hasOrganism()) {
composeSubstanceSourceMaterialOrganismComponent("organism", element.getOrganism());
}
if (element.hasPartDescription()) {
openArray("partDescription");
for (SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent e : element.getPartDescription())
composeSubstanceSourceMaterialPartDescriptionComponent(null, e);
closeArray();
};
}
protected void composeSubstanceSourceMaterialFractionDescriptionComponent(String name, SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialFractionDescriptionComponentProperties(element);
close();
}
}
protected void composeSubstanceSourceMaterialFractionDescriptionComponentProperties(SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFractionElement()) {
composeStringCore("fraction", element.getFractionElement(), false);
composeStringExtras("fraction", element.getFractionElement(), false);
}
if (element.hasMaterialType()) {
composeCodeableConcept("materialType", element.getMaterialType());
}
}
protected void composeSubstanceSourceMaterialOrganismComponent(String name, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialOrganismComponentProperties(element);
close();
}
}
protected void composeSubstanceSourceMaterialOrganismComponentProperties(SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFamily()) {
composeCodeableConcept("family", element.getFamily());
}
if (element.hasGenus()) {
composeCodeableConcept("genus", element.getGenus());
}
if (element.hasSpecies()) {
composeCodeableConcept("species", element.getSpecies());
}
if (element.hasIntraspecificType()) {
composeCodeableConcept("intraspecificType", element.getIntraspecificType());
}
if (element.hasIntraspecificDescriptionElement()) {
composeStringCore("intraspecificDescription", element.getIntraspecificDescriptionElement(), false);
composeStringExtras("intraspecificDescription", element.getIntraspecificDescriptionElement(), false);
}
if (element.hasAuthor()) {
openArray("author");
for (SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent e : element.getAuthor())
composeSubstanceSourceMaterialOrganismAuthorComponent(null, e);
closeArray();
};
if (element.hasHybrid()) {
composeSubstanceSourceMaterialOrganismHybridComponent("hybrid", element.getHybrid());
}
if (element.hasOrganismGeneral()) {
composeSubstanceSourceMaterialOrganismOrganismGeneralComponent("organismGeneral", element.getOrganismGeneral());
}
}
protected void composeSubstanceSourceMaterialOrganismAuthorComponent(String name, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialOrganismAuthorComponentProperties(element);
close();
}
}
protected void composeSubstanceSourceMaterialOrganismAuthorComponentProperties(SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAuthorType()) {
composeCodeableConcept("authorType", element.getAuthorType());
}
if (element.hasAuthorDescriptionElement()) {
composeStringCore("authorDescription", element.getAuthorDescriptionElement(), false);
composeStringExtras("authorDescription", element.getAuthorDescriptionElement(), false);
}
}
protected void composeSubstanceSourceMaterialOrganismHybridComponent(String name, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialOrganismHybridComponentProperties(element);
close();
}
}
protected void composeSubstanceSourceMaterialOrganismHybridComponentProperties(SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasMaternalOrganismIdElement()) {
composeStringCore("maternalOrganismId", element.getMaternalOrganismIdElement(), false);
composeStringExtras("maternalOrganismId", element.getMaternalOrganismIdElement(), false);
}
if (element.hasMaternalOrganismNameElement()) {
composeStringCore("maternalOrganismName", element.getMaternalOrganismNameElement(), false);
composeStringExtras("maternalOrganismName", element.getMaternalOrganismNameElement(), false);
}
if (element.hasPaternalOrganismIdElement()) {
composeStringCore("paternalOrganismId", element.getPaternalOrganismIdElement(), false);
composeStringExtras("paternalOrganismId", element.getPaternalOrganismIdElement(), false);
}
if (element.hasPaternalOrganismNameElement()) {
composeStringCore("paternalOrganismName", element.getPaternalOrganismNameElement(), false);
composeStringExtras("paternalOrganismName", element.getPaternalOrganismNameElement(), false);
}
if (element.hasHybridType()) {
composeCodeableConcept("hybridType", element.getHybridType());
}
}
protected void composeSubstanceSourceMaterialOrganismOrganismGeneralComponent(String name, SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialOrganismOrganismGeneralComponentProperties(element);
close();
}
}
protected void composeSubstanceSourceMaterialOrganismOrganismGeneralComponentProperties(SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasKingdom()) {
composeCodeableConcept("kingdom", element.getKingdom());
}
if (element.hasPhylum()) {
composeCodeableConcept("phylum", element.getPhylum());
}
if (element.hasClass_()) {
composeCodeableConcept("class", element.getClass_());
}
if (element.hasOrder()) {
composeCodeableConcept("order", element.getOrder());
}
}
protected void composeSubstanceSourceMaterialPartDescriptionComponent(String name, SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialPartDescriptionComponentProperties(element);
close();
}
}
protected void composeSubstanceSourceMaterialPartDescriptionComponentProperties(SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPart()) {
composeCodeableConcept("part", element.getPart());
}
if (element.hasPartLocation()) {
composeCodeableConcept("partLocation", element.getPartLocation());
}
}
protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSupplyDeliveryProperties(element);
}
}
protected void composeSupplyDeliveryProperties(SupplyDelivery element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSuppliedItem()) {
openArray("suppliedItem");
for (SupplyDelivery.SupplyDeliverySuppliedItemComponent e : element.getSuppliedItem())
composeSupplyDeliverySuppliedItemComponent(null, e);
closeArray();
};
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasSupplier()) {
composeReference("supplier", element.getSupplier());
}
if (element.hasDestination()) {
composeReference("destination", element.getDestination());
}
if (element.hasReceiver()) {
openArray("receiver");
for (Reference e : element.getReceiver())
composeReference(null, e);
closeArray();
};
}
protected void composeSupplyDeliverySuppliedItemComponent(String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeSupplyDeliverySuppliedItemComponentProperties(element);
close();
}
}
protected void composeSupplyDeliverySuppliedItemComponentProperties(SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeSupplyRequest(String name, SupplyRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSupplyRequestProperties(element);
}
}
protected void composeSupplyRequestProperties(SupplyRequest element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDeliverFor()) {
composeReference("deliverFor", element.getDeliverFor());
}
if (element.hasItem()) {
composeCodeableReference("item", element.getItem());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasParameter()) {
openArray("parameter");
for (SupplyRequest.SupplyRequestParameterComponent e : element.getParameter())
composeSupplyRequestParameterComponent(null, e);
closeArray();
};
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasSupplier()) {
openArray("supplier");
for (Reference e : element.getSupplier())
composeReference(null, e);
closeArray();
};
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasDeliverFrom()) {
composeReference("deliverFrom", element.getDeliverFrom());
}
if (element.hasDeliverTo()) {
composeReference("deliverTo", element.getDeliverTo());
}
}
protected void composeSupplyRequestParameterComponent(String name, SupplyRequest.SupplyRequestParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeSupplyRequestParameterComponentProperties(element);
close();
}
}
protected void composeSupplyRequestParameterComponentProperties(SupplyRequest.SupplyRequestParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeTask(String name, Task element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTaskProperties(element);
}
}
protected void composeTaskProperties(Task element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonicalElement()) {
composeCanonicalCore("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
composeCanonicalExtras("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
}
if (element.hasInstantiatesUriElement()) {
composeUriCore("instantiatesUri", element.getInstantiatesUriElement(), false);
composeUriExtras("instantiatesUri", element.getInstantiatesUriElement(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Task.TaskStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Task.TaskStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableReference("statusReason", element.getStatusReason());
}
if (element.hasBusinessStatus()) {
composeCodeableConcept("businessStatus", element.getBusinessStatus());
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasFocus()) {
composeReference("focus", element.getFocus());
}
if (element.hasFor()) {
composeReference("for", element.getFor());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasRequestedPeriod()) {
composePeriod("requestedPeriod", element.getRequestedPeriod());
}
if (element.hasExecutionPeriod()) {
composePeriod("executionPeriod", element.getExecutionPeriod());
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasLastModifiedElement()) {
composeDateTimeCore("lastModified", element.getLastModifiedElement(), false);
composeDateTimeExtras("lastModified", element.getLastModifiedElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasRequestedPerformer()) {
openArray("requestedPerformer");
for (CodeableReference e : element.getRequestedPerformer())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasOwner()) {
composeReference("owner", element.getOwner());
}
if (element.hasPerformer()) {
openArray("performer");
for (Task.TaskPerformerComponent e : element.getPerformer())
composeTaskPerformerComponent(null, e);
closeArray();
};
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasReason()) {
openArray("reason");
for (CodeableReference e : element.getReason())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasInsurance()) {
openArray("insurance");
for (Reference e : element.getInsurance())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRelevantHistory()) {
openArray("relevantHistory");
for (Reference e : element.getRelevantHistory())
composeReference(null, e);
closeArray();
};
if (element.hasRestriction()) {
composeTaskRestrictionComponent("restriction", element.getRestriction());
}
if (element.hasInput()) {
openArray("input");
for (Task.TaskInputComponent e : element.getInput())
composeTaskInputComponent(null, e);
closeArray();
};
if (element.hasOutput()) {
openArray("output");
for (Task.TaskOutputComponent e : element.getOutput())
composeTaskOutputComponent(null, e);
closeArray();
};
}
protected void composeTaskPerformerComponent(String name, Task.TaskPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeTaskPerformerComponentProperties(element);
close();
}
}
protected void composeTaskPerformerComponentProperties(Task.TaskPerformerComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element) throws IOException {
if (element != null) {
open(name);
composeTaskRestrictionComponentProperties(element);
close();
}
}
protected void composeTaskRestrictionComponentProperties(Task.TaskRestrictionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRepetitionsElement()) {
composePositiveIntCore("repetitions", element.getRepetitionsElement(), false);
composePositiveIntExtras("repetitions", element.getRepetitionsElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasRecipient()) {
openArray("recipient");
for (Reference e : element.getRecipient())
composeReference(null, e);
closeArray();
};
}
protected void composeTaskInputComponent(String name, Task.TaskInputComponent element) throws IOException {
if (element != null) {
open(name);
composeTaskInputComponentProperties(element);
close();
}
}
protected void composeTaskInputComponentProperties(Task.TaskInputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException {
if (element != null) {
open(name);
composeTaskOutputComponentProperties(element);
close();
}
}
protected void composeTaskOutputComponentProperties(Task.TaskOutputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeTerminologyCapabilities(String name, TerminologyCapabilities element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTerminologyCapabilitiesProperties(element);
}
}
protected void composeTerminologyCapabilitiesProperties(TerminologyCapabilities element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new Enumerations.CapabilityStatementKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new Enumerations.CapabilityStatementKindEnumFactory(), false);
}
if (element.hasSoftware()) {
composeTerminologyCapabilitiesSoftwareComponent("software", element.getSoftware());
}
if (element.hasImplementation()) {
composeTerminologyCapabilitiesImplementationComponent("implementation", element.getImplementation());
}
if (element.hasLockedDateElement()) {
composeBooleanCore("lockedDate", element.getLockedDateElement(), false);
composeBooleanExtras("lockedDate", element.getLockedDateElement(), false);
}
if (element.hasCodeSystem()) {
openArray("codeSystem");
for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent e : element.getCodeSystem())
composeTerminologyCapabilitiesCodeSystemComponent(null, e);
closeArray();
};
if (element.hasExpansion()) {
composeTerminologyCapabilitiesExpansionComponent("expansion", element.getExpansion());
}
if (element.hasCodeSearchElement()) {
composeEnumerationCore("codeSearch", element.getCodeSearchElement(), new TerminologyCapabilities.CodeSearchSupportEnumFactory(), false);
composeEnumerationExtras("codeSearch", element.getCodeSearchElement(), new TerminologyCapabilities.CodeSearchSupportEnumFactory(), false);
}
if (element.hasValidateCode()) {
composeTerminologyCapabilitiesValidateCodeComponent("validateCode", element.getValidateCode());
}
if (element.hasTranslation()) {
composeTerminologyCapabilitiesTranslationComponent("translation", element.getTranslation());
}
if (element.hasClosure()) {
composeTerminologyCapabilitiesClosureComponent("closure", element.getClosure());
}
}
protected void composeTerminologyCapabilitiesSoftwareComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesSoftwareComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesSoftwareComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
}
protected void composeTerminologyCapabilitiesImplementationComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesImplementationComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesImplementationComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
}
protected void composeTerminologyCapabilitiesCodeSystemComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesCodeSystemComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesCodeSystemComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUriElement()) {
composeCanonicalCore("uri", element.getUriElement(), false);
composeCanonicalExtras("uri", element.getUriElement(), false);
}
if (element.hasVersion()) {
openArray("version");
for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent e : element.getVersion())
composeTerminologyCapabilitiesCodeSystemVersionComponent(null, e);
closeArray();
};
if (element.hasContentElement()) {
composeEnumerationCore("content", element.getContentElement(), new Enumerations.CodeSystemContentModeEnumFactory(), false);
composeEnumerationExtras("content", element.getContentElement(), new Enumerations.CodeSystemContentModeEnumFactory(), false);
}
if (element.hasSubsumptionElement()) {
composeBooleanCore("subsumption", element.getSubsumptionElement(), false);
composeBooleanExtras("subsumption", element.getSubsumptionElement(), false);
}
}
protected void composeTerminologyCapabilitiesCodeSystemVersionComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesCodeSystemVersionComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesCodeSystemVersionComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeStringCore("code", element.getCodeElement(), false);
composeStringExtras("code", element.getCodeElement(), false);
}
if (element.hasIsDefaultElement()) {
composeBooleanCore("isDefault", element.getIsDefaultElement(), false);
composeBooleanExtras("isDefault", element.getIsDefaultElement(), false);
}
if (element.hasCompositionalElement()) {
composeBooleanCore("compositional", element.getCompositionalElement(), false);
composeBooleanExtras("compositional", element.getCompositionalElement(), false);
}
if (element.hasLanguage()) {
openArray("language");
for (Enumeration e : element.getLanguage())
composeEnumerationCore(null, e, new Enumerations.CommonLanguagesEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getLanguage())) {
openArray("_language");
for (Enumeration e : element.getLanguage())
composeEnumerationExtras(null, e, new Enumerations.CommonLanguagesEnumFactory(), true);
closeArray();
}
};
if (element.hasFilter()) {
openArray("filter");
for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent e : element.getFilter())
composeTerminologyCapabilitiesCodeSystemVersionFilterComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
if (anyHasValue(element.getProperty())) {
openArray("property");
for (CodeType e : element.getProperty())
composeCodeCore(null, e, e != element.getProperty().get(element.getProperty().size()-1));
closeArray();
}
if (anyHasExtras(element.getProperty())) {
openArray("_property");
for (CodeType e : element.getProperty())
composeCodeExtras(null, e, true);
closeArray();
}
};
}
protected void composeTerminologyCapabilitiesCodeSystemVersionFilterComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesCodeSystemVersionFilterComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesCodeSystemVersionFilterComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasOp()) {
if (anyHasValue(element.getOp())) {
openArray("op");
for (CodeType e : element.getOp())
composeCodeCore(null, e, e != element.getOp().get(element.getOp().size()-1));
closeArray();
}
if (anyHasExtras(element.getOp())) {
openArray("_op");
for (CodeType e : element.getOp())
composeCodeExtras(null, e, true);
closeArray();
}
};
}
protected void composeTerminologyCapabilitiesExpansionComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesExpansionComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesExpansionComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasHierarchicalElement()) {
composeBooleanCore("hierarchical", element.getHierarchicalElement(), false);
composeBooleanExtras("hierarchical", element.getHierarchicalElement(), false);
}
if (element.hasPagingElement()) {
composeBooleanCore("paging", element.getPagingElement(), false);
composeBooleanExtras("paging", element.getPagingElement(), false);
}
if (element.hasIncompleteElement()) {
composeBooleanCore("incomplete", element.getIncompleteElement(), false);
composeBooleanExtras("incomplete", element.getIncompleteElement(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent e : element.getParameter())
composeTerminologyCapabilitiesExpansionParameterComponent(null, e);
closeArray();
};
if (element.hasTextFilterElement()) {
composeMarkdownCore("textFilter", element.getTextFilterElement(), false);
composeMarkdownExtras("textFilter", element.getTextFilterElement(), false);
}
}
protected void composeTerminologyCapabilitiesExpansionParameterComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesExpansionParameterComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesExpansionParameterComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeCodeCore("name", element.getNameElement(), false);
composeCodeExtras("name", element.getNameElement(), false);
}
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeTerminologyCapabilitiesValidateCodeComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesValidateCodeComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesValidateCodeComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTranslationsElement()) {
composeBooleanCore("translations", element.getTranslationsElement(), false);
composeBooleanExtras("translations", element.getTranslationsElement(), false);
}
}
protected void composeTerminologyCapabilitiesTranslationComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTranslationComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesTranslationComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNeedsMapElement()) {
composeBooleanCore("needsMap", element.getNeedsMapElement(), false);
composeBooleanExtras("needsMap", element.getNeedsMapElement(), false);
}
}
protected void composeTerminologyCapabilitiesClosureComponent(String name, TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesClosureComponentProperties(element);
close();
}
}
protected void composeTerminologyCapabilitiesClosureComponentProperties(TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTranslationElement()) {
composeBooleanCore("translation", element.getTranslationElement(), false);
composeBooleanExtras("translation", element.getTranslationElement(), false);
}
}
protected void composeTestPlan(String name, TestPlan element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTestPlanProperties(element);
}
}
protected void composeTestPlanProperties(TestPlan element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasScope()) {
openArray("scope");
for (Reference e : element.getScope())
composeReference(null, e);
closeArray();
};
if (element.hasTestToolsElement()) {
composeMarkdownCore("testTools", element.getTestToolsElement(), false);
composeMarkdownExtras("testTools", element.getTestToolsElement(), false);
}
if (element.hasDependency()) {
openArray("dependency");
for (TestPlan.TestPlanDependencyComponent e : element.getDependency())
composeTestPlanDependencyComponent(null, e);
closeArray();
};
if (element.hasExitCriteriaElement()) {
composeMarkdownCore("exitCriteria", element.getExitCriteriaElement(), false);
composeMarkdownExtras("exitCriteria", element.getExitCriteriaElement(), false);
}
if (element.hasTestCase()) {
openArray("testCase");
for (TestPlan.TestPlanTestCaseComponent e : element.getTestCase())
composeTestPlanTestCaseComponent(null, e);
closeArray();
};
}
protected void composeTestPlanDependencyComponent(String name, TestPlan.TestPlanDependencyComponent element) throws IOException {
if (element != null) {
open(name);
composeTestPlanDependencyComponentProperties(element);
close();
}
}
protected void composeTestPlanDependencyComponentProperties(TestPlan.TestPlanDependencyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasPredecessor()) {
composeReference("predecessor", element.getPredecessor());
}
}
protected void composeTestPlanTestCaseComponent(String name, TestPlan.TestPlanTestCaseComponent element) throws IOException {
if (element != null) {
open(name);
composeTestPlanTestCaseComponentProperties(element);
close();
}
}
protected void composeTestPlanTestCaseComponentProperties(TestPlan.TestPlanTestCaseComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSequenceElement()) {
composeIntegerCore("sequence", element.getSequenceElement(), false);
composeIntegerExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasScope()) {
openArray("scope");
for (Reference e : element.getScope())
composeReference(null, e);
closeArray();
};
if (element.hasDependency()) {
openArray("dependency");
for (TestPlan.TestCaseDependencyComponent e : element.getDependency())
composeTestCaseDependencyComponent(null, e);
closeArray();
};
if (element.hasTestRun()) {
openArray("testRun");
for (TestPlan.TestPlanTestCaseTestRunComponent e : element.getTestRun())
composeTestPlanTestCaseTestRunComponent(null, e);
closeArray();
};
if (element.hasTestData()) {
openArray("testData");
for (TestPlan.TestPlanTestCaseTestDataComponent e : element.getTestData())
composeTestPlanTestCaseTestDataComponent(null, e);
closeArray();
};
if (element.hasAssertion()) {
openArray("assertion");
for (TestPlan.TestPlanTestCaseAssertionComponent e : element.getAssertion())
composeTestPlanTestCaseAssertionComponent(null, e);
closeArray();
};
}
protected void composeTestCaseDependencyComponent(String name, TestPlan.TestCaseDependencyComponent element) throws IOException {
if (element != null) {
open(name);
composeTestCaseDependencyComponentProperties(element);
close();
}
}
protected void composeTestCaseDependencyComponentProperties(TestPlan.TestCaseDependencyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasPredecessor()) {
composeReference("predecessor", element.getPredecessor());
}
}
protected void composeTestPlanTestCaseTestRunComponent(String name, TestPlan.TestPlanTestCaseTestRunComponent element) throws IOException {
if (element != null) {
open(name);
composeTestPlanTestCaseTestRunComponentProperties(element);
close();
}
}
protected void composeTestPlanTestCaseTestRunComponentProperties(TestPlan.TestPlanTestCaseTestRunComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNarrativeElement()) {
composeMarkdownCore("narrative", element.getNarrativeElement(), false);
composeMarkdownExtras("narrative", element.getNarrativeElement(), false);
}
if (element.hasScript()) {
composeTestPlanTestCaseTestRunScriptComponent("script", element.getScript());
}
}
protected void composeTestPlanTestCaseTestRunScriptComponent(String name, TestPlan.TestPlanTestCaseTestRunScriptComponent element) throws IOException {
if (element != null) {
open(name);
composeTestPlanTestCaseTestRunScriptComponentProperties(element);
close();
}
}
protected void composeTestPlanTestCaseTestRunScriptComponentProperties(TestPlan.TestPlanTestCaseTestRunScriptComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasSource()) {
composeType("source", element.getSource());
}
}
protected void composeTestPlanTestCaseTestDataComponent(String name, TestPlan.TestPlanTestCaseTestDataComponent element) throws IOException {
if (element != null) {
open(name);
composeTestPlanTestCaseTestDataComponentProperties(element);
close();
}
}
protected void composeTestPlanTestCaseTestDataComponentProperties(TestPlan.TestPlanTestCaseTestDataComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasContent()) {
composeReference("content", element.getContent());
}
if (element.hasSource()) {
composeType("source", element.getSource());
}
}
protected void composeTestPlanTestCaseAssertionComponent(String name, TestPlan.TestPlanTestCaseAssertionComponent element) throws IOException {
if (element != null) {
open(name);
composeTestPlanTestCaseAssertionComponentProperties(element);
close();
}
}
protected void composeTestPlanTestCaseAssertionComponentProperties(TestPlan.TestPlanTestCaseAssertionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasObject()) {
openArray("object");
for (CodeableReference e : element.getObject())
composeCodeableReference(null, e);
closeArray();
};
if (element.hasResult()) {
openArray("result");
for (CodeableReference e : element.getResult())
composeCodeableReference(null, e);
closeArray();
};
}
protected void composeTestReport(String name, TestReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTestReportProperties(element);
}
}
protected void composeTestReportProperties(TestReport element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory(), false);
}
if (element.hasTestScriptElement()) {
composeCanonicalCore("testScript", element.getTestScriptElement(), false);
composeCanonicalExtras("testScript", element.getTestScriptElement(), false);
}
if (element.hasResultElement()) {
composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory(), false);
composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory(), false);
}
if (element.hasScoreElement()) {
composeDecimalCore("score", element.getScoreElement(), false);
composeDecimalExtras("score", element.getScoreElement(), false);
}
if (element.hasTesterElement()) {
composeStringCore("tester", element.getTesterElement(), false);
composeStringExtras("tester", element.getTesterElement(), false);
}
if (element.hasIssuedElement()) {
composeDateTimeCore("issued", element.getIssuedElement(), false);
composeDateTimeExtras("issued", element.getIssuedElement(), false);
}
if (element.hasParticipant()) {
openArray("participant");
for (TestReport.TestReportParticipantComponent e : element.getParticipant())
composeTestReportParticipantComponent(null, e);
closeArray();
};
if (element.hasSetup()) {
composeTestReportSetupComponent("setup", element.getSetup());
}
if (element.hasTest()) {
openArray("test");
for (TestReport.TestReportTestComponent e : element.getTest())
composeTestReportTestComponent(null, e);
closeArray();
};
if (element.hasTeardown()) {
composeTestReportTeardownComponent("teardown", element.getTeardown());
}
}
protected void composeTestReportParticipantComponent(String name, TestReport.TestReportParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportParticipantComponentProperties(element);
close();
}
}
protected void composeTestReportParticipantComponentProperties(TestReport.TestReportParticipantComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
}
protected void composeTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportSetupComponentProperties(element);
close();
}
}
protected void composeTestReportSetupComponentProperties(TestReport.TestReportSetupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAction()) {
openArray("action");
for (TestReport.SetupActionComponent e : element.getAction())
composeSetupActionComponent(null, e);
closeArray();
};
}
protected void composeSetupActionComponent(String name, TestReport.SetupActionComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionComponentProperties(element);
close();
}
}
protected void composeSetupActionComponentProperties(TestReport.SetupActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOperation()) {
composeSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeSetupActionOperationComponent(String name, TestReport.SetupActionOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionOperationComponentProperties(element);
close();
}
}
protected void composeSetupActionOperationComponentProperties(TestReport.SetupActionOperationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasResultElement()) {
composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false);
composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false);
}
if (element.hasMessageElement()) {
composeMarkdownCore("message", element.getMessageElement(), false);
composeMarkdownExtras("message", element.getMessageElement(), false);
}
if (element.hasDetailElement()) {
composeUriCore("detail", element.getDetailElement(), false);
composeUriExtras("detail", element.getDetailElement(), false);
}
}
protected void composeSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionAssertComponentProperties(element);
close();
}
}
protected void composeSetupActionAssertComponentProperties(TestReport.SetupActionAssertComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasResultElement()) {
composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false);
composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false);
}
if (element.hasMessageElement()) {
composeMarkdownCore("message", element.getMessageElement(), false);
composeMarkdownExtras("message", element.getMessageElement(), false);
}
if (element.hasDetailElement()) {
composeStringCore("detail", element.getDetailElement(), false);
composeStringExtras("detail", element.getDetailElement(), false);
}
if (element.hasRequirement()) {
openArray("requirement");
for (TestReport.SetupActionAssertRequirementComponent e : element.getRequirement())
composeSetupActionAssertRequirementComponent(null, e);
closeArray();
};
}
protected void composeSetupActionAssertRequirementComponent(String name, TestReport.SetupActionAssertRequirementComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionAssertRequirementComponentProperties(element);
close();
}
}
protected void composeSetupActionAssertRequirementComponentProperties(TestReport.SetupActionAssertRequirementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLink()) {
composeType("link", element.getLink());
}
}
protected void composeTestReportTestComponent(String name, TestReport.TestReportTestComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportTestComponentProperties(element);
close();
}
}
protected void composeTestReportTestComponentProperties(TestReport.TestReportTestComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasAction()) {
openArray("action");
for (TestReport.TestActionComponent e : element.getAction())
composeTestActionComponent(null, e);
closeArray();
};
}
protected void composeTestActionComponent(String name, TestReport.TestActionComponent element) throws IOException {
if (element != null) {
open(name);
composeTestActionComponentProperties(element);
close();
}
}
protected void composeTestActionComponentProperties(TestReport.TestActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOperation()) {
composeSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeTestReportTeardownComponent(String name, TestReport.TestReportTeardownComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportTeardownComponentProperties(element);
close();
}
}
protected void composeTestReportTeardownComponentProperties(TestReport.TestReportTeardownComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAction()) {
openArray("action");
for (TestReport.TeardownActionComponent e : element.getAction())
composeTeardownActionComponent(null, e);
closeArray();
};
}
protected void composeTeardownActionComponent(String name, TestReport.TeardownActionComponent element) throws IOException {
if (element != null) {
open(name);
composeTeardownActionComponentProperties(element);
close();
}
}
protected void composeTeardownActionComponentProperties(TestReport.TeardownActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOperation()) {
composeSetupActionOperationComponent("operation", element.getOperation());
}
}
protected void composeTestScript(String name, TestScript element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTestScriptProperties(element);
}
}
protected void composeTestScriptProperties(TestScript element) throws IOException {
composeCanonicalResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasOrigin()) {
openArray("origin");
for (TestScript.TestScriptOriginComponent e : element.getOrigin())
composeTestScriptOriginComponent(null, e);
closeArray();
};
if (element.hasDestination()) {
openArray("destination");
for (TestScript.TestScriptDestinationComponent e : element.getDestination())
composeTestScriptDestinationComponent(null, e);
closeArray();
};
if (element.hasMetadata()) {
composeTestScriptMetadataComponent("metadata", element.getMetadata());
}
if (element.hasScope()) {
openArray("scope");
for (TestScript.TestScriptScopeComponent e : element.getScope())
composeTestScriptScopeComponent(null, e);
closeArray();
};
if (element.hasFixture()) {
openArray("fixture");
for (TestScript.TestScriptFixtureComponent e : element.getFixture())
composeTestScriptFixtureComponent(null, e);
closeArray();
};
if (element.hasProfile()) {
if (anyHasValue(element.getProfile())) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, e != element.getProfile().get(element.getProfile().size()-1));
closeArray();
}
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasVariable()) {
openArray("variable");
for (TestScript.TestScriptVariableComponent e : element.getVariable())
composeTestScriptVariableComponent(null, e);
closeArray();
};
if (element.hasSetup()) {
composeTestScriptSetupComponent("setup", element.getSetup());
}
if (element.hasTest()) {
openArray("test");
for (TestScript.TestScriptTestComponent e : element.getTest())
composeTestScriptTestComponent(null, e);
closeArray();
};
if (element.hasTeardown()) {
composeTestScriptTeardownComponent("teardown", element.getTeardown());
}
}
protected void composeTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptOriginComponentProperties(element);
close();
}
}
protected void composeTestScriptOriginComponentProperties(TestScript.TestScriptOriginComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIndexElement()) {
composeIntegerCore("index", element.getIndexElement(), false);
composeIntegerExtras("index", element.getIndexElement(), false);
}
if (element.hasProfile()) {
composeCoding("profile", element.getProfile());
}
if (element.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
}
protected void composeTestScriptDestinationComponent(String name, TestScript.TestScriptDestinationComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptDestinationComponentProperties(element);
close();
}
}
protected void composeTestScriptDestinationComponentProperties(TestScript.TestScriptDestinationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIndexElement()) {
composeIntegerCore("index", element.getIndexElement(), false);
composeIntegerExtras("index", element.getIndexElement(), false);
}
if (element.hasProfile()) {
composeCoding("profile", element.getProfile());
}
if (element.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
}
protected void composeTestScriptMetadataComponent(String name, TestScript.TestScriptMetadataComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptMetadataComponentProperties(element);
close();
}
}
protected void composeTestScriptMetadataComponentProperties(TestScript.TestScriptMetadataComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLink()) {
openArray("link");
for (TestScript.TestScriptMetadataLinkComponent e : element.getLink())
composeTestScriptMetadataLinkComponent(null, e);
closeArray();
};
if (element.hasCapability()) {
openArray("capability");
for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability())
composeTestScriptMetadataCapabilityComponent(null, e);
closeArray();
};
}
protected void composeTestScriptMetadataLinkComponent(String name, TestScript.TestScriptMetadataLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptMetadataLinkComponentProperties(element);
close();
}
}
protected void composeTestScriptMetadataLinkComponentProperties(TestScript.TestScriptMetadataLinkComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeTestScriptMetadataCapabilityComponent(String name, TestScript.TestScriptMetadataCapabilityComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptMetadataCapabilityComponentProperties(element);
close();
}
}
protected void composeTestScriptMetadataCapabilityComponentProperties(TestScript.TestScriptMetadataCapabilityComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRequiredElement()) {
composeBooleanCore("required", element.getRequiredElement(), false);
composeBooleanExtras("required", element.getRequiredElement(), false);
}
if (element.hasValidatedElement()) {
composeBooleanCore("validated", element.getValidatedElement(), false);
composeBooleanExtras("validated", element.getValidatedElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasOrigin()) {
if (anyHasValue(element.getOrigin())) {
openArray("origin");
for (IntegerType e : element.getOrigin())
composeIntegerCore(null, e, e != element.getOrigin().get(element.getOrigin().size()-1));
closeArray();
}
if (anyHasExtras(element.getOrigin())) {
openArray("_origin");
for (IntegerType e : element.getOrigin())
composeIntegerExtras(null, e, true);
closeArray();
}
};
if (element.hasDestinationElement()) {
composeIntegerCore("destination", element.getDestinationElement(), false);
composeIntegerExtras("destination", element.getDestinationElement(), false);
}
if (element.hasLink()) {
if (anyHasValue(element.getLink())) {
openArray("link");
for (UriType e : element.getLink())
composeUriCore(null, e, e != element.getLink().get(element.getLink().size()-1));
closeArray();
}
if (anyHasExtras(element.getLink())) {
openArray("_link");
for (UriType e : element.getLink())
composeUriExtras(null, e, true);
closeArray();
}
};
if (element.hasCapabilitiesElement()) {
composeCanonicalCore("capabilities", element.getCapabilitiesElement(), false);
composeCanonicalExtras("capabilities", element.getCapabilitiesElement(), false);
}
}
protected void composeTestScriptScopeComponent(String name, TestScript.TestScriptScopeComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptScopeComponentProperties(element);
close();
}
}
protected void composeTestScriptScopeComponentProperties(TestScript.TestScriptScopeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasArtifactElement()) {
composeCanonicalCore("artifact", element.getArtifactElement(), false);
composeCanonicalExtras("artifact", element.getArtifactElement(), false);
}
if (element.hasConformance()) {
composeCodeableConcept("conformance", element.getConformance());
}
if (element.hasPhase()) {
composeCodeableConcept("phase", element.getPhase());
}
}
protected void composeTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptFixtureComponentProperties(element);
close();
}
}
protected void composeTestScriptFixtureComponentProperties(TestScript.TestScriptFixtureComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAutocreateElement()) {
composeBooleanCore("autocreate", element.getAutocreateElement(), false);
composeBooleanExtras("autocreate", element.getAutocreateElement(), false);
}
if (element.hasAutodeleteElement()) {
composeBooleanCore("autodelete", element.getAutodeleteElement(), false);
composeBooleanExtras("autodelete", element.getAutodeleteElement(), false);
}
if (element.hasResource()) {
composeReference("resource", element.getResource());
}
}
protected void composeTestScriptVariableComponent(String name, TestScript.TestScriptVariableComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptVariableComponentProperties(element);
close();
}
}
protected void composeTestScriptVariableComponentProperties(TestScript.TestScriptVariableComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDefaultValueElement()) {
composeStringCore("defaultValue", element.getDefaultValueElement(), false);
composeStringExtras("defaultValue", element.getDefaultValueElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
if (element.hasHeaderFieldElement()) {
composeStringCore("headerField", element.getHeaderFieldElement(), false);
composeStringExtras("headerField", element.getHeaderFieldElement(), false);
}
if (element.hasHintElement()) {
composeStringCore("hint", element.getHintElement(), false);
composeStringExtras("hint", element.getHintElement(), false);
}
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasSourceIdElement()) {
composeIdCore("sourceId", element.getSourceIdElement(), false);
composeIdExtras("sourceId", element.getSourceIdElement(), false);
}
}
protected void composeTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptSetupComponentProperties(element);
close();
}
}
protected void composeTestScriptSetupComponentProperties(TestScript.TestScriptSetupComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAction()) {
openArray("action");
for (TestScript.SetupActionComponent e : element.getAction())
composeSetupActionComponent(null, e);
closeArray();
};
}
protected void composeSetupActionComponent(String name, TestScript.SetupActionComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionComponentProperties(element);
close();
}
}
protected void composeSetupActionComponentProperties(TestScript.SetupActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOperation()) {
composeSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeSetupActionOperationComponent(String name, TestScript.SetupActionOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionOperationComponentProperties(element);
close();
}
}
protected void composeSetupActionOperationComponentProperties(TestScript.SetupActionOperationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasResourceElement()) {
composeUriCore("resource", element.getResourceElement(), false);
composeUriExtras("resource", element.getResourceElement(), false);
}
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasAcceptElement()) {
composeCodeCore("accept", element.getAcceptElement(), false);
composeCodeExtras("accept", element.getAcceptElement(), false);
}
if (element.hasContentTypeElement()) {
composeCodeCore("contentType", element.getContentTypeElement(), false);
composeCodeExtras("contentType", element.getContentTypeElement(), false);
}
if (element.hasDestinationElement()) {
composeIntegerCore("destination", element.getDestinationElement(), false);
composeIntegerExtras("destination", element.getDestinationElement(), false);
}
if (element.hasEncodeRequestUrlElement()) {
composeBooleanCore("encodeRequestUrl", element.getEncodeRequestUrlElement(), false);
composeBooleanExtras("encodeRequestUrl", element.getEncodeRequestUrlElement(), false);
}
if (element.hasMethodElement()) {
composeEnumerationCore("method", element.getMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false);
composeEnumerationExtras("method", element.getMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false);
}
if (element.hasOriginElement()) {
composeIntegerCore("origin", element.getOriginElement(), false);
composeIntegerExtras("origin", element.getOriginElement(), false);
}
if (element.hasParamsElement()) {
composeStringCore("params", element.getParamsElement(), false);
composeStringExtras("params", element.getParamsElement(), false);
}
if (element.hasRequestHeader()) {
openArray("requestHeader");
for (TestScript.SetupActionOperationRequestHeaderComponent e : element.getRequestHeader())
composeSetupActionOperationRequestHeaderComponent(null, e);
closeArray();
};
if (element.hasRequestIdElement()) {
composeIdCore("requestId", element.getRequestIdElement(), false);
composeIdExtras("requestId", element.getRequestIdElement(), false);
}
if (element.hasResponseIdElement()) {
composeIdCore("responseId", element.getResponseIdElement(), false);
composeIdExtras("responseId", element.getResponseIdElement(), false);
}
if (element.hasSourceIdElement()) {
composeIdCore("sourceId", element.getSourceIdElement(), false);
composeIdExtras("sourceId", element.getSourceIdElement(), false);
}
if (element.hasTargetIdElement()) {
composeIdCore("targetId", element.getTargetIdElement(), false);
composeIdExtras("targetId", element.getTargetIdElement(), false);
}
if (element.hasUrlElement()) {
composeStringCore("url", element.getUrlElement(), false);
composeStringExtras("url", element.getUrlElement(), false);
}
}
protected void composeSetupActionOperationRequestHeaderComponent(String name, TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionOperationRequestHeaderComponentProperties(element);
close();
}
}
protected void composeSetupActionOperationRequestHeaderComponentProperties(TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasFieldElement()) {
composeStringCore("field", element.getFieldElement(), false);
composeStringExtras("field", element.getFieldElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionAssertComponentProperties(element);
close();
}
}
protected void composeSetupActionAssertComponentProperties(TestScript.SetupActionAssertComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasDirectionElement()) {
composeEnumerationCore("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory(), false);
composeEnumerationExtras("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory(), false);
}
if (element.hasCompareToSourceIdElement()) {
composeStringCore("compareToSourceId", element.getCompareToSourceIdElement(), false);
composeStringExtras("compareToSourceId", element.getCompareToSourceIdElement(), false);
}
if (element.hasCompareToSourceExpressionElement()) {
composeStringCore("compareToSourceExpression", element.getCompareToSourceExpressionElement(), false);
composeStringExtras("compareToSourceExpression", element.getCompareToSourceExpressionElement(), false);
}
if (element.hasCompareToSourcePathElement()) {
composeStringCore("compareToSourcePath", element.getCompareToSourcePathElement(), false);
composeStringExtras("compareToSourcePath", element.getCompareToSourcePathElement(), false);
}
if (element.hasContentTypeElement()) {
composeCodeCore("contentType", element.getContentTypeElement(), false);
composeCodeExtras("contentType", element.getContentTypeElement(), false);
}
if (element.hasDefaultManualCompletionElement()) {
composeEnumerationCore("defaultManualCompletion", element.getDefaultManualCompletionElement(), new TestScript.AssertionManualCompletionTypeEnumFactory(), false);
composeEnumerationExtras("defaultManualCompletion", element.getDefaultManualCompletionElement(), new TestScript.AssertionManualCompletionTypeEnumFactory(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
if (element.hasHeaderFieldElement()) {
composeStringCore("headerField", element.getHeaderFieldElement(), false);
composeStringExtras("headerField", element.getHeaderFieldElement(), false);
}
if (element.hasMinimumIdElement()) {
composeStringCore("minimumId", element.getMinimumIdElement(), false);
composeStringExtras("minimumId", element.getMinimumIdElement(), false);
}
if (element.hasNavigationLinksElement()) {
composeBooleanCore("navigationLinks", element.getNavigationLinksElement(), false);
composeBooleanExtras("navigationLinks", element.getNavigationLinksElement(), false);
}
if (element.hasOperatorElement()) {
composeEnumerationCore("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory(), false);
composeEnumerationExtras("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory(), false);
}
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasRequestMethodElement()) {
composeEnumerationCore("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false);
composeEnumerationExtras("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false);
}
if (element.hasRequestURLElement()) {
composeStringCore("requestURL", element.getRequestURLElement(), false);
composeStringExtras("requestURL", element.getRequestURLElement(), false);
}
if (element.hasResourceElement()) {
composeUriCore("resource", element.getResourceElement(), false);
composeUriExtras("resource", element.getResourceElement(), false);
}
if (element.hasResponseElement()) {
composeEnumerationCore("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory(), false);
composeEnumerationExtras("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory(), false);
}
if (element.hasResponseCodeElement()) {
composeStringCore("responseCode", element.getResponseCodeElement(), false);
composeStringExtras("responseCode", element.getResponseCodeElement(), false);
}
if (element.hasSourceIdElement()) {
composeIdCore("sourceId", element.getSourceIdElement(), false);
composeIdExtras("sourceId", element.getSourceIdElement(), false);
}
if (element.hasStopTestOnFailElement()) {
composeBooleanCore("stopTestOnFail", element.getStopTestOnFailElement(), false);
composeBooleanExtras("stopTestOnFail", element.getStopTestOnFailElement(), false);
}
if (element.hasValidateProfileIdElement()) {
composeIdCore("validateProfileId", element.getValidateProfileIdElement(), false);
composeIdExtras("validateProfileId", element.getValidateProfileIdElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasWarningOnlyElement()) {
composeBooleanCore("warningOnly", element.getWarningOnlyElement(), false);
composeBooleanExtras("warningOnly", element.getWarningOnlyElement(), false);
}
if (element.hasRequirement()) {
openArray("requirement");
for (TestScript.SetupActionAssertRequirementComponent e : element.getRequirement())
composeSetupActionAssertRequirementComponent(null, e);
closeArray();
};
}
protected void composeSetupActionAssertRequirementComponent(String name, TestScript.SetupActionAssertRequirementComponent element) throws IOException {
if (element != null) {
open(name);
composeSetupActionAssertRequirementComponentProperties(element);
close();
}
}
protected void composeSetupActionAssertRequirementComponentProperties(TestScript.SetupActionAssertRequirementComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLink()) {
composeType("link", element.getLink());
}
}
protected void composeTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestComponentProperties(element);
close();
}
}
protected void composeTestScriptTestComponentProperties(TestScript.TestScriptTestComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasAction()) {
openArray("action");
for (TestScript.TestActionComponent e : element.getAction())
composeTestActionComponent(null, e);
closeArray();
};
}
protected void composeTestActionComponent(String name, TestScript.TestActionComponent element) throws IOException {
if (element != null) {
open(name);
composeTestActionComponentProperties(element);
close();
}
}
protected void composeTestActionComponentProperties(TestScript.TestActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOperation()) {
composeSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeTestScriptTeardownComponent(String name, TestScript.TestScriptTeardownComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTeardownComponentProperties(element);
close();
}
}
protected void composeTestScriptTeardownComponentProperties(TestScript.TestScriptTeardownComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAction()) {
openArray("action");
for (TestScript.TeardownActionComponent e : element.getAction())
composeTeardownActionComponent(null, e);
closeArray();
};
}
protected void composeTeardownActionComponent(String name, TestScript.TeardownActionComponent element) throws IOException {
if (element != null) {
open(name);
composeTeardownActionComponentProperties(element);
close();
}
}
protected void composeTeardownActionComponentProperties(TestScript.TeardownActionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOperation()) {
composeSetupActionOperationComponent("operation", element.getOperation());
}
}
protected void composeTransport(String name, Transport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTransportProperties(element);
}
}
protected void composeTransportProperties(Transport element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasInstantiatesCanonicalElement()) {
composeCanonicalCore("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
composeCanonicalExtras("instantiatesCanonical", element.getInstantiatesCanonicalElement(), false);
}
if (element.hasInstantiatesUriElement()) {
composeUriCore("instantiatesUri", element.getInstantiatesUriElement(), false);
composeUriExtras("instantiatesUri", element.getInstantiatesUriElement(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
};
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Transport.TransportStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Transport.TransportStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new Transport.TransportIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new Transport.TransportIntentEnumFactory(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Enumerations.RequestPriorityEnumFactory(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasFocus()) {
composeReference("focus", element.getFocus());
}
if (element.hasFor()) {
composeReference("for", element.getFor());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasCompletionTimeElement()) {
composeDateTimeCore("completionTime", element.getCompletionTimeElement(), false);
composeDateTimeExtras("completionTime", element.getCompletionTimeElement(), false);
}
if (element.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasLastModifiedElement()) {
composeDateTimeCore("lastModified", element.getLastModifiedElement(), false);
composeDateTimeExtras("lastModified", element.getLastModifiedElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasPerformerType()) {
openArray("performerType");
for (CodeableConcept e : element.getPerformerType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasOwner()) {
composeReference("owner", element.getOwner());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasInsurance()) {
openArray("insurance");
for (Reference e : element.getInsurance())
composeReference(null, e);
closeArray();
};
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
if (element.hasRelevantHistory()) {
openArray("relevantHistory");
for (Reference e : element.getRelevantHistory())
composeReference(null, e);
closeArray();
};
if (element.hasRestriction()) {
composeTransportRestrictionComponent("restriction", element.getRestriction());
}
if (element.hasInput()) {
openArray("input");
for (Transport.ParameterComponent e : element.getInput())
composeParameterComponent(null, e);
closeArray();
};
if (element.hasOutput()) {
openArray("output");
for (Transport.TransportOutputComponent e : element.getOutput())
composeTransportOutputComponent(null, e);
closeArray();
};
if (element.hasRequestedLocation()) {
composeReference("requestedLocation", element.getRequestedLocation());
}
if (element.hasCurrentLocation()) {
composeReference("currentLocation", element.getCurrentLocation());
}
if (element.hasReason()) {
composeCodeableReference("reason", element.getReason());
}
if (element.hasHistory()) {
composeReference("history", element.getHistory());
}
}
protected void composeTransportRestrictionComponent(String name, Transport.TransportRestrictionComponent element) throws IOException {
if (element != null) {
open(name);
composeTransportRestrictionComponentProperties(element);
close();
}
}
protected void composeTransportRestrictionComponentProperties(Transport.TransportRestrictionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasRepetitionsElement()) {
composePositiveIntCore("repetitions", element.getRepetitionsElement(), false);
composePositiveIntExtras("repetitions", element.getRepetitionsElement(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasRecipient()) {
openArray("recipient");
for (Reference e : element.getRecipient())
composeReference(null, e);
closeArray();
};
}
protected void composeParameterComponent(String name, Transport.ParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeParameterComponentProperties(element);
close();
}
}
protected void composeParameterComponentProperties(Transport.ParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeTransportOutputComponent(String name, Transport.TransportOutputComponent element) throws IOException {
if (element != null) {
open(name);
composeTransportOutputComponentProperties(element);
close();
}
}
protected void composeTransportOutputComponentProperties(Transport.TransportOutputComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeValueSet(String name, ValueSet element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeValueSetProperties(element);
}
}
protected void composeValueSetProperties(ValueSet element) throws IOException {
composeMetadataResourceProperties(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasVersionAlgorithm()) {
composeType("versionAlgorithm", element.getVersionAlgorithm());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false);
}
if (element.hasExperimentalElement()) {
composeBooleanCore("experimental", element.getExperimentalElement(), false);
composeBooleanExtras("experimental", element.getExperimentalElement(), false);
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasPublisherElement()) {
composeStringCore("publisher", element.getPublisherElement(), false);
composeStringExtras("publisher", element.getPublisherElement(), false);
}
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
};
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasUseContext()) {
openArray("useContext");
for (UsageContext e : element.getUseContext())
composeUsageContext(null, e);
closeArray();
};
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasImmutableElement()) {
composeBooleanCore("immutable", element.getImmutableElement(), false);
composeBooleanExtras("immutable", element.getImmutableElement(), false);
}
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasCopyrightLabelElement()) {
composeStringCore("copyrightLabel", element.getCopyrightLabelElement(), false);
composeStringExtras("copyrightLabel", element.getCopyrightLabelElement(), false);
}
if (element.hasApprovalDateElement()) {
composeDateCore("approvalDate", element.getApprovalDateElement(), false);
composeDateExtras("approvalDate", element.getApprovalDateElement(), false);
}
if (element.hasLastReviewDateElement()) {
composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false);
composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false);
}
if (element.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
if (element.hasTopic()) {
openArray("topic");
for (CodeableConcept e : element.getTopic())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasAuthor()) {
openArray("author");
for (ContactDetail e : element.getAuthor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEditor()) {
openArray("editor");
for (ContactDetail e : element.getEditor())
composeContactDetail(null, e);
closeArray();
};
if (element.hasReviewer()) {
openArray("reviewer");
for (ContactDetail e : element.getReviewer())
composeContactDetail(null, e);
closeArray();
};
if (element.hasEndorser()) {
openArray("endorser");
for (ContactDetail e : element.getEndorser())
composeContactDetail(null, e);
closeArray();
};
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
};
if (element.hasCompose()) {
composeValueSetComposeComponent("compose", element.getCompose());
}
if (element.hasExpansion()) {
composeValueSetExpansionComponent("expansion", element.getExpansion());
}
if (element.hasScope()) {
composeValueSetScopeComponent("scope", element.getScope());
}
}
protected void composeValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetComposeComponentProperties(element);
close();
}
}
protected void composeValueSetComposeComponentProperties(ValueSet.ValueSetComposeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLockedDateElement()) {
composeDateCore("lockedDate", element.getLockedDateElement(), false);
composeDateExtras("lockedDate", element.getLockedDateElement(), false);
}
if (element.hasInactiveElement()) {
composeBooleanCore("inactive", element.getInactiveElement(), false);
composeBooleanExtras("inactive", element.getInactiveElement(), false);
}
if (element.hasInclude()) {
openArray("include");
for (ValueSet.ConceptSetComponent e : element.getInclude())
composeConceptSetComponent(null, e);
closeArray();
};
if (element.hasExclude()) {
openArray("exclude");
for (ValueSet.ConceptSetComponent e : element.getExclude())
composeConceptSetComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
if (anyHasValue(element.getProperty())) {
openArray("property");
for (StringType e : element.getProperty())
composeStringCore(null, e, e != element.getProperty().get(element.getProperty().size()-1));
closeArray();
}
if (anyHasExtras(element.getProperty())) {
openArray("_property");
for (StringType e : element.getProperty())
composeStringExtras(null, e, true);
closeArray();
}
};
}
protected void composeConceptSetComponent(String name, ValueSet.ConceptSetComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptSetComponentProperties(element);
close();
}
}
protected void composeConceptSetComponentProperties(ValueSet.ConceptSetComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSystemElement()) {
composeUriCore("system", element.getSystemElement(), false);
composeUriExtras("system", element.getSystemElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasConcept()) {
openArray("concept");
for (ValueSet.ConceptReferenceComponent e : element.getConcept())
composeConceptReferenceComponent(null, e);
closeArray();
};
if (element.hasFilter()) {
openArray("filter");
for (ValueSet.ConceptSetFilterComponent e : element.getFilter())
composeConceptSetFilterComponent(null, e);
closeArray();
};
if (element.hasValueSet()) {
if (anyHasValue(element.getValueSet())) {
openArray("valueSet");
for (CanonicalType e : element.getValueSet())
composeCanonicalCore(null, e, e != element.getValueSet().get(element.getValueSet().size()-1));
closeArray();
}
if (anyHasExtras(element.getValueSet())) {
openArray("_valueSet");
for (CanonicalType e : element.getValueSet())
composeCanonicalExtras(null, e, true);
closeArray();
}
};
if (element.hasCopyrightElement()) {
composeStringCore("copyright", element.getCopyrightElement(), false);
composeStringExtras("copyright", element.getCopyrightElement(), false);
}
}
protected void composeConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptReferenceComponentProperties(element);
close();
}
}
protected void composeConceptReferenceComponentProperties(ValueSet.ConceptReferenceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasDesignation()) {
openArray("designation");
for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation())
composeConceptReferenceDesignationComponent(null, e);
closeArray();
};
}
protected void composeConceptReferenceDesignationComponent(String name, ValueSet.ConceptReferenceDesignationComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptReferenceDesignationComponentProperties(element);
close();
}
}
protected void composeConceptReferenceDesignationComponentProperties(ValueSet.ConceptReferenceDesignationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasUse()) {
composeCoding("use", element.getUse());
}
if (element.hasAdditionalUse()) {
openArray("additionalUse");
for (Coding e : element.getAdditionalUse())
composeCoding(null, e);
closeArray();
};
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptSetFilterComponentProperties(element);
close();
}
}
protected void composeConceptSetFilterComponentProperties(ValueSet.ConceptSetFilterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasPropertyElement()) {
composeCodeCore("property", element.getPropertyElement(), false);
composeCodeExtras("property", element.getPropertyElement(), false);
}
if (element.hasOpElement()) {
composeEnumerationCore("op", element.getOpElement(), new Enumerations.FilterOperatorEnumFactory(), false);
composeEnumerationExtras("op", element.getOpElement(), new Enumerations.FilterOperatorEnumFactory(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetExpansionComponentProperties(element);
close();
}
}
protected void composeValueSetExpansionComponentProperties(ValueSet.ValueSetExpansionComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasIdentifierElement()) {
composeUriCore("identifier", element.getIdentifierElement(), false);
composeUriExtras("identifier", element.getIdentifierElement(), false);
}
if (element.hasNextElement()) {
composeUriCore("next", element.getNextElement(), false);
composeUriExtras("next", element.getNextElement(), false);
}
if (element.hasTimestampElement()) {
composeDateTimeCore("timestamp", element.getTimestampElement(), false);
composeDateTimeExtras("timestamp", element.getTimestampElement(), false);
}
if (element.hasTotalElement()) {
composeIntegerCore("total", element.getTotalElement(), false);
composeIntegerExtras("total", element.getTotalElement(), false);
}
if (element.hasOffsetElement()) {
composeIntegerCore("offset", element.getOffsetElement(), false);
composeIntegerExtras("offset", element.getOffsetElement(), false);
}
if (element.hasParameter()) {
openArray("parameter");
for (ValueSet.ValueSetExpansionParameterComponent e : element.getParameter())
composeValueSetExpansionParameterComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (ValueSet.ValueSetExpansionPropertyComponent e : element.getProperty())
composeValueSetExpansionPropertyComponent(null, e);
closeArray();
};
if (element.hasContains()) {
openArray("contains");
for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains())
composeValueSetExpansionContainsComponent(null, e);
closeArray();
};
}
protected void composeValueSetExpansionParameterComponent(String name, ValueSet.ValueSetExpansionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetExpansionParameterComponentProperties(element);
close();
}
}
protected void composeValueSetExpansionParameterComponentProperties(ValueSet.ValueSetExpansionParameterComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeValueSetExpansionPropertyComponent(String name, ValueSet.ValueSetExpansionPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetExpansionPropertyComponentProperties(element);
close();
}
}
protected void composeValueSetExpansionPropertyComponentProperties(ValueSet.ValueSetExpansionPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
}
protected void composeValueSetExpansionContainsComponent(String name, ValueSet.ValueSetExpansionContainsComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetExpansionContainsComponentProperties(element);
close();
}
}
protected void composeValueSetExpansionContainsComponentProperties(ValueSet.ValueSetExpansionContainsComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasSystemElement()) {
composeUriCore("system", element.getSystemElement(), false);
composeUriExtras("system", element.getSystemElement(), false);
}
if (element.hasAbstractElement()) {
composeBooleanCore("abstract", element.getAbstractElement(), false);
composeBooleanExtras("abstract", element.getAbstractElement(), false);
}
if (element.hasInactiveElement()) {
composeBooleanCore("inactive", element.getInactiveElement(), false);
composeBooleanExtras("inactive", element.getInactiveElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasDesignation()) {
openArray("designation");
for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation())
composeConceptReferenceDesignationComponent(null, e);
closeArray();
};
if (element.hasProperty()) {
openArray("property");
for (ValueSet.ConceptPropertyComponent e : element.getProperty())
composeConceptPropertyComponent(null, e);
closeArray();
};
if (element.hasContains()) {
openArray("contains");
for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains())
composeValueSetExpansionContainsComponent(null, e);
closeArray();
};
}
protected void composeConceptPropertyComponent(String name, ValueSet.ConceptPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptPropertyComponentProperties(element);
close();
}
}
protected void composeConceptPropertyComponentProperties(ValueSet.ConceptPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasSubProperty()) {
openArray("subProperty");
for (ValueSet.ConceptSubPropertyComponent e : element.getSubProperty())
composeConceptSubPropertyComponent(null, e);
closeArray();
};
}
protected void composeConceptSubPropertyComponent(String name, ValueSet.ConceptSubPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptSubPropertyComponentProperties(element);
close();
}
}
protected void composeConceptSubPropertyComponentProperties(ValueSet.ConceptSubPropertyComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeValueSetScopeComponent(String name, ValueSet.ValueSetScopeComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetScopeComponentProperties(element);
close();
}
}
protected void composeValueSetScopeComponentProperties(ValueSet.ValueSetScopeComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasInclusionCriteriaElement()) {
composeStringCore("inclusionCriteria", element.getInclusionCriteriaElement(), false);
composeStringExtras("inclusionCriteria", element.getInclusionCriteriaElement(), false);
}
if (element.hasExclusionCriteriaElement()) {
composeStringCore("exclusionCriteria", element.getExclusionCriteriaElement(), false);
composeStringExtras("exclusionCriteria", element.getExclusionCriteriaElement(), false);
}
}
protected void composeVerificationResult(String name, VerificationResult element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeVerificationResultProperties(element);
}
}
protected void composeVerificationResultProperties(VerificationResult element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasTarget()) {
openArray("target");
for (Reference e : element.getTarget())
composeReference(null, e);
closeArray();
};
if (element.hasTargetLocation()) {
if (anyHasValue(element.getTargetLocation())) {
openArray("targetLocation");
for (StringType e : element.getTargetLocation())
composeStringCore(null, e, e != element.getTargetLocation().get(element.getTargetLocation().size()-1));
closeArray();
}
if (anyHasExtras(element.getTargetLocation())) {
openArray("_targetLocation");
for (StringType e : element.getTargetLocation())
composeStringExtras(null, e, true);
closeArray();
}
};
if (element.hasNeed()) {
composeCodeableConcept("need", element.getNeed());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new VerificationResult.VerificationResultStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new VerificationResult.VerificationResultStatusEnumFactory(), false);
}
if (element.hasStatusDateElement()) {
composeDateTimeCore("statusDate", element.getStatusDateElement(), false);
composeDateTimeExtras("statusDate", element.getStatusDateElement(), false);
}
if (element.hasValidationType()) {
composeCodeableConcept("validationType", element.getValidationType());
}
if (element.hasValidationProcess()) {
openArray("validationProcess");
for (CodeableConcept e : element.getValidationProcess())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasFrequency()) {
composeTiming("frequency", element.getFrequency());
}
if (element.hasLastPerformedElement()) {
composeDateTimeCore("lastPerformed", element.getLastPerformedElement(), false);
composeDateTimeExtras("lastPerformed", element.getLastPerformedElement(), false);
}
if (element.hasNextScheduledElement()) {
composeDateCore("nextScheduled", element.getNextScheduledElement(), false);
composeDateExtras("nextScheduled", element.getNextScheduledElement(), false);
}
if (element.hasFailureAction()) {
composeCodeableConcept("failureAction", element.getFailureAction());
}
if (element.hasPrimarySource()) {
openArray("primarySource");
for (VerificationResult.VerificationResultPrimarySourceComponent e : element.getPrimarySource())
composeVerificationResultPrimarySourceComponent(null, e);
closeArray();
};
if (element.hasAttestation()) {
composeVerificationResultAttestationComponent("attestation", element.getAttestation());
}
if (element.hasValidator()) {
openArray("validator");
for (VerificationResult.VerificationResultValidatorComponent e : element.getValidator())
composeVerificationResultValidatorComponent(null, e);
closeArray();
};
}
protected void composeVerificationResultPrimarySourceComponent(String name, VerificationResult.VerificationResultPrimarySourceComponent element) throws IOException {
if (element != null) {
open(name);
composeVerificationResultPrimarySourceComponentProperties(element);
close();
}
}
protected void composeVerificationResultPrimarySourceComponentProperties(VerificationResult.VerificationResultPrimarySourceComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasWho()) {
composeReference("who", element.getWho());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasCommunicationMethod()) {
openArray("communicationMethod");
for (CodeableConcept e : element.getCommunicationMethod())
composeCodeableConcept(null, e);
closeArray();
};
if (element.hasValidationStatus()) {
composeCodeableConcept("validationStatus", element.getValidationStatus());
}
if (element.hasValidationDateElement()) {
composeDateTimeCore("validationDate", element.getValidationDateElement(), false);
composeDateTimeExtras("validationDate", element.getValidationDateElement(), false);
}
if (element.hasCanPushUpdates()) {
composeCodeableConcept("canPushUpdates", element.getCanPushUpdates());
}
if (element.hasPushTypeAvailable()) {
openArray("pushTypeAvailable");
for (CodeableConcept e : element.getPushTypeAvailable())
composeCodeableConcept(null, e);
closeArray();
};
}
protected void composeVerificationResultAttestationComponent(String name, VerificationResult.VerificationResultAttestationComponent element) throws IOException {
if (element != null) {
open(name);
composeVerificationResultAttestationComponentProperties(element);
close();
}
}
protected void composeVerificationResultAttestationComponentProperties(VerificationResult.VerificationResultAttestationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasWho()) {
composeReference("who", element.getWho());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
if (element.hasCommunicationMethod()) {
composeCodeableConcept("communicationMethod", element.getCommunicationMethod());
}
if (element.hasDateElement()) {
composeDateCore("date", element.getDateElement(), false);
composeDateExtras("date", element.getDateElement(), false);
}
if (element.hasSourceIdentityCertificateElement()) {
composeStringCore("sourceIdentityCertificate", element.getSourceIdentityCertificateElement(), false);
composeStringExtras("sourceIdentityCertificate", element.getSourceIdentityCertificateElement(), false);
}
if (element.hasProxyIdentityCertificateElement()) {
composeStringCore("proxyIdentityCertificate", element.getProxyIdentityCertificateElement(), false);
composeStringExtras("proxyIdentityCertificate", element.getProxyIdentityCertificateElement(), false);
}
if (element.hasProxySignature()) {
composeSignature("proxySignature", element.getProxySignature());
}
if (element.hasSourceSignature()) {
composeSignature("sourceSignature", element.getSourceSignature());
}
}
protected void composeVerificationResultValidatorComponent(String name, VerificationResult.VerificationResultValidatorComponent element) throws IOException {
if (element != null) {
open(name);
composeVerificationResultValidatorComponentProperties(element);
close();
}
}
protected void composeVerificationResultValidatorComponentProperties(VerificationResult.VerificationResultValidatorComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasOrganization()) {
composeReference("organization", element.getOrganization());
}
if (element.hasIdentityCertificateElement()) {
composeStringCore("identityCertificate", element.getIdentityCertificateElement(), false);
composeStringExtras("identityCertificate", element.getIdentityCertificateElement(), false);
}
if (element.hasAttestationSignature()) {
composeSignature("attestationSignature", element.getAttestationSignature());
}
}
protected void composeVisionPrescription(String name, VisionPrescription element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeVisionPrescriptionProperties(element);
}
}
protected void composeVisionPrescriptionProperties(VisionPrescription element) throws IOException {
composeDomainResourceProperties(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
};
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.FinancialResourceStatusCodesEnumFactory(), false);
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasDateWrittenElement()) {
composeDateTimeCore("dateWritten", element.getDateWrittenElement(), false);
composeDateTimeExtras("dateWritten", element.getDateWrittenElement(), false);
}
if (element.hasPrescriber()) {
composeReference("prescriber", element.getPrescriber());
}
if (element.hasLensSpecification()) {
openArray("lensSpecification");
for (VisionPrescription.VisionPrescriptionLensSpecificationComponent e : element.getLensSpecification())
composeVisionPrescriptionLensSpecificationComponent(null, e);
closeArray();
};
}
protected void composeVisionPrescriptionLensSpecificationComponent(String name, VisionPrescription.VisionPrescriptionLensSpecificationComponent element) throws IOException {
if (element != null) {
open(name);
composeVisionPrescriptionLensSpecificationComponentProperties(element);
close();
}
}
protected void composeVisionPrescriptionLensSpecificationComponentProperties(VisionPrescription.VisionPrescriptionLensSpecificationComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasProduct()) {
composeCodeableConcept("product", element.getProduct());
}
if (element.hasEyeElement()) {
composeEnumerationCore("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory(), false);
composeEnumerationExtras("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory(), false);
}
if (element.hasSphereElement()) {
composeDecimalCore("sphere", element.getSphereElement(), false);
composeDecimalExtras("sphere", element.getSphereElement(), false);
}
if (element.hasCylinderElement()) {
composeDecimalCore("cylinder", element.getCylinderElement(), false);
composeDecimalExtras("cylinder", element.getCylinderElement(), false);
}
if (element.hasAxisElement()) {
composeIntegerCore("axis", element.getAxisElement(), false);
composeIntegerExtras("axis", element.getAxisElement(), false);
}
if (element.hasPrism()) {
openArray("prism");
for (VisionPrescription.PrismComponent e : element.getPrism())
composePrismComponent(null, e);
closeArray();
};
if (element.hasAddElement()) {
composeDecimalCore("add", element.getAddElement(), false);
composeDecimalExtras("add", element.getAddElement(), false);
}
if (element.hasPowerElement()) {
composeDecimalCore("power", element.getPowerElement(), false);
composeDecimalExtras("power", element.getPowerElement(), false);
}
if (element.hasBackCurveElement()) {
composeDecimalCore("backCurve", element.getBackCurveElement(), false);
composeDecimalExtras("backCurve", element.getBackCurveElement(), false);
}
if (element.hasDiameterElement()) {
composeDecimalCore("diameter", element.getDiameterElement(), false);
composeDecimalExtras("diameter", element.getDiameterElement(), false);
}
if (element.hasDuration()) {
composeQuantity("duration", element.getDuration());
}
if (element.hasColorElement()) {
composeStringCore("color", element.getColorElement(), false);
composeStringExtras("color", element.getColorElement(), false);
}
if (element.hasBrandElement()) {
composeStringCore("brand", element.getBrandElement(), false);
composeStringExtras("brand", element.getBrandElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
};
}
protected void composePrismComponent(String name, VisionPrescription.PrismComponent element) throws IOException {
if (element != null) {
open(name);
composePrismComponentProperties(element);
close();
}
}
protected void composePrismComponentProperties(VisionPrescription.PrismComponent element) throws IOException {
composeBackboneElementProperties(element);
if (element.hasAmountElement()) {
composeDecimalCore("amount", element.getAmountElement(), false);
composeDecimalExtras("amount", element.getAmountElement(), false);
}
if (element.hasBaseElement()) {
composeEnumerationCore("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory(), false);
composeEnumerationExtras("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory(), false);
}
}
@Override
protected void composeResource(Resource resource) throws IOException {
if (resource == null) {
throw new Error("Resource is null - can't produce JSON");
} else if (resource instanceof Account) {
composeAccount("Account", (Account)resource);
} else if (resource instanceof ActivityDefinition) {
composeActivityDefinition("ActivityDefinition", (ActivityDefinition)resource);
} else if (resource instanceof ActorDefinition) {
composeActorDefinition("ActorDefinition", (ActorDefinition)resource);
} else if (resource instanceof AdministrableProductDefinition) {
composeAdministrableProductDefinition("AdministrableProductDefinition", (AdministrableProductDefinition)resource);
} else if (resource instanceof AdverseEvent) {
composeAdverseEvent("AdverseEvent", (AdverseEvent)resource);
} else if (resource instanceof AllergyIntolerance) {
composeAllergyIntolerance("AllergyIntolerance", (AllergyIntolerance)resource);
} else if (resource instanceof Appointment) {
composeAppointment("Appointment", (Appointment)resource);
} else if (resource instanceof AppointmentResponse) {
composeAppointmentResponse("AppointmentResponse", (AppointmentResponse)resource);
} else if (resource instanceof ArtifactAssessment) {
composeArtifactAssessment("ArtifactAssessment", (ArtifactAssessment)resource);
} else if (resource instanceof AuditEvent) {
composeAuditEvent("AuditEvent", (AuditEvent)resource);
} else if (resource instanceof Basic) {
composeBasic("Basic", (Basic)resource);
} else if (resource instanceof Binary) {
composeBinary("Binary", (Binary)resource);
} else if (resource instanceof BiologicallyDerivedProduct) {
composeBiologicallyDerivedProduct("BiologicallyDerivedProduct", (BiologicallyDerivedProduct)resource);
} else if (resource instanceof BiologicallyDerivedProductDispense) {
composeBiologicallyDerivedProductDispense("BiologicallyDerivedProductDispense", (BiologicallyDerivedProductDispense)resource);
} else if (resource instanceof BodyStructure) {
composeBodyStructure("BodyStructure", (BodyStructure)resource);
} else if (resource instanceof Bundle) {
composeBundle("Bundle", (Bundle)resource);
} else if (resource instanceof CapabilityStatement) {
composeCapabilityStatement("CapabilityStatement", (CapabilityStatement)resource);
} else if (resource instanceof CarePlan) {
composeCarePlan("CarePlan", (CarePlan)resource);
} else if (resource instanceof CareTeam) {
composeCareTeam("CareTeam", (CareTeam)resource);
} else if (resource instanceof ChargeItem) {
composeChargeItem("ChargeItem", (ChargeItem)resource);
} else if (resource instanceof ChargeItemDefinition) {
composeChargeItemDefinition("ChargeItemDefinition", (ChargeItemDefinition)resource);
} else if (resource instanceof Citation) {
composeCitation("Citation", (Citation)resource);
} else if (resource instanceof Claim) {
composeClaim("Claim", (Claim)resource);
} else if (resource instanceof ClaimResponse) {
composeClaimResponse("ClaimResponse", (ClaimResponse)resource);
} else if (resource instanceof ClinicalImpression) {
composeClinicalImpression("ClinicalImpression", (ClinicalImpression)resource);
} else if (resource instanceof ClinicalUseDefinition) {
composeClinicalUseDefinition("ClinicalUseDefinition", (ClinicalUseDefinition)resource);
} else if (resource instanceof CodeSystem) {
composeCodeSystem("CodeSystem", (CodeSystem)resource);
} else if (resource instanceof Communication) {
composeCommunication("Communication", (Communication)resource);
} else if (resource instanceof CommunicationRequest) {
composeCommunicationRequest("CommunicationRequest", (CommunicationRequest)resource);
} else if (resource instanceof CompartmentDefinition) {
composeCompartmentDefinition("CompartmentDefinition", (CompartmentDefinition)resource);
} else if (resource instanceof Composition) {
composeComposition("Composition", (Composition)resource);
} else if (resource instanceof ConceptMap) {
composeConceptMap("ConceptMap", (ConceptMap)resource);
} else if (resource instanceof Condition) {
composeCondition("Condition", (Condition)resource);
} else if (resource instanceof ConditionDefinition) {
composeConditionDefinition("ConditionDefinition", (ConditionDefinition)resource);
} else if (resource instanceof Consent) {
composeConsent("Consent", (Consent)resource);
} else if (resource instanceof Contract) {
composeContract("Contract", (Contract)resource);
} else if (resource instanceof Coverage) {
composeCoverage("Coverage", (Coverage)resource);
} else if (resource instanceof CoverageEligibilityRequest) {
composeCoverageEligibilityRequest("CoverageEligibilityRequest", (CoverageEligibilityRequest)resource);
} else if (resource instanceof CoverageEligibilityResponse) {
composeCoverageEligibilityResponse("CoverageEligibilityResponse", (CoverageEligibilityResponse)resource);
} else if (resource instanceof DetectedIssue) {
composeDetectedIssue("DetectedIssue", (DetectedIssue)resource);
} else if (resource instanceof Device) {
composeDevice("Device", (Device)resource);
} else if (resource instanceof DeviceAssociation) {
composeDeviceAssociation("DeviceAssociation", (DeviceAssociation)resource);
} else if (resource instanceof DeviceDefinition) {
composeDeviceDefinition("DeviceDefinition", (DeviceDefinition)resource);
} else if (resource instanceof DeviceDispense) {
composeDeviceDispense("DeviceDispense", (DeviceDispense)resource);
} else if (resource instanceof DeviceMetric) {
composeDeviceMetric("DeviceMetric", (DeviceMetric)resource);
} else if (resource instanceof DeviceRequest) {
composeDeviceRequest("DeviceRequest", (DeviceRequest)resource);
} else if (resource instanceof DeviceUsage) {
composeDeviceUsage("DeviceUsage", (DeviceUsage)resource);
} else if (resource instanceof DiagnosticReport) {
composeDiagnosticReport("DiagnosticReport", (DiagnosticReport)resource);
} else if (resource instanceof DocumentReference) {
composeDocumentReference("DocumentReference", (DocumentReference)resource);
} else if (resource instanceof Encounter) {
composeEncounter("Encounter", (Encounter)resource);
} else if (resource instanceof EncounterHistory) {
composeEncounterHistory("EncounterHistory", (EncounterHistory)resource);
} else if (resource instanceof Endpoint) {
composeEndpoint("Endpoint", (Endpoint)resource);
} else if (resource instanceof EnrollmentRequest) {
composeEnrollmentRequest("EnrollmentRequest", (EnrollmentRequest)resource);
} else if (resource instanceof EnrollmentResponse) {
composeEnrollmentResponse("EnrollmentResponse", (EnrollmentResponse)resource);
} else if (resource instanceof EpisodeOfCare) {
composeEpisodeOfCare("EpisodeOfCare", (EpisodeOfCare)resource);
} else if (resource instanceof EventDefinition) {
composeEventDefinition("EventDefinition", (EventDefinition)resource);
} else if (resource instanceof Evidence) {
composeEvidence("Evidence", (Evidence)resource);
} else if (resource instanceof EvidenceReport) {
composeEvidenceReport("EvidenceReport", (EvidenceReport)resource);
} else if (resource instanceof EvidenceVariable) {
composeEvidenceVariable("EvidenceVariable", (EvidenceVariable)resource);
} else if (resource instanceof ExampleScenario) {
composeExampleScenario("ExampleScenario", (ExampleScenario)resource);
} else if (resource instanceof ExplanationOfBenefit) {
composeExplanationOfBenefit("ExplanationOfBenefit", (ExplanationOfBenefit)resource);
} else if (resource instanceof FamilyMemberHistory) {
composeFamilyMemberHistory("FamilyMemberHistory", (FamilyMemberHistory)resource);
} else if (resource instanceof Flag) {
composeFlag("Flag", (Flag)resource);
} else if (resource instanceof FormularyItem) {
composeFormularyItem("FormularyItem", (FormularyItem)resource);
} else if (resource instanceof GenomicStudy) {
composeGenomicStudy("GenomicStudy", (GenomicStudy)resource);
} else if (resource instanceof Goal) {
composeGoal("Goal", (Goal)resource);
} else if (resource instanceof GraphDefinition) {
composeGraphDefinition("GraphDefinition", (GraphDefinition)resource);
} else if (resource instanceof Group) {
composeGroup("Group", (Group)resource);
} else if (resource instanceof GuidanceResponse) {
composeGuidanceResponse("GuidanceResponse", (GuidanceResponse)resource);
} else if (resource instanceof HealthcareService) {
composeHealthcareService("HealthcareService", (HealthcareService)resource);
} else if (resource instanceof ImagingSelection) {
composeImagingSelection("ImagingSelection", (ImagingSelection)resource);
} else if (resource instanceof ImagingStudy) {
composeImagingStudy("ImagingStudy", (ImagingStudy)resource);
} else if (resource instanceof Immunization) {
composeImmunization("Immunization", (Immunization)resource);
} else if (resource instanceof ImmunizationEvaluation) {
composeImmunizationEvaluation("ImmunizationEvaluation", (ImmunizationEvaluation)resource);
} else if (resource instanceof ImmunizationRecommendation) {
composeImmunizationRecommendation("ImmunizationRecommendation", (ImmunizationRecommendation)resource);
} else if (resource instanceof ImplementationGuide) {
composeImplementationGuide("ImplementationGuide", (ImplementationGuide)resource);
} else if (resource instanceof Ingredient) {
composeIngredient("Ingredient", (Ingredient)resource);
} else if (resource instanceof InsurancePlan) {
composeInsurancePlan("InsurancePlan", (InsurancePlan)resource);
} else if (resource instanceof InventoryItem) {
composeInventoryItem("InventoryItem", (InventoryItem)resource);
} else if (resource instanceof InventoryReport) {
composeInventoryReport("InventoryReport", (InventoryReport)resource);
} else if (resource instanceof Invoice) {
composeInvoice("Invoice", (Invoice)resource);
} else if (resource instanceof Library) {
composeLibrary("Library", (Library)resource);
} else if (resource instanceof Linkage) {
composeLinkage("Linkage", (Linkage)resource);
} else if (resource instanceof ListResource) {
composeListResource("List", (ListResource)resource);
} else if (resource instanceof Location) {
composeLocation("Location", (Location)resource);
} else if (resource instanceof ManufacturedItemDefinition) {
composeManufacturedItemDefinition("ManufacturedItemDefinition", (ManufacturedItemDefinition)resource);
} else if (resource instanceof Measure) {
composeMeasure("Measure", (Measure)resource);
} else if (resource instanceof MeasureReport) {
composeMeasureReport("MeasureReport", (MeasureReport)resource);
} else if (resource instanceof Medication) {
composeMedication("Medication", (Medication)resource);
} else if (resource instanceof MedicationAdministration) {
composeMedicationAdministration("MedicationAdministration", (MedicationAdministration)resource);
} else if (resource instanceof MedicationDispense) {
composeMedicationDispense("MedicationDispense", (MedicationDispense)resource);
} else if (resource instanceof MedicationKnowledge) {
composeMedicationKnowledge("MedicationKnowledge", (MedicationKnowledge)resource);
} else if (resource instanceof MedicationRequest) {
composeMedicationRequest("MedicationRequest", (MedicationRequest)resource);
} else if (resource instanceof MedicationStatement) {
composeMedicationStatement("MedicationStatement", (MedicationStatement)resource);
} else if (resource instanceof MedicinalProductDefinition) {
composeMedicinalProductDefinition("MedicinalProductDefinition", (MedicinalProductDefinition)resource);
} else if (resource instanceof MessageDefinition) {
composeMessageDefinition("MessageDefinition", (MessageDefinition)resource);
} else if (resource instanceof MessageHeader) {
composeMessageHeader("MessageHeader", (MessageHeader)resource);
} else if (resource instanceof MolecularSequence) {
composeMolecularSequence("MolecularSequence", (MolecularSequence)resource);
} else if (resource instanceof NamingSystem) {
composeNamingSystem("NamingSystem", (NamingSystem)resource);
} else if (resource instanceof NutritionIntake) {
composeNutritionIntake("NutritionIntake", (NutritionIntake)resource);
} else if (resource instanceof NutritionOrder) {
composeNutritionOrder("NutritionOrder", (NutritionOrder)resource);
} else if (resource instanceof NutritionProduct) {
composeNutritionProduct("NutritionProduct", (NutritionProduct)resource);
} else if (resource instanceof Observation) {
composeObservation("Observation", (Observation)resource);
} else if (resource instanceof ObservationDefinition) {
composeObservationDefinition("ObservationDefinition", (ObservationDefinition)resource);
} else if (resource instanceof OperationDefinition) {
composeOperationDefinition("OperationDefinition", (OperationDefinition)resource);
} else if (resource instanceof OperationOutcome) {
composeOperationOutcome("OperationOutcome", (OperationOutcome)resource);
} else if (resource instanceof Organization) {
composeOrganization("Organization", (Organization)resource);
} else if (resource instanceof OrganizationAffiliation) {
composeOrganizationAffiliation("OrganizationAffiliation", (OrganizationAffiliation)resource);
} else if (resource instanceof PackagedProductDefinition) {
composePackagedProductDefinition("PackagedProductDefinition", (PackagedProductDefinition)resource);
} else if (resource instanceof Parameters) {
composeParameters("Parameters", (Parameters)resource);
} else if (resource instanceof Patient) {
composePatient("Patient", (Patient)resource);
} else if (resource instanceof PaymentNotice) {
composePaymentNotice("PaymentNotice", (PaymentNotice)resource);
} else if (resource instanceof PaymentReconciliation) {
composePaymentReconciliation("PaymentReconciliation", (PaymentReconciliation)resource);
} else if (resource instanceof Permission) {
composePermission("Permission", (Permission)resource);
} else if (resource instanceof Person) {
composePerson("Person", (Person)resource);
} else if (resource instanceof PlanDefinition) {
composePlanDefinition("PlanDefinition", (PlanDefinition)resource);
} else if (resource instanceof Practitioner) {
composePractitioner("Practitioner", (Practitioner)resource);
} else if (resource instanceof PractitionerRole) {
composePractitionerRole("PractitionerRole", (PractitionerRole)resource);
} else if (resource instanceof Procedure) {
composeProcedure("Procedure", (Procedure)resource);
} else if (resource instanceof Provenance) {
composeProvenance("Provenance", (Provenance)resource);
} else if (resource instanceof Questionnaire) {
composeQuestionnaire("Questionnaire", (Questionnaire)resource);
} else if (resource instanceof QuestionnaireResponse) {
composeQuestionnaireResponse("QuestionnaireResponse", (QuestionnaireResponse)resource);
} else if (resource instanceof RegulatedAuthorization) {
composeRegulatedAuthorization("RegulatedAuthorization", (RegulatedAuthorization)resource);
} else if (resource instanceof RelatedPerson) {
composeRelatedPerson("RelatedPerson", (RelatedPerson)resource);
} else if (resource instanceof RequestOrchestration) {
composeRequestOrchestration("RequestOrchestration", (RequestOrchestration)resource);
} else if (resource instanceof Requirements) {
composeRequirements("Requirements", (Requirements)resource);
} else if (resource instanceof ResearchStudy) {
composeResearchStudy("ResearchStudy", (ResearchStudy)resource);
} else if (resource instanceof ResearchSubject) {
composeResearchSubject("ResearchSubject", (ResearchSubject)resource);
} else if (resource instanceof RiskAssessment) {
composeRiskAssessment("RiskAssessment", (RiskAssessment)resource);
} else if (resource instanceof Schedule) {
composeSchedule("Schedule", (Schedule)resource);
} else if (resource instanceof SearchParameter) {
composeSearchParameter("SearchParameter", (SearchParameter)resource);
} else if (resource instanceof ServiceRequest) {
composeServiceRequest("ServiceRequest", (ServiceRequest)resource);
} else if (resource instanceof Slot) {
composeSlot("Slot", (Slot)resource);
} else if (resource instanceof Specimen) {
composeSpecimen("Specimen", (Specimen)resource);
} else if (resource instanceof SpecimenDefinition) {
composeSpecimenDefinition("SpecimenDefinition", (SpecimenDefinition)resource);
} else if (resource instanceof StructureDefinition) {
composeStructureDefinition("StructureDefinition", (StructureDefinition)resource);
} else if (resource instanceof StructureMap) {
composeStructureMap("StructureMap", (StructureMap)resource);
} else if (resource instanceof Subscription) {
composeSubscription("Subscription", (Subscription)resource);
} else if (resource instanceof SubscriptionStatus) {
composeSubscriptionStatus("SubscriptionStatus", (SubscriptionStatus)resource);
} else if (resource instanceof SubscriptionTopic) {
composeSubscriptionTopic("SubscriptionTopic", (SubscriptionTopic)resource);
} else if (resource instanceof Substance) {
composeSubstance("Substance", (Substance)resource);
} else if (resource instanceof SubstanceDefinition) {
composeSubstanceDefinition("SubstanceDefinition", (SubstanceDefinition)resource);
} else if (resource instanceof SubstanceNucleicAcid) {
composeSubstanceNucleicAcid("SubstanceNucleicAcid", (SubstanceNucleicAcid)resource);
} else if (resource instanceof SubstancePolymer) {
composeSubstancePolymer("SubstancePolymer", (SubstancePolymer)resource);
} else if (resource instanceof SubstanceProtein) {
composeSubstanceProtein("SubstanceProtein", (SubstanceProtein)resource);
} else if (resource instanceof SubstanceReferenceInformation) {
composeSubstanceReferenceInformation("SubstanceReferenceInformation", (SubstanceReferenceInformation)resource);
} else if (resource instanceof SubstanceSourceMaterial) {
composeSubstanceSourceMaterial("SubstanceSourceMaterial", (SubstanceSourceMaterial)resource);
} else if (resource instanceof SupplyDelivery) {
composeSupplyDelivery("SupplyDelivery", (SupplyDelivery)resource);
} else if (resource instanceof SupplyRequest) {
composeSupplyRequest("SupplyRequest", (SupplyRequest)resource);
} else if (resource instanceof Task) {
composeTask("Task", (Task)resource);
} else if (resource instanceof TerminologyCapabilities) {
composeTerminologyCapabilities("TerminologyCapabilities", (TerminologyCapabilities)resource);
} else if (resource instanceof TestPlan) {
composeTestPlan("TestPlan", (TestPlan)resource);
} else if (resource instanceof TestReport) {
composeTestReport("TestReport", (TestReport)resource);
} else if (resource instanceof TestScript) {
composeTestScript("TestScript", (TestScript)resource);
} else if (resource instanceof Transport) {
composeTransport("Transport", (Transport)resource);
} else if (resource instanceof ValueSet) {
composeValueSet("ValueSet", (ValueSet)resource);
} else if (resource instanceof VerificationResult) {
composeVerificationResult("VerificationResult", (VerificationResult)resource);
} else if (resource instanceof VisionPrescription) {
composeVisionPrescription("VisionPrescription", (VisionPrescription)resource);
} else if (!customCompose(resource)) {
throw new Error("Unhandled resource type: "+resource.getClass().getName());
}
}
protected void composeNamedReference(String name, Resource resource) throws IOException {
if (resource == null) {
throw new Error("Resource is null - can't produce JSON");
} else if (resource instanceof Account) {
composeAccount(name, (Account)resource);
} else if (resource instanceof ActivityDefinition) {
composeActivityDefinition(name, (ActivityDefinition)resource);
} else if (resource instanceof ActorDefinition) {
composeActorDefinition(name, (ActorDefinition)resource);
} else if (resource instanceof AdministrableProductDefinition) {
composeAdministrableProductDefinition(name, (AdministrableProductDefinition)resource);
} else if (resource instanceof AdverseEvent) {
composeAdverseEvent(name, (AdverseEvent)resource);
} else if (resource instanceof AllergyIntolerance) {
composeAllergyIntolerance(name, (AllergyIntolerance)resource);
} else if (resource instanceof Appointment) {
composeAppointment(name, (Appointment)resource);
} else if (resource instanceof AppointmentResponse) {
composeAppointmentResponse(name, (AppointmentResponse)resource);
} else if (resource instanceof ArtifactAssessment) {
composeArtifactAssessment(name, (ArtifactAssessment)resource);
} else if (resource instanceof AuditEvent) {
composeAuditEvent(name, (AuditEvent)resource);
} else if (resource instanceof Basic) {
composeBasic(name, (Basic)resource);
} else if (resource instanceof Binary) {
composeBinary(name, (Binary)resource);
} else if (resource instanceof BiologicallyDerivedProduct) {
composeBiologicallyDerivedProduct(name, (BiologicallyDerivedProduct)resource);
} else if (resource instanceof BiologicallyDerivedProductDispense) {
composeBiologicallyDerivedProductDispense(name, (BiologicallyDerivedProductDispense)resource);
} else if (resource instanceof BodyStructure) {
composeBodyStructure(name, (BodyStructure)resource);
} else if (resource instanceof Bundle) {
composeBundle(name, (Bundle)resource);
} else if (resource instanceof CapabilityStatement) {
composeCapabilityStatement(name, (CapabilityStatement)resource);
} else if (resource instanceof CarePlan) {
composeCarePlan(name, (CarePlan)resource);
} else if (resource instanceof CareTeam) {
composeCareTeam(name, (CareTeam)resource);
} else if (resource instanceof ChargeItem) {
composeChargeItem(name, (ChargeItem)resource);
} else if (resource instanceof ChargeItemDefinition) {
composeChargeItemDefinition(name, (ChargeItemDefinition)resource);
} else if (resource instanceof Citation) {
composeCitation(name, (Citation)resource);
} else if (resource instanceof Claim) {
composeClaim(name, (Claim)resource);
} else if (resource instanceof ClaimResponse) {
composeClaimResponse(name, (ClaimResponse)resource);
} else if (resource instanceof ClinicalImpression) {
composeClinicalImpression(name, (ClinicalImpression)resource);
} else if (resource instanceof ClinicalUseDefinition) {
composeClinicalUseDefinition(name, (ClinicalUseDefinition)resource);
} else if (resource instanceof CodeSystem) {
composeCodeSystem(name, (CodeSystem)resource);
} else if (resource instanceof Communication) {
composeCommunication(name, (Communication)resource);
} else if (resource instanceof CommunicationRequest) {
composeCommunicationRequest(name, (CommunicationRequest)resource);
} else if (resource instanceof CompartmentDefinition) {
composeCompartmentDefinition(name, (CompartmentDefinition)resource);
} else if (resource instanceof Composition) {
composeComposition(name, (Composition)resource);
} else if (resource instanceof ConceptMap) {
composeConceptMap(name, (ConceptMap)resource);
} else if (resource instanceof Condition) {
composeCondition(name, (Condition)resource);
} else if (resource instanceof ConditionDefinition) {
composeConditionDefinition(name, (ConditionDefinition)resource);
} else if (resource instanceof Consent) {
composeConsent(name, (Consent)resource);
} else if (resource instanceof Contract) {
composeContract(name, (Contract)resource);
} else if (resource instanceof Coverage) {
composeCoverage(name, (Coverage)resource);
} else if (resource instanceof CoverageEligibilityRequest) {
composeCoverageEligibilityRequest(name, (CoverageEligibilityRequest)resource);
} else if (resource instanceof CoverageEligibilityResponse) {
composeCoverageEligibilityResponse(name, (CoverageEligibilityResponse)resource);
} else if (resource instanceof DetectedIssue) {
composeDetectedIssue(name, (DetectedIssue)resource);
} else if (resource instanceof Device) {
composeDevice(name, (Device)resource);
} else if (resource instanceof DeviceAssociation) {
composeDeviceAssociation(name, (DeviceAssociation)resource);
} else if (resource instanceof DeviceDefinition) {
composeDeviceDefinition(name, (DeviceDefinition)resource);
} else if (resource instanceof DeviceDispense) {
composeDeviceDispense(name, (DeviceDispense)resource);
} else if (resource instanceof DeviceMetric) {
composeDeviceMetric(name, (DeviceMetric)resource);
} else if (resource instanceof DeviceRequest) {
composeDeviceRequest(name, (DeviceRequest)resource);
} else if (resource instanceof DeviceUsage) {
composeDeviceUsage(name, (DeviceUsage)resource);
} else if (resource instanceof DiagnosticReport) {
composeDiagnosticReport(name, (DiagnosticReport)resource);
} else if (resource instanceof DocumentReference) {
composeDocumentReference(name, (DocumentReference)resource);
} else if (resource instanceof Encounter) {
composeEncounter(name, (Encounter)resource);
} else if (resource instanceof EncounterHistory) {
composeEncounterHistory(name, (EncounterHistory)resource);
} else if (resource instanceof Endpoint) {
composeEndpoint(name, (Endpoint)resource);
} else if (resource instanceof EnrollmentRequest) {
composeEnrollmentRequest(name, (EnrollmentRequest)resource);
} else if (resource instanceof EnrollmentResponse) {
composeEnrollmentResponse(name, (EnrollmentResponse)resource);
} else if (resource instanceof EpisodeOfCare) {
composeEpisodeOfCare(name, (EpisodeOfCare)resource);
} else if (resource instanceof EventDefinition) {
composeEventDefinition(name, (EventDefinition)resource);
} else if (resource instanceof Evidence) {
composeEvidence(name, (Evidence)resource);
} else if (resource instanceof EvidenceReport) {
composeEvidenceReport(name, (EvidenceReport)resource);
} else if (resource instanceof EvidenceVariable) {
composeEvidenceVariable(name, (EvidenceVariable)resource);
} else if (resource instanceof ExampleScenario) {
composeExampleScenario(name, (ExampleScenario)resource);
} else if (resource instanceof ExplanationOfBenefit) {
composeExplanationOfBenefit(name, (ExplanationOfBenefit)resource);
} else if (resource instanceof FamilyMemberHistory) {
composeFamilyMemberHistory(name, (FamilyMemberHistory)resource);
} else if (resource instanceof Flag) {
composeFlag(name, (Flag)resource);
} else if (resource instanceof FormularyItem) {
composeFormularyItem(name, (FormularyItem)resource);
} else if (resource instanceof GenomicStudy) {
composeGenomicStudy(name, (GenomicStudy)resource);
} else if (resource instanceof Goal) {
composeGoal(name, (Goal)resource);
} else if (resource instanceof GraphDefinition) {
composeGraphDefinition(name, (GraphDefinition)resource);
} else if (resource instanceof Group) {
composeGroup(name, (Group)resource);
} else if (resource instanceof GuidanceResponse) {
composeGuidanceResponse(name, (GuidanceResponse)resource);
} else if (resource instanceof HealthcareService) {
composeHealthcareService(name, (HealthcareService)resource);
} else if (resource instanceof ImagingSelection) {
composeImagingSelection(name, (ImagingSelection)resource);
} else if (resource instanceof ImagingStudy) {
composeImagingStudy(name, (ImagingStudy)resource);
} else if (resource instanceof Immunization) {
composeImmunization(name, (Immunization)resource);
} else if (resource instanceof ImmunizationEvaluation) {
composeImmunizationEvaluation(name, (ImmunizationEvaluation)resource);
} else if (resource instanceof ImmunizationRecommendation) {
composeImmunizationRecommendation(name, (ImmunizationRecommendation)resource);
} else if (resource instanceof ImplementationGuide) {
composeImplementationGuide(name, (ImplementationGuide)resource);
} else if (resource instanceof Ingredient) {
composeIngredient(name, (Ingredient)resource);
} else if (resource instanceof InsurancePlan) {
composeInsurancePlan(name, (InsurancePlan)resource);
} else if (resource instanceof InventoryItem) {
composeInventoryItem(name, (InventoryItem)resource);
} else if (resource instanceof InventoryReport) {
composeInventoryReport(name, (InventoryReport)resource);
} else if (resource instanceof Invoice) {
composeInvoice(name, (Invoice)resource);
} else if (resource instanceof Library) {
composeLibrary(name, (Library)resource);
} else if (resource instanceof Linkage) {
composeLinkage(name, (Linkage)resource);
} else if (resource instanceof ListResource) {
composeListResource(name, (ListResource)resource);
} else if (resource instanceof Location) {
composeLocation(name, (Location)resource);
} else if (resource instanceof ManufacturedItemDefinition) {
composeManufacturedItemDefinition(name, (ManufacturedItemDefinition)resource);
} else if (resource instanceof Measure) {
composeMeasure(name, (Measure)resource);
} else if (resource instanceof MeasureReport) {
composeMeasureReport(name, (MeasureReport)resource);
} else if (resource instanceof Medication) {
composeMedication(name, (Medication)resource);
} else if (resource instanceof MedicationAdministration) {
composeMedicationAdministration(name, (MedicationAdministration)resource);
} else if (resource instanceof MedicationDispense) {
composeMedicationDispense(name, (MedicationDispense)resource);
} else if (resource instanceof MedicationKnowledge) {
composeMedicationKnowledge(name, (MedicationKnowledge)resource);
} else if (resource instanceof MedicationRequest) {
composeMedicationRequest(name, (MedicationRequest)resource);
} else if (resource instanceof MedicationStatement) {
composeMedicationStatement(name, (MedicationStatement)resource);
} else if (resource instanceof MedicinalProductDefinition) {
composeMedicinalProductDefinition(name, (MedicinalProductDefinition)resource);
} else if (resource instanceof MessageDefinition) {
composeMessageDefinition(name, (MessageDefinition)resource);
} else if (resource instanceof MessageHeader) {
composeMessageHeader(name, (MessageHeader)resource);
} else if (resource instanceof MolecularSequence) {
composeMolecularSequence(name, (MolecularSequence)resource);
} else if (resource instanceof NamingSystem) {
composeNamingSystem(name, (NamingSystem)resource);
} else if (resource instanceof NutritionIntake) {
composeNutritionIntake(name, (NutritionIntake)resource);
} else if (resource instanceof NutritionOrder) {
composeNutritionOrder(name, (NutritionOrder)resource);
} else if (resource instanceof NutritionProduct) {
composeNutritionProduct(name, (NutritionProduct)resource);
} else if (resource instanceof Observation) {
composeObservation(name, (Observation)resource);
} else if (resource instanceof ObservationDefinition) {
composeObservationDefinition(name, (ObservationDefinition)resource);
} else if (resource instanceof OperationDefinition) {
composeOperationDefinition(name, (OperationDefinition)resource);
} else if (resource instanceof OperationOutcome) {
composeOperationOutcome(name, (OperationOutcome)resource);
} else if (resource instanceof Organization) {
composeOrganization(name, (Organization)resource);
} else if (resource instanceof OrganizationAffiliation) {
composeOrganizationAffiliation(name, (OrganizationAffiliation)resource);
} else if (resource instanceof PackagedProductDefinition) {
composePackagedProductDefinition(name, (PackagedProductDefinition)resource);
} else if (resource instanceof Parameters) {
composeParameters(name, (Parameters)resource);
} else if (resource instanceof Patient) {
composePatient(name, (Patient)resource);
} else if (resource instanceof PaymentNotice) {
composePaymentNotice(name, (PaymentNotice)resource);
} else if (resource instanceof PaymentReconciliation) {
composePaymentReconciliation(name, (PaymentReconciliation)resource);
} else if (resource instanceof Permission) {
composePermission(name, (Permission)resource);
} else if (resource instanceof Person) {
composePerson(name, (Person)resource);
} else if (resource instanceof PlanDefinition) {
composePlanDefinition(name, (PlanDefinition)resource);
} else if (resource instanceof Practitioner) {
composePractitioner(name, (Practitioner)resource);
} else if (resource instanceof PractitionerRole) {
composePractitionerRole(name, (PractitionerRole)resource);
} else if (resource instanceof Procedure) {
composeProcedure(name, (Procedure)resource);
} else if (resource instanceof Provenance) {
composeProvenance(name, (Provenance)resource);
} else if (resource instanceof Questionnaire) {
composeQuestionnaire(name, (Questionnaire)resource);
} else if (resource instanceof QuestionnaireResponse) {
composeQuestionnaireResponse(name, (QuestionnaireResponse)resource);
} else if (resource instanceof RegulatedAuthorization) {
composeRegulatedAuthorization(name, (RegulatedAuthorization)resource);
} else if (resource instanceof RelatedPerson) {
composeRelatedPerson(name, (RelatedPerson)resource);
} else if (resource instanceof RequestOrchestration) {
composeRequestOrchestration(name, (RequestOrchestration)resource);
} else if (resource instanceof Requirements) {
composeRequirements(name, (Requirements)resource);
} else if (resource instanceof ResearchStudy) {
composeResearchStudy(name, (ResearchStudy)resource);
} else if (resource instanceof ResearchSubject) {
composeResearchSubject(name, (ResearchSubject)resource);
} else if (resource instanceof RiskAssessment) {
composeRiskAssessment(name, (RiskAssessment)resource);
} else if (resource instanceof Schedule) {
composeSchedule(name, (Schedule)resource);
} else if (resource instanceof SearchParameter) {
composeSearchParameter(name, (SearchParameter)resource);
} else if (resource instanceof ServiceRequest) {
composeServiceRequest(name, (ServiceRequest)resource);
} else if (resource instanceof Slot) {
composeSlot(name, (Slot)resource);
} else if (resource instanceof Specimen) {
composeSpecimen(name, (Specimen)resource);
} else if (resource instanceof SpecimenDefinition) {
composeSpecimenDefinition(name, (SpecimenDefinition)resource);
} else if (resource instanceof StructureDefinition) {
composeStructureDefinition(name, (StructureDefinition)resource);
} else if (resource instanceof StructureMap) {
composeStructureMap(name, (StructureMap)resource);
} else if (resource instanceof Subscription) {
composeSubscription(name, (Subscription)resource);
} else if (resource instanceof SubscriptionStatus) {
composeSubscriptionStatus(name, (SubscriptionStatus)resource);
} else if (resource instanceof SubscriptionTopic) {
composeSubscriptionTopic(name, (SubscriptionTopic)resource);
} else if (resource instanceof Substance) {
composeSubstance(name, (Substance)resource);
} else if (resource instanceof SubstanceDefinition) {
composeSubstanceDefinition(name, (SubstanceDefinition)resource);
} else if (resource instanceof SubstanceNucleicAcid) {
composeSubstanceNucleicAcid(name, (SubstanceNucleicAcid)resource);
} else if (resource instanceof SubstancePolymer) {
composeSubstancePolymer(name, (SubstancePolymer)resource);
} else if (resource instanceof SubstanceProtein) {
composeSubstanceProtein(name, (SubstanceProtein)resource);
} else if (resource instanceof SubstanceReferenceInformation) {
composeSubstanceReferenceInformation(name, (SubstanceReferenceInformation)resource);
} else if (resource instanceof SubstanceSourceMaterial) {
composeSubstanceSourceMaterial(name, (SubstanceSourceMaterial)resource);
} else if (resource instanceof SupplyDelivery) {
composeSupplyDelivery(name, (SupplyDelivery)resource);
} else if (resource instanceof SupplyRequest) {
composeSupplyRequest(name, (SupplyRequest)resource);
} else if (resource instanceof Task) {
composeTask(name, (Task)resource);
} else if (resource instanceof TerminologyCapabilities) {
composeTerminologyCapabilities(name, (TerminologyCapabilities)resource);
} else if (resource instanceof TestPlan) {
composeTestPlan(name, (TestPlan)resource);
} else if (resource instanceof TestReport) {
composeTestReport(name, (TestReport)resource);
} else if (resource instanceof TestScript) {
composeTestScript(name, (TestScript)resource);
} else if (resource instanceof Transport) {
composeTransport(name, (Transport)resource);
} else if (resource instanceof ValueSet) {
composeValueSet(name, (ValueSet)resource);
} else if (resource instanceof VerificationResult) {
composeVerificationResult(name, (VerificationResult)resource);
} else if (resource instanceof VisionPrescription) {
composeVisionPrescription(name, (VisionPrescription)resource);
} else if (!customCompose(name, resource)) {
throw new Error("Unhandled resource type : "+resource.getClass().getName());
}
}
protected void composeType(String prefix, DataType type) throws IOException {
if (type == null) {
;
} else if (type instanceof Address) {
composeAddress(prefix+"Address", (Address) type);
} else if (type instanceof Age) {
composeAge(prefix+"Age", (Age) type);
} else if (type instanceof Annotation) {
composeAnnotation(prefix+"Annotation", (Annotation) type);
} else if (type instanceof Attachment) {
composeAttachment(prefix+"Attachment", (Attachment) type);
} else if (type instanceof Availability) {
composeAvailability(prefix+"Availability", (Availability) type);
} else if (type instanceof CodeableConcept) {
composeCodeableConcept(prefix+"CodeableConcept", (CodeableConcept) type);
} else if (type instanceof CodeableReference) {
composeCodeableReference(prefix+"CodeableReference", (CodeableReference) type);
} else if (type instanceof Coding) {
composeCoding(prefix+"Coding", (Coding) type);
} else if (type instanceof ContactDetail) {
composeContactDetail(prefix+"ContactDetail", (ContactDetail) type);
} else if (type instanceof ContactPoint) {
composeContactPoint(prefix+"ContactPoint", (ContactPoint) type);
} else if (type instanceof Contributor) {
composeContributor(prefix+"Contributor", (Contributor) type);
} else if (type instanceof Count) {
composeCount(prefix+"Count", (Count) type);
} else if (type instanceof DataRequirement) {
composeDataRequirement(prefix+"DataRequirement", (DataRequirement) type);
} else if (type instanceof Distance) {
composeDistance(prefix+"Distance", (Distance) type);
} else if (type instanceof Dosage) {
composeDosage(prefix+"Dosage", (Dosage) type);
} else if (type instanceof Duration) {
composeDuration(prefix+"Duration", (Duration) type);
} else if (type instanceof ElementDefinition) {
composeElementDefinition(prefix+"ElementDefinition", (ElementDefinition) type);
} else if (type instanceof Expression) {
composeExpression(prefix+"Expression", (Expression) type);
} else if (type instanceof ExtendedContactDetail) {
composeExtendedContactDetail(prefix+"ExtendedContactDetail", (ExtendedContactDetail) type);
} else if (type instanceof Extension) {
composeExtension(prefix+"Extension", (Extension) type);
} else if (type instanceof HumanName) {
composeHumanName(prefix+"HumanName", (HumanName) type);
} else if (type instanceof Identifier) {
composeIdentifier(prefix+"Identifier", (Identifier) type);
} else if (type instanceof MarketingStatus) {
composeMarketingStatus(prefix+"MarketingStatus", (MarketingStatus) type);
} else if (type instanceof Meta) {
composeMeta(prefix+"Meta", (Meta) type);
} else if (type instanceof MonetaryComponent) {
composeMonetaryComponent(prefix+"MonetaryComponent", (MonetaryComponent) type);
} else if (type instanceof Money) {
composeMoney(prefix+"Money", (Money) type);
} else if (type instanceof Narrative) {
composeNarrative(prefix+"Narrative", (Narrative) type);
} else if (type instanceof ParameterDefinition) {
composeParameterDefinition(prefix+"ParameterDefinition", (ParameterDefinition) type);
} else if (type instanceof Period) {
composePeriod(prefix+"Period", (Period) type);
} else if (type instanceof ProductShelfLife) {
composeProductShelfLife(prefix+"ProductShelfLife", (ProductShelfLife) type);
} else if (type instanceof Quantity) {
composeQuantity(prefix+"Quantity", (Quantity) type);
} else if (type instanceof Range) {
composeRange(prefix+"Range", (Range) type);
} else if (type instanceof Ratio) {
composeRatio(prefix+"Ratio", (Ratio) type);
} else if (type instanceof RatioRange) {
composeRatioRange(prefix+"RatioRange", (RatioRange) type);
} else if (type instanceof Reference) {
composeReference(prefix+"Reference", (Reference) type);
} else if (type instanceof RelatedArtifact) {
composeRelatedArtifact(prefix+"RelatedArtifact", (RelatedArtifact) type);
} else if (type instanceof SampledData) {
composeSampledData(prefix+"SampledData", (SampledData) type);
} else if (type instanceof Signature) {
composeSignature(prefix+"Signature", (Signature) type);
} else if (type instanceof Timing) {
composeTiming(prefix+"Timing", (Timing) type);
} else if (type instanceof TriggerDefinition) {
composeTriggerDefinition(prefix+"TriggerDefinition", (TriggerDefinition) type);
} else if (type instanceof UsageContext) {
composeUsageContext(prefix+"UsageContext", (UsageContext) type);
} else if (type instanceof VirtualServiceDetail) {
composeVirtualServiceDetail(prefix+"VirtualServiceDetail", (VirtualServiceDetail) type);
} else if (type instanceof CodeType) {
composeCodeCore(prefix+"Code", (CodeType) type, false);
composeCodeExtras(prefix+"Code", (CodeType) type, false);
}
else if (type instanceof OidType) {
composeOidCore(prefix+"Oid", (OidType) type, false);
composeOidExtras(prefix+"Oid", (OidType) type, false);
}
else if (type instanceof CanonicalType) {
composeCanonicalCore(prefix+"Canonical", (CanonicalType) type, false);
composeCanonicalExtras(prefix+"Canonical", (CanonicalType) type, false);
}
else if (type instanceof UuidType) {
composeUuidCore(prefix+"Uuid", (UuidType) type, false);
composeUuidExtras(prefix+"Uuid", (UuidType) type, false);
}
else if (type instanceof UrlType) {
composeUrlCore(prefix+"Url", (UrlType) type, false);
composeUrlExtras(prefix+"Url", (UrlType) type, false);
}
else if (type instanceof UnsignedIntType) {
composeUnsignedIntCore(prefix+"UnsignedInt", (UnsignedIntType) type, false);
composeUnsignedIntExtras(prefix+"UnsignedInt", (UnsignedIntType) type, false);
}
else if (type instanceof MarkdownType) {
composeMarkdownCore(prefix+"Markdown", (MarkdownType) type, false);
composeMarkdownExtras(prefix+"Markdown", (MarkdownType) type, false);
}
else if (type instanceof IdType) {
composeIdCore(prefix+"Id", (IdType) type, false);
composeIdExtras(prefix+"Id", (IdType) type, false);
}
else if (type instanceof PositiveIntType) {
composePositiveIntCore(prefix+"PositiveInt", (PositiveIntType) type, false);
composePositiveIntExtras(prefix+"PositiveInt", (PositiveIntType) type, false);
}
else if (type instanceof DateType) {
composeDateCore(prefix+"Date", (DateType) type, false);
composeDateExtras(prefix+"Date", (DateType) type, false);
}
else if (type instanceof DateTimeType) {
composeDateTimeCore(prefix+"DateTime", (DateTimeType) type, false);
composeDateTimeExtras(prefix+"DateTime", (DateTimeType) type, false);
}
else if (type instanceof StringType) {
composeStringCore(prefix+"String", (StringType) type, false);
composeStringExtras(prefix+"String", (StringType) type, false);
}
else if (type instanceof IntegerType) {
composeIntegerCore(prefix+"Integer", (IntegerType) type, false);
composeIntegerExtras(prefix+"Integer", (IntegerType) type, false);
}
else if (type instanceof Integer64Type) {
composeInteger64Core(prefix+"Integer64", (Integer64Type) type, false);
composeInteger64Extras(prefix+"Integer64", (Integer64Type) type, false);
}
else if (type instanceof UriType) {
composeUriCore(prefix+"Uri", (UriType) type, false);
composeUriExtras(prefix+"Uri", (UriType) type, false);
}
else if (type instanceof InstantType) {
composeInstantCore(prefix+"Instant", (InstantType) type, false);
composeInstantExtras(prefix+"Instant", (InstantType) type, false);
}
else if (type instanceof BooleanType) {
composeBooleanCore(prefix+"Boolean", (BooleanType) type, false);
composeBooleanExtras(prefix+"Boolean", (BooleanType) type, false);
}
else if (type instanceof Base64BinaryType) {
composeBase64BinaryCore(prefix+"Base64Binary", (Base64BinaryType) type, false);
composeBase64BinaryExtras(prefix+"Base64Binary", (Base64BinaryType) type, false);
}
else if (type instanceof TimeType) {
composeTimeCore(prefix+"Time", (TimeType) type, false);
composeTimeExtras(prefix+"Time", (TimeType) type, false);
}
else if (type instanceof DecimalType) {
composeDecimalCore(prefix+"Decimal", (DecimalType) type, false);
composeDecimalExtras(prefix+"Decimal", (DecimalType) type, false);
} else
throw new Error("Unhandled type");
}
protected void composeTypeInner(DataType type) throws IOException {
if (type == null) {
;
} else if (type instanceof Address) {
composeAddressProperties((Address) type);
} else if (type instanceof Age) {
composeAgeProperties((Age) type);
} else if (type instanceof Annotation) {
composeAnnotationProperties((Annotation) type);
} else if (type instanceof Attachment) {
composeAttachmentProperties((Attachment) type);
} else if (type instanceof Availability) {
composeAvailabilityProperties((Availability) type);
} else if (type instanceof CodeableConcept) {
composeCodeableConceptProperties((CodeableConcept) type);
} else if (type instanceof CodeableReference) {
composeCodeableReferenceProperties((CodeableReference) type);
} else if (type instanceof Coding) {
composeCodingProperties((Coding) type);
} else if (type instanceof ContactDetail) {
composeContactDetailProperties((ContactDetail) type);
} else if (type instanceof ContactPoint) {
composeContactPointProperties((ContactPoint) type);
} else if (type instanceof Contributor) {
composeContributorProperties((Contributor) type);
} else if (type instanceof Count) {
composeCountProperties((Count) type);
} else if (type instanceof DataRequirement) {
composeDataRequirementProperties((DataRequirement) type);
} else if (type instanceof Distance) {
composeDistanceProperties((Distance) type);
} else if (type instanceof Dosage) {
composeDosageProperties((Dosage) type);
} else if (type instanceof Duration) {
composeDurationProperties((Duration) type);
} else if (type instanceof ElementDefinition) {
composeElementDefinitionProperties((ElementDefinition) type);
} else if (type instanceof Expression) {
composeExpressionProperties((Expression) type);
} else if (type instanceof ExtendedContactDetail) {
composeExtendedContactDetailProperties((ExtendedContactDetail) type);
} else if (type instanceof Extension) {
composeExtensionProperties((Extension) type);
} else if (type instanceof HumanName) {
composeHumanNameProperties((HumanName) type);
} else if (type instanceof Identifier) {
composeIdentifierProperties((Identifier) type);
} else if (type instanceof MarketingStatus) {
composeMarketingStatusProperties((MarketingStatus) type);
} else if (type instanceof Meta) {
composeMetaProperties((Meta) type);
} else if (type instanceof MonetaryComponent) {
composeMonetaryComponentProperties((MonetaryComponent) type);
} else if (type instanceof Money) {
composeMoneyProperties((Money) type);
} else if (type instanceof Narrative) {
composeNarrativeProperties((Narrative) type);
} else if (type instanceof ParameterDefinition) {
composeParameterDefinitionProperties((ParameterDefinition) type);
} else if (type instanceof Period) {
composePeriodProperties((Period) type);
} else if (type instanceof ProductShelfLife) {
composeProductShelfLifeProperties((ProductShelfLife) type);
} else if (type instanceof Quantity) {
composeQuantityProperties((Quantity) type);
} else if (type instanceof Range) {
composeRangeProperties((Range) type);
} else if (type instanceof Ratio) {
composeRatioProperties((Ratio) type);
} else if (type instanceof RatioRange) {
composeRatioRangeProperties((RatioRange) type);
} else if (type instanceof Reference) {
composeReferenceProperties((Reference) type);
} else if (type instanceof RelatedArtifact) {
composeRelatedArtifactProperties((RelatedArtifact) type);
} else if (type instanceof SampledData) {
composeSampledDataProperties((SampledData) type);
} else if (type instanceof Signature) {
composeSignatureProperties((Signature) type);
} else if (type instanceof Timing) {
composeTimingProperties((Timing) type);
} else if (type instanceof TriggerDefinition) {
composeTriggerDefinitionProperties((TriggerDefinition) type);
} else if (type instanceof UsageContext) {
composeUsageContextProperties((UsageContext) type);
} else if (type instanceof VirtualServiceDetail) {
composeVirtualServiceDetailProperties((VirtualServiceDetail) type);
} else
throw new Error("Unhandled type: "+type.fhirType());
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy