org.hl7.fhir.r4.formats.JsonParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.hl7.fhir.r4 Show documentation
Show all versions of org.hl7.fhir.r4 Show documentation
Builds the hapi fhir r4. Requires hapi-fhir-base and hapi-fhir-utilities be built first and be
excluded from any other poms requiring it.
The newest version!
package org.hl7.fhir.r4.formats;
import java.io.IOException;
import org.hl7.fhir.exceptions.FHIRFormatError;
/*
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, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.json.JsonTrackingParser.PresentedBigDecimal;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
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 parseElementProperties(JsonObject json, Element element) throws IOException, FHIRFormatError {
super.parseElementProperties(json, element);
if (json.has("extension")) {
JsonArray array = json.getAsJsonArray("extension");
for (int i = 0; i < array.size(); i++) {
element.getExtension().add(parseExtension(array.get(i).getAsJsonObject()));
}
}
;
}
protected void parseBackboneElementProperties(JsonObject json, BackboneElement element)
throws IOException, FHIRFormatError {
parseElementProperties(json, element);
if (json.has("modifierExtension")) {
JsonArray array = json.getAsJsonArray("modifierExtension");
for (int i = 0; i < array.size(); i++) {
element.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject()));
}
}
}
protected void parseBackboneElementProperties(JsonObject json, BackboneType element)
throws IOException, FHIRFormatError {
parseElementProperties(json, element);
if (json.has("modifierExtension")) {
JsonArray array = json.getAsJsonArray("modifierExtension");
for (int i = 0; i < array.size(); i++) {
element.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject()));
}
}
}
protected void parseTypeProperties(JsonObject json, Element element) throws IOException, FHIRFormatError {
parseElementProperties(json, element);
}
@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 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 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 {
parseTypeProperties(json, res);
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
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 {
parseTypeProperties(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 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 {
parseElementProperties(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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getProfile().get(i));
}
}
;
if (json.has("security")) {
JsonArray array = json.getAsJsonArray("security");
for (int i = 0; i < array.size(); i++) {
res.getSecurity().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("tag")) {
JsonArray array = json.getAsJsonArray("tag");
for (int i = 0; i < array.size(); i++) {
res.getTag().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
parseTypeProperties(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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 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 {
parseTypeProperties(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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
parseTypeProperties(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(parseUnsignedInt(json.get("size").getAsString()));
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());
}
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 {
parseTypeProperties(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")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getProfile().get(i));
}
}
;
Type subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("mustSupport")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getMustSupport().get(i));
}
}
;
if (json.has("codeFilter")) {
JsonArray array = json.getAsJsonArray("codeFilter");
for (int i = 0; i < array.size(); i++) {
res.getCodeFilter()
.add(parseDataRequirementDataRequirementCodeFilterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("dateFilter")) {
JsonArray array = json.getAsJsonArray("dateFilter");
for (int i = 0; i < array.size(); i++) {
res.getDateFilter()
.add(parseDataRequirementDataRequirementDateFilterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("sort");
for (int i = 0; i < array.size(); i++) {
res.getSort().add(parseDataRequirementDataRequirementSortComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementDataRequirementCodeFilterComponent(
JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent();
parseDataRequirementDataRequirementCodeFilterComponentProperties(json, owner, res);
return res;
}
protected void parseDataRequirementDataRequirementCodeFilterComponentProperties(JsonObject json,
DataRequirement owner, DataRequirement.DataRequirementCodeFilterComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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 = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
}
protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDataRequirementDateFilterComponent(
JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent();
parseDataRequirementDataRequirementDateFilterComponentProperties(json, owner, res);
return res;
}
protected void parseDataRequirementDataRequirementDateFilterComponentProperties(JsonObject json,
DataRequirement owner, DataRequirement.DataRequirementDateFilterComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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());
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DataRequirement.DataRequirementSortComponent parseDataRequirementDataRequirementSortComponent(
JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError {
DataRequirement.DataRequirementSortComponent res = new DataRequirement.DataRequirementSortComponent();
parseDataRequirementDataRequirementSortComponentProperties(json, owner, res);
return res;
}
protected void parseDataRequirementDataRequirementSortComponentProperties(JsonObject json, DataRequirement owner,
DataRequirement.DataRequirementSortComponent res) throws IOException, FHIRFormatError {
parseTypeProperties(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 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 {
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("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
if (json.has("additionalInstruction")) {
JsonArray array = json.getAsJsonArray("additionalInstruction");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalInstruction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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")));
Type asNeeded = parseType("asNeeded", json);
if (asNeeded != null)
res.setAsNeeded(asNeeded);
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 = json.getAsJsonArray("doseAndRate");
for (int i = 0; i < array.size(); i++) {
res.getDoseAndRate().add(parseDosageDosageDoseAndRateComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("maxDosePerPeriod"))
res.setMaxDosePerPeriod(parseRatio(getJObject(json, "maxDosePerPeriod")));
if (json.has("maxDosePerAdministration"))
res.setMaxDosePerAdministration(parseQuantity(getJObject(json, "maxDosePerAdministration")));
if (json.has("maxDosePerLifetime"))
res.setMaxDosePerLifetime(parseQuantity(getJObject(json, "maxDosePerLifetime")));
}
protected Dosage.DosageDoseAndRateComponent parseDosageDosageDoseAndRateComponent(JsonObject json, Dosage owner)
throws IOException, FHIRFormatError {
Dosage.DosageDoseAndRateComponent res = new Dosage.DosageDoseAndRateComponent();
parseDosageDosageDoseAndRateComponentProperties(json, owner, res);
return res;
}
protected void parseDosageDosageDoseAndRateComponentProperties(JsonObject json, Dosage owner,
Dosage.DosageDoseAndRateComponent res) throws IOException, FHIRFormatError {
parseTypeProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type dose = parseType("dose", json);
if (dose != null)
res.setDose(dose);
Type rate = parseType("rate", json);
if (rate != null)
res.setRate(rate);
}
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 {
parseTypeProperties(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 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 {
parseTypeProperties(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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getGiven().get(i));
}
}
;
if (json.has("prefix")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPrefix().get(i));
}
}
;
if (json.has("suffix")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSuffix().get(i));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
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 {
parseTypeProperties(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 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 {
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("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 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 {
parseTypeProperties(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 SubstanceAmount parseSubstanceAmount(JsonObject json) throws IOException, FHIRFormatError {
SubstanceAmount res = new SubstanceAmount();
parseSubstanceAmountProperties(json, res);
return res;
}
protected void parseSubstanceAmountProperties(JsonObject json, SubstanceAmount res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
if (json.has("amountType"))
res.setAmountType(parseCodeableConcept(getJObject(json, "amountType")));
if (json.has("amountText"))
res.setAmountTextElement(parseString(json.get("amountText").getAsString()));
if (json.has("_amountText"))
parseElementProperties(getJObject(json, "_amountText"), res.getAmountTextElement());
if (json.has("referenceRange"))
res.setReferenceRange(
parseSubstanceAmountSubstanceAmountReferenceRangeComponent(getJObject(json, "referenceRange"), res));
}
protected SubstanceAmount.SubstanceAmountReferenceRangeComponent parseSubstanceAmountSubstanceAmountReferenceRangeComponent(
JsonObject json, SubstanceAmount owner) throws IOException, FHIRFormatError {
SubstanceAmount.SubstanceAmountReferenceRangeComponent res = new SubstanceAmount.SubstanceAmountReferenceRangeComponent();
parseSubstanceAmountSubstanceAmountReferenceRangeComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceAmountSubstanceAmountReferenceRangeComponentProperties(JsonObject json,
SubstanceAmount owner, SubstanceAmount.SubstanceAmountReferenceRangeComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(json, res);
if (json.has("lowLimit"))
res.setLowLimit(parseQuantity(getJObject(json, "lowLimit")));
if (json.has("highLimit"))
res.setHighLimit(parseQuantity(getJObject(json, "highLimit")));
}
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 {
parseTypeProperties(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 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 {
parseTypeProperties(json, res);
if (json.has("origin"))
res.setOrigin(parseQuantity(getJObject(json, "origin")));
if (json.has("period"))
res.setPeriodElement(parseDecimal(json.get("period").getAsBigDecimal()));
if (json.has("_period"))
parseElementProperties(getJObject(json, "_period"), res.getPeriodElement());
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("data"))
res.setDataElement(parseString(json.get("data").getAsString()));
if (json.has("_data"))
parseElementProperties(getJObject(json, "_data"), res.getDataElement());
}
protected Population parsePopulation(JsonObject json) throws IOException, FHIRFormatError {
Population res = new Population();
parsePopulationProperties(json, res);
return res;
}
protected void parsePopulationProperties(JsonObject json, Population res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type age = parseType("age", json);
if (age != null)
res.setAge(age);
if (json.has("gender"))
res.setGender(parseCodeableConcept(getJObject(json, "gender")));
if (json.has("race"))
res.setRace(parseCodeableConcept(getJObject(json, "race")));
if (json.has("physiologicalCondition"))
res.setPhysiologicalCondition(parseCodeableConcept(getJObject(json, "physiologicalCondition")));
}
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 {
parseTypeProperties(json, res);
if (json.has("numerator"))
res.setNumerator(parseQuantity(getJObject(json, "numerator")));
if (json.has("denominator"))
res.setDenominator(parseQuantity(getJObject(json, "denominator")));
}
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 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 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 {
parseTypeProperties(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 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 {
parseTypeProperties(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());
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("data")) {
JsonArray array = json.getAsJsonArray("data");
for (int i = 0; i < array.size(); i++) {
res.getData().add(parseDataRequirement(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("condition"))
res.setCondition(parseExpression(getJObject(json, "condition")));
}
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 {
parseTypeProperties(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(), Quantity.QuantityComparator.NULL,
new Quantity.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 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 {
parseTypeProperties(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 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 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 {
parseTypeProperties(json, res);
if (json.has("low"))
res.setLow(parseQuantity(getJObject(json, "low")));
if (json.has("high"))
res.setHigh(parseQuantity(getJObject(json, "high")));
}
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 {
parseTypeProperties(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("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("url"))
res.setUrlElement(parseUrl(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
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());
}
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 {
parseTypeProperties(json, res);
Type 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 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 {
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("period"))
res.setPeriod(parseQuantity(getJObject(json, "period")));
if (json.has("specialPrecautionsForStorage")) {
JsonArray array = json.getAsJsonArray("specialPrecautionsForStorage");
for (int i = 0; i < array.size(); i++) {
res.getSpecialPrecautionsForStorage().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
parseTypeProperties(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 = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
parseTypeProperties(json, res);
if (json.has("code"))
res.setCode(parseCoding(getJObject(json, "code")));
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
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 {
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("name"))
res.setNameElement(parseId(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 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 {
parseTypeProperties(json, res);
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
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 {
parseBackboneElementProperties(json, res);
if (json.has("event")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getEvent().get(i));
}
}
;
if (json.has("repeat"))
res.setRepeat(parseTimingTimingRepeatComponent(getJObject(json, "repeat"), res));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
protected Timing.TimingRepeatComponent parseTimingTimingRepeatComponent(JsonObject json, Timing owner)
throws IOException, FHIRFormatError {
Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent();
parseTimingTimingRepeatComponentProperties(json, owner, res);
return res;
}
protected void parseTimingTimingRepeatComponentProperties(JsonObject json, Timing owner,
Timing.TimingRepeatComponent res) throws IOException, FHIRFormatError {
parseTypeProperties(json, res);
Type 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 = json.getAsJsonArray("dayOfWeek");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDayOfWeek().add(new Enumeration());
} else {
res.getDayOfWeek().add(
parseEnumeration(array.get(i).getAsString(), Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory()));
}
}
}
;
if (json.has("_dayOfWeek")) {
JsonArray array = json.getAsJsonArray("_dayOfWeek");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDayOfWeek().size())
res.getDayOfWeek().add(parseEnumeration(null, Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getDayOfWeek().get(i));
}
}
;
if (json.has("timeOfDay")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getTimeOfDay().get(i));
}
}
;
if (json.has("when")) {
JsonArray array = json.getAsJsonArray("when");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getWhen().add(new Enumeration());
} else {
res.getWhen().add(parseEnumeration(array.get(i).getAsString(), Timing.EventTiming.NULL,
new Timing.EventTimingEnumFactory()));
}
}
}
;
if (json.has("_when")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 ProdCharacteristic parseProdCharacteristic(JsonObject json) throws IOException, FHIRFormatError {
ProdCharacteristic res = new ProdCharacteristic();
parseProdCharacteristicProperties(json, res);
return res;
}
protected void parseProdCharacteristicProperties(JsonObject json, ProdCharacteristic res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("height"))
res.setHeight(parseQuantity(getJObject(json, "height")));
if (json.has("width"))
res.setWidth(parseQuantity(getJObject(json, "width")));
if (json.has("depth"))
res.setDepth(parseQuantity(getJObject(json, "depth")));
if (json.has("weight"))
res.setWeight(parseQuantity(getJObject(json, "weight")));
if (json.has("nominalVolume"))
res.setNominalVolume(parseQuantity(getJObject(json, "nominalVolume")));
if (json.has("externalDiameter"))
res.setExternalDiameter(parseQuantity(getJObject(json, "externalDiameter")));
if (json.has("shape"))
res.setShapeElement(parseString(json.get("shape").getAsString()));
if (json.has("_shape"))
parseElementProperties(getJObject(json, "_shape"), res.getShapeElement());
if (json.has("color")) {
JsonArray array = json.getAsJsonArray("color");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getColor().add(new StringType());
} else {
res.getColor().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_color")) {
JsonArray array = json.getAsJsonArray("_color");
for (int i = 0; i < array.size(); i++) {
if (i == res.getColor().size())
res.getColor().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getColor().get(i));
}
}
;
if (json.has("imprint")) {
JsonArray array = json.getAsJsonArray("imprint");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getImprint().add(new StringType());
} else {
res.getImprint().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_imprint")) {
JsonArray array = json.getAsJsonArray("_imprint");
for (int i = 0; i < array.size(); i++) {
if (i == res.getImprint().size())
res.getImprint().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getImprint().get(i));
}
}
;
if (json.has("image")) {
JsonArray array = json.getAsJsonArray("image");
for (int i = 0; i < array.size(); i++) {
res.getImage().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("scoring"))
res.setScoring(parseCodeableConcept(getJObject(json, "scoring")));
}
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 {
parseTypeProperties(json, res);
if (json.has("coding")) {
JsonArray array = json.getAsJsonArray("coding");
for (int i = 0; i < array.size(); i++) {
res.getCoding().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
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 {
parseTypeProperties(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(), ParameterDefinition.ParameterUse.NULL,
new ParameterDefinition.ParameterUseEnumFactory()));
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(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 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 {
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("representation")) {
JsonArray array = json.getAsJsonArray("representation");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getRepresentation().add(new Enumeration());
} else {
res.getRepresentation()
.add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.PropertyRepresentation.NULL,
new ElementDefinition.PropertyRepresentationEnumFactory()));
}
}
}
;
if (json.has("_representation")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("slicing"))
res.setSlicing(parseElementDefinitionElementDefinitionSlicingComponent(getJObject(json, "slicing"), res));
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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(parseElementDefinitionElementDefinitionBaseComponent(getJObject(json, "base"), res));
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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseElementDefinitionTypeRefComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type 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());
Type fixed = parseType("fixed", json);
if (fixed != null)
res.setFixed(fixed);
Type pattern = parseType("pattern", json);
if (pattern != null)
res.setPattern(pattern);
if (json.has("example")) {
JsonArray array = json.getAsJsonArray("example");
for (int i = 0; i < array.size(); i++) {
res.getExample()
.add(parseElementDefinitionElementDefinitionExampleComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type minValue = parseType("minValue", json);
if (minValue != null)
res.setMinValue(minValue);
Type 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getCondition().get(i));
}
}
;
if (json.has("constraint")) {
JsonArray array = json.getAsJsonArray("constraint");
for (int i = 0; i < array.size(); i++) {
res.getConstraint()
.add(parseElementDefinitionElementDefinitionConstraintComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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(parseElementDefinitionElementDefinitionBindingComponent(getJObject(json, "binding"), res));
if (json.has("mapping")) {
JsonArray array = json.getAsJsonArray("mapping");
for (int i = 0; i < array.size(); i++) {
res.getMapping()
.add(parseElementDefinitionElementDefinitionMappingComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionElementDefinitionSlicingComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent();
parseElementDefinitionElementDefinitionSlicingComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionSlicingComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(json, res);
if (json.has("discriminator")) {
JsonArray array = json.getAsJsonArray("discriminator");
for (int i = 0; i < array.size(); i++) {
res.getDiscriminator().add(parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
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 parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent();
parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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 parseElementDefinitionElementDefinitionBaseComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent();
parseElementDefinitionElementDefinitionBaseComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionBaseComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionBaseComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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,
ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent();
parseElementDefinitionTypeRefComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionTypeRefComponentProperties(JsonObject json, ElementDefinition owner,
ElementDefinition.TypeRefComponent res) throws IOException, FHIRFormatError {
parseTypeProperties(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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getProfile().get(i));
}
}
;
if (json.has("targetProfile")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getTargetProfile().get(i));
}
}
;
if (json.has("aggregation")) {
JsonArray array = json.getAsJsonArray("aggregation");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getAggregation().add(new Enumeration());
} else {
res.getAggregation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.AggregationMode.NULL,
new ElementDefinition.AggregationModeEnumFactory()));
}
}
}
;
if (json.has("_aggregation")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 parseElementDefinitionElementDefinitionExampleComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent();
parseElementDefinitionElementDefinitionExampleComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionExampleComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionExampleComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(json, res);
if (json.has("label"))
res.setLabelElement(parseString(json.get("label").getAsString()));
if (json.has("_label"))
parseElementProperties(getJObject(json, "_label"), res.getLabelElement());
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionElementDefinitionConstraintComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent();
parseElementDefinitionElementDefinitionConstraintComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionConstraintComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionConstraintComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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(parseString(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("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("xpath"))
res.setXpathElement(parseString(json.get("xpath").getAsString()));
if (json.has("_xpath"))
parseElementProperties(getJObject(json, "_xpath"), res.getXpathElement());
if (json.has("source"))
res.setSourceElement(parseCanonical(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
}
protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionElementDefinitionBindingComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent();
parseElementDefinitionElementDefinitionBindingComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionBindingComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionBindingComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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(parseString(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());
}
protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionElementDefinitionMappingComponent(
JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError {
ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent();
parseElementDefinitionElementDefinitionMappingComponentProperties(json, owner, res);
return res;
}
protected void parseElementDefinitionElementDefinitionMappingComponentProperties(JsonObject json,
ElementDefinition owner, ElementDefinition.ElementDefinitionMappingComponent res)
throws IOException, FHIRFormatError {
parseTypeProperties(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(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
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 = json.getAsJsonArray("contained");
for (int i = 0; i < array.size(); i++) {
res.getContained().add(parseResource(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("extension")) {
JsonArray array = json.getAsJsonArray("extension");
for (int i = 0; i < array.size(); i++) {
res.getExtension().add(parseExtension(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("modifierExtension")) {
JsonArray array = json.getAsJsonArray("modifierExtension");
for (int i = 0; i < array.size(); i++) {
res.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseParametersParametersParameterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Parameters.ParametersParameterComponent parseParametersParametersParameterComponent(JsonObject json,
Parameters owner) throws IOException, FHIRFormatError {
Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent();
parseParametersParametersParameterComponentProperties(json, owner, res);
return res;
}
protected void parseParametersParametersParameterComponentProperties(JsonObject json, Parameters owner,
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());
Type 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 = json.getAsJsonArray("part");
for (int i = 0; i < array.size(); i++) {
res.getPart().add(parseParametersParametersParameterComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected void parseResourceProperties(JsonObject json, Resource res) throws IOException, FHIRFormatError {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("servicePeriod"))
res.setServicePeriod(parsePeriod(getJObject(json, "servicePeriod")));
if (json.has("coverage")) {
JsonArray array = json.getAsJsonArray("coverage");
for (int i = 0; i < array.size(); i++) {
res.getCoverage().add(parseAccountCoverageComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("guarantor")) {
JsonArray array = json.getAsJsonArray("guarantor");
for (int i = 0; i < array.size(); i++) {
res.getGuarantor().add(parseAccountGuarantorComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
}
protected Account.CoverageComponent parseAccountCoverageComponent(JsonObject json, Account owner)
throws IOException, FHIRFormatError {
Account.CoverageComponent res = new Account.CoverageComponent();
parseAccountCoverageComponentProperties(json, owner, res);
return res;
}
protected void parseAccountCoverageComponentProperties(JsonObject json, Account owner, 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, Account owner)
throws IOException, FHIRFormatError {
Account.GuarantorComponent res = new Account.GuarantorComponent();
parseAccountGuarantorComponentProperties(json, owner, res);
return res;
}
protected void parseAccountGuarantorComponentProperties(JsonObject json, Account owner,
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 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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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());
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("library")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLibrary().get(i));
}
}
;
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(),
ActivityDefinition.ActivityDefinitionKind.NULL, new ActivityDefinition.ActivityDefinitionKindEnumFactory()));
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(), ActivityDefinition.RequestIntent.NULL,
new ActivityDefinition.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(),
ActivityDefinition.RequestPriority.NULL, new ActivityDefinition.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());
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant()
.add(parseActivityDefinitionActivityDefinitionParticipantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type 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 = json.getAsJsonArray("dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseDosage(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite")) {
JsonArray array = json.getAsJsonArray("bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specimenRequirement")) {
JsonArray array = json.getAsJsonArray("specimenRequirement");
for (int i = 0; i < array.size(); i++) {
res.getSpecimenRequirement().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("observationRequirement")) {
JsonArray array = json.getAsJsonArray("observationRequirement");
for (int i = 0; i < array.size(); i++) {
res.getObservationRequirement().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("observationResultRequirement")) {
JsonArray array = json.getAsJsonArray("observationResultRequirement");
for (int i = 0; i < array.size(); i++) {
res.getObservationResultRequirement().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("dynamicValue");
for (int i = 0; i < array.size(); i++) {
res.getDynamicValue()
.add(parseActivityDefinitionActivityDefinitionDynamicValueComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionActivityDefinitionParticipantComponent(
JsonObject json, ActivityDefinition owner) throws IOException, FHIRFormatError {
ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent();
parseActivityDefinitionActivityDefinitionParticipantComponentProperties(json, owner, res);
return res;
}
protected void parseActivityDefinitionActivityDefinitionParticipantComponentProperties(JsonObject json,
ActivityDefinition owner, ActivityDefinition.ActivityDefinitionParticipantComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(
parseEnumeration(json.get("type").getAsString(), ActivityDefinition.ActivityParticipantType.NULL,
new ActivityDefinition.ActivityParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionActivityDefinitionDynamicValueComponent(
JsonObject json, ActivityDefinition owner) throws IOException, FHIRFormatError {
ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent();
parseActivityDefinitionActivityDefinitionDynamicValueComponentProperties(json, owner, res);
return res;
}
protected void parseActivityDefinitionActivityDefinitionDynamicValueComponentProperties(JsonObject json,
ActivityDefinition owner, 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 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"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("event"))
res.setEvent(parseCodeableConcept(getJObject(json, "event")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
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("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("resultingCondition")) {
JsonArray array = json.getAsJsonArray("resultingCondition");
for (int i = 0; i < array.size(); i++) {
res.getResultingCondition().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("seriousness"))
res.setSeriousness(parseCodeableConcept(getJObject(json, "seriousness")));
if (json.has("severity"))
res.setSeverity(parseCodeableConcept(getJObject(json, "severity")));
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
if (json.has("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("contributor")) {
JsonArray array = json.getAsJsonArray("contributor");
for (int i = 0; i < array.size(); i++) {
res.getContributor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("suspectEntity")) {
JsonArray array = json.getAsJsonArray("suspectEntity");
for (int i = 0; i < array.size(); i++) {
res.getSuspectEntity()
.add(parseAdverseEventAdverseEventSuspectEntityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("subjectMedicalHistory")) {
JsonArray array = json.getAsJsonArray("subjectMedicalHistory");
for (int i = 0; i < array.size(); i++) {
res.getSubjectMedicalHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("referenceDocument")) {
JsonArray array = json.getAsJsonArray("referenceDocument");
for (int i = 0; i < array.size(); i++) {
res.getReferenceDocument().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("study")) {
JsonArray array = json.getAsJsonArray("study");
for (int i = 0; i < array.size(); i++) {
res.getStudy().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventAdverseEventSuspectEntityComponent(
JsonObject json, AdverseEvent owner) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent();
parseAdverseEventAdverseEventSuspectEntityComponentProperties(json, owner, res);
return res;
}
protected void parseAdverseEventAdverseEventSuspectEntityComponentProperties(JsonObject json, AdverseEvent owner,
AdverseEvent.AdverseEventSuspectEntityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("instance"))
res.setInstance(parseReference(getJObject(json, "instance")));
if (json.has("causality")) {
JsonArray array = json.getAsJsonArray("causality");
for (int i = 0; i < array.size(); i++) {
res.getCausality()
.add(parseAdverseEventAdverseEventSuspectEntityCausalityComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventAdverseEventSuspectEntityCausalityComponent(
JsonObject json, AdverseEvent owner) throws IOException, FHIRFormatError {
AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent();
parseAdverseEventAdverseEventSuspectEntityCausalityComponentProperties(json, owner, res);
return res;
}
protected void parseAdverseEventAdverseEventSuspectEntityCausalityComponentProperties(JsonObject json,
AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("assessment"))
res.setAssessment(parseCodeableConcept(getJObject(json, "assessment")));
if (json.has("productRelatedness"))
res.setProductRelatednessElement(parseString(json.get("productRelatedness").getAsString()));
if (json.has("_productRelatedness"))
parseElementProperties(getJObject(json, "_productRelatedness"), res.getProductRelatednessElement());
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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.setTypeElement(parseEnumeration(json.get("type").getAsString(),
AllergyIntolerance.AllergyIntoleranceType.NULL, new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getCategory().add(new Enumeration());
} else {
res.getCategory()
.add(parseEnumeration(array.get(i).getAsString(), AllergyIntolerance.AllergyIntoleranceCategory.NULL,
new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory()));
}
}
}
;
if (json.has("_category")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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")));
Type 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("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("asserter"))
res.setAsserter(parseReference(getJObject(json, "asserter")));
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reaction")) {
JsonArray array = json.getAsJsonArray("reaction");
for (int i = 0; i < array.size(); i++) {
res.getReaction()
.add(parseAllergyIntoleranceAllergyIntoleranceReactionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceAllergyIntoleranceReactionComponent(
JsonObject json, AllergyIntolerance owner) throws IOException, FHIRFormatError {
AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent();
parseAllergyIntoleranceAllergyIntoleranceReactionComponentProperties(json, owner, res);
return res;
}
protected void parseAllergyIntoleranceAllergyIntoleranceReactionComponentProperties(JsonObject json,
AllergyIntolerance owner, 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 = json.getAsJsonArray("manifestation");
for (int i = 0; i < array.size(); i++) {
res.getManifestation().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("cancelationReason"))
res.setCancelationReason(parseCodeableConcept(getJObject(json, "cancelationReason")));
if (json.has("serviceCategory")) {
JsonArray array = json.getAsJsonArray("serviceCategory");
for (int i = 0; i < array.size(); i++) {
res.getServiceCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("serviceType")) {
JsonArray array = json.getAsJsonArray("serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialty")) {
JsonArray array = json.getAsJsonArray("specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("appointmentType"))
res.setAppointmentType(parseCodeableConcept(getJObject(json, "appointmentType")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("priority"))
res.setPriorityElement(parseUnsignedInt(json.get("priority").getAsString()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("supportingInformation")) {
JsonArray array = json.getAsJsonArray("supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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("slot")) {
JsonArray array = json.getAsJsonArray("slot");
for (int i = 0; i < array.size(); i++) {
res.getSlot().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("patientInstruction"))
res.setPatientInstructionElement(parseString(json.get("patientInstruction").getAsString()));
if (json.has("_patientInstruction"))
parseElementProperties(getJObject(json, "_patientInstruction"), res.getPatientInstructionElement());
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseAppointmentAppointmentParticipantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("requestedPeriod")) {
JsonArray array = json.getAsJsonArray("requestedPeriod");
for (int i = 0; i < array.size(); i++) {
res.getRequestedPeriod().add(parsePeriod(array.get(i).getAsJsonObject()));
}
}
;
}
protected Appointment.AppointmentParticipantComponent parseAppointmentAppointmentParticipantComponent(JsonObject json,
Appointment owner) throws IOException, FHIRFormatError {
Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent();
parseAppointmentAppointmentParticipantComponentProperties(json, owner, res);
return res;
}
protected void parseAppointmentAppointmentParticipantComponentProperties(JsonObject json, Appointment owner,
Appointment.AppointmentParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
if (json.has("required"))
res.setRequiredElement(parseEnumeration(json.get("required").getAsString(), Appointment.ParticipantRequired.NULL,
new Appointment.ParticipantRequiredEnumFactory()));
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());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("appointment"))
res.setAppointment(parseReference(getJObject(json, "appointment")));
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 = json.getAsJsonArray("participantType");
for (int i = 0; i < array.size(); i++) {
res.getParticipantType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("actor"))
res.setActor(parseReference(getJObject(json, "actor")));
if (json.has("participantStatus"))
res.setParticipantStatusElement(parseEnumeration(json.get("participantStatus").getAsString(),
AppointmentResponse.ParticipantStatus.NULL, new AppointmentResponse.ParticipantStatusEnumFactory()));
if (json.has("_participantStatus"))
parseElementProperties(getJObject(json, "_participantStatus"), res.getParticipantStatusElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
}
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("type"))
res.setType(parseCoding(getJObject(json, "type")));
if (json.has("subtype")) {
JsonArray array = json.getAsJsonArray("subtype");
for (int i = 0; i < array.size(); i++) {
res.getSubtype().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
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("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
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.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), AuditEvent.AuditEventOutcome.NULL,
new AuditEvent.AuditEventOutcomeEnumFactory()));
if (json.has("_outcome"))
parseElementProperties(getJObject(json, "_outcome"), res.getOutcomeElement());
if (json.has("outcomeDesc"))
res.setOutcomeDescElement(parseString(json.get("outcomeDesc").getAsString()));
if (json.has("_outcomeDesc"))
parseElementProperties(getJObject(json, "_outcomeDesc"), res.getOutcomeDescElement());
if (json.has("purposeOfEvent")) {
JsonArray array = json.getAsJsonArray("purposeOfEvent");
for (int i = 0; i < array.size(); i++) {
res.getPurposeOfEvent().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("agent")) {
JsonArray array = json.getAsJsonArray("agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseAuditEventAuditEventAgentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("source"))
res.setSource(parseAuditEventAuditEventSourceComponent(getJObject(json, "source"), res));
if (json.has("entity")) {
JsonArray array = json.getAsJsonArray("entity");
for (int i = 0; i < array.size(); i++) {
res.getEntity().add(parseAuditEventAuditEventEntityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected AuditEvent.AuditEventAgentComponent parseAuditEventAuditEventAgentComponent(JsonObject json,
AuditEvent owner) throws IOException, FHIRFormatError {
AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent();
parseAuditEventAuditEventAgentComponentProperties(json, owner, res);
return res;
}
protected void parseAuditEventAuditEventAgentComponentProperties(JsonObject json, AuditEvent owner,
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 = json.getAsJsonArray("role");
for (int i = 0; i < array.size(); i++) {
res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("altId"))
res.setAltIdElement(parseString(json.get("altId").getAsString()));
if (json.has("_altId"))
parseElementProperties(getJObject(json, "_altId"), res.getAltIdElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPolicy().get(i));
}
}
;
if (json.has("media"))
res.setMedia(parseCoding(getJObject(json, "media")));
if (json.has("network"))
res.setNetwork(parseAuditEventAuditEventAgentNetworkComponent(getJObject(json, "network"), owner));
if (json.has("purposeOfUse")) {
JsonArray array = json.getAsJsonArray("purposeOfUse");
for (int i = 0; i < array.size(); i++) {
res.getPurposeOfUse().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected AuditEvent.AuditEventAgentNetworkComponent parseAuditEventAuditEventAgentNetworkComponent(JsonObject json,
AuditEvent owner) throws IOException, FHIRFormatError {
AuditEvent.AuditEventAgentNetworkComponent res = new AuditEvent.AuditEventAgentNetworkComponent();
parseAuditEventAuditEventAgentNetworkComponentProperties(json, owner, res);
return res;
}
protected void parseAuditEventAuditEventAgentNetworkComponentProperties(JsonObject json, AuditEvent owner,
AuditEvent.AuditEventAgentNetworkComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("address"))
res.setAddressElement(parseString(json.get("address").getAsString()));
if (json.has("_address"))
parseElementProperties(getJObject(json, "_address"), res.getAddressElement());
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), AuditEvent.AuditEventAgentNetworkType.NULL,
new AuditEvent.AuditEventAgentNetworkTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected AuditEvent.AuditEventSourceComponent parseAuditEventAuditEventSourceComponent(JsonObject json,
AuditEvent owner) throws IOException, FHIRFormatError {
AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent();
parseAuditEventAuditEventSourceComponentProperties(json, owner, res);
return res;
}
protected void parseAuditEventAuditEventSourceComponentProperties(JsonObject json, AuditEvent owner,
AuditEvent.AuditEventSourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("site"))
res.setSiteElement(parseString(json.get("site").getAsString()));
if (json.has("_site"))
parseElementProperties(getJObject(json, "_site"), res.getSiteElement());
if (json.has("observer"))
res.setObserver(parseReference(getJObject(json, "observer")));
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
}
protected AuditEvent.AuditEventEntityComponent parseAuditEventAuditEventEntityComponent(JsonObject json,
AuditEvent owner) throws IOException, FHIRFormatError {
AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent();
parseAuditEventAuditEventEntityComponentProperties(json, owner, res);
return res;
}
protected void parseAuditEventAuditEventEntityComponentProperties(JsonObject json, AuditEvent owner,
AuditEvent.AuditEventEntityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("what"))
res.setWhat(parseReference(getJObject(json, "what")));
if (json.has("type"))
res.setType(parseCoding(getJObject(json, "type")));
if (json.has("role"))
res.setRole(parseCoding(getJObject(json, "role")));
if (json.has("lifecycle"))
res.setLifecycle(parseCoding(getJObject(json, "lifecycle")));
if (json.has("securityLabel")) {
JsonArray array = json.getAsJsonArray("securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
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("query"))
res.setQueryElement(parseBase64Binary(json.get("query").getAsString()));
if (json.has("_query"))
parseElementProperties(getJObject(json, "_query"), res.getQueryElement());
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseAuditEventAuditEventEntityDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventAuditEventEntityDetailComponent(JsonObject json,
AuditEvent owner) throws IOException, FHIRFormatError {
AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent();
parseAuditEventAuditEventEntityDetailComponentProperties(json, owner, res);
return res;
}
protected void parseAuditEventAuditEventEntityDetailComponentProperties(JsonObject json, AuditEvent owner,
AuditEvent.AuditEventEntityDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseString(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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(parseDate(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("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("productCategory"))
res.setProductCategoryElement(parseEnumeration(json.get("productCategory").getAsString(),
BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL,
new BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory()));
if (json.has("_productCategory"))
parseElementProperties(getJObject(json, "_productCategory"), res.getProductCategoryElement());
if (json.has("productCode"))
res.setProductCode(parseCodeableConcept(getJObject(json, "productCode")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(),
BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL,
new BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("request")) {
JsonArray array = json.getAsJsonArray("request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("quantity"))
res.setQuantityElement(parseInteger(json.get("quantity").getAsLong()));
if (json.has("_quantity"))
parseElementProperties(getJObject(json, "_quantity"), res.getQuantityElement());
if (json.has("parent")) {
JsonArray array = json.getAsJsonArray("parent");
for (int i = 0; i < array.size(); i++) {
res.getParent().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("collection"))
res.setCollection(parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent(
getJObject(json, "collection"), res));
if (json.has("processing")) {
JsonArray array = json.getAsJsonArray("processing");
for (int i = 0; i < array.size(); i++) {
res.getProcessing().add(parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("manipulation"))
res.setManipulation(parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent(
getJObject(json, "manipulation"), res));
if (json.has("storage")) {
JsonArray array = json.getAsJsonArray("storage");
for (int i = 0; i < array.size(); i++) {
res.getStorage().add(parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent(
JsonObject json, BiologicallyDerivedProduct owner) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent();
parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentProperties(json, owner, res);
return res;
}
protected void parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentProperties(JsonObject json,
BiologicallyDerivedProduct owner, 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")));
Type collected = parseType("collected", json);
if (collected != null)
res.setCollected(collected);
}
protected BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent(
JsonObject json, BiologicallyDerivedProduct owner) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent();
parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentProperties(json, owner, res);
return res;
}
protected void parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentProperties(JsonObject json,
BiologicallyDerivedProduct owner, BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent 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("procedure"))
res.setProcedure(parseCodeableConcept(getJObject(json, "procedure")));
if (json.has("additive"))
res.setAdditive(parseReference(getJObject(json, "additive")));
Type time = parseType("time", json);
if (time != null)
res.setTime(time);
}
protected BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent(
JsonObject json, BiologicallyDerivedProduct owner) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent();
parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentProperties(json, owner, res);
return res;
}
protected void parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentProperties(
JsonObject json, BiologicallyDerivedProduct owner,
BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent 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());
Type time = parseType("time", json);
if (time != null)
res.setTime(time);
}
protected BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent(
JsonObject json, BiologicallyDerivedProduct owner) throws IOException, FHIRFormatError {
BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent();
parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentProperties(json, owner, res);
return res;
}
protected void parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentProperties(JsonObject json,
BiologicallyDerivedProduct owner, BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent 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("temperature"))
res.setTemperatureElement(parseDecimal(json.get("temperature").getAsBigDecimal()));
if (json.has("_temperature"))
parseElementProperties(getJObject(json, "_temperature"), res.getTemperatureElement());
if (json.has("scale"))
res.setScaleElement(parseEnumeration(json.get("scale").getAsString(),
BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.NULL,
new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory()));
if (json.has("_scale"))
parseElementProperties(getJObject(json, "_scale"), res.getScaleElement());
if (json.has("duration"))
res.setDuration(parsePeriod(getJObject(json, "duration")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("location"))
res.setLocation(parseCodeableConcept(getJObject(json, "location")));
if (json.has("locationQualifier")) {
JsonArray array = json.getAsJsonArray("locationQualifier");
for (int i = 0; i < array.size(); i++) {
res.getLocationQualifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("image")) {
JsonArray array = json.getAsJsonArray("image");
for (int i = 0; i < array.size(); i++) {
res.getImage().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
}
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 = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseBundleBundleLinkComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("entry")) {
JsonArray array = json.getAsJsonArray("entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseBundleBundleEntryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("signature"))
res.setSignature(parseSignature(getJObject(json, "signature")));
}
protected Bundle.BundleLinkComponent parseBundleBundleLinkComponent(JsonObject json, Bundle owner)
throws IOException, FHIRFormatError {
Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent();
parseBundleBundleLinkComponentProperties(json, owner, res);
return res;
}
protected void parseBundleBundleLinkComponentProperties(JsonObject json, Bundle owner, Bundle.BundleLinkComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relation"))
res.setRelationElement(parseString(json.get("relation").getAsString()));
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 parseBundleBundleEntryComponent(JsonObject json, Bundle owner)
throws IOException, FHIRFormatError {
Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent();
parseBundleBundleEntryComponentProperties(json, owner, res);
return res;
}
protected void parseBundleBundleEntryComponentProperties(JsonObject json, Bundle owner,
Bundle.BundleEntryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("link")) {
JsonArray array = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseBundleBundleLinkComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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(parseBundleBundleEntrySearchComponent(getJObject(json, "search"), owner));
if (json.has("request"))
res.setRequest(parseBundleBundleEntryRequestComponent(getJObject(json, "request"), owner));
if (json.has("response"))
res.setResponse(parseBundleBundleEntryResponseComponent(getJObject(json, "response"), owner));
}
protected Bundle.BundleEntrySearchComponent parseBundleBundleEntrySearchComponent(JsonObject json, Bundle owner)
throws IOException, FHIRFormatError {
Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent();
parseBundleBundleEntrySearchComponentProperties(json, owner, res);
return res;
}
protected void parseBundleBundleEntrySearchComponentProperties(JsonObject json, Bundle owner,
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 parseBundleBundleEntryRequestComponent(JsonObject json, Bundle owner)
throws IOException, FHIRFormatError {
Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent();
parseBundleBundleEntryRequestComponentProperties(json, owner, res);
return res;
}
protected void parseBundleBundleEntryRequestComponentProperties(JsonObject json, Bundle owner,
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 parseBundleBundleEntryResponseComponent(JsonObject json, Bundle owner)
throws IOException, FHIRFormatError {
Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent();
parseBundleBundleEntryResponseComponentProperties(json, owner, res);
return res;
}
protected void parseBundleBundleEntryResponseComponentProperties(JsonObject json, Bundle owner,
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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("kind"))
res.setKindElement(
parseEnumeration(json.get("kind").getAsString(), CapabilityStatement.CapabilityStatementKind.NULL,
new CapabilityStatement.CapabilityStatementKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("instantiates")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiates().get(i));
}
}
;
if (json.has("imports")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getImports().get(i));
}
}
;
if (json.has("software"))
res.setSoftware(parseCapabilityStatementCapabilityStatementSoftwareComponent(getJObject(json, "software"), res));
if (json.has("implementation"))
res.setImplementation(
parseCapabilityStatementCapabilityStatementImplementationComponent(getJObject(json, "implementation"), res));
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getFormat().get(i));
}
}
;
if (json.has("patchFormat")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPatchFormat().get(i));
}
}
;
if (json.has("implementationGuide")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getImplementationGuide().get(i));
}
}
;
if (json.has("rest")) {
JsonArray array = json.getAsJsonArray("rest");
for (int i = 0; i < array.size(); i++) {
res.getRest()
.add(parseCapabilityStatementCapabilityStatementRestComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("messaging")) {
JsonArray array = json.getAsJsonArray("messaging");
for (int i = 0; i < array.size(); i++) {
res.getMessaging()
.add(parseCapabilityStatementCapabilityStatementMessagingComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("document")) {
JsonArray array = json.getAsJsonArray("document");
for (int i = 0; i < array.size(); i++) {
res.getDocument()
.add(parseCapabilityStatementCapabilityStatementDocumentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementCapabilityStatementSoftwareComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent();
parseCapabilityStatementCapabilityStatementSoftwareComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementSoftwareComponentProperties(JsonObject json,
CapabilityStatement owner, 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 parseCapabilityStatementCapabilityStatementImplementationComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent();
parseCapabilityStatementCapabilityStatementImplementationComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementImplementationComponentProperties(JsonObject json,
CapabilityStatement owner, CapabilityStatement.CapabilityStatementImplementationComponent 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());
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
}
protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementCapabilityStatementRestComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent();
parseCapabilityStatementCapabilityStatementRestComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementRestComponentProperties(JsonObject json,
CapabilityStatement owner, 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(
parseCapabilityStatementCapabilityStatementRestSecurityComponent(getJObject(json, "security"), owner));
if (json.has("resource")) {
JsonArray array = json.getAsJsonArray("resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(
parseCapabilityStatementCapabilityStatementRestResourceComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("interaction")) {
JsonArray array = json.getAsJsonArray("interaction");
for (int i = 0; i < array.size(); i++) {
res.getInteraction()
.add(parseCapabilityStatementSystemInteractionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("searchParam")) {
JsonArray array = json.getAsJsonArray("searchParam");
for (int i = 0; i < array.size(); i++) {
res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("operation")) {
JsonArray array = json.getAsJsonArray("operation");
for (int i = 0; i < array.size(); i++) {
res.getOperation().add(parseCapabilityStatementCapabilityStatementRestResourceOperationComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("compartment")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getCompartment().get(i));
}
}
;
}
protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementCapabilityStatementRestSecurityComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent();
parseCapabilityStatementCapabilityStatementRestSecurityComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementRestSecurityComponentProperties(JsonObject json,
CapabilityStatement owner, 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 = json.getAsJsonArray("service");
for (int i = 0; i < array.size(); i++) {
res.getService().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementCapabilityStatementRestResourceComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent();
parseCapabilityStatementCapabilityStatementRestResourceComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementRestResourceComponentProperties(JsonObject json,
CapabilityStatement owner, 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("interaction");
for (int i = 0; i < array.size(); i++) {
res.getInteraction()
.add(parseCapabilityStatementResourceInteractionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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("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 = json.getAsJsonArray("referencePolicy");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReferencePolicy().add(new Enumeration());
} else {
res.getReferencePolicy()
.add(parseEnumeration(array.get(i).getAsString(), CapabilityStatement.ReferenceHandlingPolicy.NULL,
new CapabilityStatement.ReferenceHandlingPolicyEnumFactory()));
}
}
}
;
if (json.has("_referencePolicy")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getReferencePolicy().get(i));
}
}
;
if (json.has("searchInclude")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSearchInclude().get(i));
}
}
;
if (json.has("searchRevInclude")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSearchRevInclude().get(i));
}
}
;
if (json.has("searchParam")) {
JsonArray array = json.getAsJsonArray("searchParam");
for (int i = 0; i < array.size(); i++) {
res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("operation")) {
JsonArray array = json.getAsJsonArray("operation");
for (int i = 0; i < array.size(); i++) {
res.getOperation().add(parseCapabilityStatementCapabilityStatementRestResourceOperationComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent();
parseCapabilityStatementResourceInteractionComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementResourceInteractionComponentProperties(JsonObject json,
CapabilityStatement owner, 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 parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent();
parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentProperties(JsonObject json,
CapabilityStatement owner, 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 parseCapabilityStatementCapabilityStatementRestResourceOperationComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementRestResourceOperationComponent res = new CapabilityStatement.CapabilityStatementRestResourceOperationComponent();
parseCapabilityStatementCapabilityStatementRestResourceOperationComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementRestResourceOperationComponentProperties(JsonObject json,
CapabilityStatement owner, 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, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent();
parseCapabilityStatementSystemInteractionComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementSystemInteractionComponentProperties(JsonObject json,
CapabilityStatement owner, 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 parseCapabilityStatementCapabilityStatementMessagingComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent();
parseCapabilityStatementCapabilityStatementMessagingComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementMessagingComponentProperties(JsonObject json,
CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
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 = json.getAsJsonArray("supportedMessage");
for (int i = 0; i < array.size(); i++) {
res.getSupportedMessage().add(parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent();
parseCapabilityStatementCapabilityStatementMessagingEndpointComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementMessagingEndpointComponentProperties(JsonObject json,
CapabilityStatement owner, 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 parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent();
parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentProperties(
JsonObject json, CapabilityStatement owner,
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 parseCapabilityStatementCapabilityStatementDocumentComponent(
JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError {
CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent();
parseCapabilityStatementCapabilityStatementDocumentComponentProperties(json, owner, res);
return res;
}
protected void parseCapabilityStatementCapabilityStatementDocumentComponentProperties(JsonObject json,
CapabilityStatement owner, 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("replaces")) {
JsonArray array = json.getAsJsonArray("replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CarePlan.CarePlanStatus.NULL,
new CarePlan.CarePlanStatusEnumFactory()));
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("contributor")) {
JsonArray array = json.getAsJsonArray("contributor");
for (int i = 0; i < array.size(); i++) {
res.getContributor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("careTeam")) {
JsonArray array = json.getAsJsonArray("careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("addresses")) {
JsonArray array = json.getAsJsonArray("addresses");
for (int i = 0; i < array.size(); i++) {
res.getAddresses().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("goal")) {
JsonArray array = json.getAsJsonArray("goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("activity")) {
JsonArray array = json.getAsJsonArray("activity");
for (int i = 0; i < array.size(); i++) {
res.getActivity().add(parseCarePlanCarePlanActivityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected CarePlan.CarePlanActivityComponent parseCarePlanCarePlanActivityComponent(JsonObject json, CarePlan owner)
throws IOException, FHIRFormatError {
CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent();
parseCarePlanCarePlanActivityComponentProperties(json, owner, res);
return res;
}
protected void parseCarePlanCarePlanActivityComponentProperties(JsonObject json, CarePlan owner,
CarePlan.CarePlanActivityComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("outcomeCodeableConcept")) {
JsonArray array = json.getAsJsonArray("outcomeCodeableConcept");
for (int i = 0; i < array.size(); i++) {
res.getOutcomeCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("outcomeReference")) {
JsonArray array = json.getAsJsonArray("outcomeReference");
for (int i = 0; i < array.size(); i++) {
res.getOutcomeReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("progress")) {
JsonArray array = json.getAsJsonArray("progress");
for (int i = 0; i < array.size(); i++) {
res.getProgress().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
if (json.has("detail"))
res.setDetail(parseCarePlanCarePlanActivityDetailComponent(getJObject(json, "detail"), owner));
}
protected CarePlan.CarePlanActivityDetailComponent parseCarePlanCarePlanActivityDetailComponent(JsonObject json,
CarePlan owner) throws IOException, FHIRFormatError {
CarePlan.CarePlanActivityDetailComponent res = new CarePlan.CarePlanActivityDetailComponent();
parseCarePlanCarePlanActivityDetailComponentProperties(json, owner, res);
return res;
}
protected void parseCarePlanCarePlanActivityDetailComponentProperties(JsonObject json, CarePlan owner,
CarePlan.CarePlanActivityDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), CarePlan.CarePlanActivityKind.NULL,
new CarePlan.CarePlanActivityKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("goal")) {
JsonArray array = json.getAsJsonArray("goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CarePlan.CarePlanActivityStatus.NULL,
new CarePlan.CarePlanActivityStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("doNotPerform"))
res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean()));
if (json.has("_doNotPerform"))
parseElementProperties(getJObject(json, "_doNotPerform"), res.getDoNotPerformElement());
Type scheduled = parseType("scheduled", json);
if (scheduled != null)
res.setScheduled(scheduled);
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("performer")) {
JsonArray array = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type product = parseType("product", json);
if (product != null)
res.setProduct(product);
if (json.has("dailyAmount"))
res.setDailyAmount(parseQuantity(getJObject(json, "dailyAmount")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseCareTeamCareTeamParticipantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("managingOrganization")) {
JsonArray array = json.getAsJsonArray("managingOrganization");
for (int i = 0; i < array.size(); i++) {
res.getManagingOrganization().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected CareTeam.CareTeamParticipantComponent parseCareTeamCareTeamParticipantComponent(JsonObject json,
CareTeam owner) throws IOException, FHIRFormatError {
CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent();
parseCareTeamCareTeamParticipantComponentProperties(json, owner, res);
return res;
}
protected void parseCareTeamCareTeamParticipantComponentProperties(JsonObject json, CareTeam owner,
CareTeam.CareTeamParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("role")) {
JsonArray array = json.getAsJsonArray("role");
for (int i = 0; i < array.size(); i++) {
res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("member"))
res.setMember(parseReference(getJObject(json, "member")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected CatalogEntry parseCatalogEntry(JsonObject json) throws IOException, FHIRFormatError {
CatalogEntry res = new CatalogEntry();
parseCatalogEntryProperties(json, res);
return res;
}
protected void parseCatalogEntryProperties(JsonObject json, CatalogEntry res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("orderable"))
res.setOrderableElement(parseBoolean(json.get("orderable").getAsBoolean()));
if (json.has("_orderable"))
parseElementProperties(getJObject(json, "_orderable"), res.getOrderableElement());
if (json.has("referencedItem"))
res.setReferencedItem(parseReference(getJObject(json, "referencedItem")));
if (json.has("additionalIdentifier")) {
JsonArray array = json.getAsJsonArray("additionalIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("classification")) {
JsonArray array = json.getAsJsonArray("classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("validityPeriod"))
res.setValidityPeriod(parsePeriod(getJObject(json, "validityPeriod")));
if (json.has("validTo"))
res.setValidToElement(parseDateTime(json.get("validTo").getAsString()));
if (json.has("_validTo"))
parseElementProperties(getJObject(json, "_validTo"), res.getValidToElement());
if (json.has("lastUpdated"))
res.setLastUpdatedElement(parseDateTime(json.get("lastUpdated").getAsString()));
if (json.has("_lastUpdated"))
parseElementProperties(getJObject(json, "_lastUpdated"), res.getLastUpdatedElement());
if (json.has("additionalCharacteristic")) {
JsonArray array = json.getAsJsonArray("additionalCharacteristic");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalCharacteristic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("additionalClassification")) {
JsonArray array = json.getAsJsonArray("additionalClassification");
for (int i = 0; i < array.size(); i++) {
res.getAdditionalClassification().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedEntry")) {
JsonArray array = json.getAsJsonArray("relatedEntry");
for (int i = 0; i < array.size(); i++) {
res.getRelatedEntry()
.add(parseCatalogEntryCatalogEntryRelatedEntryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected CatalogEntry.CatalogEntryRelatedEntryComponent parseCatalogEntryCatalogEntryRelatedEntryComponent(
JsonObject json, CatalogEntry owner) throws IOException, FHIRFormatError {
CatalogEntry.CatalogEntryRelatedEntryComponent res = new CatalogEntry.CatalogEntryRelatedEntryComponent();
parseCatalogEntryCatalogEntryRelatedEntryComponentProperties(json, owner, res);
return res;
}
protected void parseCatalogEntryCatalogEntryRelatedEntryComponentProperties(JsonObject json, CatalogEntry owner,
CatalogEntry.CatalogEntryRelatedEntryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relationtype"))
res.setRelationtypeElement(parseEnumeration(json.get("relationtype").getAsString(),
CatalogEntry.CatalogEntryRelationType.NULL, new CatalogEntry.CatalogEntryRelationTypeEnumFactory()));
if (json.has("_relationtype"))
parseElementProperties(getJObject(json, "_relationtype"), res.getRelationtypeElement());
if (json.has("item"))
res.setItem(parseReference(getJObject(json, "item")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("definitionUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDefinitionUri().get(i));
}
}
;
if (json.has("definitionCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("context"))
res.setContext(parseReference(getJObject(json, "context")));
Type occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("performer")) {
JsonArray array = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseChargeItemChargeItemPerformerComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("bodysite");
for (int i = 0; i < array.size(); i++) {
res.getBodysite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("factorOverride"))
res.setFactorOverrideElement(parseDecimal(json.get("factorOverride").getAsBigDecimal()));
if (json.has("_factorOverride"))
parseElementProperties(getJObject(json, "_factorOverride"), res.getFactorOverrideElement());
if (json.has("priceOverride"))
res.setPriceOverride(parseMoney(getJObject(json, "priceOverride")));
if (json.has("overrideReason"))
res.setOverrideReasonElement(parseString(json.get("overrideReason").getAsString()));
if (json.has("_overrideReason"))
parseElementProperties(getJObject(json, "_overrideReason"), res.getOverrideReasonElement());
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 = json.getAsJsonArray("reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("service")) {
JsonArray array = json.getAsJsonArray("service");
for (int i = 0; i < array.size(); i++) {
res.getService().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type product = parseType("product", json);
if (product != null)
res.setProduct(product);
if (json.has("account")) {
JsonArray array = json.getAsJsonArray("account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("supportingInformation")) {
JsonArray array = json.getAsJsonArray("supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected ChargeItem.ChargeItemPerformerComponent parseChargeItemChargeItemPerformerComponent(JsonObject json,
ChargeItem owner) throws IOException, FHIRFormatError {
ChargeItem.ChargeItemPerformerComponent res = new ChargeItem.ChargeItemPerformerComponent();
parseChargeItemChargeItemPerformerComponentProperties(json, owner, res);
return res;
}
protected void parseChargeItemChargeItemPerformerComponentProperties(JsonObject json, ChargeItem owner,
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDerivedFromUri().get(i));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPartOf().get(i));
}
}
;
if (json.has("replaces")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("instance")) {
JsonArray array = json.getAsJsonArray("instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("applicability")) {
JsonArray array = json.getAsJsonArray("applicability");
for (int i = 0; i < array.size(); i++) {
res.getApplicability().add(
parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("propertyGroup")) {
JsonArray array = json.getAsJsonArray("propertyGroup");
for (int i = 0; i < array.size(); i++) {
res.getPropertyGroup().add(
parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(
JsonObject json, ChargeItemDefinition owner) throws IOException, FHIRFormatError {
ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent res = new ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent();
parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponentProperties(json, owner, res);
return res;
}
protected void parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponentProperties(JsonObject json,
ChargeItemDefinition owner, ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent 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("language"))
res.setLanguageElement(parseString(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());
}
protected ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent(
JsonObject json, ChargeItemDefinition owner) throws IOException, FHIRFormatError {
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent res = new ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent();
parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentProperties(json, owner, res);
return res;
}
protected void parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentProperties(JsonObject json,
ChargeItemDefinition owner, ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("applicability")) {
JsonArray array = json.getAsJsonArray("applicability");
for (int i = 0; i < array.size(); i++) {
res.getApplicability().add(
parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("priceComponent")) {
JsonArray array = json.getAsJsonArray("priceComponent");
for (int i = 0; i < array.size(); i++) {
res.getPriceComponent().add(parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent(
JsonObject json, ChargeItemDefinition owner) throws IOException, FHIRFormatError {
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent res = new ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent();
parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentProperties(json, owner, res);
return res;
}
protected void parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentProperties(
JsonObject json, ChargeItemDefinition owner,
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(),
ChargeItemDefinition.ChargeItemDefinitionPriceComponentType.NULL,
new ChargeItemDefinition.ChargeItemDefinitionPriceComponentTypeEnumFactory()));
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 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Claim.ClaimStatus.NULL,
new Claim.ClaimStatusEnumFactory()));
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(), Claim.Use.NULL, new Claim.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 = json.getAsJsonArray("related");
for (int i = 0; i < array.size(); i++) {
res.getRelated().add(parseClaimRelatedClaimComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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"), res));
if (json.has("referral"))
res.setReferral(parseReference(getJObject(json, "referral")));
if (json.has("facility"))
res.setFacility(parseReference(getJObject(json, "facility")));
if (json.has("careTeam")) {
JsonArray array = json.getAsJsonArray("careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseClaimCareTeamComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseClaimSupportingInformationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("diagnosis")) {
JsonArray array = json.getAsJsonArray("diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseClaimDiagnosisComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("procedure")) {
JsonArray array = json.getAsJsonArray("procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseClaimProcedureComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseClaimInsuranceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("accident"))
res.setAccident(parseClaimAccidentComponent(getJObject(json, "accident"), res));
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseClaimItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("total"))
res.setTotal(parseMoney(getJObject(json, "total")));
}
protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent();
parseClaimRelatedClaimComponentProperties(json, owner, res);
return res;
}
protected void parseClaimRelatedClaimComponentProperties(JsonObject json, Claim owner,
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, Claim owner)
throws IOException, FHIRFormatError {
Claim.PayeeComponent res = new Claim.PayeeComponent();
parseClaimPayeeComponentProperties(json, owner, res);
return res;
}
protected void parseClaimPayeeComponentProperties(JsonObject json, Claim owner, 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.CareTeamComponent parseClaimCareTeamComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.CareTeamComponent res = new Claim.CareTeamComponent();
parseClaimCareTeamComponentProperties(json, owner, res);
return res;
}
protected void parseClaimCareTeamComponentProperties(JsonObject json, Claim owner, 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("qualification"))
res.setQualification(parseCodeableConcept(getJObject(json, "qualification")));
}
protected Claim.SupportingInformationComponent parseClaimSupportingInformationComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.SupportingInformationComponent res = new Claim.SupportingInformationComponent();
parseClaimSupportingInformationComponentProperties(json, owner, res);
return res;
}
protected void parseClaimSupportingInformationComponentProperties(JsonObject json, Claim owner,
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")));
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
Type 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, Claim owner)
throws IOException, FHIRFormatError {
Claim.DiagnosisComponent res = new Claim.DiagnosisComponent();
parseClaimDiagnosisComponentProperties(json, owner, res);
return res;
}
protected void parseClaimDiagnosisComponentProperties(JsonObject json, Claim owner, 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());
Type diagnosis = parseType("diagnosis", json);
if (diagnosis != null)
res.setDiagnosis(diagnosis);
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("onAdmission"))
res.setOnAdmission(parseCodeableConcept(getJObject(json, "onAdmission")));
if (json.has("packageCode"))
res.setPackageCode(parseCodeableConcept(getJObject(json, "packageCode")));
}
protected Claim.ProcedureComponent parseClaimProcedureComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.ProcedureComponent res = new Claim.ProcedureComponent();
parseClaimProcedureComponentProperties(json, owner, res);
return res;
}
protected void parseClaimProcedureComponentProperties(JsonObject json, Claim owner, 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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
Type procedure = parseType("procedure", json);
if (procedure != null)
res.setProcedure(procedure);
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Claim.InsuranceComponent parseClaimInsuranceComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.InsuranceComponent res = new Claim.InsuranceComponent();
parseClaimInsuranceComponentProperties(json, owner, res);
return res;
}
protected void parseClaimInsuranceComponentProperties(JsonObject json, Claim owner, 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i));
}
}
;
if (json.has("claimResponse"))
res.setClaimResponse(parseReference(getJObject(json, "claimResponse")));
}
protected Claim.AccidentComponent parseClaimAccidentComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.AccidentComponent res = new Claim.AccidentComponent();
parseClaimAccidentComponentProperties(json, owner, res);
return res;
}
protected void parseClaimAccidentComponentProperties(JsonObject json, Claim owner, 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")));
Type location = parseType("location", json);
if (location != null)
res.setLocation(location);
}
protected Claim.ItemComponent parseClaimItemComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.ItemComponent res = new Claim.ItemComponent();
parseClaimItemComponentProperties(json, owner, res);
return res;
}
protected void parseClaimItemComponentProperties(JsonObject json, Claim owner, 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("careTeamSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getCareTeamSequence().get(i));
}
}
;
if (json.has("diagnosisSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDiagnosisSequence().get(i));
}
}
;
if (json.has("procedureSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getProcedureSequence().get(i));
}
}
;
if (json.has("informationSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
Type serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
Type 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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("subSite")) {
JsonArray array = json.getAsJsonArray("subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("encounter")) {
JsonArray array = json.getAsJsonArray("encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseClaimDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Claim.DetailComponent parseClaimDetailComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.DetailComponent res = new Claim.DetailComponent();
parseClaimDetailComponentProperties(json, owner, res);
return res;
}
protected void parseClaimDetailComponentProperties(JsonObject json, Claim owner, 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("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("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subDetail")) {
JsonArray array = json.getAsJsonArray("subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseClaimSubDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Claim.SubDetailComponent parseClaimSubDetailComponent(JsonObject json, Claim owner)
throws IOException, FHIRFormatError {
Claim.SubDetailComponent res = new Claim.SubDetailComponent();
parseClaimSubDetailComponentProperties(json, owner, res);
return res;
}
protected void parseClaimSubDetailComponentProperties(JsonObject json, Claim owner, 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("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("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ClaimResponse.ClaimResponseStatus.NULL,
new ClaimResponse.ClaimResponseStatusEnumFactory()));
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(), ClaimResponse.Use.NULL, new ClaimResponse.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(), ClaimResponse.RemittanceOutcome.NULL,
new ClaimResponse.RemittanceOutcomeEnumFactory()));
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("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("payeeType"))
res.setPayeeType(parseCodeableConcept(getJObject(json, "payeeType")));
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseClaimResponseItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("addItem")) {
JsonArray array = json.getAsJsonArray("addItem");
for (int i = 0; i < array.size(); i++) {
res.getAddItem().add(parseClaimResponseAddedItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("total")) {
JsonArray array = json.getAsJsonArray("total");
for (int i = 0; i < array.size(); i++) {
res.getTotal().add(parseClaimResponseTotalComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("payment"))
res.setPayment(parseClaimResponsePaymentComponent(getJObject(json, "payment"), res));
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 = json.getAsJsonArray("processNote");
for (int i = 0; i < array.size(); i++) {
res.getProcessNote().add(parseClaimResponseNoteComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("communicationRequest")) {
JsonArray array = json.getAsJsonArray("communicationRequest");
for (int i = 0; i < array.size(); i++) {
res.getCommunicationRequest().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseClaimResponseInsuranceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("error")) {
JsonArray array = json.getAsJsonArray("error");
for (int i = 0; i < array.size(); i++) {
res.getError().add(parseClaimResponseErrorComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(JsonObject json, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent();
parseClaimResponseItemComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseItemComponentProperties(JsonObject json, ClaimResponse owner,
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("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseClaimResponseItemDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(JsonObject json,
ClaimResponse owner) throws IOException, FHIRFormatError {
ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent();
parseClaimResponseAdjudicationComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseAdjudicationComponentProperties(JsonObject json, ClaimResponse owner,
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("value"))
res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(JsonObject json,
ClaimResponse owner) throws IOException, FHIRFormatError {
ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent();
parseClaimResponseItemDetailComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseItemDetailComponentProperties(JsonObject json, ClaimResponse owner,
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("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("subDetail")) {
JsonArray array = json.getAsJsonArray("subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseClaimResponseSubDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(JsonObject json, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent();
parseClaimResponseSubDetailComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseSubDetailComponentProperties(JsonObject json, ClaimResponse owner,
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("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(JsonObject json, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent();
parseClaimResponseAddedItemComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseAddedItemComponentProperties(JsonObject json, ClaimResponse owner,
ClaimResponse.AddedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getItemSequence().get(i));
}
}
;
if (json.has("detailSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDetailSequence().get(i));
}
}
;
if (json.has("subdetailSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSubdetailSequence().get(i));
}
}
;
if (json.has("provider")) {
JsonArray array = json.getAsJsonArray("provider");
for (int i = 0; i < array.size(); i++) {
res.getProvider().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
Type serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
Type 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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("subSite")) {
JsonArray array = json.getAsJsonArray("subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseClaimResponseAddedItemDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ClaimResponse.AddedItemDetailComponent parseClaimResponseAddedItemDetailComponent(JsonObject json,
ClaimResponse owner) throws IOException, FHIRFormatError {
ClaimResponse.AddedItemDetailComponent res = new ClaimResponse.AddedItemDetailComponent();
parseClaimResponseAddedItemDetailComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseAddedItemDetailComponentProperties(JsonObject json, ClaimResponse owner,
ClaimResponse.AddedItemDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("subDetail")) {
JsonArray array = json.getAsJsonArray("subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseClaimResponseAddedItemSubDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ClaimResponse.AddedItemSubDetailComponent parseClaimResponseAddedItemSubDetailComponent(JsonObject json,
ClaimResponse owner) throws IOException, FHIRFormatError {
ClaimResponse.AddedItemSubDetailComponent res = new ClaimResponse.AddedItemSubDetailComponent();
parseClaimResponseAddedItemSubDetailComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseAddedItemSubDetailComponentProperties(JsonObject json, ClaimResponse owner,
ClaimResponse.AddedItemSubDetailComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ClaimResponse.TotalComponent parseClaimResponseTotalComponent(JsonObject json, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.TotalComponent res = new ClaimResponse.TotalComponent();
parseClaimResponseTotalComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseTotalComponentProperties(JsonObject json, ClaimResponse owner,
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, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent();
parseClaimResponsePaymentComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponsePaymentComponentProperties(JsonObject json, ClaimResponse owner,
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, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent();
parseClaimResponseNoteComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseNoteComponentProperties(JsonObject json, ClaimResponse owner,
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.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL,
new Enumerations.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());
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
}
protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(JsonObject json, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent();
parseClaimResponseInsuranceComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseInsuranceComponentProperties(JsonObject json, ClaimResponse owner,
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, ClaimResponse owner)
throws IOException, FHIRFormatError {
ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent();
parseClaimResponseErrorComponentProperties(json, owner, res);
return res;
}
protected void parseClaimResponseErrorComponentProperties(JsonObject json, ClaimResponse owner,
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")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), ClinicalImpression.ClinicalImpressionStatus.NULL,
new ClinicalImpression.ClinicalImpressionStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
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("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type 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("assessor"))
res.setAssessor(parseReference(getJObject(json, "assessor")));
if (json.has("previous"))
res.setPrevious(parseReference(getJObject(json, "previous")));
if (json.has("problem")) {
JsonArray array = json.getAsJsonArray("problem");
for (int i = 0; i < array.size(); i++) {
res.getProblem().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("investigation")) {
JsonArray array = json.getAsJsonArray("investigation");
for (int i = 0; i < array.size(); i++) {
res.getInvestigation()
.add(parseClinicalImpressionClinicalImpressionInvestigationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("protocol")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("finding");
for (int i = 0; i < array.size(); i++) {
res.getFinding()
.add(parseClinicalImpressionClinicalImpressionFindingComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("prognosisCodeableConcept")) {
JsonArray array = json.getAsJsonArray("prognosisCodeableConcept");
for (int i = 0; i < array.size(); i++) {
res.getPrognosisCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("prognosisReference")) {
JsonArray array = json.getAsJsonArray("prognosisReference");
for (int i = 0; i < array.size(); i++) {
res.getPrognosisReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected ClinicalImpression.ClinicalImpressionInvestigationComponent parseClinicalImpressionClinicalImpressionInvestigationComponent(
JsonObject json, ClinicalImpression owner) throws IOException, FHIRFormatError {
ClinicalImpression.ClinicalImpressionInvestigationComponent res = new ClinicalImpression.ClinicalImpressionInvestigationComponent();
parseClinicalImpressionClinicalImpressionInvestigationComponentProperties(json, owner, res);
return res;
}
protected void parseClinicalImpressionClinicalImpressionInvestigationComponentProperties(JsonObject json,
ClinicalImpression owner, ClinicalImpression.ClinicalImpressionInvestigationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionClinicalImpressionFindingComponent(
JsonObject json, ClinicalImpression owner) throws IOException, FHIRFormatError {
ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent();
parseClinicalImpressionClinicalImpressionFindingComponentProperties(json, owner, res);
return res;
}
protected void parseClinicalImpressionClinicalImpressionFindingComponentProperties(JsonObject json,
ClinicalImpression owner, ClinicalImpression.ClinicalImpressionFindingComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemCodeableConcept"))
res.setItemCodeableConcept(parseCodeableConcept(getJObject(json, "itemCodeableConcept")));
if (json.has("itemReference"))
res.setItemReference(parseReference(getJObject(json, "itemReference")));
if (json.has("basis"))
res.setBasisElement(parseString(json.get("basis").getAsString()));
if (json.has("_basis"))
parseElementProperties(getJObject(json, "_basis"), res.getBasisElement());
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("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(), CodeSystem.CodeSystemContentMode.NULL,
new CodeSystem.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 = json.getAsJsonArray("filter");
for (int i = 0; i < array.size(); i++) {
res.getFilter().add(parseCodeSystemCodeSystemFilterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("property")) {
JsonArray array = json.getAsJsonArray("property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseCodeSystemPropertyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("concept")) {
JsonArray array = json.getAsJsonArray("concept");
for (int i = 0; i < array.size(); i++) {
res.getConcept().add(parseCodeSystemConceptDefinitionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected CodeSystem.CodeSystemFilterComponent parseCodeSystemCodeSystemFilterComponent(JsonObject json,
CodeSystem owner) throws IOException, FHIRFormatError {
CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent();
parseCodeSystemCodeSystemFilterComponentProperties(json, owner, res);
return res;
}
protected void parseCodeSystemCodeSystemFilterComponentProperties(JsonObject json, CodeSystem owner,
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 = json.getAsJsonArray("operator");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getOperator().add(new Enumeration());
} else {
res.getOperator().add(parseEnumeration(array.get(i).getAsString(), CodeSystem.FilterOperator.NULL,
new CodeSystem.FilterOperatorEnumFactory()));
}
}
}
;
if (json.has("_operator")) {
JsonArray array = json.getAsJsonArray("_operator");
for (int i = 0; i < array.size(); i++) {
if (i == res.getOperator().size())
res.getOperator()
.add(parseEnumeration(null, CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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, CodeSystem owner)
throws IOException, FHIRFormatError {
CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent();
parseCodeSystemPropertyComponentProperties(json, owner, res);
return res;
}
protected void parseCodeSystemPropertyComponentProperties(JsonObject json, CodeSystem owner,
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,
CodeSystem owner) throws IOException, FHIRFormatError {
CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent();
parseCodeSystemConceptDefinitionComponentProperties(json, owner, res);
return res;
}
protected void parseCodeSystemConceptDefinitionComponentProperties(JsonObject json, CodeSystem owner,
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 = json.getAsJsonArray("designation");
for (int i = 0; i < array.size(); i++) {
res.getDesignation()
.add(parseCodeSystemConceptDefinitionDesignationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("property")) {
JsonArray array = json.getAsJsonArray("property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseCodeSystemConceptPropertyComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("concept")) {
JsonArray array = json.getAsJsonArray("concept");
for (int i = 0; i < array.size(); i++) {
res.getConcept().add(parseCodeSystemConceptDefinitionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent(
JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError {
CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent();
parseCodeSystemConceptDefinitionDesignationComponentProperties(json, owner, res);
return res;
}
protected void parseCodeSystemConceptDefinitionDesignationComponentProperties(JsonObject json, CodeSystem owner,
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("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(JsonObject json,
CodeSystem owner) throws IOException, FHIRFormatError {
CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent();
parseCodeSystemConceptPropertyComponentProperties(json, owner, res);
return res;
}
protected void parseCodeSystemConceptPropertyComponentProperties(JsonObject json, CodeSystem owner,
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());
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("inResponseTo")) {
JsonArray array = json.getAsJsonArray("inResponseTo");
for (int i = 0; i < array.size(); i++) {
res.getInResponseTo().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Communication.CommunicationStatus.NULL,
new Communication.CommunicationStatusEnumFactory()));
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(),
Communication.CommunicationPriority.NULL, new Communication.CommunicationPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("medium")) {
JsonArray array = json.getAsJsonArray("medium");
for (int i = 0; i < array.size(); i++) {
res.getMedium().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("about");
for (int i = 0; i < array.size(); i++) {
res.getAbout().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("sender"))
res.setSender(parseReference(getJObject(json, "sender")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("payload")) {
JsonArray array = json.getAsJsonArray("payload");
for (int i = 0; i < array.size(); i++) {
res.getPayload().add(parseCommunicationCommunicationPayloadComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected Communication.CommunicationPayloadComponent parseCommunicationCommunicationPayloadComponent(JsonObject json,
Communication owner) throws IOException, FHIRFormatError {
Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent();
parseCommunicationCommunicationPayloadComponentProperties(json, owner, res);
return res;
}
protected void parseCommunicationCommunicationPayloadComponentProperties(JsonObject json, Communication owner,
Communication.CommunicationPayloadComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("replaces")) {
JsonArray array = json.getAsJsonArray("replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), CommunicationRequest.CommunicationRequestStatus.NULL,
new CommunicationRequest.CommunicationRequestStatusEnumFactory()));
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("priority"))
res.setPriorityElement(
parseEnumeration(json.get("priority").getAsString(), CommunicationRequest.CommunicationPriority.NULL,
new CommunicationRequest.CommunicationPriorityEnumFactory()));
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 = json.getAsJsonArray("medium");
for (int i = 0; i < array.size(); i++) {
res.getMedium().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("about")) {
JsonArray array = json.getAsJsonArray("about");
for (int i = 0; i < array.size(); i++) {
res.getAbout().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
if (json.has("payload")) {
JsonArray array = json.getAsJsonArray("payload");
for (int i = 0; i < array.size(); i++) {
res.getPayload()
.add(parseCommunicationRequestCommunicationRequestPayloadComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type 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 = json.getAsJsonArray("recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("sender"))
res.setSender(parseReference(getJObject(json, "sender")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestCommunicationRequestPayloadComponent(
JsonObject json, CommunicationRequest owner) throws IOException, FHIRFormatError {
CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent();
parseCommunicationRequestCommunicationRequestPayloadComponentProperties(json, owner, res);
return res;
}
protected void parseCommunicationRequestCommunicationRequestPayloadComponentProperties(JsonObject json,
CommunicationRequest owner, CommunicationRequest.CommunicationRequestPayloadComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
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(), CompartmentDefinition.CompartmentType.NULL,
new CompartmentDefinition.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 = json.getAsJsonArray("resource");
for (int i = 0; i < array.size(); i++) {
res.getResource()
.add(parseCompartmentDefinitionCompartmentDefinitionResourceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionCompartmentDefinitionResourceComponent(
JsonObject json, CompartmentDefinition owner) throws IOException, FHIRFormatError {
CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent();
parseCompartmentDefinitionCompartmentDefinitionResourceComponentProperties(json, owner, res);
return res;
}
protected void parseCompartmentDefinitionCompartmentDefinitionResourceComponentProperties(JsonObject json,
CompartmentDefinition owner, 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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());
}
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("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Composition.CompositionStatus.NULL,
new Composition.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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
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("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("confidentiality"))
res.setConfidentialityElement(parseEnumeration(json.get("confidentiality").getAsString(),
Composition.DocumentConfidentiality.NULL, new Composition.DocumentConfidentialityEnumFactory()));
if (json.has("_confidentiality"))
parseElementProperties(getJObject(json, "_confidentiality"), res.getConfidentialityElement());
if (json.has("attester")) {
JsonArray array = json.getAsJsonArray("attester");
for (int i = 0; i < array.size(); i++) {
res.getAttester().add(parseCompositionCompositionAttesterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
if (json.has("relatesTo")) {
JsonArray array = json.getAsJsonArray("relatesTo");
for (int i = 0; i < array.size(); i++) {
res.getRelatesTo().add(parseCompositionCompositionRelatesToComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("event")) {
JsonArray array = json.getAsJsonArray("event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseCompositionCompositionEventComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("section")) {
JsonArray array = json.getAsJsonArray("section");
for (int i = 0; i < array.size(); i++) {
res.getSection().add(parseCompositionSectionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Composition.CompositionAttesterComponent parseCompositionCompositionAttesterComponent(JsonObject json,
Composition owner) throws IOException, FHIRFormatError {
Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent();
parseCompositionCompositionAttesterComponentProperties(json, owner, res);
return res;
}
protected void parseCompositionCompositionAttesterComponentProperties(JsonObject json, Composition owner,
Composition.CompositionAttesterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Composition.CompositionAttestationMode.NULL,
new Composition.CompositionAttestationModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
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.CompositionRelatesToComponent parseCompositionCompositionRelatesToComponent(JsonObject json,
Composition owner) throws IOException, FHIRFormatError {
Composition.CompositionRelatesToComponent res = new Composition.CompositionRelatesToComponent();
parseCompositionCompositionRelatesToComponentProperties(json, owner, res);
return res;
}
protected void parseCompositionCompositionRelatesToComponentProperties(JsonObject json, Composition owner,
Composition.CompositionRelatesToComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), Composition.DocumentRelationshipType.NULL,
new Composition.DocumentRelationshipTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
Type target = parseType("target", json);
if (target != null)
res.setTarget(target);
}
protected Composition.CompositionEventComponent parseCompositionCompositionEventComponent(JsonObject json,
Composition owner) throws IOException, FHIRFormatError {
Composition.CompositionEventComponent res = new Composition.CompositionEventComponent();
parseCompositionCompositionEventComponentProperties(json, owner, res);
return res;
}
protected void parseCompositionCompositionEventComponentProperties(JsonObject json, Composition owner,
Composition.CompositionEventComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Composition.SectionComponent parseCompositionSectionComponent(JsonObject json, Composition owner)
throws IOException, FHIRFormatError {
Composition.SectionComponent res = new Composition.SectionComponent();
parseCompositionSectionComponentProperties(json, owner, res);
return res;
}
protected void parseCompositionSectionComponentProperties(JsonObject json, Composition owner,
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 = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("focus"))
res.setFocus(parseReference(getJObject(json, "focus")));
if (json.has("text"))
res.setText(parseNarrative(getJObject(json, "text")));
if (json.has("mode"))
res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Composition.SectionMode.NULL,
new Composition.SectionModeEnumFactory()));
if (json.has("_mode"))
parseElementProperties(getJObject(json, "_mode"), res.getModeElement());
if (json.has("orderedBy"))
res.setOrderedBy(parseCodeableConcept(getJObject(json, "orderedBy")));
if (json.has("entry")) {
JsonArray array = json.getAsJsonArray("entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("emptyReason"))
res.setEmptyReason(parseCodeableConcept(getJObject(json, "emptyReason")));
if (json.has("section")) {
JsonArray array = json.getAsJsonArray("section");
for (int i = 0; i < array.size(); i++) {
res.getSection().add(parseCompositionSectionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
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 {
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());
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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
Type source = parseType("source", json);
if (source != null)
res.setSource(source);
Type target = parseType("target", json);
if (target != null)
res.setTarget(target);
if (json.has("group")) {
JsonArray array = json.getAsJsonArray("group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseConceptMapConceptMapGroupComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ConceptMap.ConceptMapGroupComponent parseConceptMapConceptMapGroupComponent(JsonObject json,
ConceptMap owner) throws IOException, FHIRFormatError {
ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent();
parseConceptMapConceptMapGroupComponentProperties(json, owner, res);
return res;
}
protected void parseConceptMapConceptMapGroupComponentProperties(JsonObject json, ConceptMap owner,
ConceptMap.ConceptMapGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("source"))
res.setSourceElement(parseUri(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
if (json.has("sourceVersion"))
res.setSourceVersionElement(parseString(json.get("sourceVersion").getAsString()));
if (json.has("_sourceVersion"))
parseElementProperties(getJObject(json, "_sourceVersion"), res.getSourceVersionElement());
if (json.has("target"))
res.setTargetElement(parseUri(json.get("target").getAsString()));
if (json.has("_target"))
parseElementProperties(getJObject(json, "_target"), res.getTargetElement());
if (json.has("targetVersion"))
res.setTargetVersionElement(parseString(json.get("targetVersion").getAsString()));
if (json.has("_targetVersion"))
parseElementProperties(getJObject(json, "_targetVersion"), res.getTargetVersionElement());
if (json.has("element")) {
JsonArray array = json.getAsJsonArray("element");
for (int i = 0; i < array.size(); i++) {
res.getElement().add(parseConceptMapSourceElementComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("unmapped"))
res.setUnmapped(parseConceptMapConceptMapGroupUnmappedComponent(getJObject(json, "unmapped"), owner));
}
protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(JsonObject json, ConceptMap owner)
throws IOException, FHIRFormatError {
ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent();
parseConceptMapSourceElementComponentProperties(json, owner, res);
return res;
}
protected void parseConceptMapSourceElementComponentProperties(JsonObject json, ConceptMap owner,
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("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseConceptMapTargetElementComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(JsonObject json, ConceptMap owner)
throws IOException, FHIRFormatError {
ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent();
parseConceptMapTargetElementComponentProperties(json, owner, res);
return res;
}
protected void parseConceptMapTargetElementComponentProperties(JsonObject json, ConceptMap owner,
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("equivalence"))
res.setEquivalenceElement(parseEnumeration(json.get("equivalence").getAsString(),
Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory()));
if (json.has("_equivalence"))
parseElementProperties(getJObject(json, "_equivalence"), res.getEquivalenceElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("dependsOn")) {
JsonArray array = json.getAsJsonArray("dependsOn");
for (int i = 0; i < array.size(); i++) {
res.getDependsOn().add(parseConceptMapOtherElementComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("product")) {
JsonArray array = json.getAsJsonArray("product");
for (int i = 0; i < array.size(); i++) {
res.getProduct().add(parseConceptMapOtherElementComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(JsonObject json, ConceptMap owner)
throws IOException, FHIRFormatError {
ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent();
parseConceptMapOtherElementComponentProperties(json, owner, res);
return res;
}
protected void parseConceptMapOtherElementComponentProperties(JsonObject json, ConceptMap owner,
ConceptMap.OtherElementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("property"))
res.setPropertyElement(parseUri(json.get("property").getAsString()));
if (json.has("_property"))
parseElementProperties(getJObject(json, "_property"), res.getPropertyElement());
if (json.has("system"))
res.setSystemElement(parseCanonical(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("display"))
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(getJObject(json, "_display"), res.getDisplayElement());
}
protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapConceptMapGroupUnmappedComponent(JsonObject json,
ConceptMap owner) throws IOException, FHIRFormatError {
ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent();
parseConceptMapConceptMapGroupUnmappedComponentProperties(json, owner, res);
return res;
}
protected void parseConceptMapConceptMapGroupUnmappedComponentProperties(JsonObject json, ConceptMap owner,
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("url"))
res.setUrlElement(parseCanonical(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type onset = parseType("onset", json);
if (onset != null)
res.setOnset(onset);
Type 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("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("asserter"))
res.setAsserter(parseReference(getJObject(json, "asserter")));
if (json.has("stage")) {
JsonArray array = json.getAsJsonArray("stage");
for (int i = 0; i < array.size(); i++) {
res.getStage().add(parseConditionConditionStageComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("evidence")) {
JsonArray array = json.getAsJsonArray("evidence");
for (int i = 0; i < array.size(); i++) {
res.getEvidence().add(parseConditionConditionEvidenceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected Condition.ConditionStageComponent parseConditionConditionStageComponent(JsonObject json, Condition owner)
throws IOException, FHIRFormatError {
Condition.ConditionStageComponent res = new Condition.ConditionStageComponent();
parseConditionConditionStageComponentProperties(json, owner, res);
return res;
}
protected void parseConditionConditionStageComponentProperties(JsonObject json, Condition owner,
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 = json.getAsJsonArray("assessment");
for (int i = 0; i < array.size(); i++) {
res.getAssessment().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
}
protected Condition.ConditionEvidenceComponent parseConditionConditionEvidenceComponent(JsonObject json,
Condition owner) throws IOException, FHIRFormatError {
Condition.ConditionEvidenceComponent res = new Condition.ConditionEvidenceComponent();
parseConditionConditionEvidenceComponentProperties(json, owner, res);
return res;
}
protected void parseConditionConditionEvidenceComponentProperties(JsonObject json, Condition owner,
Condition.ConditionEvidenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("scope"))
res.setScope(parseCodeableConcept(getJObject(json, "scope")));
if (json.has("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("dateTime"))
res.setDateTimeElement(parseDateTime(json.get("dateTime").getAsString()));
if (json.has("_dateTime"))
parseElementProperties(getJObject(json, "_dateTime"), res.getDateTimeElement());
if (json.has("performer")) {
JsonArray array = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("organization")) {
JsonArray array = json.getAsJsonArray("organization");
for (int i = 0; i < array.size(); i++) {
res.getOrganization().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type source = parseType("source", json);
if (source != null)
res.setSource(source);
if (json.has("policy")) {
JsonArray array = json.getAsJsonArray("policy");
for (int i = 0; i < array.size(); i++) {
res.getPolicy().add(parseConsentConsentPolicyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("policyRule"))
res.setPolicyRule(parseCodeableConcept(getJObject(json, "policyRule")));
if (json.has("verification")) {
JsonArray array = json.getAsJsonArray("verification");
for (int i = 0; i < array.size(); i++) {
res.getVerification().add(parseConsentConsentVerificationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("provision"))
res.setProvision(parseConsentprovisionComponent(getJObject(json, "provision"), res));
}
protected Consent.ConsentPolicyComponent parseConsentConsentPolicyComponent(JsonObject json, Consent owner)
throws IOException, FHIRFormatError {
Consent.ConsentPolicyComponent res = new Consent.ConsentPolicyComponent();
parseConsentConsentPolicyComponentProperties(json, owner, res);
return res;
}
protected void parseConsentConsentPolicyComponentProperties(JsonObject json, Consent owner,
Consent.ConsentPolicyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("authority"))
res.setAuthorityElement(parseUri(json.get("authority").getAsString()));
if (json.has("_authority"))
parseElementProperties(getJObject(json, "_authority"), res.getAuthorityElement());
if (json.has("uri"))
res.setUriElement(parseUri(json.get("uri").getAsString()));
if (json.has("_uri"))
parseElementProperties(getJObject(json, "_uri"), res.getUriElement());
}
protected Consent.ConsentVerificationComponent parseConsentConsentVerificationComponent(JsonObject json,
Consent owner) throws IOException, FHIRFormatError {
Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent();
parseConsentConsentVerificationComponentProperties(json, owner, res);
return res;
}
protected void parseConsentConsentVerificationComponentProperties(JsonObject json, Consent owner,
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("verifiedWith"))
res.setVerifiedWith(parseReference(getJObject(json, "verifiedWith")));
if (json.has("verificationDate"))
res.setVerificationDateElement(parseDateTime(json.get("verificationDate").getAsString()));
if (json.has("_verificationDate"))
parseElementProperties(getJObject(json, "_verificationDate"), res.getVerificationDateElement());
}
protected Consent.provisionComponent parseConsentprovisionComponent(JsonObject json, Consent owner)
throws IOException, FHIRFormatError {
Consent.provisionComponent res = new Consent.provisionComponent();
parseConsentprovisionComponentProperties(json, owner, res);
return res;
}
protected void parseConsentprovisionComponentProperties(JsonObject json, Consent owner,
Consent.provisionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Consent.ConsentProvisionType.NULL,
new Consent.ConsentProvisionTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("actor")) {
JsonArray array = json.getAsJsonArray("actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseConsentprovisionActorComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("securityLabel")) {
JsonArray array = json.getAsJsonArray("securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("purpose")) {
JsonArray array = json.getAsJsonArray("purpose");
for (int i = 0; i < array.size(); i++) {
res.getPurpose().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("class")) {
JsonArray array = json.getAsJsonArray("class");
for (int i = 0; i < array.size(); i++) {
res.getClass_().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dataPeriod"))
res.setDataPeriod(parsePeriod(getJObject(json, "dataPeriod")));
if (json.has("data")) {
JsonArray array = json.getAsJsonArray("data");
for (int i = 0; i < array.size(); i++) {
res.getData().add(parseConsentprovisionDataComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("provision")) {
JsonArray array = json.getAsJsonArray("provision");
for (int i = 0; i < array.size(); i++) {
res.getProvision().add(parseConsentprovisionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Consent.provisionActorComponent parseConsentprovisionActorComponent(JsonObject json, Consent owner)
throws IOException, FHIRFormatError {
Consent.provisionActorComponent res = new Consent.provisionActorComponent();
parseConsentprovisionActorComponentProperties(json, owner, res);
return res;
}
protected void parseConsentprovisionActorComponentProperties(JsonObject json, Consent owner,
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, Consent owner)
throws IOException, FHIRFormatError {
Consent.provisionDataComponent res = new Consent.provisionDataComponent();
parseConsentprovisionDataComponentProperties(json, owner, res);
return res;
}
protected void parseConsentprovisionDataComponentProperties(JsonObject json, Consent owner,
Consent.provisionDataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("meaning"))
res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Consent.ConsentDataMeaning.NULL,
new Consent.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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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.ContractStatus.NULL,
new Contract.ContractStatusEnumFactory()));
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 = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("authority")) {
JsonArray array = json.getAsJsonArray("authority");
for (int i = 0; i < array.size(); i++) {
res.getAuthority().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("domain")) {
JsonArray array = json.getAsJsonArray("domain");
for (int i = 0; i < array.size(); i++) {
res.getDomain().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("site")) {
JsonArray array = json.getAsJsonArray("site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getAlias().get(i));
}
}
;
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("scope"))
res.setScope(parseCodeableConcept(getJObject(json, "scope")));
Type 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 = json.getAsJsonArray("subType");
for (int i = 0; i < array.size(); i++) {
res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("contentDefinition"))
res.setContentDefinition(parseContractContentDefinitionComponent(getJObject(json, "contentDefinition"), res));
if (json.has("term")) {
JsonArray array = json.getAsJsonArray("term");
for (int i = 0; i < array.size(); i++) {
res.getTerm().add(parseContractTermComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relevantHistory")) {
JsonArray array = json.getAsJsonArray("relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("signer")) {
JsonArray array = json.getAsJsonArray("signer");
for (int i = 0; i < array.size(); i++) {
res.getSigner().add(parseContractSignatoryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("friendly")) {
JsonArray array = json.getAsJsonArray("friendly");
for (int i = 0; i < array.size(); i++) {
res.getFriendly().add(parseContractFriendlyLanguageComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("legal")) {
JsonArray array = json.getAsJsonArray("legal");
for (int i = 0; i < array.size(); i++) {
res.getLegal().add(parseContractLegalLanguageComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("rule")) {
JsonArray array = json.getAsJsonArray("rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parseContractComputableLanguageComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type legallyBinding = parseType("legallyBinding", json);
if (legallyBinding != null)
res.setLegallyBinding(legallyBinding);
}
protected Contract.ContentDefinitionComponent parseContractContentDefinitionComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.ContentDefinitionComponent res = new Contract.ContentDefinitionComponent();
parseContractContentDefinitionComponentProperties(json, owner, res);
return res;
}
protected void parseContractContentDefinitionComponentProperties(JsonObject json, Contract owner,
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.ContractPublicationStatus.NULL, new Contract.ContractPublicationStatusEnumFactory()));
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, Contract owner)
throws IOException, FHIRFormatError {
Contract.TermComponent res = new Contract.TermComponent();
parseContractTermComponentProperties(json, owner, res);
return res;
}
protected void parseContractTermComponentProperties(JsonObject json, Contract owner, 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")));
Type 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 = json.getAsJsonArray("securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseContractSecurityLabelComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("offer"))
res.setOffer(parseContractContractOfferComponent(getJObject(json, "offer"), owner));
if (json.has("asset")) {
JsonArray array = json.getAsJsonArray("asset");
for (int i = 0; i < array.size(); i++) {
res.getAsset().add(parseContractContractAssetComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseContractActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("group")) {
JsonArray array = json.getAsJsonArray("group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseContractTermComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Contract.SecurityLabelComponent parseContractSecurityLabelComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.SecurityLabelComponent res = new Contract.SecurityLabelComponent();
parseContractSecurityLabelComponentProperties(json, owner, res);
return res;
}
protected void parseContractSecurityLabelComponentProperties(JsonObject json, Contract owner,
Contract.SecurityLabelComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("number")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNumber().get(i));
}
}
;
if (json.has("classification"))
res.setClassification(parseCoding(getJObject(json, "classification")));
if (json.has("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("control")) {
JsonArray array = json.getAsJsonArray("control");
for (int i = 0; i < array.size(); i++) {
res.getControl().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
}
protected Contract.ContractOfferComponent parseContractContractOfferComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.ContractOfferComponent res = new Contract.ContractOfferComponent();
parseContractContractOfferComponentProperties(json, owner, res);
return res;
}
protected void parseContractContractOfferComponentProperties(JsonObject json, Contract owner,
Contract.ContractOfferComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("party")) {
JsonArray array = json.getAsJsonArray("party");
for (int i = 0; i < array.size(); i++) {
res.getParty().add(parseContractContractPartyComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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 = json.getAsJsonArray("decisionMode");
for (int i = 0; i < array.size(); i++) {
res.getDecisionMode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("answer")) {
JsonArray array = json.getAsJsonArray("answer");
for (int i = 0; i < array.size(); i++) {
res.getAnswer().add(parseContractAnswerComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLinkId().get(i));
}
}
;
if (json.has("securityLabelNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSecurityLabelNumber().get(i));
}
}
;
}
protected Contract.ContractPartyComponent parseContractContractPartyComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.ContractPartyComponent res = new Contract.ContractPartyComponent();
parseContractContractPartyComponentProperties(json, owner, res);
return res;
}
protected void parseContractContractPartyComponentProperties(JsonObject json, Contract owner,
Contract.ContractPartyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference")) {
JsonArray array = json.getAsJsonArray("reference");
for (int i = 0; i < array.size(); i++) {
res.getReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected Contract.AnswerComponent parseContractAnswerComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.AnswerComponent res = new Contract.AnswerComponent();
parseContractAnswerComponentProperties(json, owner, res);
return res;
}
protected void parseContractAnswerComponentProperties(JsonObject json, Contract owner, Contract.AnswerComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Contract.ContractAssetComponent parseContractContractAssetComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.ContractAssetComponent res = new Contract.ContractAssetComponent();
parseContractContractAssetComponentProperties(json, owner, res);
return res;
}
protected void parseContractContractAssetComponentProperties(JsonObject json, Contract owner,
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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("typeReference")) {
JsonArray array = json.getAsJsonArray("typeReference");
for (int i = 0; i < array.size(); i++) {
res.getTypeReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subtype")) {
JsonArray array = json.getAsJsonArray("subtype");
for (int i = 0; i < array.size(); i++) {
res.getSubtype().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relationship"))
res.setRelationship(parseCoding(getJObject(json, "relationship")));
if (json.has("context")) {
JsonArray array = json.getAsJsonArray("context");
for (int i = 0; i < array.size(); i++) {
res.getContext().add(parseContractAssetContextComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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 = json.getAsJsonArray("periodType");
for (int i = 0; i < array.size(); i++) {
res.getPeriodType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period")) {
JsonArray array = json.getAsJsonArray("period");
for (int i = 0; i < array.size(); i++) {
res.getPeriod().add(parsePeriod(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("usePeriod")) {
JsonArray array = json.getAsJsonArray("usePeriod");
for (int i = 0; i < array.size(); i++) {
res.getUsePeriod().add(parsePeriod(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLinkId().get(i));
}
}
;
if (json.has("answer")) {
JsonArray array = json.getAsJsonArray("answer");
for (int i = 0; i < array.size(); i++) {
res.getAnswer().add(parseContractAnswerComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("securityLabelNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSecurityLabelNumber().get(i));
}
}
;
if (json.has("valuedItem")) {
JsonArray array = json.getAsJsonArray("valuedItem");
for (int i = 0; i < array.size(); i++) {
res.getValuedItem().add(parseContractValuedItemComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Contract.AssetContextComponent parseContractAssetContextComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.AssetContextComponent res = new Contract.AssetContextComponent();
parseContractAssetContextComponentProperties(json, owner, res);
return res;
}
protected void parseContractAssetContextComponentProperties(JsonObject json, Contract owner,
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 = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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, Contract owner)
throws IOException, FHIRFormatError {
Contract.ValuedItemComponent res = new Contract.ValuedItemComponent();
parseContractValuedItemComponentProperties(json, owner, res);
return res;
}
protected void parseContractValuedItemComponentProperties(JsonObject json, Contract owner,
Contract.ValuedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLinkId().get(i));
}
}
;
if (json.has("securityLabelNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSecurityLabelNumber().get(i));
}
}
;
}
protected Contract.ActionComponent parseContractActionComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.ActionComponent res = new Contract.ActionComponent();
parseContractActionComponentProperties(json, owner, res);
return res;
}
protected void parseContractActionComponentProperties(JsonObject json, Contract owner, 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 = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseContractActionSubjectComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("intent"))
res.setIntent(parseCodeableConcept(getJObject(json, "intent")));
if (json.has("linkId")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getContextLinkId().get(i));
}
}
;
Type occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
if (json.has("requester")) {
JsonArray array = json.getAsJsonArray("requester");
for (int i = 0; i < array.size(); i++) {
res.getRequester().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("requesterLinkId")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getRequesterLinkId().get(i));
}
}
;
if (json.has("performerType")) {
JsonArray array = json.getAsJsonArray("performerType");
for (int i = 0; i < array.size(); i++) {
res.getPerformerType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPerformerLinkId().get(i));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reason")) {
JsonArray array = json.getAsJsonArray("reason");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getReason().add(new StringType());
} else {
res.getReason().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_reason")) {
JsonArray array = json.getAsJsonArray("_reason");
for (int i = 0; i < array.size(); i++) {
if (i == res.getReason().size())
res.getReason().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getReason().get(i));
}
}
;
if (json.has("reasonLinkId")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getReasonLinkId().get(i));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("securityLabelNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSecurityLabelNumber().get(i));
}
}
;
}
protected Contract.ActionSubjectComponent parseContractActionSubjectComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.ActionSubjectComponent res = new Contract.ActionSubjectComponent();
parseContractActionSubjectComponentProperties(json, owner, res);
return res;
}
protected void parseContractActionSubjectComponentProperties(JsonObject json, Contract owner,
Contract.ActionSubjectComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference")) {
JsonArray array = json.getAsJsonArray("reference");
for (int i = 0; i < array.size(); i++) {
res.getReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected Contract.SignatoryComponent parseContractSignatoryComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.SignatoryComponent res = new Contract.SignatoryComponent();
parseContractSignatoryComponentProperties(json, owner, res);
return res;
}
protected void parseContractSignatoryComponentProperties(JsonObject json, Contract owner,
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 = json.getAsJsonArray("signature");
for (int i = 0; i < array.size(); i++) {
res.getSignature().add(parseSignature(array.get(i).getAsJsonObject()));
}
}
;
}
protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent();
parseContractFriendlyLanguageComponentProperties(json, owner, res);
return res;
}
protected void parseContractFriendlyLanguageComponentProperties(JsonObject json, Contract owner,
Contract.FriendlyLanguageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(JsonObject json, Contract owner)
throws IOException, FHIRFormatError {
Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent();
parseContractLegalLanguageComponentProperties(json, owner, res);
return res;
}
protected void parseContractLegalLanguageComponentProperties(JsonObject json, Contract owner,
Contract.LegalLanguageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type content = parseType("content", json);
if (content != null)
res.setContent(content);
}
protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(JsonObject json,
Contract owner) throws IOException, FHIRFormatError {
Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent();
parseContractComputableLanguageComponentProperties(json, owner, res);
return res;
}
protected void parseContractComputableLanguageComponentProperties(JsonObject json, Contract owner,
Contract.ComputableLanguageComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Coverage.CoverageStatus.NULL,
new Coverage.CoverageStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
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"))
res.setSubscriberIdElement(parseString(json.get("subscriberId").getAsString()));
if (json.has("_subscriberId"))
parseElementProperties(getJObject(json, "_subscriberId"), res.getSubscriberIdElement());
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("payor")) {
JsonArray array = json.getAsJsonArray("payor");
for (int i = 0; i < array.size(); i++) {
res.getPayor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("class")) {
JsonArray array = json.getAsJsonArray("class");
for (int i = 0; i < array.size(); i++) {
res.getClass_().add(parseCoverageClassComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("costToBeneficiary");
for (int i = 0; i < array.size(); i++) {
res.getCostToBeneficiary().add(parseCoverageCostToBeneficiaryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("contract");
for (int i = 0; i < array.size(); i++) {
res.getContract().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Coverage.ClassComponent parseCoverageClassComponent(JsonObject json, Coverage owner)
throws IOException, FHIRFormatError {
Coverage.ClassComponent res = new Coverage.ClassComponent();
parseCoverageClassComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageClassComponentProperties(JsonObject json, Coverage owner, Coverage.ClassComponent 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("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
}
protected Coverage.CostToBeneficiaryComponent parseCoverageCostToBeneficiaryComponent(JsonObject json, Coverage owner)
throws IOException, FHIRFormatError {
Coverage.CostToBeneficiaryComponent res = new Coverage.CostToBeneficiaryComponent();
parseCoverageCostToBeneficiaryComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageCostToBeneficiaryComponentProperties(JsonObject json, Coverage owner,
Coverage.CostToBeneficiaryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("exception")) {
JsonArray array = json.getAsJsonArray("exception");
for (int i = 0; i < array.size(); i++) {
res.getException().add(parseCoverageExemptionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Coverage.ExemptionComponent parseCoverageExemptionComponent(JsonObject json, Coverage owner)
throws IOException, FHIRFormatError {
Coverage.ExemptionComponent res = new Coverage.ExemptionComponent();
parseCoverageExemptionComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageExemptionComponentProperties(JsonObject json, Coverage owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), CoverageEligibilityRequest.EligibilityRequestStatus.NULL,
new CoverageEligibilityRequest.EligibilityRequestStatusEnumFactory()));
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 = json.getAsJsonArray("purpose");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPurpose().add(new Enumeration());
} else {
res.getPurpose()
.add(parseEnumeration(array.get(i).getAsString(),
CoverageEligibilityRequest.EligibilityRequestPurpose.NULL,
new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory()));
}
}
}
;
if (json.has("_purpose")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPurpose().get(i));
}
}
;
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
Type 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 = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo()
.add(parseCoverageEligibilityRequestSupportingInformationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseCoverageEligibilityRequestInsuranceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseCoverageEligibilityRequestDetailsComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected CoverageEligibilityRequest.SupportingInformationComponent parseCoverageEligibilityRequestSupportingInformationComponent(
JsonObject json, CoverageEligibilityRequest owner) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.SupportingInformationComponent res = new CoverageEligibilityRequest.SupportingInformationComponent();
parseCoverageEligibilityRequestSupportingInformationComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityRequestSupportingInformationComponentProperties(JsonObject json,
CoverageEligibilityRequest owner, 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, CoverageEligibilityRequest owner) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.InsuranceComponent res = new CoverageEligibilityRequest.InsuranceComponent();
parseCoverageEligibilityRequestInsuranceComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityRequestInsuranceComponentProperties(JsonObject json,
CoverageEligibilityRequest owner, 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,
CoverageEligibilityRequest owner) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.DetailsComponent res = new CoverageEligibilityRequest.DetailsComponent();
parseCoverageEligibilityRequestDetailsComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityRequestDetailsComponentProperties(JsonObject json,
CoverageEligibilityRequest owner, CoverageEligibilityRequest.DetailsComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("supportingInfoSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis()
.add(parseCoverageEligibilityRequestDiagnosisComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected CoverageEligibilityRequest.DiagnosisComponent parseCoverageEligibilityRequestDiagnosisComponent(
JsonObject json, CoverageEligibilityRequest owner) throws IOException, FHIRFormatError {
CoverageEligibilityRequest.DiagnosisComponent res = new CoverageEligibilityRequest.DiagnosisComponent();
parseCoverageEligibilityRequestDiagnosisComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityRequestDiagnosisComponentProperties(JsonObject json,
CoverageEligibilityRequest owner, CoverageEligibilityRequest.DiagnosisComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), CoverageEligibilityResponse.EligibilityResponseStatus.NULL,
new CoverageEligibilityResponse.EligibilityResponseStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("purpose")) {
JsonArray array = json.getAsJsonArray("purpose");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPurpose().add(new Enumeration());
} else {
res.getPurpose()
.add(parseEnumeration(array.get(i).getAsString(),
CoverageEligibilityResponse.EligibilityResponsePurpose.NULL,
new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory()));
}
}
}
;
if (json.has("_purpose")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPurpose().get(i));
}
}
;
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
Type 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(), Enumerations.RemittanceOutcome.NULL,
new Enumerations.RemittanceOutcomeEnumFactory()));
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 = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseCoverageEligibilityResponseInsuranceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("error");
for (int i = 0; i < array.size(); i++) {
res.getError().add(parseCoverageEligibilityResponseErrorsComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected CoverageEligibilityResponse.InsuranceComponent parseCoverageEligibilityResponseInsuranceComponent(
JsonObject json, CoverageEligibilityResponse owner) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.InsuranceComponent res = new CoverageEligibilityResponse.InsuranceComponent();
parseCoverageEligibilityResponseInsuranceComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityResponseInsuranceComponentProperties(JsonObject json,
CoverageEligibilityResponse owner, 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 = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseCoverageEligibilityResponseItemsComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected CoverageEligibilityResponse.ItemsComponent parseCoverageEligibilityResponseItemsComponent(JsonObject json,
CoverageEligibilityResponse owner) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.ItemsComponent res = new CoverageEligibilityResponse.ItemsComponent();
parseCoverageEligibilityResponseItemsComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityResponseItemsComponentProperties(JsonObject json,
CoverageEligibilityResponse owner, 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 = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("benefit");
for (int i = 0; i < array.size(); i++) {
res.getBenefit().add(parseCoverageEligibilityResponseBenefitComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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 = json.getAsJsonArray("authorizationSupporting");
for (int i = 0; i < array.size(); i++) {
res.getAuthorizationSupporting().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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, CoverageEligibilityResponse owner) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.BenefitComponent res = new CoverageEligibilityResponse.BenefitComponent();
parseCoverageEligibilityResponseBenefitComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityResponseBenefitComponentProperties(JsonObject json,
CoverageEligibilityResponse owner, CoverageEligibilityResponse.BenefitComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type allowed = parseType("allowed", json);
if (allowed != null)
res.setAllowed(allowed);
Type used = parseType("used", json);
if (used != null)
res.setUsed(used);
}
protected CoverageEligibilityResponse.ErrorsComponent parseCoverageEligibilityResponseErrorsComponent(JsonObject json,
CoverageEligibilityResponse owner) throws IOException, FHIRFormatError {
CoverageEligibilityResponse.ErrorsComponent res = new CoverageEligibilityResponse.ErrorsComponent();
parseCoverageEligibilityResponseErrorsComponentProperties(json, owner, res);
return res;
}
protected void parseCoverageEligibilityResponseErrorsComponentProperties(JsonObject json,
CoverageEligibilityResponse owner, CoverageEligibilityResponse.ErrorsComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
Type 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 = json.getAsJsonArray("implicated");
for (int i = 0; i < array.size(); i++) {
res.getImplicated().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("evidence")) {
JsonArray array = json.getAsJsonArray("evidence");
for (int i = 0; i < array.size(); i++) {
res.getEvidence().add(parseDetectedIssueDetectedIssueEvidenceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("detail"))
res.setDetailElement(parseString(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 = json.getAsJsonArray("mitigation");
for (int i = 0; i < array.size(); i++) {
res.getMitigation()
.add(parseDetectedIssueDetectedIssueMitigationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected DetectedIssue.DetectedIssueEvidenceComponent parseDetectedIssueDetectedIssueEvidenceComponent(
JsonObject json, DetectedIssue owner) throws IOException, FHIRFormatError {
DetectedIssue.DetectedIssueEvidenceComponent res = new DetectedIssue.DetectedIssueEvidenceComponent();
parseDetectedIssueDetectedIssueEvidenceComponentProperties(json, owner, res);
return res;
}
protected void parseDetectedIssueDetectedIssueEvidenceComponentProperties(JsonObject json, DetectedIssue owner,
DetectedIssue.DetectedIssueEvidenceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueDetectedIssueMitigationComponent(
JsonObject json, DetectedIssue owner) throws IOException, FHIRFormatError {
DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent();
parseDetectedIssueDetectedIssueMitigationComponentProperties(json, owner, res);
return res;
}
protected void parseDetectedIssueDetectedIssueMitigationComponentProperties(JsonObject json, DetectedIssue owner,
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")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("definition"))
res.setDefinition(parseReference(getJObject(json, "definition")));
if (json.has("udiCarrier")) {
JsonArray array = json.getAsJsonArray("udiCarrier");
for (int i = 0; i < array.size(); i++) {
res.getUdiCarrier().add(parseDeviceDeviceUdiCarrierComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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("statusReason")) {
JsonArray array = json.getAsJsonArray("statusReason");
for (int i = 0; i < array.size(); i++) {
res.getStatusReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("distinctIdentifier"))
res.setDistinctIdentifierElement(parseString(json.get("distinctIdentifier").getAsString()));
if (json.has("_distinctIdentifier"))
parseElementProperties(getJObject(json, "_distinctIdentifier"), res.getDistinctIdentifierElement());
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("deviceName")) {
JsonArray array = json.getAsJsonArray("deviceName");
for (int i = 0; i < array.size(); i++) {
res.getDeviceName().add(parseDeviceDeviceDeviceNameComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("specialization")) {
JsonArray array = json.getAsJsonArray("specialization");
for (int i = 0; i < array.size(); i++) {
res.getSpecialization().add(parseDeviceDeviceSpecializationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("version")) {
JsonArray array = json.getAsJsonArray("version");
for (int i = 0; i < array.size(); i++) {
res.getVersion().add(parseDeviceDeviceVersionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("property")) {
JsonArray array = json.getAsJsonArray("property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(parseDeviceDevicePropertyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
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("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("safety")) {
JsonArray array = json.getAsJsonArray("safety");
for (int i = 0; i < array.size(); i++) {
res.getSafety().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("parent"))
res.setParent(parseReference(getJObject(json, "parent")));
}
protected Device.DeviceUdiCarrierComponent parseDeviceDeviceUdiCarrierComponent(JsonObject json, Device owner)
throws IOException, FHIRFormatError {
Device.DeviceUdiCarrierComponent res = new Device.DeviceUdiCarrierComponent();
parseDeviceDeviceUdiCarrierComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDeviceUdiCarrierComponentProperties(JsonObject json, Device owner,
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.DeviceDeviceNameComponent parseDeviceDeviceDeviceNameComponent(JsonObject json, Device owner)
throws IOException, FHIRFormatError {
Device.DeviceDeviceNameComponent res = new Device.DeviceDeviceNameComponent();
parseDeviceDeviceDeviceNameComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDeviceDeviceNameComponentProperties(JsonObject json, Device owner,
Device.DeviceDeviceNameComponent 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(), Device.DeviceNameType.NULL,
new Device.DeviceNameTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected Device.DeviceSpecializationComponent parseDeviceDeviceSpecializationComponent(JsonObject json, Device owner)
throws IOException, FHIRFormatError {
Device.DeviceSpecializationComponent res = new Device.DeviceSpecializationComponent();
parseDeviceDeviceSpecializationComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDeviceSpecializationComponentProperties(JsonObject json, Device owner,
Device.DeviceSpecializationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("systemType"))
res.setSystemType(parseCodeableConcept(getJObject(json, "systemType")));
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
}
protected Device.DeviceVersionComponent parseDeviceDeviceVersionComponent(JsonObject json, Device owner)
throws IOException, FHIRFormatError {
Device.DeviceVersionComponent res = new Device.DeviceVersionComponent();
parseDeviceDeviceVersionComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDeviceVersionComponentProperties(JsonObject json, Device owner,
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("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected Device.DevicePropertyComponent parseDeviceDevicePropertyComponent(JsonObject json, Device owner)
throws IOException, FHIRFormatError {
Device.DevicePropertyComponent res = new Device.DevicePropertyComponent();
parseDeviceDevicePropertyComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDevicePropertyComponentProperties(JsonObject json, Device owner,
Device.DevicePropertyComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("valueQuantity")) {
JsonArray array = json.getAsJsonArray("valueQuantity");
for (int i = 0; i < array.size(); i++) {
res.getValueQuantity().add(parseQuantity(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("valueCode")) {
JsonArray array = json.getAsJsonArray("valueCode");
for (int i = 0; i < array.size(); i++) {
res.getValueCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
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("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("udiDeviceIdentifier")) {
JsonArray array = json.getAsJsonArray("udiDeviceIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getUdiDeviceIdentifier().add(
parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type manufacturer = parseType("manufacturer", json);
if (manufacturer != null)
res.setManufacturer(manufacturer);
if (json.has("deviceName")) {
JsonArray array = json.getAsJsonArray("deviceName");
for (int i = 0; i < array.size(); i++) {
res.getDeviceName()
.add(parseDeviceDefinitionDeviceDefinitionDeviceNameComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("modelNumber"))
res.setModelNumberElement(parseString(json.get("modelNumber").getAsString()));
if (json.has("_modelNumber"))
parseElementProperties(getJObject(json, "_modelNumber"), res.getModelNumberElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("specialization")) {
JsonArray array = json.getAsJsonArray("specialization");
for (int i = 0; i < array.size(); i++) {
res.getSpecialization()
.add(parseDeviceDefinitionDeviceDefinitionSpecializationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("version")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getVersion().get(i));
}
}
;
if (json.has("safety")) {
JsonArray array = json.getAsJsonArray("safety");
for (int i = 0; i < array.size(); i++) {
res.getSafety().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("shelfLifeStorage")) {
JsonArray array = json.getAsJsonArray("shelfLifeStorage");
for (int i = 0; i < array.size(); i++) {
res.getShelfLifeStorage().add(parseProductShelfLife(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("physicalCharacteristics"))
res.setPhysicalCharacteristics(parseProdCharacteristic(getJObject(json, "physicalCharacteristics")));
if (json.has("languageCode")) {
JsonArray array = json.getAsJsonArray("languageCode");
for (int i = 0; i < array.size(); i++) {
res.getLanguageCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("capability")) {
JsonArray array = json.getAsJsonArray("capability");
for (int i = 0; i < array.size(); i++) {
res.getCapability()
.add(parseDeviceDefinitionDeviceDefinitionCapabilityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("property")) {
JsonArray array = json.getAsJsonArray("property");
for (int i = 0; i < array.size(); i++) {
res.getProperty()
.add(parseDeviceDefinitionDeviceDefinitionPropertyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("onlineInformation"))
res.setOnlineInformationElement(parseUri(json.get("onlineInformation").getAsString()));
if (json.has("_onlineInformation"))
parseElementProperties(getJObject(json, "_onlineInformation"), res.getOnlineInformationElement());
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("parentDevice"))
res.setParentDevice(parseReference(getJObject(json, "parentDevice")));
if (json.has("material")) {
JsonArray array = json.getAsJsonArray("material");
for (int i = 0; i < array.size(); i++) {
res.getMaterial()
.add(parseDeviceDefinitionDeviceDefinitionMaterialComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent(
JsonObject json, DeviceDefinition owner) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent res = new DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent();
parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentProperties(JsonObject json,
DeviceDefinition owner, 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());
}
protected DeviceDefinition.DeviceDefinitionDeviceNameComponent parseDeviceDefinitionDeviceDefinitionDeviceNameComponent(
JsonObject json, DeviceDefinition owner) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionDeviceNameComponent res = new DeviceDefinition.DeviceDefinitionDeviceNameComponent();
parseDeviceDefinitionDeviceDefinitionDeviceNameComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDefinitionDeviceDefinitionDeviceNameComponentProperties(JsonObject json,
DeviceDefinition owner, 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(), DeviceDefinition.DeviceNameType.NULL,
new DeviceDefinition.DeviceNameTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
}
protected DeviceDefinition.DeviceDefinitionSpecializationComponent parseDeviceDefinitionDeviceDefinitionSpecializationComponent(
JsonObject json, DeviceDefinition owner) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionSpecializationComponent res = new DeviceDefinition.DeviceDefinitionSpecializationComponent();
parseDeviceDefinitionDeviceDefinitionSpecializationComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDefinitionDeviceDefinitionSpecializationComponentProperties(JsonObject json,
DeviceDefinition owner, DeviceDefinition.DeviceDefinitionSpecializationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("systemType"))
res.setSystemTypeElement(parseString(json.get("systemType").getAsString()));
if (json.has("_systemType"))
parseElementProperties(getJObject(json, "_systemType"), res.getSystemTypeElement());
if (json.has("version"))
res.setVersionElement(parseString(json.get("version").getAsString()));
if (json.has("_version"))
parseElementProperties(getJObject(json, "_version"), res.getVersionElement());
}
protected DeviceDefinition.DeviceDefinitionCapabilityComponent parseDeviceDefinitionDeviceDefinitionCapabilityComponent(
JsonObject json, DeviceDefinition owner) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionCapabilityComponent res = new DeviceDefinition.DeviceDefinitionCapabilityComponent();
parseDeviceDefinitionDeviceDefinitionCapabilityComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDefinitionDeviceDefinitionCapabilityComponentProperties(JsonObject json,
DeviceDefinition owner, DeviceDefinition.DeviceDefinitionCapabilityComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("description")) {
JsonArray array = json.getAsJsonArray("description");
for (int i = 0; i < array.size(); i++) {
res.getDescription().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected DeviceDefinition.DeviceDefinitionPropertyComponent parseDeviceDefinitionDeviceDefinitionPropertyComponent(
JsonObject json, DeviceDefinition owner) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionPropertyComponent res = new DeviceDefinition.DeviceDefinitionPropertyComponent();
parseDeviceDefinitionDeviceDefinitionPropertyComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDefinitionDeviceDefinitionPropertyComponentProperties(JsonObject json,
DeviceDefinition owner, DeviceDefinition.DeviceDefinitionPropertyComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("valueQuantity")) {
JsonArray array = json.getAsJsonArray("valueQuantity");
for (int i = 0; i < array.size(); i++) {
res.getValueQuantity().add(parseQuantity(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("valueCode")) {
JsonArray array = json.getAsJsonArray("valueCode");
for (int i = 0; i < array.size(); i++) {
res.getValueCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected DeviceDefinition.DeviceDefinitionMaterialComponent parseDeviceDefinitionDeviceDefinitionMaterialComponent(
JsonObject json, DeviceDefinition owner) throws IOException, FHIRFormatError {
DeviceDefinition.DeviceDefinitionMaterialComponent res = new DeviceDefinition.DeviceDefinitionMaterialComponent();
parseDeviceDefinitionDeviceDefinitionMaterialComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceDefinitionDeviceDefinitionMaterialComponentProperties(JsonObject json,
DeviceDefinition owner, 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 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("unit"))
res.setUnit(parseCodeableConcept(getJObject(json, "unit")));
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
if (json.has("parent"))
res.setParent(parseReference(getJObject(json, "parent")));
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(parseEnumeration(json.get("color").getAsString(), DeviceMetric.DeviceMetricColor.NULL,
new DeviceMetric.DeviceMetricColorEnumFactory()));
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("measurementPeriod"))
res.setMeasurementPeriod(parseTiming(getJObject(json, "measurementPeriod")));
if (json.has("calibration")) {
JsonArray array = json.getAsJsonArray("calibration");
for (int i = 0; i < array.size(); i++) {
res.getCalibration()
.add(parseDeviceMetricDeviceMetricCalibrationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricDeviceMetricCalibrationComponent(
JsonObject json, DeviceMetric owner) throws IOException, FHIRFormatError {
DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent();
parseDeviceMetricDeviceMetricCalibrationComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceMetricDeviceMetricCalibrationComponentProperties(JsonObject json, DeviceMetric owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("priorRequest")) {
JsonArray array = json.getAsJsonArray("priorRequest");
for (int i = 0; i < array.size(); i++) {
res.getPriorRequest().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceRequest.DeviceRequestStatus.NULL,
new DeviceRequest.DeviceRequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), DeviceRequest.RequestIntent.NULL,
new DeviceRequest.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), DeviceRequest.RequestPriority.NULL,
new DeviceRequest.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
Type code = parseType("code", json);
if (code != null)
res.setCode(code);
if (json.has("parameter")) {
JsonArray array = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseDeviceRequestDeviceRequestParameterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type 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("performerType"))
res.setPerformerType(parseCodeableConcept(getJObject(json, "performerType")));
if (json.has("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relevantHistory")) {
JsonArray array = json.getAsJsonArray("relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected DeviceRequest.DeviceRequestParameterComponent parseDeviceRequestDeviceRequestParameterComponent(
JsonObject json, DeviceRequest owner) throws IOException, FHIRFormatError {
DeviceRequest.DeviceRequestParameterComponent res = new DeviceRequest.DeviceRequestParameterComponent();
parseDeviceRequestDeviceRequestParameterComponentProperties(json, owner, res);
return res;
}
protected void parseDeviceRequestDeviceRequestParameterComponentProperties(JsonObject json, DeviceRequest owner,
DeviceRequest.DeviceRequestParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected DeviceUseStatement parseDeviceUseStatement(JsonObject json) throws IOException, FHIRFormatError {
DeviceUseStatement res = new DeviceUseStatement();
parseDeviceUseStatementProperties(json, res);
return res;
}
protected void parseDeviceUseStatementProperties(JsonObject json, DeviceUseStatement res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), DeviceUseStatement.DeviceUseStatementStatus.NULL,
new DeviceUseStatement.DeviceUseStatementStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("derivedFrom")) {
JsonArray array = json.getAsJsonArray("derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("recordedOn"))
res.setRecordedOnElement(parseDateTime(json.get("recordedOn").getAsString()));
if (json.has("_recordedOn"))
parseElementProperties(getJObject(json, "_recordedOn"), res.getRecordedOnElement());
if (json.has("source"))
res.setSource(parseReference(getJObject(json, "source")));
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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")));
Type 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 = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("resultsInterpreter")) {
JsonArray array = json.getAsJsonArray("resultsInterpreter");
for (int i = 0; i < array.size(); i++) {
res.getResultsInterpreter().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specimen")) {
JsonArray array = json.getAsJsonArray("specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("result")) {
JsonArray array = json.getAsJsonArray("result");
for (int i = 0; i < array.size(); i++) {
res.getResult().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("imagingStudy")) {
JsonArray array = json.getAsJsonArray("imagingStudy");
for (int i = 0; i < array.size(); i++) {
res.getImagingStudy().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("media")) {
JsonArray array = json.getAsJsonArray("media");
for (int i = 0; i < array.size(); i++) {
res.getMedia().add(parseDiagnosticReportDiagnosticReportMediaComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("conclusion"))
res.setConclusionElement(parseString(json.get("conclusion").getAsString()));
if (json.has("_conclusion"))
parseElementProperties(getJObject(json, "_conclusion"), res.getConclusionElement());
if (json.has("conclusionCode")) {
JsonArray array = json.getAsJsonArray("conclusionCode");
for (int i = 0; i < array.size(); i++) {
res.getConclusionCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("presentedForm")) {
JsonArray array = json.getAsJsonArray("presentedForm");
for (int i = 0; i < array.size(); i++) {
res.getPresentedForm().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
}
protected DiagnosticReport.DiagnosticReportMediaComponent parseDiagnosticReportDiagnosticReportMediaComponent(
JsonObject json, DiagnosticReport owner) throws IOException, FHIRFormatError {
DiagnosticReport.DiagnosticReportMediaComponent res = new DiagnosticReport.DiagnosticReportMediaComponent();
parseDiagnosticReportDiagnosticReportMediaComponentProperties(json, owner, res);
return res;
}
protected void parseDiagnosticReportDiagnosticReportMediaComponentProperties(JsonObject json, DiagnosticReport owner,
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 DocumentManifest parseDocumentManifest(JsonObject json) throws IOException, FHIRFormatError {
DocumentManifest res = new DocumentManifest();
parseDocumentManifestProperties(json, res);
return res;
}
protected void parseDocumentManifestProperties(JsonObject json, DocumentManifest res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("masterIdentifier"))
res.setMasterIdentifier(parseIdentifier(getJObject(json, "masterIdentifier")));
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.DocumentReferenceStatus.NULL,
new Enumerations.DocumentReferenceStatusEnumFactory()));
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("created"))
res.setCreatedElement(parseDateTime(json.get("created").getAsString()));
if (json.has("_created"))
parseElementProperties(getJObject(json, "_created"), res.getCreatedElement());
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("recipient")) {
JsonArray array = json.getAsJsonArray("recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("source"))
res.setSourceElement(parseUri(json.get("source").getAsString()));
if (json.has("_source"))
parseElementProperties(getJObject(json, "_source"), res.getSourceElement());
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("content")) {
JsonArray array = json.getAsJsonArray("content");
for (int i = 0; i < array.size(); i++) {
res.getContent().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("related")) {
JsonArray array = json.getAsJsonArray("related");
for (int i = 0; i < array.size(); i++) {
res.getRelated()
.add(parseDocumentManifestDocumentManifestRelatedComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected DocumentManifest.DocumentManifestRelatedComponent parseDocumentManifestDocumentManifestRelatedComponent(
JsonObject json, DocumentManifest owner) throws IOException, FHIRFormatError {
DocumentManifest.DocumentManifestRelatedComponent res = new DocumentManifest.DocumentManifestRelatedComponent();
parseDocumentManifestDocumentManifestRelatedComponentProperties(json, owner, res);
return res;
}
protected void parseDocumentManifestDocumentManifestRelatedComponentProperties(JsonObject json,
DocumentManifest owner, DocumentManifest.DocumentManifestRelatedComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("ref"))
res.setRef(parseReference(getJObject(json, "ref")));
}
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("masterIdentifier"))
res.setMasterIdentifier(parseIdentifier(getJObject(json, "masterIdentifier")));
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.DocumentReferenceStatus.NULL,
new Enumerations.DocumentReferenceStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("docStatus"))
res.setDocStatusElement(parseEnumeration(json.get("docStatus").getAsString(),
DocumentReference.ReferredDocumentStatus.NULL, new DocumentReference.ReferredDocumentStatusEnumFactory()));
if (json.has("_docStatus"))
parseElementProperties(getJObject(json, "_docStatus"), res.getDocStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
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 = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("authenticator"))
res.setAuthenticator(parseReference(getJObject(json, "authenticator")));
if (json.has("custodian"))
res.setCustodian(parseReference(getJObject(json, "custodian")));
if (json.has("relatesTo")) {
JsonArray array = json.getAsJsonArray("relatesTo");
for (int i = 0; i < array.size(); i++) {
res.getRelatesTo()
.add(parseDocumentReferenceDocumentReferenceRelatesToComponent(array.get(i).getAsJsonObject(), 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("securityLabel")) {
JsonArray array = json.getAsJsonArray("securityLabel");
for (int i = 0; i < array.size(); i++) {
res.getSecurityLabel().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("content")) {
JsonArray array = json.getAsJsonArray("content");
for (int i = 0; i < array.size(); i++) {
res.getContent()
.add(parseDocumentReferenceDocumentReferenceContentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("context"))
res.setContext(parseDocumentReferenceDocumentReferenceContextComponent(getJObject(json, "context"), res));
}
protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceDocumentReferenceRelatesToComponent(
JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent();
parseDocumentReferenceDocumentReferenceRelatesToComponentProperties(json, owner, res);
return res;
}
protected void parseDocumentReferenceDocumentReferenceRelatesToComponentProperties(JsonObject json,
DocumentReference owner, DocumentReference.DocumentReferenceRelatesToComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCodeElement(
parseEnumeration(json.get("code").getAsString(), DocumentReference.DocumentRelationshipType.NULL,
new DocumentReference.DocumentRelationshipTypeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("target"))
res.setTarget(parseReference(getJObject(json, "target")));
}
protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceDocumentReferenceContentComponent(
JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent();
parseDocumentReferenceDocumentReferenceContentComponentProperties(json, owner, res);
return res;
}
protected void parseDocumentReferenceDocumentReferenceContentComponentProperties(JsonObject json,
DocumentReference owner, DocumentReference.DocumentReferenceContentComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("attachment"))
res.setAttachment(parseAttachment(getJObject(json, "attachment")));
if (json.has("format"))
res.setFormat(parseCoding(getJObject(json, "format")));
}
protected DocumentReference.DocumentReferenceContextComponent parseDocumentReferenceDocumentReferenceContextComponent(
JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError {
DocumentReference.DocumentReferenceContextComponent res = new DocumentReference.DocumentReferenceContextComponent();
parseDocumentReferenceDocumentReferenceContextComponentProperties(json, owner, res);
return res;
}
protected void parseDocumentReferenceDocumentReferenceContextComponentProperties(JsonObject json,
DocumentReference owner, DocumentReference.DocumentReferenceContextComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("encounter")) {
JsonArray array = json.getAsJsonArray("encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("event")) {
JsonArray array = json.getAsJsonArray("event");
for (int i = 0; i < array.size(); i++) {
res.getEvent().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("facilityType"))
res.setFacilityType(parseCodeableConcept(getJObject(json, "facilityType")));
if (json.has("practiceSetting"))
res.setPracticeSetting(parseCodeableConcept(getJObject(json, "practiceSetting")));
if (json.has("sourcePatientInfo"))
res.setSourcePatientInfo(parseReference(getJObject(json, "sourcePatientInfo")));
if (json.has("related")) {
JsonArray array = json.getAsJsonArray("related");
for (int i = 0; i < array.size(); i++) {
res.getRelated().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected EffectEvidenceSynthesis parseEffectEvidenceSynthesis(JsonObject json) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis res = new EffectEvidenceSynthesis();
parseEffectEvidenceSynthesisProperties(json, res);
return res;
}
protected void parseEffectEvidenceSynthesisProperties(JsonObject json, EffectEvidenceSynthesis 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("synthesisType"))
res.setSynthesisType(parseCodeableConcept(getJObject(json, "synthesisType")));
if (json.has("studyType"))
res.setStudyType(parseCodeableConcept(getJObject(json, "studyType")));
if (json.has("population"))
res.setPopulation(parseReference(getJObject(json, "population")));
if (json.has("exposure"))
res.setExposure(parseReference(getJObject(json, "exposure")));
if (json.has("exposureAlternative"))
res.setExposureAlternative(parseReference(getJObject(json, "exposureAlternative")));
if (json.has("outcome"))
res.setOutcome(parseReference(getJObject(json, "outcome")));
if (json.has("sampleSize"))
res.setSampleSize(
parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent(getJObject(json, "sampleSize"), res));
if (json.has("resultsByExposure")) {
JsonArray array = json.getAsJsonArray("resultsByExposure");
for (int i = 0; i < array.size(); i++) {
res.getResultsByExposure().add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("effectEstimate")) {
JsonArray array = json.getAsJsonArray("effectEstimate");
for (int i = 0; i < array.size(); i++) {
res.getEffectEstimate().add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("certainty")) {
JsonArray array = json.getAsJsonArray("certainty");
for (int i = 0; i < array.size(); i++) {
res.getCertainty().add(
parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent(
JsonObject json, EffectEvidenceSynthesis owner) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent();
parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentProperties(json, owner, res);
return res;
}
protected void parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentProperties(JsonObject json,
EffectEvidenceSynthesis owner, EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent 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("numberOfStudies"))
res.setNumberOfStudiesElement(parseInteger(json.get("numberOfStudies").getAsLong()));
if (json.has("_numberOfStudies"))
parseElementProperties(getJObject(json, "_numberOfStudies"), res.getNumberOfStudiesElement());
if (json.has("numberOfParticipants"))
res.setNumberOfParticipantsElement(parseInteger(json.get("numberOfParticipants").getAsLong()));
if (json.has("_numberOfParticipants"))
parseElementProperties(getJObject(json, "_numberOfParticipants"), res.getNumberOfParticipantsElement());
}
protected EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent(
JsonObject json, EffectEvidenceSynthesis owner) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent();
parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentProperties(json, owner, res);
return res;
}
protected void parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentProperties(
JsonObject json, EffectEvidenceSynthesis owner,
EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent 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("exposureState"))
res.setExposureStateElement(parseEnumeration(json.get("exposureState").getAsString(),
EffectEvidenceSynthesis.ExposureState.NULL, new EffectEvidenceSynthesis.ExposureStateEnumFactory()));
if (json.has("_exposureState"))
parseElementProperties(getJObject(json, "_exposureState"), res.getExposureStateElement());
if (json.has("variantState"))
res.setVariantState(parseCodeableConcept(getJObject(json, "variantState")));
if (json.has("riskEvidenceSynthesis"))
res.setRiskEvidenceSynthesis(parseReference(getJObject(json, "riskEvidenceSynthesis")));
}
protected EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent(
JsonObject json, EffectEvidenceSynthesis owner) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent();
parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentProperties(json, owner, res);
return res;
}
protected void parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentProperties(JsonObject json,
EffectEvidenceSynthesis owner, EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent 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("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("variantState"))
res.setVariantState(parseCodeableConcept(getJObject(json, "variantState")));
if (json.has("value"))
res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("unitOfMeasure"))
res.setUnitOfMeasure(parseCodeableConcept(getJObject(json, "unitOfMeasure")));
if (json.has("precisionEstimate")) {
JsonArray array = json.getAsJsonArray("precisionEstimate");
for (int i = 0; i < array.size(); i++) {
res.getPrecisionEstimate()
.add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(
JsonObject json, EffectEvidenceSynthesis owner) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent();
parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentProperties(json, owner,
res);
return res;
}
protected void parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentProperties(
JsonObject json, EffectEvidenceSynthesis owner,
EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("level"))
res.setLevelElement(parseDecimal(json.get("level").getAsBigDecimal()));
if (json.has("_level"))
parseElementProperties(getJObject(json, "_level"), res.getLevelElement());
if (json.has("from"))
res.setFromElement(parseDecimal(json.get("from").getAsBigDecimal()));
if (json.has("_from"))
parseElementProperties(getJObject(json, "_from"), res.getFromElement());
if (json.has("to"))
res.setToElement(parseDecimal(json.get("to").getAsBigDecimal()));
if (json.has("_to"))
parseElementProperties(getJObject(json, "_to"), res.getToElement());
}
protected EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent(
JsonObject json, EffectEvidenceSynthesis owner) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent();
parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentProperties(json, owner, res);
return res;
}
protected void parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentProperties(JsonObject json,
EffectEvidenceSynthesis owner, EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("rating")) {
JsonArray array = json.getAsJsonArray("rating");
for (int i = 0; i < array.size(); i++) {
res.getRating().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("certaintySubcomponent")) {
JsonArray array = json.getAsJsonArray("certaintySubcomponent");
for (int i = 0; i < array.size(); i++) {
res.getCertaintySubcomponent()
.add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(
JsonObject json, EffectEvidenceSynthesis owner) throws IOException, FHIRFormatError {
EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent();
parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentProperties(json, owner,
res);
return res;
}
protected void parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentProperties(
JsonObject json, EffectEvidenceSynthesis owner,
EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("rating")) {
JsonArray array = json.getAsJsonArray("rating");
for (int i = 0; i < array.size(); i++) {
res.getRating().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterStatus.NULL,
new Encounter.EncounterStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusHistory")) {
JsonArray array = json.getAsJsonArray("statusHistory");
for (int i = 0; i < array.size(); i++) {
res.getStatusHistory().add(parseEncounterStatusHistoryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("class"))
res.setClass_(parseCoding(getJObject(json, "class")));
if (json.has("classHistory")) {
JsonArray array = json.getAsJsonArray("classHistory");
for (int i = 0; i < array.size(); i++) {
res.getClassHistory().add(parseEncounterClassHistoryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("serviceType"))
res.setServiceType(parseCodeableConcept(getJObject(json, "serviceType")));
if (json.has("priority"))
res.setPriority(parseCodeableConcept(getJObject(json, "priority")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("episodeOfCare")) {
JsonArray array = json.getAsJsonArray("episodeOfCare");
for (int i = 0; i < array.size(); i++) {
res.getEpisodeOfCare().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseEncounterEncounterParticipantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("appointment")) {
JsonArray array = json.getAsJsonArray("appointment");
for (int i = 0; i < array.size(); i++) {
res.getAppointment().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("length"))
res.setLength(parseDuration(getJObject(json, "length")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("diagnosis")) {
JsonArray array = json.getAsJsonArray("diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseEncounterDiagnosisComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("account")) {
JsonArray array = json.getAsJsonArray("account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("hospitalization"))
res.setHospitalization(parseEncounterEncounterHospitalizationComponent(getJObject(json, "hospitalization"), res));
if (json.has("location")) {
JsonArray array = json.getAsJsonArray("location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseEncounterEncounterLocationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("serviceProvider"))
res.setServiceProvider(parseReference(getJObject(json, "serviceProvider")));
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
}
protected Encounter.StatusHistoryComponent parseEncounterStatusHistoryComponent(JsonObject json, Encounter owner)
throws IOException, FHIRFormatError {
Encounter.StatusHistoryComponent res = new Encounter.StatusHistoryComponent();
parseEncounterStatusHistoryComponentProperties(json, owner, res);
return res;
}
protected void parseEncounterStatusHistoryComponentProperties(JsonObject json, Encounter owner,
Encounter.StatusHistoryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterStatus.NULL,
new Encounter.EncounterStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Encounter.ClassHistoryComponent parseEncounterClassHistoryComponent(JsonObject json, Encounter owner)
throws IOException, FHIRFormatError {
Encounter.ClassHistoryComponent res = new Encounter.ClassHistoryComponent();
parseEncounterClassHistoryComponentProperties(json, owner, res);
return res;
}
protected void parseEncounterClassHistoryComponentProperties(JsonObject json, Encounter owner,
Encounter.ClassHistoryComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("class"))
res.setClass_(parseCoding(getJObject(json, "class")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
protected Encounter.EncounterParticipantComponent parseEncounterEncounterParticipantComponent(JsonObject json,
Encounter owner) throws IOException, FHIRFormatError {
Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent();
parseEncounterEncounterParticipantComponentProperties(json, owner, res);
return res;
}
protected void parseEncounterEncounterParticipantComponentProperties(JsonObject json, Encounter owner,
Encounter.EncounterParticipantComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("individual"))
res.setIndividual(parseReference(getJObject(json, "individual")));
}
protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(JsonObject json, Encounter owner)
throws IOException, FHIRFormatError {
Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent();
parseEncounterDiagnosisComponentProperties(json, owner, res);
return res;
}
protected void parseEncounterDiagnosisComponentProperties(JsonObject json, Encounter owner,
Encounter.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("condition"))
res.setCondition(parseReference(getJObject(json, "condition")));
if (json.has("use"))
res.setUse(parseCodeableConcept(getJObject(json, "use")));
if (json.has("rank"))
res.setRankElement(parsePositiveInt(json.get("rank").getAsString()));
if (json.has("_rank"))
parseElementProperties(getJObject(json, "_rank"), res.getRankElement());
}
protected Encounter.EncounterHospitalizationComponent parseEncounterEncounterHospitalizationComponent(JsonObject json,
Encounter owner) throws IOException, FHIRFormatError {
Encounter.EncounterHospitalizationComponent res = new Encounter.EncounterHospitalizationComponent();
parseEncounterEncounterHospitalizationComponentProperties(json, owner, res);
return res;
}
protected void parseEncounterEncounterHospitalizationComponentProperties(JsonObject json, Encounter owner,
Encounter.EncounterHospitalizationComponent 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("dietPreference")) {
JsonArray array = json.getAsJsonArray("dietPreference");
for (int i = 0; i < array.size(); i++) {
res.getDietPreference().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialCourtesy")) {
JsonArray array = json.getAsJsonArray("specialCourtesy");
for (int i = 0; i < array.size(); i++) {
res.getSpecialCourtesy().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialArrangement")) {
JsonArray array = json.getAsJsonArray("specialArrangement");
for (int i = 0; i < array.size(); i++) {
res.getSpecialArrangement().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("destination"))
res.setDestination(parseReference(getJObject(json, "destination")));
if (json.has("dischargeDisposition"))
res.setDischargeDisposition(parseCodeableConcept(getJObject(json, "dischargeDisposition")));
}
protected Encounter.EncounterLocationComponent parseEncounterEncounterLocationComponent(JsonObject json,
Encounter owner) throws IOException, FHIRFormatError {
Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent();
parseEncounterEncounterLocationComponentProperties(json, owner, res);
return res;
}
protected void parseEncounterEncounterLocationComponentProperties(JsonObject json, Encounter owner,
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("physicalType"))
res.setPhysicalType(parseCodeableConcept(getJObject(json, "physicalType")));
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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"))
res.setConnectionType(parseCoding(getJObject(json, "connectionType")));
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("payloadType")) {
JsonArray array = json.getAsJsonArray("payloadType");
for (int i = 0; i < array.size(); i++) {
res.getPayloadType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("payloadMimeType")) {
JsonArray array = json.getAsJsonArray("payloadMimeType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPayloadMimeType().add(new CodeType());
} else {
res.getPayloadMimeType().add(parseCode(array.get(i).getAsString()));
}
}
}
;
if (json.has("_payloadMimeType")) {
JsonArray array = json.getAsJsonArray("_payloadMimeType");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPayloadMimeType().size())
res.getPayloadMimeType().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getPayloadMimeType().get(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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getHeader().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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(),
EnrollmentRequest.EnrollmentRequestStatus.NULL, new EnrollmentRequest.EnrollmentRequestStatusEnumFactory()));
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), EnrollmentResponse.EnrollmentResponseStatus.NULL,
new EnrollmentResponse.EnrollmentResponseStatusEnumFactory()));
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(), Enumerations.RemittanceOutcome.NULL,
new Enumerations.RemittanceOutcomeEnumFactory()));
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("statusHistory");
for (int i = 0; i < array.size(); i++) {
res.getStatusHistory()
.add(parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("diagnosis")) {
JsonArray array = json.getAsJsonArray("diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("referralRequest");
for (int i = 0; i < array.size(); i++) {
res.getReferralRequest().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("careManager"))
res.setCareManager(parseReference(getJObject(json, "careManager")));
if (json.has("team")) {
JsonArray array = json.getAsJsonArray("team");
for (int i = 0; i < array.size(); i++) {
res.getTeam().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("account")) {
JsonArray array = json.getAsJsonArray("account");
for (int i = 0; i < array.size(); i++) {
res.getAccount().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(
JsonObject json, EpisodeOfCare owner) throws IOException, FHIRFormatError {
EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent();
parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentProperties(json, owner, res);
return res;
}
protected void parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentProperties(JsonObject json, EpisodeOfCare owner,
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.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(JsonObject json, EpisodeOfCare owner)
throws IOException, FHIRFormatError {
EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent();
parseEpisodeOfCareDiagnosisComponentProperties(json, owner, res);
return res;
}
protected void parseEpisodeOfCareDiagnosisComponentProperties(JsonObject json, EpisodeOfCare owner,
EpisodeOfCare.DiagnosisComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("condition"))
res.setCondition(parseReference(getJObject(json, "condition")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("rank"))
res.setRankElement(parsePositiveInt(json.get("rank").getAsString()));
if (json.has("_rank"))
parseElementProperties(getJObject(json, "_rank"), res.getRankElement());
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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());
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("trigger")) {
JsonArray array = json.getAsJsonArray("trigger");
for (int i = 0; i < array.size(); i++) {
res.getTrigger().add(parseTriggerDefinition(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("shortTitle"))
res.setShortTitleElement(parseString(json.get("shortTitle").getAsString()));
if (json.has("_shortTitle"))
parseElementProperties(getJObject(json, "_shortTitle"), res.getShortTitleElement());
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("exposureBackground"))
res.setExposureBackground(parseReference(getJObject(json, "exposureBackground")));
if (json.has("exposureVariant")) {
JsonArray array = json.getAsJsonArray("exposureVariant");
for (int i = 0; i < array.size(); i++) {
res.getExposureVariant().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("outcome")) {
JsonArray array = json.getAsJsonArray("outcome");
for (int i = 0; i < array.size(); i++) {
res.getOutcome().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("shortTitle"))
res.setShortTitleElement(parseString(json.get("shortTitle").getAsString()));
if (json.has("_shortTitle"))
parseElementProperties(getJObject(json, "_shortTitle"), res.getShortTitleElement());
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), EvidenceVariable.EvidenceVariableType.NULL,
new EvidenceVariable.EvidenceVariableTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("characteristic")) {
JsonArray array = json.getAsJsonArray("characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic()
.add(parseEvidenceVariableEvidenceVariableCharacteristicComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected EvidenceVariable.EvidenceVariableCharacteristicComponent parseEvidenceVariableEvidenceVariableCharacteristicComponent(
JsonObject json, EvidenceVariable owner) throws IOException, FHIRFormatError {
EvidenceVariable.EvidenceVariableCharacteristicComponent res = new EvidenceVariable.EvidenceVariableCharacteristicComponent();
parseEvidenceVariableEvidenceVariableCharacteristicComponentProperties(json, owner, res);
return res;
}
protected void parseEvidenceVariableEvidenceVariableCharacteristicComponentProperties(JsonObject json,
EvidenceVariable owner, EvidenceVariable.EvidenceVariableCharacteristicComponent 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());
Type definition = parseType("definition", json);
if (definition != null)
res.setDefinition(definition);
if (json.has("usageContext")) {
JsonArray array = json.getAsJsonArray("usageContext");
for (int i = 0; i < array.size(); i++) {
res.getUsageContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("exclude"))
res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean()));
if (json.has("_exclude"))
parseElementProperties(getJObject(json, "_exclude"), res.getExcludeElement());
Type participantEffective = parseType("participantEffective", json);
if (participantEffective != null)
res.setParticipantEffective(participantEffective);
if (json.has("timeFromStart"))
res.setTimeFromStart(parseDuration(getJObject(json, "timeFromStart")));
if (json.has("groupMeasure"))
res.setGroupMeasureElement(parseEnumeration(json.get("groupMeasure").getAsString(),
EvidenceVariable.GroupMeasure.NULL, new EvidenceVariable.GroupMeasureEnumFactory()));
if (json.has("_groupMeasure"))
parseElementProperties(getJObject(json, "_groupMeasure"), res.getGroupMeasureElement());
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("actor")) {
JsonArray array = json.getAsJsonArray("actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseExampleScenarioExampleScenarioActorComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("instance")) {
JsonArray array = json.getAsJsonArray("instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance()
.add(parseExampleScenarioExampleScenarioInstanceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("process")) {
JsonArray array = json.getAsJsonArray("process");
for (int i = 0; i < array.size(); i++) {
res.getProcess().add(parseExampleScenarioExampleScenarioProcessComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("workflow")) {
JsonArray array = json.getAsJsonArray("workflow");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getWorkflow().add(new CanonicalType());
} else {
res.getWorkflow().add(parseCanonical(array.get(i).getAsString()));
}
}
}
;
if (json.has("_workflow")) {
JsonArray array = json.getAsJsonArray("_workflow");
for (int i = 0; i < array.size(); i++) {
if (i == res.getWorkflow().size())
res.getWorkflow().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getWorkflow().get(i));
}
}
;
}
protected ExampleScenario.ExampleScenarioActorComponent parseExampleScenarioExampleScenarioActorComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioActorComponent res = new ExampleScenario.ExampleScenarioActorComponent();
parseExampleScenarioExampleScenarioActorComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioActorComponentProperties(JsonObject json, ExampleScenario owner,
ExampleScenario.ExampleScenarioActorComponent 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(), ExampleScenario.ExampleScenarioActorType.NULL,
new ExampleScenario.ExampleScenarioActorTypeEnumFactory()));
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("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ExampleScenario.ExampleScenarioInstanceComponent parseExampleScenarioExampleScenarioInstanceComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceComponent();
parseExampleScenarioExampleScenarioInstanceComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioInstanceComponentProperties(JsonObject json, ExampleScenario owner,
ExampleScenario.ExampleScenarioInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("resourceId"))
res.setResourceIdElement(parseString(json.get("resourceId").getAsString()));
if (json.has("_resourceId"))
parseElementProperties(getJObject(json, "_resourceId"), res.getResourceIdElement());
if (json.has("resourceType"))
res.setResourceTypeElement(parseEnumeration(json.get("resourceType").getAsString(),
ExampleScenario.FHIRResourceType.NULL, new ExampleScenario.FHIRResourceTypeEnumFactory()));
if (json.has("_resourceType"))
parseElementProperties(getJObject(json, "_resourceType"), res.getResourceTypeElement());
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("version")) {
JsonArray array = json.getAsJsonArray("version");
for (int i = 0; i < array.size(); i++) {
res.getVersion()
.add(parseExampleScenarioExampleScenarioInstanceVersionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("containedInstance")) {
JsonArray array = json.getAsJsonArray("containedInstance");
for (int i = 0; i < array.size(); i++) {
res.getContainedInstance().add(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExampleScenario.ExampleScenarioInstanceVersionComponent parseExampleScenarioExampleScenarioInstanceVersionComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioInstanceVersionComponent res = new ExampleScenario.ExampleScenarioInstanceVersionComponent();
parseExampleScenarioExampleScenarioInstanceVersionComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioInstanceVersionComponentProperties(JsonObject json,
ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceVersionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("versionId"))
res.setVersionIdElement(parseString(json.get("versionId").getAsString()));
if (json.has("_versionId"))
parseElementProperties(getJObject(json, "_versionId"), res.getVersionIdElement());
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent();
parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentProperties(JsonObject json,
ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("resourceId"))
res.setResourceIdElement(parseString(json.get("resourceId").getAsString()));
if (json.has("_resourceId"))
parseElementProperties(getJObject(json, "_resourceId"), res.getResourceIdElement());
if (json.has("versionId"))
res.setVersionIdElement(parseString(json.get("versionId").getAsString()));
if (json.has("_versionId"))
parseElementProperties(getJObject(json, "_versionId"), res.getVersionIdElement());
}
protected ExampleScenario.ExampleScenarioProcessComponent parseExampleScenarioExampleScenarioProcessComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessComponent res = new ExampleScenario.ExampleScenarioProcessComponent();
parseExampleScenarioExampleScenarioProcessComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioProcessComponentProperties(JsonObject json, ExampleScenario owner,
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 = json.getAsJsonArray("step");
for (int i = 0; i < array.size(); i++) {
res.getStep()
.add(parseExampleScenarioExampleScenarioProcessStepComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExampleScenario.ExampleScenarioProcessStepComponent parseExampleScenarioExampleScenarioProcessStepComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessStepComponent res = new ExampleScenario.ExampleScenarioProcessStepComponent();
parseExampleScenarioExampleScenarioProcessStepComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioProcessStepComponentProperties(JsonObject json,
ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("process")) {
JsonArray array = json.getAsJsonArray("process");
for (int i = 0; i < array.size(); i++) {
res.getProcess()
.add(parseExampleScenarioExampleScenarioProcessComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("pause"))
res.setPauseElement(parseBoolean(json.get("pause").getAsBoolean()));
if (json.has("_pause"))
parseElementProperties(getJObject(json, "_pause"), res.getPauseElement());
if (json.has("operation"))
res.setOperation(
parseExampleScenarioExampleScenarioProcessStepOperationComponent(getJObject(json, "operation"), owner));
if (json.has("alternative")) {
JsonArray array = json.getAsJsonArray("alternative");
for (int i = 0; i < array.size(); i++) {
res.getAlternative().add(
parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExampleScenario.ExampleScenarioProcessStepOperationComponent parseExampleScenarioExampleScenarioProcessStepOperationComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessStepOperationComponent res = new ExampleScenario.ExampleScenarioProcessStepOperationComponent();
parseExampleScenarioExampleScenarioProcessStepOperationComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioProcessStepOperationComponentProperties(JsonObject json,
ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepOperationComponent 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("type"))
res.setTypeElement(parseString(json.get("type").getAsString()));
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("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(
parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(getJObject(json, "request"), owner));
if (json.has("response"))
res.setResponse(
parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(getJObject(json, "response"), owner));
}
protected ExampleScenario.ExampleScenarioProcessStepAlternativeComponent parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(
JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError {
ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeComponent();
parseExampleScenarioExampleScenarioProcessStepAlternativeComponentProperties(json, owner, res);
return res;
}
protected void parseExampleScenarioExampleScenarioProcessStepAlternativeComponentProperties(JsonObject json,
ExampleScenario owner, 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 = json.getAsJsonArray("step");
for (int i = 0; i < array.size(); i++) {
res.getStep()
.add(parseExampleScenarioExampleScenarioProcessStepComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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(), ExplanationOfBenefit.Use.NULL,
new ExplanationOfBenefit.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 = json.getAsJsonArray("related");
for (int i = 0; i < array.size(); i++) {
res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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(parseExplanationOfBenefitPayeeComponent(getJObject(json, "payee"), res));
if (json.has("referral"))
res.setReferral(parseReference(getJObject(json, "referral")));
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(),
ExplanationOfBenefit.RemittanceOutcome.NULL, new ExplanationOfBenefit.RemittanceOutcomeEnumFactory()));
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("preAuthRef")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i));
}
}
;
if (json.has("preAuthRefPeriod")) {
JsonArray array = json.getAsJsonArray("preAuthRefPeriod");
for (int i = 0; i < array.size(); i++) {
res.getPreAuthRefPeriod().add(parsePeriod(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("careTeam")) {
JsonArray array = json.getAsJsonArray("careTeam");
for (int i = 0; i < array.size(); i++) {
res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo()
.add(parseExplanationOfBenefitSupportingInformationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("diagnosis")) {
JsonArray array = json.getAsJsonArray("diagnosis");
for (int i = 0; i < array.size(); i++) {
res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("procedure")) {
JsonArray array = json.getAsJsonArray("procedure");
for (int i = 0; i < array.size(); i++) {
res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseExplanationOfBenefitInsuranceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("accident"))
res.setAccident(parseExplanationOfBenefitAccidentComponent(getJObject(json, "accident"), res));
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseExplanationOfBenefitItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("addItem")) {
JsonArray array = json.getAsJsonArray("addItem");
for (int i = 0; i < array.size(); i++) {
res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("total")) {
JsonArray array = json.getAsJsonArray("total");
for (int i = 0; i < array.size(); i++) {
res.getTotal().add(parseExplanationOfBenefitTotalComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("payment"))
res.setPayment(parseExplanationOfBenefitPaymentComponent(getJObject(json, "payment"), res));
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 = json.getAsJsonArray("processNote");
for (int i = 0; i < array.size(); i++) {
res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("benefitPeriod"))
res.setBenefitPeriod(parsePeriod(getJObject(json, "benefitPeriod")));
if (json.has("benefitBalance")) {
JsonArray array = json.getAsJsonArray("benefitBalance");
for (int i = 0; i < array.size(); i++) {
res.getBenefitBalance()
.add(parseExplanationOfBenefitBenefitBalanceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent();
parseExplanationOfBenefitRelatedClaimComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitRelatedClaimComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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.PayeeComponent parseExplanationOfBenefitPayeeComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent();
parseExplanationOfBenefitPayeeComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitPayeeComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent();
parseExplanationOfBenefitCareTeamComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitCareTeamComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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("qualification"))
res.setQualification(parseCodeableConcept(getJObject(json, "qualification")));
}
protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent(
JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent();
parseExplanationOfBenefitSupportingInformationComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitSupportingInformationComponentProperties(JsonObject json,
ExplanationOfBenefit owner, 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")));
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
Type 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,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent();
parseExplanationOfBenefitDiagnosisComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitDiagnosisComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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());
Type diagnosis = parseType("diagnosis", json);
if (diagnosis != null)
res.setDiagnosis(diagnosis);
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("onAdmission"))
res.setOnAdmission(parseCodeableConcept(getJObject(json, "onAdmission")));
if (json.has("packageCode"))
res.setPackageCode(parseCodeableConcept(getJObject(json, "packageCode")));
}
protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent();
parseExplanationOfBenefitProcedureComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitProcedureComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("date"))
res.setDateElement(parseDateTime(json.get("date").getAsString()));
if (json.has("_date"))
parseElementProperties(getJObject(json, "_date"), res.getDateElement());
Type procedure = parseType("procedure", json);
if (procedure != null)
res.setProcedure(procedure);
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent();
parseExplanationOfBenefitInsuranceComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitInsuranceComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i));
}
}
;
}
protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent();
parseExplanationOfBenefitAccidentComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitAccidentComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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")));
Type location = parseType("location", json);
if (location != null)
res.setLocation(location);
}
protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent();
parseExplanationOfBenefitItemComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitItemComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getCareTeamSequence().get(i));
}
}
;
if (json.has("diagnosisSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDiagnosisSequence().get(i));
}
}
;
if (json.has("procedureSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getProcedureSequence().get(i));
}
}
;
if (json.has("informationSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
Type serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
Type 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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("subSite")) {
JsonArray array = json.getAsJsonArray("subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("encounter")) {
JsonArray array = json.getAsJsonArray("encounter");
for (int i = 0; i < array.size(); i++) {
res.getEncounter().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication()
.add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseExplanationOfBenefitDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent();
parseExplanationOfBenefitAdjudicationComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitAdjudicationComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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("value"))
res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent();
parseExplanationOfBenefitDetailComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitDetailComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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("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("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication()
.add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("subDetail")) {
JsonArray array = json.getAsJsonArray("subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent();
parseExplanationOfBenefitSubDetailComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitSubDetailComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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("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("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("udi")) {
JsonArray array = json.getAsJsonArray("udi");
for (int i = 0; i < array.size(); i++) {
res.getUdi().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication()
.add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent();
parseExplanationOfBenefitAddedItemComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemComponentProperties(JsonObject json, ExplanationOfBenefit owner,
ExplanationOfBenefit.AddedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("itemSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getItemSequence().get(i));
}
}
;
if (json.has("detailSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDetailSequence().get(i));
}
}
;
if (json.has("subDetailSequence")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getSubDetailSequence().get(i));
}
}
;
if (json.has("provider")) {
JsonArray array = json.getAsJsonArray("provider");
for (int i = 0; i < array.size(); i++) {
res.getProvider().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("programCode")) {
JsonArray array = json.getAsJsonArray("programCode");
for (int i = 0; i < array.size(); i++) {
res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
Type serviced = parseType("serviced", json);
if (serviced != null)
res.setServiced(serviced);
Type 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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("subSite")) {
JsonArray array = json.getAsJsonArray("subSite");
for (int i = 0; i < array.size(); i++) {
res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication()
.add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parseExplanationOfBenefitAddedItemDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.AddedItemDetailComponent parseExplanationOfBenefitAddedItemDetailComponent(
JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemDetailComponent res = new ExplanationOfBenefit.AddedItemDetailComponent();
parseExplanationOfBenefitAddedItemDetailComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemDetailComponentProperties(JsonObject json,
ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemDetailComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication()
.add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("subDetail")) {
JsonArray array = json.getAsJsonArray("subDetail");
for (int i = 0; i < array.size(); i++) {
res.getSubDetail()
.add(parseExplanationOfBenefitAddedItemDetailSubDetailComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.AddedItemDetailSubDetailComponent parseExplanationOfBenefitAddedItemDetailSubDetailComponent(
JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.AddedItemDetailSubDetailComponent res = new ExplanationOfBenefit.AddedItemDetailSubDetailComponent();
parseExplanationOfBenefitAddedItemDetailSubDetailComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitAddedItemDetailSubDetailComponentProperties(JsonObject json,
ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemDetailSubDetailComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("productOrService"))
res.setProductOrService(parseCodeableConcept(getJObject(json, "productOrService")));
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("net"))
res.setNet(parseMoney(getJObject(json, "net")));
if (json.has("noteNumber")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i));
}
}
;
if (json.has("adjudication")) {
JsonArray array = json.getAsJsonArray("adjudication");
for (int i = 0; i < array.size(); i++) {
res.getAdjudication()
.add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.TotalComponent parseExplanationOfBenefitTotalComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.TotalComponent res = new ExplanationOfBenefit.TotalComponent();
parseExplanationOfBenefitTotalComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitTotalComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent();
parseExplanationOfBenefitPaymentComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitPaymentComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent();
parseExplanationOfBenefitNoteComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitNoteComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL,
new Enumerations.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());
if (json.has("language"))
res.setLanguage(parseCodeableConcept(getJObject(json, "language")));
}
protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent(
JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent();
parseExplanationOfBenefitBenefitBalanceComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitBenefitBalanceComponentProperties(JsonObject json, ExplanationOfBenefit owner,
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 = json.getAsJsonArray("financial");
for (int i = 0; i < array.size(); i++) {
res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(JsonObject json,
ExplanationOfBenefit owner) throws IOException, FHIRFormatError {
ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent();
parseExplanationOfBenefitBenefitComponentProperties(json, owner, res);
return res;
}
protected void parseExplanationOfBenefitBenefitComponentProperties(JsonObject json, ExplanationOfBenefit owner,
ExplanationOfBenefit.BenefitComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type allowed = parseType("allowed", json);
if (allowed != null)
res.setAllowed(allowed);
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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("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")));
Type born = parseType("born", json);
if (born != null)
res.setBorn(born);
Type 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());
Type deceased = parseType("deceased", json);
if (deceased != null)
res.setDeceased(deceased);
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("condition")) {
JsonArray array = json.getAsJsonArray("condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition()
.add(parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(
JsonObject json, FamilyMemberHistory owner) throws IOException, FHIRFormatError {
FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent();
parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentProperties(json, owner, res);
return res;
}
protected void parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentProperties(JsonObject json,
FamilyMemberHistory owner, 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());
Type onset = parseType("onset", json);
if (onset != null)
res.setOnset(onset);
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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")));
Type start = parseType("start", json);
if (start != null)
res.setStart(start);
if (json.has("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseGoalGoalTargetComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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("expressedBy"))
res.setExpressedBy(parseReference(getJObject(json, "expressedBy")));
if (json.has("addresses")) {
JsonArray array = json.getAsJsonArray("addresses");
for (int i = 0; i < array.size(); i++) {
res.getAddresses().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("outcomeCode")) {
JsonArray array = json.getAsJsonArray("outcomeCode");
for (int i = 0; i < array.size(); i++) {
res.getOutcomeCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("outcomeReference")) {
JsonArray array = json.getAsJsonArray("outcomeReference");
for (int i = 0; i < array.size(); i++) {
res.getOutcomeReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Goal.GoalTargetComponent parseGoalGoalTargetComponent(JsonObject json, Goal owner)
throws IOException, FHIRFormatError {
Goal.GoalTargetComponent res = new Goal.GoalTargetComponent();
parseGoalGoalTargetComponentProperties(json, owner, res);
return res;
}
protected void parseGoalGoalTargetComponentProperties(JsonObject json, Goal owner, Goal.GoalTargetComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("measure"))
res.setMeasure(parseCodeableConcept(getJObject(json, "measure")));
Type detail = parseType("detail", json);
if (detail != null)
res.setDetail(detail);
Type 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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
if (json.has("start"))
res.setStartElement(parseCode(json.get("start").getAsString()));
if (json.has("_start"))
parseElementProperties(getJObject(json, "_start"), res.getStartElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
if (json.has("link")) {
JsonArray array = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionGraphDefinitionLinkComponent(
JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError {
GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent();
parseGraphDefinitionGraphDefinitionLinkComponentProperties(json, owner, res);
return res;
}
protected void parseGraphDefinitionGraphDefinitionLinkComponentProperties(JsonObject json, GraphDefinition owner,
GraphDefinition.GraphDefinitionLinkComponent 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("sliceName"))
res.setSliceNameElement(parseString(json.get("sliceName").getAsString()));
if (json.has("_sliceName"))
parseElementProperties(getJObject(json, "_sliceName"), res.getSliceNameElement());
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("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget()
.add(parseGraphDefinitionGraphDefinitionLinkTargetComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected GraphDefinition.GraphDefinitionLinkTargetComponent parseGraphDefinitionGraphDefinitionLinkTargetComponent(
JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError {
GraphDefinition.GraphDefinitionLinkTargetComponent res = new GraphDefinition.GraphDefinitionLinkTargetComponent();
parseGraphDefinitionGraphDefinitionLinkTargetComponentProperties(json, owner, res);
return res;
}
protected void parseGraphDefinitionGraphDefinitionLinkTargetComponentProperties(JsonObject json,
GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetComponent 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("params"))
res.setParamsElement(parseString(json.get("params").getAsString()));
if (json.has("_params"))
parseElementProperties(getJObject(json, "_params"), res.getParamsElement());
if (json.has("profile"))
res.setProfileElement(parseCanonical(json.get("profile").getAsString()));
if (json.has("_profile"))
parseElementProperties(getJObject(json, "_profile"), res.getProfileElement());
if (json.has("compartment")) {
JsonArray array = json.getAsJsonArray("compartment");
for (int i = 0; i < array.size(); i++) {
res.getCompartment().add(
parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("link")) {
JsonArray array = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(
JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError {
GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent();
parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentProperties(json, owner, res);
return res;
}
protected void parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentProperties(JsonObject json,
GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent 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("code"))
res.setCodeElement(parseEnumeration(json.get("code").getAsString(), GraphDefinition.CompartmentCode.NULL,
new GraphDefinition.CompartmentCodeEnumFactory()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
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("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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("actual"))
res.setActualElement(parseBoolean(json.get("actual").getAsBoolean()));
if (json.has("_actual"))
parseElementProperties(getJObject(json, "_actual"), res.getActualElement());
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("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 = json.getAsJsonArray("characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseGroupGroupCharacteristicComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("member")) {
JsonArray array = json.getAsJsonArray("member");
for (int i = 0; i < array.size(); i++) {
res.getMember().add(parseGroupGroupMemberComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Group.GroupCharacteristicComponent parseGroupGroupCharacteristicComponent(JsonObject json, Group owner)
throws IOException, FHIRFormatError {
Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent();
parseGroupGroupCharacteristicComponentProperties(json, owner, res);
return res;
}
protected void parseGroupGroupCharacteristicComponentProperties(JsonObject json, Group owner,
Group.GroupCharacteristicComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
Type 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 parseGroupGroupMemberComponent(JsonObject json, Group owner)
throws IOException, FHIRFormatError {
Group.GroupMemberComponent res = new Group.GroupMemberComponent();
parseGroupGroupMemberComponentProperties(json, owner, res);
return res;
}
protected void parseGroupGroupMemberComponentProperties(JsonObject json, Group owner, 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
Type 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("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("evaluationMessage")) {
JsonArray array = json.getAsJsonArray("evaluationMessage");
for (int i = 0; i < array.size(); i++) {
res.getEvaluationMessage().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("outputParameters"))
res.setOutputParameters(parseReference(getJObject(json, "outputParameters")));
if (json.has("result"))
res.setResult(parseReference(getJObject(json, "result")));
if (json.has("dataRequirement")) {
JsonArray array = json.getAsJsonArray("dataRequirement");
for (int i = 0; i < array.size(); i++) {
res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialty")) {
JsonArray array = json.getAsJsonArray("specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("location")) {
JsonArray array = json.getAsJsonArray("location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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());
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("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("coverageArea")) {
JsonArray array = json.getAsJsonArray("coverageArea");
for (int i = 0; i < array.size(); i++) {
res.getCoverageArea().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("serviceProvisionCode")) {
JsonArray array = json.getAsJsonArray("serviceProvisionCode");
for (int i = 0; i < array.size(); i++) {
res.getServiceProvisionCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("eligibility")) {
JsonArray array = json.getAsJsonArray("eligibility");
for (int i = 0; i < array.size(); i++) {
res.getEligibility()
.add(parseHealthcareServiceHealthcareServiceEligibilityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("program")) {
JsonArray array = json.getAsJsonArray("program");
for (int i = 0; i < array.size(); i++) {
res.getProgram().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("characteristic")) {
JsonArray array = json.getAsJsonArray("characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("communication")) {
JsonArray array = json.getAsJsonArray("communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("referralMethod")) {
JsonArray array = json.getAsJsonArray("referralMethod");
for (int i = 0; i < array.size(); i++) {
res.getReferralMethod().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("appointmentRequired"))
res.setAppointmentRequiredElement(parseBoolean(json.get("appointmentRequired").getAsBoolean()));
if (json.has("_appointmentRequired"))
parseElementProperties(getJObject(json, "_appointmentRequired"), res.getAppointmentRequiredElement());
if (json.has("availableTime")) {
JsonArray array = json.getAsJsonArray("availableTime");
for (int i = 0; i < array.size(); i++) {
res.getAvailableTime()
.add(parseHealthcareServiceHealthcareServiceAvailableTimeComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("notAvailable")) {
JsonArray array = json.getAsJsonArray("notAvailable");
for (int i = 0; i < array.size(); i++) {
res.getNotAvailable()
.add(parseHealthcareServiceHealthcareServiceNotAvailableComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("availabilityExceptions"))
res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString()));
if (json.has("_availabilityExceptions"))
parseElementProperties(getJObject(json, "_availabilityExceptions"), res.getAvailabilityExceptionsElement());
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected HealthcareService.HealthcareServiceEligibilityComponent parseHealthcareServiceHealthcareServiceEligibilityComponent(
JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError {
HealthcareService.HealthcareServiceEligibilityComponent res = new HealthcareService.HealthcareServiceEligibilityComponent();
parseHealthcareServiceHealthcareServiceEligibilityComponentProperties(json, owner, res);
return res;
}
protected void parseHealthcareServiceHealthcareServiceEligibilityComponentProperties(JsonObject json,
HealthcareService owner, 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 HealthcareService.HealthcareServiceAvailableTimeComponent parseHealthcareServiceHealthcareServiceAvailableTimeComponent(
JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError {
HealthcareService.HealthcareServiceAvailableTimeComponent res = new HealthcareService.HealthcareServiceAvailableTimeComponent();
parseHealthcareServiceHealthcareServiceAvailableTimeComponentProperties(json, owner, res);
return res;
}
protected void parseHealthcareServiceHealthcareServiceAvailableTimeComponentProperties(JsonObject json,
HealthcareService owner, HealthcareService.HealthcareServiceAvailableTimeComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("daysOfWeek")) {
JsonArray array = json.getAsJsonArray("daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDaysOfWeek().add(new Enumeration());
} else {
res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), HealthcareService.DaysOfWeek.NULL,
new HealthcareService.DaysOfWeekEnumFactory()));
}
}
}
;
if (json.has("_daysOfWeek")) {
JsonArray array = json.getAsJsonArray("_daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDaysOfWeek().size())
res.getDaysOfWeek().add(
parseEnumeration(null, HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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 HealthcareService.HealthcareServiceNotAvailableComponent parseHealthcareServiceHealthcareServiceNotAvailableComponent(
JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError {
HealthcareService.HealthcareServiceNotAvailableComponent res = new HealthcareService.HealthcareServiceNotAvailableComponent();
parseHealthcareServiceHealthcareServiceNotAvailableComponentProperties(json, owner, res);
return res;
}
protected void parseHealthcareServiceHealthcareServiceNotAvailableComponentProperties(JsonObject json,
HealthcareService owner, HealthcareService.HealthcareServiceNotAvailableComponent 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("during"))
res.setDuring(parsePeriod(getJObject(json, "during")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("modality");
for (int i = 0; i < array.size(); i++) {
res.getModality().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("referrer"))
res.setReferrer(parseReference(getJObject(json, "referrer")));
if (json.has("interpreter")) {
JsonArray array = json.getAsJsonArray("interpreter");
for (int i = 0; i < array.size(); i++) {
res.getInterpreter().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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("procedureReference"))
res.setProcedureReference(parseReference(getJObject(json, "procedureReference")));
if (json.has("procedureCode")) {
JsonArray array = json.getAsJsonArray("procedureCode");
for (int i = 0; i < array.size(); i++) {
res.getProcedureCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("series");
for (int i = 0; i < array.size(); i++) {
res.getSeries().add(parseImagingStudyImagingStudySeriesComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudyImagingStudySeriesComponent(JsonObject json,
ImagingStudy owner) throws IOException, FHIRFormatError {
ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent();
parseImagingStudyImagingStudySeriesComponentProperties(json, owner, res);
return res;
}
protected void parseImagingStudyImagingStudySeriesComponentProperties(JsonObject json, ImagingStudy owner,
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(parseCoding(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 = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite"))
res.setBodySite(parseCoding(getJObject(json, "bodySite")));
if (json.has("laterality"))
res.setLaterality(parseCoding(getJObject(json, "laterality")));
if (json.has("specimen")) {
JsonArray array = json.getAsJsonArray("specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer()
.add(parseImagingStudyImagingStudySeriesPerformerComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("instance")) {
JsonArray array = json.getAsJsonArray("instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance()
.add(parseImagingStudyImagingStudySeriesInstanceComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ImagingStudy.ImagingStudySeriesPerformerComponent parseImagingStudyImagingStudySeriesPerformerComponent(
JsonObject json, ImagingStudy owner) throws IOException, FHIRFormatError {
ImagingStudy.ImagingStudySeriesPerformerComponent res = new ImagingStudy.ImagingStudySeriesPerformerComponent();
parseImagingStudyImagingStudySeriesPerformerComponentProperties(json, owner, res);
return res;
}
protected void parseImagingStudyImagingStudySeriesPerformerComponentProperties(JsonObject json, ImagingStudy owner,
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 parseImagingStudyImagingStudySeriesInstanceComponent(
JsonObject json, ImagingStudy owner) throws IOException, FHIRFormatError {
ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent();
parseImagingStudyImagingStudySeriesInstanceComponentProperties(json, owner, res);
return res;
}
protected void parseImagingStudyImagingStudySeriesInstanceComponentProperties(JsonObject json, ImagingStudy owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Immunization.ImmunizationStatus.NULL,
new Immunization.ImmunizationStatusEnumFactory()));
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("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type 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("primarySource"))
res.setPrimarySourceElement(parseBoolean(json.get("primarySource").getAsBoolean()));
if (json.has("_primarySource"))
parseElementProperties(getJObject(json, "_primarySource"), res.getPrimarySourceElement());
if (json.has("reportOrigin"))
res.setReportOrigin(parseCodeableConcept(getJObject(json, "reportOrigin")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("manufacturer"))
res.setManufacturer(parseReference(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("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 = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseImmunizationImmunizationPerformerComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("subpotentReason");
for (int i = 0; i < array.size(); i++) {
res.getSubpotentReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("education")) {
JsonArray array = json.getAsJsonArray("education");
for (int i = 0; i < array.size(); i++) {
res.getEducation().add(parseImmunizationImmunizationEducationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("programEligibility")) {
JsonArray array = json.getAsJsonArray("programEligibility");
for (int i = 0; i < array.size(); i++) {
res.getProgramEligibility().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("fundingSource"))
res.setFundingSource(parseCodeableConcept(getJObject(json, "fundingSource")));
if (json.has("reaction")) {
JsonArray array = json.getAsJsonArray("reaction");
for (int i = 0; i < array.size(); i++) {
res.getReaction().add(parseImmunizationImmunizationReactionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("protocolApplied")) {
JsonArray array = json.getAsJsonArray("protocolApplied");
for (int i = 0; i < array.size(); i++) {
res.getProtocolApplied()
.add(parseImmunizationImmunizationProtocolAppliedComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Immunization.ImmunizationPerformerComponent parseImmunizationImmunizationPerformerComponent(JsonObject json,
Immunization owner) throws IOException, FHIRFormatError {
Immunization.ImmunizationPerformerComponent res = new Immunization.ImmunizationPerformerComponent();
parseImmunizationImmunizationPerformerComponentProperties(json, owner, res);
return res;
}
protected void parseImmunizationImmunizationPerformerComponentProperties(JsonObject json, Immunization owner,
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.ImmunizationEducationComponent parseImmunizationImmunizationEducationComponent(JsonObject json,
Immunization owner) throws IOException, FHIRFormatError {
Immunization.ImmunizationEducationComponent res = new Immunization.ImmunizationEducationComponent();
parseImmunizationImmunizationEducationComponentProperties(json, owner, res);
return res;
}
protected void parseImmunizationImmunizationEducationComponentProperties(JsonObject json, Immunization owner,
Immunization.ImmunizationEducationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("documentType"))
res.setDocumentTypeElement(parseString(json.get("documentType").getAsString()));
if (json.has("_documentType"))
parseElementProperties(getJObject(json, "_documentType"), res.getDocumentTypeElement());
if (json.has("reference"))
res.setReferenceElement(parseUri(json.get("reference").getAsString()));
if (json.has("_reference"))
parseElementProperties(getJObject(json, "_reference"), res.getReferenceElement());
if (json.has("publicationDate"))
res.setPublicationDateElement(parseDateTime(json.get("publicationDate").getAsString()));
if (json.has("_publicationDate"))
parseElementProperties(getJObject(json, "_publicationDate"), res.getPublicationDateElement());
if (json.has("presentationDate"))
res.setPresentationDateElement(parseDateTime(json.get("presentationDate").getAsString()));
if (json.has("_presentationDate"))
parseElementProperties(getJObject(json, "_presentationDate"), res.getPresentationDateElement());
}
protected Immunization.ImmunizationReactionComponent parseImmunizationImmunizationReactionComponent(JsonObject json,
Immunization owner) throws IOException, FHIRFormatError {
Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent();
parseImmunizationImmunizationReactionComponentProperties(json, owner, res);
return res;
}
protected void parseImmunizationImmunizationReactionComponentProperties(JsonObject json, Immunization owner,
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("detail"))
res.setDetail(parseReference(getJObject(json, "detail")));
if (json.has("reported"))
res.setReportedElement(parseBoolean(json.get("reported").getAsBoolean()));
if (json.has("_reported"))
parseElementProperties(getJObject(json, "_reported"), res.getReportedElement());
}
protected Immunization.ImmunizationProtocolAppliedComponent parseImmunizationImmunizationProtocolAppliedComponent(
JsonObject json, Immunization owner) throws IOException, FHIRFormatError {
Immunization.ImmunizationProtocolAppliedComponent res = new Immunization.ImmunizationProtocolAppliedComponent();
parseImmunizationImmunizationProtocolAppliedComponentProperties(json, owner, res);
return res;
}
protected void parseImmunizationImmunizationProtocolAppliedComponentProperties(JsonObject json, Immunization owner,
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 = json.getAsJsonArray("targetDisease");
for (int i = 0; i < array.size(); i++) {
res.getTargetDisease().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
Type doseNumber = parseType("doseNumber", json);
if (doseNumber != null)
res.setDoseNumber(doseNumber);
Type seriesDoses = parseType("seriesDoses", json);
if (seriesDoses != null)
res.setSeriesDoses(seriesDoses);
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), ImmunizationEvaluation.ImmunizationEvaluationStatus.NULL,
new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory()));
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 = json.getAsJsonArray("doseStatusReason");
for (int i = 0; i < array.size(); i++) {
res.getDoseStatusReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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"))
res.setSeriesElement(parseString(json.get("series").getAsString()));
if (json.has("_series"))
parseElementProperties(getJObject(json, "_series"), res.getSeriesElement());
Type doseNumber = parseType("doseNumber", json);
if (doseNumber != null)
res.setDoseNumber(doseNumber);
Type seriesDoses = parseType("seriesDoses", json);
if (seriesDoses != null)
res.setSeriesDoses(seriesDoses);
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("recommendation");
for (int i = 0; i < array.size(); i++) {
res.getRecommendation().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(
JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError {
ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent();
parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(json, owner, res);
return res;
}
protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(
JsonObject json, ImmunizationRecommendation owner,
ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("vaccineCode")) {
JsonArray array = json.getAsJsonArray("vaccineCode");
for (int i = 0; i < array.size(); i++) {
res.getVaccineCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("targetDisease"))
res.setTargetDisease(parseCodeableConcept(getJObject(json, "targetDisease")));
if (json.has("contraindicatedVaccineCode")) {
JsonArray array = json.getAsJsonArray("contraindicatedVaccineCode");
for (int i = 0; i < array.size(); i++) {
res.getContraindicatedVaccineCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("forecastStatus"))
res.setForecastStatus(parseCodeableConcept(getJObject(json, "forecastStatus")));
if (json.has("forecastReason")) {
JsonArray array = json.getAsJsonArray("forecastReason");
for (int i = 0; i < array.size(); i++) {
res.getForecastReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dateCriterion")) {
JsonArray array = json.getAsJsonArray("dateCriterion");
for (int i = 0; i < array.size(); i++) {
res.getDateCriterion()
.add(parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
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"))
res.setSeriesElement(parseString(json.get("series").getAsString()));
if (json.has("_series"))
parseElementProperties(getJObject(json, "_series"), res.getSeriesElement());
Type doseNumber = parseType("doseNumber", json);
if (doseNumber != null)
res.setDoseNumber(doseNumber);
Type seriesDoses = parseType("seriesDoses", json);
if (seriesDoses != null)
res.setSeriesDoses(seriesDoses);
if (json.has("supportingImmunization")) {
JsonArray array = json.getAsJsonArray("supportingImmunization");
for (int i = 0; i < array.size(); i++) {
res.getSupportingImmunization().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("supportingPatientInformation")) {
JsonArray array = json.getAsJsonArray("supportingPatientInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingPatientInformation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(
JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError {
ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent();
parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentProperties(json, owner,
res);
return res;
}
protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentProperties(
JsonObject json, ImmunizationRecommendation owner,
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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("copyright"))
res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString()));
if (json.has("_copyright"))
parseElementProperties(getJObject(json, "_copyright"), res.getCopyrightElement());
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 = json.getAsJsonArray("fhirVersion");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getFhirVersion().add(new Enumeration());
} else {
res.getFhirVersion().add(parseEnumeration(array.get(i).getAsString(), Enumerations.FHIRVersion.NULL,
new Enumerations.FHIRVersionEnumFactory()));
}
}
}
;
if (json.has("_fhirVersion")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getFhirVersion().get(i));
}
}
;
if (json.has("dependsOn")) {
JsonArray array = json.getAsJsonArray("dependsOn");
for (int i = 0; i < array.size(); i++) {
res.getDependsOn()
.add(parseImplementationGuideImplementationGuideDependsOnComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("global")) {
JsonArray array = json.getAsJsonArray("global");
for (int i = 0; i < array.size(); i++) {
res.getGlobal()
.add(parseImplementationGuideImplementationGuideGlobalComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("definition"))
res.setDefinition(
parseImplementationGuideImplementationGuideDefinitionComponent(getJObject(json, "definition"), res));
if (json.has("manifest"))
res.setManifest(parseImplementationGuideImplementationGuideManifestComponent(getJObject(json, "manifest"), res));
}
protected ImplementationGuide.ImplementationGuideDependsOnComponent parseImplementationGuideImplementationGuideDependsOnComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDependsOnComponent res = new ImplementationGuide.ImplementationGuideDependsOnComponent();
parseImplementationGuideImplementationGuideDependsOnComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDependsOnComponentProperties(JsonObject json,
ImplementationGuide owner, 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());
}
protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideImplementationGuideGlobalComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent();
parseImplementationGuideImplementationGuideGlobalComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideGlobalComponentProperties(JsonObject json,
ImplementationGuide owner, 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 parseImplementationGuideImplementationGuideDefinitionComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionComponent res = new ImplementationGuide.ImplementationGuideDefinitionComponent();
parseImplementationGuideImplementationGuideDefinitionComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDefinitionComponentProperties(JsonObject json,
ImplementationGuide owner, ImplementationGuide.ImplementationGuideDefinitionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("grouping")) {
JsonArray array = json.getAsJsonArray("grouping");
for (int i = 0; i < array.size(); i++) {
res.getGrouping().add(parseImplementationGuideImplementationGuideDefinitionGroupingComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("resource")) {
JsonArray array = json.getAsJsonArray("resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parseImplementationGuideImplementationGuideDefinitionResourceComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("page"))
res.setPage(parseImplementationGuideImplementationGuideDefinitionPageComponent(getJObject(json, "page"), owner));
if (json.has("parameter")) {
JsonArray array = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseImplementationGuideImplementationGuideDefinitionParameterComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("template")) {
JsonArray array = json.getAsJsonArray("template");
for (int i = 0; i < array.size(); i++) {
res.getTemplate().add(parseImplementationGuideImplementationGuideDefinitionTemplateComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ImplementationGuide.ImplementationGuideDefinitionGroupingComponent parseImplementationGuideImplementationGuideDefinitionGroupingComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionGroupingComponent res = new ImplementationGuide.ImplementationGuideDefinitionGroupingComponent();
parseImplementationGuideImplementationGuideDefinitionGroupingComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDefinitionGroupingComponentProperties(JsonObject json,
ImplementationGuide owner, 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(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionResourceComponent parseImplementationGuideImplementationGuideDefinitionResourceComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionResourceComponent res = new ImplementationGuide.ImplementationGuideDefinitionResourceComponent();
parseImplementationGuideImplementationGuideDefinitionResourceComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDefinitionResourceComponentProperties(JsonObject json,
ImplementationGuide owner, 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 = json.getAsJsonArray("fhirVersion");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getFhirVersion().add(new Enumeration());
} else {
res.getFhirVersion().add(parseEnumeration(array.get(i).getAsString(), Enumerations.FHIRVersion.NULL,
new Enumerations.FHIRVersionEnumFactory()));
}
}
}
;
if (json.has("_fhirVersion")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
Type example = parseType("example", json);
if (example != null)
res.setExample(example);
if (json.has("groupingId"))
res.setGroupingIdElement(parseId(json.get("groupingId").getAsString()));
if (json.has("_groupingId"))
parseElementProperties(getJObject(json, "_groupingId"), res.getGroupingIdElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionPageComponent parseImplementationGuideImplementationGuideDefinitionPageComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionPageComponent res = new ImplementationGuide.ImplementationGuideDefinitionPageComponent();
parseImplementationGuideImplementationGuideDefinitionPageComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDefinitionPageComponentProperties(JsonObject json,
ImplementationGuide owner, ImplementationGuide.ImplementationGuideDefinitionPageComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type name = parseType("name", json);
if (name != null)
res.setName(name);
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 = json.getAsJsonArray("page");
for (int i = 0; i < array.size(); i++) {
res.getPage().add(
parseImplementationGuideImplementationGuideDefinitionPageComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ImplementationGuide.ImplementationGuideDefinitionParameterComponent parseImplementationGuideImplementationGuideDefinitionParameterComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionParameterComponent res = new ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
parseImplementationGuideImplementationGuideDefinitionParameterComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDefinitionParameterComponentProperties(JsonObject json,
ImplementationGuide owner, ImplementationGuide.ImplementationGuideDefinitionParameterComponent 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("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ImplementationGuide.ImplementationGuideDefinitionTemplateComponent parseImplementationGuideImplementationGuideDefinitionTemplateComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideDefinitionTemplateComponent res = new ImplementationGuide.ImplementationGuideDefinitionTemplateComponent();
parseImplementationGuideImplementationGuideDefinitionTemplateComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideDefinitionTemplateComponentProperties(JsonObject json,
ImplementationGuide owner, 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 parseImplementationGuideImplementationGuideManifestComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ImplementationGuideManifestComponent res = new ImplementationGuide.ImplementationGuideManifestComponent();
parseImplementationGuideImplementationGuideManifestComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideImplementationGuideManifestComponentProperties(JsonObject json,
ImplementationGuide owner, 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 = json.getAsJsonArray("resource");
for (int i = 0; i < array.size(); i++) {
res.getResource().add(parseImplementationGuideManifestResourceComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("page")) {
JsonArray array = json.getAsJsonArray("page");
for (int i = 0; i < array.size(); i++) {
res.getPage().add(parseImplementationGuideManifestPageComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("image")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getImage().get(i));
}
}
;
if (json.has("other")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getOther().get(i));
}
}
;
}
protected ImplementationGuide.ManifestResourceComponent parseImplementationGuideManifestResourceComponent(
JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ManifestResourceComponent res = new ImplementationGuide.ManifestResourceComponent();
parseImplementationGuideManifestResourceComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideManifestResourceComponentProperties(JsonObject json, ImplementationGuide owner,
ImplementationGuide.ManifestResourceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("reference"))
res.setReference(parseReference(getJObject(json, "reference")));
Type example = parseType("example", json);
if (example != null)
res.setExample(example);
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,
ImplementationGuide owner) throws IOException, FHIRFormatError {
ImplementationGuide.ManifestPageComponent res = new ImplementationGuide.ManifestPageComponent();
parseImplementationGuideManifestPageComponentProperties(json, owner, res);
return res;
}
protected void parseImplementationGuideManifestPageComponentProperties(JsonObject json, ImplementationGuide owner,
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getAnchor().get(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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("coverageArea");
for (int i = 0; i < array.size(); i++) {
res.getCoverageArea().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseInsurancePlanInsurancePlanContactComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("network")) {
JsonArray array = json.getAsJsonArray("network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("coverage")) {
JsonArray array = json.getAsJsonArray("coverage");
for (int i = 0; i < array.size(); i++) {
res.getCoverage().add(parseInsurancePlanInsurancePlanCoverageComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("plan")) {
JsonArray array = json.getAsJsonArray("plan");
for (int i = 0; i < array.size(); i++) {
res.getPlan().add(parseInsurancePlanInsurancePlanPlanComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected InsurancePlan.InsurancePlanContactComponent parseInsurancePlanInsurancePlanContactComponent(JsonObject json,
InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanContactComponent res = new InsurancePlan.InsurancePlanContactComponent();
parseInsurancePlanInsurancePlanContactComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanInsurancePlanContactComponentProperties(JsonObject json, InsurancePlan owner,
InsurancePlan.InsurancePlanContactComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("purpose"))
res.setPurpose(parseCodeableConcept(getJObject(json, "purpose")));
if (json.has("name"))
res.setName(parseHumanName(getJObject(json, "name")));
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("address"))
res.setAddress(parseAddress(getJObject(json, "address")));
}
protected InsurancePlan.InsurancePlanCoverageComponent parseInsurancePlanInsurancePlanCoverageComponent(
JsonObject json, InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanCoverageComponent res = new InsurancePlan.InsurancePlanCoverageComponent();
parseInsurancePlanInsurancePlanCoverageComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanInsurancePlanCoverageComponentProperties(JsonObject json, InsurancePlan owner,
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 = json.getAsJsonArray("network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("benefit")) {
JsonArray array = json.getAsJsonArray("benefit");
for (int i = 0; i < array.size(); i++) {
res.getBenefit().add(parseInsurancePlanCoverageBenefitComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected InsurancePlan.CoverageBenefitComponent parseInsurancePlanCoverageBenefitComponent(JsonObject json,
InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.CoverageBenefitComponent res = new InsurancePlan.CoverageBenefitComponent();
parseInsurancePlanCoverageBenefitComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanCoverageBenefitComponentProperties(JsonObject json, InsurancePlan owner,
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 = json.getAsJsonArray("limit");
for (int i = 0; i < array.size(); i++) {
res.getLimit().add(parseInsurancePlanCoverageBenefitLimitComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected InsurancePlan.CoverageBenefitLimitComponent parseInsurancePlanCoverageBenefitLimitComponent(JsonObject json,
InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.CoverageBenefitLimitComponent res = new InsurancePlan.CoverageBenefitLimitComponent();
parseInsurancePlanCoverageBenefitLimitComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanCoverageBenefitLimitComponentProperties(JsonObject json, InsurancePlan owner,
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 parseInsurancePlanInsurancePlanPlanComponent(JsonObject json,
InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanPlanComponent res = new InsurancePlan.InsurancePlanPlanComponent();
parseInsurancePlanInsurancePlanPlanComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanInsurancePlanPlanComponentProperties(JsonObject json, InsurancePlan owner,
InsurancePlan.InsurancePlanPlanComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("coverageArea")) {
JsonArray array = json.getAsJsonArray("coverageArea");
for (int i = 0; i < array.size(); i++) {
res.getCoverageArea().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("network")) {
JsonArray array = json.getAsJsonArray("network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("generalCost")) {
JsonArray array = json.getAsJsonArray("generalCost");
for (int i = 0; i < array.size(); i++) {
res.getGeneralCost()
.add(parseInsurancePlanInsurancePlanPlanGeneralCostComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("specificCost")) {
JsonArray array = json.getAsJsonArray("specificCost");
for (int i = 0; i < array.size(); i++) {
res.getSpecificCost()
.add(parseInsurancePlanInsurancePlanPlanSpecificCostComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected InsurancePlan.InsurancePlanPlanGeneralCostComponent parseInsurancePlanInsurancePlanPlanGeneralCostComponent(
JsonObject json, InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanPlanGeneralCostComponent res = new InsurancePlan.InsurancePlanPlanGeneralCostComponent();
parseInsurancePlanInsurancePlanPlanGeneralCostComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanInsurancePlanPlanGeneralCostComponentProperties(JsonObject json, InsurancePlan owner,
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 parseInsurancePlanInsurancePlanPlanSpecificCostComponent(
JsonObject json, InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.InsurancePlanPlanSpecificCostComponent res = new InsurancePlan.InsurancePlanPlanSpecificCostComponent();
parseInsurancePlanInsurancePlanPlanSpecificCostComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanInsurancePlanPlanSpecificCostComponentProperties(JsonObject json,
InsurancePlan owner, 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 = json.getAsJsonArray("benefit");
for (int i = 0; i < array.size(); i++) {
res.getBenefit().add(parseInsurancePlanPlanBenefitComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected InsurancePlan.PlanBenefitComponent parseInsurancePlanPlanBenefitComponent(JsonObject json,
InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.PlanBenefitComponent res = new InsurancePlan.PlanBenefitComponent();
parseInsurancePlanPlanBenefitComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanPlanBenefitComponentProperties(JsonObject json, InsurancePlan owner,
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 = json.getAsJsonArray("cost");
for (int i = 0; i < array.size(); i++) {
res.getCost().add(parseInsurancePlanPlanBenefitCostComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected InsurancePlan.PlanBenefitCostComponent parseInsurancePlanPlanBenefitCostComponent(JsonObject json,
InsurancePlan owner) throws IOException, FHIRFormatError {
InsurancePlan.PlanBenefitCostComponent res = new InsurancePlan.PlanBenefitCostComponent();
parseInsurancePlanPlanBenefitCostComponentProperties(json, owner, res);
return res;
}
protected void parseInsurancePlanPlanBenefitCostComponentProperties(JsonObject json, InsurancePlan owner,
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 = json.getAsJsonArray("qualifiers");
for (int i = 0; i < array.size(); i++) {
res.getQualifiers().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("value"))
res.setValue(parseQuantity(getJObject(json, "value")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseInvoiceInvoiceParticipantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("lineItem");
for (int i = 0; i < array.size(); i++) {
res.getLineItem().add(parseInvoiceInvoiceLineItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("totalPriceComponent")) {
JsonArray array = json.getAsJsonArray("totalPriceComponent");
for (int i = 0; i < array.size(); i++) {
res.getTotalPriceComponent()
.add(parseInvoiceInvoiceLineItemPriceComponentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected Invoice.InvoiceParticipantComponent parseInvoiceInvoiceParticipantComponent(JsonObject json, Invoice owner)
throws IOException, FHIRFormatError {
Invoice.InvoiceParticipantComponent res = new Invoice.InvoiceParticipantComponent();
parseInvoiceInvoiceParticipantComponentProperties(json, owner, res);
return res;
}
protected void parseInvoiceInvoiceParticipantComponentProperties(JsonObject json, Invoice owner,
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 parseInvoiceInvoiceLineItemComponent(JsonObject json, Invoice owner)
throws IOException, FHIRFormatError {
Invoice.InvoiceLineItemComponent res = new Invoice.InvoiceLineItemComponent();
parseInvoiceInvoiceLineItemComponentProperties(json, owner, res);
return res;
}
protected void parseInvoiceInvoiceLineItemComponentProperties(JsonObject json, Invoice owner,
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());
Type chargeItem = parseType("chargeItem", json);
if (chargeItem != null)
res.setChargeItem(chargeItem);
if (json.has("priceComponent")) {
JsonArray array = json.getAsJsonArray("priceComponent");
for (int i = 0; i < array.size(); i++) {
res.getPriceComponent()
.add(parseInvoiceInvoiceLineItemPriceComponentComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Invoice.InvoiceLineItemPriceComponentComponent parseInvoiceInvoiceLineItemPriceComponentComponent(
JsonObject json, Invoice owner) throws IOException, FHIRFormatError {
Invoice.InvoiceLineItemPriceComponentComponent res = new Invoice.InvoiceLineItemPriceComponentComponent();
parseInvoiceInvoiceLineItemPriceComponentComponentProperties(json, owner, res);
return res;
}
protected void parseInvoiceInvoiceLineItemPriceComponentComponentProperties(JsonObject json, Invoice owner,
Invoice.InvoiceLineItemPriceComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Invoice.InvoicePriceComponentType.NULL,
new Invoice.InvoicePriceComponentTypeEnumFactory()));
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 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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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")));
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("parameter")) {
JsonArray array = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseParameterDefinition(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dataRequirement")) {
JsonArray array = json.getAsJsonArray("dataRequirement");
for (int i = 0; i < array.size(); i++) {
res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("content")) {
JsonArray array = json.getAsJsonArray("content");
for (int i = 0; i < array.size(); i++) {
res.getContent().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseLinkageLinkageItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Linkage.LinkageItemComponent parseLinkageLinkageItemComponent(JsonObject json, Linkage owner)
throws IOException, FHIRFormatError {
Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent();
parseLinkageLinkageItemComponentProperties(json, owner, res);
return res;
}
protected void parseLinkageLinkageItemComponentProperties(JsonObject json, Linkage owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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(), ListResource.ListMode.NULL,
new ListResource.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"))
res.setSubject(parseReference(getJObject(json, "subject")));
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("entry")) {
JsonArray array = json.getAsJsonArray("entry");
for (int i = 0; i < array.size(); i++) {
res.getEntry().add(parseListResourceListEntryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("emptyReason"))
res.setEmptyReason(parseCodeableConcept(getJObject(json, "emptyReason")));
}
protected ListResource.ListEntryComponent parseListResourceListEntryComponent(JsonObject json, ListResource owner)
throws IOException, FHIRFormatError {
ListResource.ListEntryComponent res = new ListResource.ListEntryComponent();
parseListResourceListEntryComponentProperties(json, owner, res);
return res;
}
protected void parseListResourceListEntryComponentProperties(JsonObject json, ListResource owner,
ListResource.ListEntryComponent 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getAlias().get(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("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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("address"))
res.setAddress(parseAddress(getJObject(json, "address")));
if (json.has("physicalType"))
res.setPhysicalType(parseCodeableConcept(getJObject(json, "physicalType")));
if (json.has("position"))
res.setPosition(parseLocationLocationPositionComponent(getJObject(json, "position"), res));
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
if (json.has("hoursOfOperation")) {
JsonArray array = json.getAsJsonArray("hoursOfOperation");
for (int i = 0; i < array.size(); i++) {
res.getHoursOfOperation()
.add(parseLocationLocationHoursOfOperationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("availabilityExceptions"))
res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString()));
if (json.has("_availabilityExceptions"))
parseElementProperties(getJObject(json, "_availabilityExceptions"), res.getAvailabilityExceptionsElement());
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Location.LocationPositionComponent parseLocationLocationPositionComponent(JsonObject json, Location owner)
throws IOException, FHIRFormatError {
Location.LocationPositionComponent res = new Location.LocationPositionComponent();
parseLocationLocationPositionComponentProperties(json, owner, res);
return res;
}
protected void parseLocationLocationPositionComponentProperties(JsonObject json, Location owner,
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 Location.LocationHoursOfOperationComponent parseLocationLocationHoursOfOperationComponent(JsonObject json,
Location owner) throws IOException, FHIRFormatError {
Location.LocationHoursOfOperationComponent res = new Location.LocationHoursOfOperationComponent();
parseLocationLocationHoursOfOperationComponentProperties(json, owner, res);
return res;
}
protected void parseLocationLocationHoursOfOperationComponentProperties(JsonObject json, Location owner,
Location.LocationHoursOfOperationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("daysOfWeek")) {
JsonArray array = json.getAsJsonArray("daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDaysOfWeek().add(new Enumeration());
} else {
res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), Location.DaysOfWeek.NULL,
new Location.DaysOfWeekEnumFactory()));
}
}
}
;
if (json.has("_daysOfWeek")) {
JsonArray array = json.getAsJsonArray("_daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDaysOfWeek().size())
res.getDaysOfWeek()
.add(parseEnumeration(null, Location.DaysOfWeek.NULL, new Location.DaysOfWeekEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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("openingTime"))
res.setOpeningTimeElement(parseTime(json.get("openingTime").getAsString()));
if (json.has("_openingTime"))
parseElementProperties(getJObject(json, "_openingTime"), res.getOpeningTimeElement());
if (json.has("closingTime"))
res.setClosingTimeElement(parseTime(json.get("closingTime").getAsString()));
if (json.has("_closingTime"))
parseElementProperties(getJObject(json, "_closingTime"), res.getClosingTimeElement());
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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());
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("library")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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("compositeScoring"))
res.setCompositeScoring(parseCodeableConcept(getJObject(json, "compositeScoring")));
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("riskAdjustment"))
res.setRiskAdjustmentElement(parseString(json.get("riskAdjustment").getAsString()));
if (json.has("_riskAdjustment"))
parseElementProperties(getJObject(json, "_riskAdjustment"), res.getRiskAdjustmentElement());
if (json.has("rateAggregation"))
res.setRateAggregationElement(parseString(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("definition")) {
JsonArray array = json.getAsJsonArray("definition");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDefinition().add(new MarkdownType());
} else {
res.getDefinition().add(parseMarkdown(array.get(i).getAsString()));
}
}
}
;
if (json.has("_definition")) {
JsonArray array = json.getAsJsonArray("_definition");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDefinition().size())
res.getDefinition().add(parseMarkdown(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getDefinition().get(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 = json.getAsJsonArray("group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseMeasureMeasureGroupComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("supplementalData")) {
JsonArray array = json.getAsJsonArray("supplementalData");
for (int i = 0; i < array.size(); i++) {
res.getSupplementalData()
.add(parseMeasureMeasureSupplementalDataComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Measure.MeasureGroupComponent parseMeasureMeasureGroupComponent(JsonObject json, Measure owner)
throws IOException, FHIRFormatError {
Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent();
parseMeasureMeasureGroupComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureMeasureGroupComponentProperties(JsonObject json, Measure owner,
Measure.MeasureGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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("population")) {
JsonArray array = json.getAsJsonArray("population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parseMeasureMeasureGroupPopulationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("stratifier")) {
JsonArray array = json.getAsJsonArray("stratifier");
for (int i = 0; i < array.size(); i++) {
res.getStratifier().add(parseMeasureMeasureGroupStratifierComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Measure.MeasureGroupPopulationComponent parseMeasureMeasureGroupPopulationComponent(JsonObject json,
Measure owner) throws IOException, FHIRFormatError {
Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent();
parseMeasureMeasureGroupPopulationComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureMeasureGroupPopulationComponentProperties(JsonObject json, Measure owner,
Measure.MeasureGroupPopulationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
}
protected Measure.MeasureGroupStratifierComponent parseMeasureMeasureGroupStratifierComponent(JsonObject json,
Measure owner) throws IOException, FHIRFormatError {
Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent();
parseMeasureMeasureGroupStratifierComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureMeasureGroupStratifierComponentProperties(JsonObject json, Measure owner,
Measure.MeasureGroupStratifierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
if (json.has("component")) {
JsonArray array = json.getAsJsonArray("component");
for (int i = 0; i < array.size(); i++) {
res.getComponent()
.add(parseMeasureMeasureGroupStratifierComponentComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Measure.MeasureGroupStratifierComponentComponent parseMeasureMeasureGroupStratifierComponentComponent(
JsonObject json, Measure owner) throws IOException, FHIRFormatError {
Measure.MeasureGroupStratifierComponentComponent res = new Measure.MeasureGroupStratifierComponentComponent();
parseMeasureMeasureGroupStratifierComponentComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureMeasureGroupStratifierComponentComponentProperties(JsonObject json, Measure owner,
Measure.MeasureGroupStratifierComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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("criteria"))
res.setCriteria(parseExpression(getJObject(json, "criteria")));
}
protected Measure.MeasureSupplementalDataComponent parseMeasureMeasureSupplementalDataComponent(JsonObject json,
Measure owner) throws IOException, FHIRFormatError {
Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent();
parseMeasureMeasureSupplementalDataComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureMeasureSupplementalDataComponentProperties(JsonObject json, Measure owner,
Measure.MeasureSupplementalDataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("usage")) {
JsonArray array = json.getAsJsonArray("usage");
for (int i = 0; i < array.size(); i++) {
res.getUsage().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseString(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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("improvementNotation"))
res.setImprovementNotation(parseCodeableConcept(getJObject(json, "improvementNotation")));
if (json.has("group")) {
JsonArray array = json.getAsJsonArray("group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseMeasureReportMeasureReportGroupComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("evaluatedResource")) {
JsonArray array = json.getAsJsonArray("evaluatedResource");
for (int i = 0; i < array.size(); i++) {
res.getEvaluatedResource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected MeasureReport.MeasureReportGroupComponent parseMeasureReportMeasureReportGroupComponent(JsonObject json,
MeasureReport owner) throws IOException, FHIRFormatError {
MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent();
parseMeasureReportMeasureReportGroupComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureReportMeasureReportGroupComponentProperties(JsonObject json, MeasureReport owner,
MeasureReport.MeasureReportGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("population")) {
JsonArray array = json.getAsJsonArray("population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation()
.add(parseMeasureReportMeasureReportGroupPopulationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("measureScore"))
res.setMeasureScore(parseQuantity(getJObject(json, "measureScore")));
if (json.has("stratifier")) {
JsonArray array = json.getAsJsonArray("stratifier");
for (int i = 0; i < array.size(); i++) {
res.getStratifier()
.add(parseMeasureReportMeasureReportGroupStratifierComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportMeasureReportGroupPopulationComponent(
JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError {
MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent();
parseMeasureReportMeasureReportGroupPopulationComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureReportMeasureReportGroupPopulationComponentProperties(JsonObject json, MeasureReport owner,
MeasureReport.MeasureReportGroupPopulationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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")));
}
protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportMeasureReportGroupStratifierComponent(
JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError {
MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent();
parseMeasureReportMeasureReportGroupStratifierComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureReportMeasureReportGroupStratifierComponentProperties(JsonObject json, MeasureReport owner,
MeasureReport.MeasureReportGroupStratifierComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("stratum")) {
JsonArray array = json.getAsJsonArray("stratum");
for (int i = 0; i < array.size(); i++) {
res.getStratum().add(parseMeasureReportStratifierGroupComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(JsonObject json,
MeasureReport owner) throws IOException, FHIRFormatError {
MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent();
parseMeasureReportStratifierGroupComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureReportStratifierGroupComponentProperties(JsonObject json, MeasureReport owner,
MeasureReport.StratifierGroupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("value"))
res.setValue(parseCodeableConcept(getJObject(json, "value")));
if (json.has("component")) {
JsonArray array = json.getAsJsonArray("component");
for (int i = 0; i < array.size(); i++) {
res.getComponent()
.add(parseMeasureReportStratifierGroupComponentComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("population")) {
JsonArray array = json.getAsJsonArray("population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation()
.add(parseMeasureReportStratifierGroupPopulationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("measureScore"))
res.setMeasureScore(parseQuantity(getJObject(json, "measureScore")));
}
protected MeasureReport.StratifierGroupComponentComponent parseMeasureReportStratifierGroupComponentComponent(
JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError {
MeasureReport.StratifierGroupComponentComponent res = new MeasureReport.StratifierGroupComponentComponent();
parseMeasureReportStratifierGroupComponentComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureReportStratifierGroupComponentComponentProperties(JsonObject json, MeasureReport owner,
MeasureReport.StratifierGroupComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("value"))
res.setValue(parseCodeableConcept(getJObject(json, "value")));
}
protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent(
JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError {
MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent();
parseMeasureReportStratifierGroupPopulationComponentProperties(json, owner, res);
return res;
}
protected void parseMeasureReportStratifierGroupPopulationComponentProperties(JsonObject json, MeasureReport owner,
MeasureReport.StratifierGroupPopulationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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")));
}
protected Media parseMedia(JsonObject json) throws IOException, FHIRFormatError {
Media res = new Media();
parseMediaProperties(json, res);
return res;
}
protected void parseMediaProperties(JsonObject json, Media res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Media.MediaStatus.NULL,
new Media.MediaStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("modality"))
res.setModality(parseCodeableConcept(getJObject(json, "modality")));
if (json.has("view"))
res.setView(parseCodeableConcept(getJObject(json, "view")));
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type created = parseType("created", json);
if (created != null)
res.setCreated(created);
if (json.has("issued"))
res.setIssuedElement(parseInstant(json.get("issued").getAsString()));
if (json.has("_issued"))
parseElementProperties(getJObject(json, "_issued"), res.getIssuedElement());
if (json.has("operator"))
res.setOperator(parseReference(getJObject(json, "operator")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
if (json.has("deviceName"))
res.setDeviceNameElement(parseString(json.get("deviceName").getAsString()));
if (json.has("_deviceName"))
parseElementProperties(getJObject(json, "_deviceName"), res.getDeviceNameElement());
if (json.has("device"))
res.setDevice(parseReference(getJObject(json, "device")));
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("content"))
res.setContent(parseAttachment(getJObject(json, "content")));
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Medication.MedicationStatus.NULL,
new Medication.MedicationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("manufacturer"))
res.setManufacturer(parseReference(getJObject(json, "manufacturer")));
if (json.has("form"))
res.setForm(parseCodeableConcept(getJObject(json, "form")));
if (json.has("amount"))
res.setAmount(parseRatio(getJObject(json, "amount")));
if (json.has("ingredient")) {
JsonArray array = json.getAsJsonArray("ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseMedicationMedicationIngredientComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("batch"))
res.setBatch(parseMedicationMedicationBatchComponent(getJObject(json, "batch"), res));
}
protected Medication.MedicationIngredientComponent parseMedicationMedicationIngredientComponent(JsonObject json,
Medication owner) throws IOException, FHIRFormatError {
Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent();
parseMedicationMedicationIngredientComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationMedicationIngredientComponentProperties(JsonObject json, Medication owner,
Medication.MedicationIngredientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type item = parseType("item", json);
if (item != null)
res.setItem(item);
if (json.has("isActive"))
res.setIsActiveElement(parseBoolean(json.get("isActive").getAsBoolean()));
if (json.has("_isActive"))
parseElementProperties(getJObject(json, "_isActive"), res.getIsActiveElement());
if (json.has("strength"))
res.setStrength(parseRatio(getJObject(json, "strength")));
}
protected Medication.MedicationBatchComponent parseMedicationMedicationBatchComponent(JsonObject json,
Medication owner) throws IOException, FHIRFormatError {
Medication.MedicationBatchComponent res = new Medication.MedicationBatchComponent();
parseMedicationMedicationBatchComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationMedicationBatchComponentProperties(JsonObject json, Medication owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiates")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiates().get(i));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(),
MedicationAdministration.MedicationAdministrationStatus.NULL,
new MedicationAdministration.MedicationAdministrationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason")) {
JsonArray array = json.getAsJsonArray("statusReason");
for (int i = 0; i < array.size(); i++) {
res.getStatusReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
Type medication = parseType("medication", json);
if (medication != null)
res.setMedication(medication);
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("context"))
res.setContext(parseReference(getJObject(json, "context")));
if (json.has("supportingInformation")) {
JsonArray array = json.getAsJsonArray("supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type effective = parseType("effective", json);
if (effective != null)
res.setEffective(effective);
if (json.has("performer")) {
JsonArray array = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseMedicationAdministrationMedicationAdministrationPerformerComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
if (json.has("device")) {
JsonArray array = json.getAsJsonArray("device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dosage"))
res.setDosage(
parseMedicationAdministrationMedicationAdministrationDosageComponent(getJObject(json, "dosage"), res));
if (json.has("eventHistory")) {
JsonArray array = json.getAsJsonArray("eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationMedicationAdministrationPerformerComponent(
JsonObject json, MedicationAdministration owner) throws IOException, FHIRFormatError {
MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent();
parseMedicationAdministrationMedicationAdministrationPerformerComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationAdministrationMedicationAdministrationPerformerComponentProperties(JsonObject json,
MedicationAdministration owner, 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(parseReference(getJObject(json, "actor")));
}
protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationMedicationAdministrationDosageComponent(
JsonObject json, MedicationAdministration owner) throws IOException, FHIRFormatError {
MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent();
parseMedicationAdministrationMedicationAdministrationDosageComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationAdministrationMedicationAdministrationDosageComponentProperties(JsonObject json,
MedicationAdministration owner, 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")));
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), MedicationDispense.MedicationDispenseStatus.NULL,
new MedicationDispense.MedicationDispenseStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
Type statusReason = parseType("statusReason", json);
if (statusReason != null)
res.setStatusReason(statusReason);
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
Type medication = parseType("medication", json);
if (medication != null)
res.setMedication(medication);
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("context"))
res.setContext(parseReference(getJObject(json, "context")));
if (json.has("supportingInformation")) {
JsonArray array = json.getAsJsonArray("supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("performer")) {
JsonArray array = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer()
.add(parseMedicationDispenseMedicationDispensePerformerComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("authorizingPrescription")) {
JsonArray array = json.getAsJsonArray("authorizingPrescription");
for (int i = 0; i < array.size(); i++) {
res.getAuthorizingPrescription().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("receiver");
for (int i = 0; i < array.size(); i++) {
res.getReceiver().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dosageInstruction")) {
JsonArray array = json.getAsJsonArray("dosageInstruction");
for (int i = 0; i < array.size(); i++) {
res.getDosageInstruction().add(parseDosage(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("substitution"))
res.setSubstitution(
parseMedicationDispenseMedicationDispenseSubstitutionComponent(getJObject(json, "substitution"), res));
if (json.has("detectedIssue")) {
JsonArray array = json.getAsJsonArray("detectedIssue");
for (int i = 0; i < array.size(); i++) {
res.getDetectedIssue().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("eventHistory")) {
JsonArray array = json.getAsJsonArray("eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispenseMedicationDispensePerformerComponent(
JsonObject json, MedicationDispense owner) throws IOException, FHIRFormatError {
MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent();
parseMedicationDispenseMedicationDispensePerformerComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationDispenseMedicationDispensePerformerComponentProperties(JsonObject json,
MedicationDispense owner, 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 parseMedicationDispenseMedicationDispenseSubstitutionComponent(
JsonObject json, MedicationDispense owner) throws IOException, FHIRFormatError {
MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent();
parseMedicationDispenseMedicationDispenseSubstitutionComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationDispenseMedicationDispenseSubstitutionComponentProperties(JsonObject json,
MedicationDispense owner, 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 = json.getAsJsonArray("reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("responsibleParty")) {
JsonArray array = json.getAsJsonArray("responsibleParty");
for (int i = 0; i < array.size(); i++) {
res.getResponsibleParty().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), MedicationKnowledge.MedicationKnowledgeStatus.NULL,
new MedicationKnowledge.MedicationKnowledgeStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("manufacturer"))
res.setManufacturer(parseReference(getJObject(json, "manufacturer")));
if (json.has("doseForm"))
res.setDoseForm(parseCodeableConcept(getJObject(json, "doseForm")));
if (json.has("amount"))
res.setAmount(parseQuantity(getJObject(json, "amount")));
if (json.has("synonym")) {
JsonArray array = json.getAsJsonArray("synonym");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSynonym().add(new StringType());
} else {
res.getSynonym().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_synonym")) {
JsonArray array = json.getAsJsonArray("_synonym");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSynonym().size())
res.getSynonym().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getSynonym().get(i));
}
}
;
if (json.has("relatedMedicationKnowledge")) {
JsonArray array = json.getAsJsonArray("relatedMedicationKnowledge");
for (int i = 0; i < array.size(); i++) {
res.getRelatedMedicationKnowledge()
.add(parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("associatedMedication")) {
JsonArray array = json.getAsJsonArray("associatedMedication");
for (int i = 0; i < array.size(); i++) {
res.getAssociatedMedication().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("productType")) {
JsonArray array = json.getAsJsonArray("productType");
for (int i = 0; i < array.size(); i++) {
res.getProductType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("monograph")) {
JsonArray array = json.getAsJsonArray("monograph");
for (int i = 0; i < array.size(); i++) {
res.getMonograph()
.add(parseMedicationKnowledgeMedicationKnowledgeMonographComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("ingredient")) {
JsonArray array = json.getAsJsonArray("ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient()
.add(parseMedicationKnowledgeMedicationKnowledgeIngredientComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("preparationInstruction"))
res.setPreparationInstructionElement(parseMarkdown(json.get("preparationInstruction").getAsString()));
if (json.has("_preparationInstruction"))
parseElementProperties(getJObject(json, "_preparationInstruction"), res.getPreparationInstructionElement());
if (json.has("intendedRoute")) {
JsonArray array = json.getAsJsonArray("intendedRoute");
for (int i = 0; i < array.size(); i++) {
res.getIntendedRoute().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("cost")) {
JsonArray array = json.getAsJsonArray("cost");
for (int i = 0; i < array.size(); i++) {
res.getCost()
.add(parseMedicationKnowledgeMedicationKnowledgeCostComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("monitoringProgram")) {
JsonArray array = json.getAsJsonArray("monitoringProgram");
for (int i = 0; i < array.size(); i++) {
res.getMonitoringProgram().add(
parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("administrationGuidelines")) {
JsonArray array = json.getAsJsonArray("administrationGuidelines");
for (int i = 0; i < array.size(); i++) {
res.getAdministrationGuidelines().add(
parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent(array.get(i).getAsJsonObject(),
res));
}
}
;
if (json.has("medicineClassification")) {
JsonArray array = json.getAsJsonArray("medicineClassification");
for (int i = 0; i < array.size(); i++) {
res.getMedicineClassification().add(parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("packaging"))
res.setPackaging(
parseMedicationKnowledgeMedicationKnowledgePackagingComponent(getJObject(json, "packaging"), res));
if (json.has("drugCharacteristic")) {
JsonArray array = json.getAsJsonArray("drugCharacteristic");
for (int i = 0; i < array.size(); i++) {
res.getDrugCharacteristic().add(parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("contraindication")) {
JsonArray array = json.getAsJsonArray("contraindication");
for (int i = 0; i < array.size(); i++) {
res.getContraindication().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("regulatory")) {
JsonArray array = json.getAsJsonArray("regulatory");
for (int i = 0; i < array.size(); i++) {
res.getRegulatory()
.add(parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("kinetics")) {
JsonArray array = json.getAsJsonArray("kinetics");
for (int i = 0; i < array.size(); i++) {
res.getKinetics()
.add(parseMedicationKnowledgeMedicationKnowledgeKineticsComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent res = new MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent();
parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentProperties(
JsonObject json, MedicationKnowledge owner,
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 = json.getAsJsonArray("reference");
for (int i = 0; i < array.size(); i++) {
res.getReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicationKnowledge.MedicationKnowledgeMonographComponent parseMedicationKnowledgeMedicationKnowledgeMonographComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeMonographComponent res = new MedicationKnowledge.MedicationKnowledgeMonographComponent();
parseMedicationKnowledgeMedicationKnowledgeMonographComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeMonographComponentProperties(JsonObject json,
MedicationKnowledge owner, 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.MedicationKnowledgeIngredientComponent parseMedicationKnowledgeMedicationKnowledgeIngredientComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeIngredientComponent res = new MedicationKnowledge.MedicationKnowledgeIngredientComponent();
parseMedicationKnowledgeMedicationKnowledgeIngredientComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeIngredientComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeIngredientComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type item = parseType("item", json);
if (item != null)
res.setItem(item);
if (json.has("isActive"))
res.setIsActiveElement(parseBoolean(json.get("isActive").getAsBoolean()));
if (json.has("_isActive"))
parseElementProperties(getJObject(json, "_isActive"), res.getIsActiveElement());
if (json.has("strength"))
res.setStrength(parseRatio(getJObject(json, "strength")));
}
protected MedicationKnowledge.MedicationKnowledgeCostComponent parseMedicationKnowledgeMedicationKnowledgeCostComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeCostComponent res = new MedicationKnowledge.MedicationKnowledgeCostComponent();
parseMedicationKnowledgeMedicationKnowledgeCostComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeCostComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeCostComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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());
if (json.has("cost"))
res.setCost(parseMoney(getJObject(json, "cost")));
}
protected MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent res = new MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent();
parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentProperties(JsonObject json,
MedicationKnowledge owner, 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.MedicationKnowledgeAdministrationGuidelinesComponent parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent res = new MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent();
parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("dosage")) {
JsonArray array = json.getAsJsonArray("dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
Type indication = parseType("indication", json);
if (indication != null)
res.setIndication(indication);
if (json.has("patientCharacteristics")) {
JsonArray array = json.getAsJsonArray("patientCharacteristics");
for (int i = 0; i < array.size(); i++) {
res.getPatientCharacteristics()
.add(parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent res = new MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent();
parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentProperties(
JsonObject json, MedicationKnowledge owner,
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("dosage")) {
JsonArray array = json.getAsJsonArray("dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseDosage(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent res = new MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent();
parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentProperties(json,
owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentProperties(
JsonObject json, MedicationKnowledge owner,
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type characteristic = parseType("characteristic", json);
if (characteristic != null)
res.setCharacteristic(characteristic);
if (json.has("value")) {
JsonArray array = json.getAsJsonArray("value");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getValue().add(new StringType());
} else {
res.getValue().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_value")) {
JsonArray array = json.getAsJsonArray("_value");
for (int i = 0; i < array.size(); i++) {
if (i == res.getValue().size())
res.getValue().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getValue().get(i));
}
}
;
}
protected MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent res = new MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent();
parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("classification")) {
JsonArray array = json.getAsJsonArray("classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicationKnowledge.MedicationKnowledgePackagingComponent parseMedicationKnowledgeMedicationKnowledgePackagingComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgePackagingComponent res = new MedicationKnowledge.MedicationKnowledgePackagingComponent();
parseMedicationKnowledgeMedicationKnowledgePackagingComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgePackagingComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgePackagingComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
}
protected MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent res = new MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent();
parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected MedicationKnowledge.MedicationKnowledgeRegulatoryComponent parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatoryComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryComponent();
parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponentProperties(JsonObject json,
MedicationKnowledge owner, 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 = json.getAsJsonArray("substitution");
for (int i = 0; i < array.size(); i++) {
res.getSubstitution().add(parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("schedule")) {
JsonArray array = json.getAsJsonArray("schedule");
for (int i = 0; i < array.size(); i++) {
res.getSchedule().add(parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("maxDispense"))
res.setMaxDispense(parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent(
getJObject(json, "maxDispense"), owner));
}
protected MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent();
parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentProperties(JsonObject json,
MedicationKnowledge owner, 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.MedicationKnowledgeRegulatoryScheduleComponent parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent();
parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("schedule"))
res.setSchedule(parseCodeableConcept(getJObject(json, "schedule")));
}
protected MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent();
parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentProperties(JsonObject json,
MedicationKnowledge owner, 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.MedicationKnowledgeKineticsComponent parseMedicationKnowledgeMedicationKnowledgeKineticsComponent(
JsonObject json, MedicationKnowledge owner) throws IOException, FHIRFormatError {
MedicationKnowledge.MedicationKnowledgeKineticsComponent res = new MedicationKnowledge.MedicationKnowledgeKineticsComponent();
parseMedicationKnowledgeMedicationKnowledgeKineticsComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationKnowledgeMedicationKnowledgeKineticsComponentProperties(JsonObject json,
MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeKineticsComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("areaUnderCurve")) {
JsonArray array = json.getAsJsonArray("areaUnderCurve");
for (int i = 0; i < array.size(); i++) {
res.getAreaUnderCurve().add(parseQuantity(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("lethalDose50")) {
JsonArray array = json.getAsJsonArray("lethalDose50");
for (int i = 0; i < array.size(); i++) {
res.getLethalDose50().add(parseQuantity(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("halfLifePeriod"))
res.setHalfLifePeriod(parseDuration(getJObject(json, "halfLifePeriod")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("priority"))
res.setPriorityElement(
parseEnumeration(json.get("priority").getAsString(), MedicationRequest.MedicationRequestPriority.NULL,
new MedicationRequest.MedicationRequestPriorityEnumFactory()));
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());
Type reported = parseType("reported", json);
if (reported != null)
res.setReported(reported);
Type medication = parseType("medication", json);
if (medication != null)
res.setMedication(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 = json.getAsJsonArray("supportingInformation");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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(parseReference(getJObject(json, "performer")));
if (json.has("performerType"))
res.setPerformerType(parseCodeableConcept(getJObject(json, "performerType")));
if (json.has("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("courseOfTherapyType"))
res.setCourseOfTherapyType(parseCodeableConcept(getJObject(json, "courseOfTherapyType")));
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dosageInstruction")) {
JsonArray array = json.getAsJsonArray("dosageInstruction");
for (int i = 0; i < array.size(); i++) {
res.getDosageInstruction().add(parseDosage(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dispenseRequest"))
res.setDispenseRequest(
parseMedicationRequestMedicationRequestDispenseRequestComponent(getJObject(json, "dispenseRequest"), res));
if (json.has("substitution"))
res.setSubstitution(
parseMedicationRequestMedicationRequestSubstitutionComponent(getJObject(json, "substitution"), res));
if (json.has("priorPrescription"))
res.setPriorPrescription(parseReference(getJObject(json, "priorPrescription")));
if (json.has("detectedIssue")) {
JsonArray array = json.getAsJsonArray("detectedIssue");
for (int i = 0; i < array.size(); i++) {
res.getDetectedIssue().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("eventHistory")) {
JsonArray array = json.getAsJsonArray("eventHistory");
for (int i = 0; i < array.size(); i++) {
res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestMedicationRequestDispenseRequestComponent(
JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError {
MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent();
parseMedicationRequestMedicationRequestDispenseRequestComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationRequestMedicationRequestDispenseRequestComponentProperties(JsonObject json,
MedicationRequest owner, MedicationRequest.MedicationRequestDispenseRequestComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("initialFill"))
res.setInitialFill(parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponent(
getJObject(json, "initialFill"), owner));
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("performer"))
res.setPerformer(parseReference(getJObject(json, "performer")));
}
protected MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponent(
JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError {
MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent res = new MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent();
parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponentProperties(JsonObject json,
MedicationRequest owner, 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 parseMedicationRequestMedicationRequestSubstitutionComponent(
JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError {
MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent();
parseMedicationRequestMedicationRequestSubstitutionComponentProperties(json, owner, res);
return res;
}
protected void parseMedicationRequestMedicationRequestSubstitutionComponentProperties(JsonObject json,
MedicationRequest owner, MedicationRequest.MedicationRequestSubstitutionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), MedicationStatement.MedicationStatementStatus.NULL,
new MedicationStatement.MedicationStatementStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason")) {
JsonArray array = json.getAsJsonArray("statusReason");
for (int i = 0; i < array.size(); i++) {
res.getStatusReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
Type medication = parseType("medication", json);
if (medication != null)
res.setMedication(medication);
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("context"))
res.setContext(parseReference(getJObject(json, "context")));
Type 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"))
res.setInformationSource(parseReference(getJObject(json, "informationSource")));
if (json.has("derivedFrom")) {
JsonArray array = json.getAsJsonArray("derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("dosage")) {
JsonArray array = json.getAsJsonArray("dosage");
for (int i = 0; i < array.size(); i++) {
res.getDosage().add(parseDosage(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicinalProduct parseMedicinalProduct(JsonObject json) throws IOException, FHIRFormatError {
MedicinalProduct res = new MedicinalProduct();
parseMedicinalProductProperties(json, res);
return res;
}
protected void parseMedicinalProductProperties(JsonObject json, MedicinalProduct res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("domain"))
res.setDomain(parseCoding(getJObject(json, "domain")));
if (json.has("combinedPharmaceuticalDoseForm"))
res.setCombinedPharmaceuticalDoseForm(parseCodeableConcept(getJObject(json, "combinedPharmaceuticalDoseForm")));
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 = json.getAsJsonArray("specialMeasures");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSpecialMeasures().add(new StringType());
} else {
res.getSpecialMeasures().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_specialMeasures")) {
JsonArray array = json.getAsJsonArray("_specialMeasures");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSpecialMeasures().size())
res.getSpecialMeasures().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getSpecialMeasures().get(i));
}
}
;
if (json.has("paediatricUseIndicator"))
res.setPaediatricUseIndicator(parseCodeableConcept(getJObject(json, "paediatricUseIndicator")));
if (json.has("productClassification")) {
JsonArray array = json.getAsJsonArray("productClassification");
for (int i = 0; i < array.size(); i++) {
res.getProductClassification().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("marketingStatus")) {
JsonArray array = json.getAsJsonArray("marketingStatus");
for (int i = 0; i < array.size(); i++) {
res.getMarketingStatus().add(parseMarketingStatus(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("pharmaceuticalProduct")) {
JsonArray array = json.getAsJsonArray("pharmaceuticalProduct");
for (int i = 0; i < array.size(); i++) {
res.getPharmaceuticalProduct().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("packagedMedicinalProduct")) {
JsonArray array = json.getAsJsonArray("packagedMedicinalProduct");
for (int i = 0; i < array.size(); i++) {
res.getPackagedMedicinalProduct().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("attachedDocument")) {
JsonArray array = json.getAsJsonArray("attachedDocument");
for (int i = 0; i < array.size(); i++) {
res.getAttachedDocument().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("masterFile")) {
JsonArray array = json.getAsJsonArray("masterFile");
for (int i = 0; i < array.size(); i++) {
res.getMasterFile().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("clinicalTrial")) {
JsonArray array = json.getAsJsonArray("clinicalTrial");
for (int i = 0; i < array.size(); i++) {
res.getClinicalTrial().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("name")) {
JsonArray array = json.getAsJsonArray("name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseMedicinalProductMedicinalProductNameComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("crossReference")) {
JsonArray array = json.getAsJsonArray("crossReference");
for (int i = 0; i < array.size(); i++) {
res.getCrossReference().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("manufacturingBusinessOperation")) {
JsonArray array = json.getAsJsonArray("manufacturingBusinessOperation");
for (int i = 0; i < array.size(); i++) {
res.getManufacturingBusinessOperation().add(
parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponent(array.get(i).getAsJsonObject(),
res));
}
}
;
if (json.has("specialDesignation")) {
JsonArray array = json.getAsJsonArray("specialDesignation");
for (int i = 0; i < array.size(); i++) {
res.getSpecialDesignation()
.add(parseMedicinalProductMedicinalProductSpecialDesignationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected MedicinalProduct.MedicinalProductNameComponent parseMedicinalProductMedicinalProductNameComponent(
JsonObject json, MedicinalProduct owner) throws IOException, FHIRFormatError {
MedicinalProduct.MedicinalProductNameComponent res = new MedicinalProduct.MedicinalProductNameComponent();
parseMedicinalProductMedicinalProductNameComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductMedicinalProductNameComponentProperties(JsonObject json, MedicinalProduct owner,
MedicinalProduct.MedicinalProductNameComponent 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("namePart")) {
JsonArray array = json.getAsJsonArray("namePart");
for (int i = 0; i < array.size(); i++) {
res.getNamePart()
.add(parseMedicinalProductMedicinalProductNameNamePartComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("countryLanguage")) {
JsonArray array = json.getAsJsonArray("countryLanguage");
for (int i = 0; i < array.size(); i++) {
res.getCountryLanguage().add(
parseMedicinalProductMedicinalProductNameCountryLanguageComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProduct.MedicinalProductNameNamePartComponent parseMedicinalProductMedicinalProductNameNamePartComponent(
JsonObject json, MedicinalProduct owner) throws IOException, FHIRFormatError {
MedicinalProduct.MedicinalProductNameNamePartComponent res = new MedicinalProduct.MedicinalProductNameNamePartComponent();
parseMedicinalProductMedicinalProductNameNamePartComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductMedicinalProductNameNamePartComponentProperties(JsonObject json,
MedicinalProduct owner, MedicinalProduct.MedicinalProductNameNamePartComponent 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(parseCoding(getJObject(json, "type")));
}
protected MedicinalProduct.MedicinalProductNameCountryLanguageComponent parseMedicinalProductMedicinalProductNameCountryLanguageComponent(
JsonObject json, MedicinalProduct owner) throws IOException, FHIRFormatError {
MedicinalProduct.MedicinalProductNameCountryLanguageComponent res = new MedicinalProduct.MedicinalProductNameCountryLanguageComponent();
parseMedicinalProductMedicinalProductNameCountryLanguageComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductMedicinalProductNameCountryLanguageComponentProperties(JsonObject json,
MedicinalProduct owner, MedicinalProduct.MedicinalProductNameCountryLanguageComponent 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 MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponent(
JsonObject json, MedicinalProduct owner) throws IOException, FHIRFormatError {
MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent res = new MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent();
parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponentProperties(JsonObject json,
MedicinalProduct owner, MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operationType"))
res.setOperationType(parseCodeableConcept(getJObject(json, "operationType")));
if (json.has("authorisationReferenceNumber"))
res.setAuthorisationReferenceNumber(parseIdentifier(getJObject(json, "authorisationReferenceNumber")));
if (json.has("effectiveDate"))
res.setEffectiveDateElement(parseDateTime(json.get("effectiveDate").getAsString()));
if (json.has("_effectiveDate"))
parseElementProperties(getJObject(json, "_effectiveDate"), res.getEffectiveDateElement());
if (json.has("confidentialityIndicator"))
res.setConfidentialityIndicator(parseCodeableConcept(getJObject(json, "confidentialityIndicator")));
if (json.has("manufacturer")) {
JsonArray array = json.getAsJsonArray("manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("regulator"))
res.setRegulator(parseReference(getJObject(json, "regulator")));
}
protected MedicinalProduct.MedicinalProductSpecialDesignationComponent parseMedicinalProductMedicinalProductSpecialDesignationComponent(
JsonObject json, MedicinalProduct owner) throws IOException, FHIRFormatError {
MedicinalProduct.MedicinalProductSpecialDesignationComponent res = new MedicinalProduct.MedicinalProductSpecialDesignationComponent();
parseMedicinalProductMedicinalProductSpecialDesignationComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductMedicinalProductSpecialDesignationComponentProperties(JsonObject json,
MedicinalProduct owner, MedicinalProduct.MedicinalProductSpecialDesignationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("intendedUse"))
res.setIntendedUse(parseCodeableConcept(getJObject(json, "intendedUse")));
Type indication = parseType("indication", json);
if (indication != null)
res.setIndication(indication);
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());
if (json.has("species"))
res.setSpecies(parseCodeableConcept(getJObject(json, "species")));
}
protected MedicinalProductAuthorization parseMedicinalProductAuthorization(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductAuthorization res = new MedicinalProductAuthorization();
parseMedicinalProductAuthorizationProperties(json, res);
return res;
}
protected void parseMedicinalProductAuthorizationProperties(JsonObject json, MedicinalProductAuthorization res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("country")) {
JsonArray array = json.getAsJsonArray("country");
for (int i = 0; i < array.size(); i++) {
res.getCountry().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("restoreDate"))
res.setRestoreDateElement(parseDateTime(json.get("restoreDate").getAsString()));
if (json.has("_restoreDate"))
parseElementProperties(getJObject(json, "_restoreDate"), res.getRestoreDateElement());
if (json.has("validityPeriod"))
res.setValidityPeriod(parsePeriod(getJObject(json, "validityPeriod")));
if (json.has("dataExclusivityPeriod"))
res.setDataExclusivityPeriod(parsePeriod(getJObject(json, "dataExclusivityPeriod")));
if (json.has("dateOfFirstAuthorization"))
res.setDateOfFirstAuthorizationElement(parseDateTime(json.get("dateOfFirstAuthorization").getAsString()));
if (json.has("_dateOfFirstAuthorization"))
parseElementProperties(getJObject(json, "_dateOfFirstAuthorization"), res.getDateOfFirstAuthorizationElement());
if (json.has("internationalBirthDate"))
res.setInternationalBirthDateElement(parseDateTime(json.get("internationalBirthDate").getAsString()));
if (json.has("_internationalBirthDate"))
parseElementProperties(getJObject(json, "_internationalBirthDate"), res.getInternationalBirthDateElement());
if (json.has("legalBasis"))
res.setLegalBasis(parseCodeableConcept(getJObject(json, "legalBasis")));
if (json.has("jurisdictionalAuthorization")) {
JsonArray array = json.getAsJsonArray("jurisdictionalAuthorization");
for (int i = 0; i < array.size(); i++) {
res.getJurisdictionalAuthorization()
.add(parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("holder"))
res.setHolder(parseReference(getJObject(json, "holder")));
if (json.has("regulator"))
res.setRegulator(parseReference(getJObject(json, "regulator")));
if (json.has("procedure"))
res.setProcedure(parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(
getJObject(json, "procedure"), res));
}
protected MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(
JsonObject json, MedicinalProductAuthorization owner) throws IOException, FHIRFormatError {
MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent res = new MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent();
parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentProperties(json,
owner, res);
return res;
}
protected void parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentProperties(
JsonObject json, MedicinalProductAuthorization owner,
MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("country"))
res.setCountry(parseCodeableConcept(getJObject(json, "country")));
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("legalStatusOfSupply"))
res.setLegalStatusOfSupply(parseCodeableConcept(getJObject(json, "legalStatusOfSupply")));
if (json.has("validityPeriod"))
res.setValidityPeriod(parsePeriod(getJObject(json, "validityPeriod")));
}
protected MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(
JsonObject json, MedicinalProductAuthorization owner) throws IOException, FHIRFormatError {
MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent res = new MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent();
parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentProperties(
JsonObject json, MedicinalProductAuthorization owner,
MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent 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")));
Type date = parseType("date", json);
if (date != null)
res.setDate(date);
if (json.has("application")) {
JsonArray array = json.getAsJsonArray("application");
for (int i = 0; i < array.size(); i++) {
res.getApplication().add(parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProductContraindication parseMedicinalProductContraindication(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductContraindication res = new MedicinalProductContraindication();
parseMedicinalProductContraindicationProperties(json, res);
return res;
}
protected void parseMedicinalProductContraindicationProperties(JsonObject json, MedicinalProductContraindication res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("subject")) {
JsonArray array = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("disease"))
res.setDisease(parseCodeableConcept(getJObject(json, "disease")));
if (json.has("diseaseStatus"))
res.setDiseaseStatus(parseCodeableConcept(getJObject(json, "diseaseStatus")));
if (json.has("comorbidity")) {
JsonArray array = json.getAsJsonArray("comorbidity");
for (int i = 0; i < array.size(); i++) {
res.getComorbidity().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("therapeuticIndication")) {
JsonArray array = json.getAsJsonArray("therapeuticIndication");
for (int i = 0; i < array.size(); i++) {
res.getTherapeuticIndication().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("otherTherapy")) {
JsonArray array = json.getAsJsonArray("otherTherapy");
for (int i = 0; i < array.size(); i++) {
res.getOtherTherapy()
.add(parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("population")) {
JsonArray array = json.getAsJsonArray("population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parsePopulation(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent(
JsonObject json, MedicinalProductContraindication owner) throws IOException, FHIRFormatError {
MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent res = new MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent();
parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentProperties(json, owner,
res);
return res;
}
protected void parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentProperties(
JsonObject json, MedicinalProductContraindication owner,
MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("therapyRelationshipType"))
res.setTherapyRelationshipType(parseCodeableConcept(getJObject(json, "therapyRelationshipType")));
Type medication = parseType("medication", json);
if (medication != null)
res.setMedication(medication);
}
protected MedicinalProductIndication parseMedicinalProductIndication(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductIndication res = new MedicinalProductIndication();
parseMedicinalProductIndicationProperties(json, res);
return res;
}
protected void parseMedicinalProductIndicationProperties(JsonObject json, MedicinalProductIndication res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("subject")) {
JsonArray array = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("diseaseSymptomProcedure"))
res.setDiseaseSymptomProcedure(parseCodeableConcept(getJObject(json, "diseaseSymptomProcedure")));
if (json.has("diseaseStatus"))
res.setDiseaseStatus(parseCodeableConcept(getJObject(json, "diseaseStatus")));
if (json.has("comorbidity")) {
JsonArray array = json.getAsJsonArray("comorbidity");
for (int i = 0; i < array.size(); i++) {
res.getComorbidity().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("intendedEffect"))
res.setIntendedEffect(parseCodeableConcept(getJObject(json, "intendedEffect")));
if (json.has("duration"))
res.setDuration(parseQuantity(getJObject(json, "duration")));
if (json.has("otherTherapy")) {
JsonArray array = json.getAsJsonArray("otherTherapy");
for (int i = 0; i < array.size(); i++) {
res.getOtherTherapy().add(parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("undesirableEffect")) {
JsonArray array = json.getAsJsonArray("undesirableEffect");
for (int i = 0; i < array.size(); i++) {
res.getUndesirableEffect().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("population")) {
JsonArray array = json.getAsJsonArray("population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parsePopulation(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent(
JsonObject json, MedicinalProductIndication owner) throws IOException, FHIRFormatError {
MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent res = new MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent();
parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentProperties(
JsonObject json, MedicinalProductIndication owner,
MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("therapyRelationshipType"))
res.setTherapyRelationshipType(parseCodeableConcept(getJObject(json, "therapyRelationshipType")));
Type medication = parseType("medication", json);
if (medication != null)
res.setMedication(medication);
}
protected MedicinalProductIngredient parseMedicinalProductIngredient(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductIngredient res = new MedicinalProductIngredient();
parseMedicinalProductIngredientProperties(json, res);
return res;
}
protected void parseMedicinalProductIngredientProperties(JsonObject json, MedicinalProductIngredient res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
if (json.has("allergenicIndicator"))
res.setAllergenicIndicatorElement(parseBoolean(json.get("allergenicIndicator").getAsBoolean()));
if (json.has("_allergenicIndicator"))
parseElementProperties(getJObject(json, "_allergenicIndicator"), res.getAllergenicIndicatorElement());
if (json.has("manufacturer")) {
JsonArray array = json.getAsJsonArray("manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specifiedSubstance")) {
JsonArray array = json.getAsJsonArray("specifiedSubstance");
for (int i = 0; i < array.size(); i++) {
res.getSpecifiedSubstance()
.add(parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("substance"))
res.setSubstance(parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent(
getJObject(json, "substance"), res));
}
protected MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent(
JsonObject json, MedicinalProductIngredient owner) throws IOException, FHIRFormatError {
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent();
parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentProperties(
JsonObject json, MedicinalProductIngredient owner,
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("group"))
res.setGroup(parseCodeableConcept(getJObject(json, "group")));
if (json.has("confidentiality"))
res.setConfidentiality(parseCodeableConcept(getJObject(json, "confidentiality")));
if (json.has("strength")) {
JsonArray array = json.getAsJsonArray("strength");
for (int i = 0; i < array.size(); i++) {
res.getStrength()
.add(parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(
JsonObject json, MedicinalProductIngredient owner) throws IOException, FHIRFormatError {
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent();
parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentProperties(json, owner,
res);
return res;
}
protected void parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentProperties(
JsonObject json, MedicinalProductIngredient owner,
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("presentation"))
res.setPresentation(parseRatio(getJObject(json, "presentation")));
if (json.has("presentationLowLimit"))
res.setPresentationLowLimit(parseRatio(getJObject(json, "presentationLowLimit")));
if (json.has("concentration"))
res.setConcentration(parseRatio(getJObject(json, "concentration")));
if (json.has("concentrationLowLimit"))
res.setConcentrationLowLimit(parseRatio(getJObject(json, "concentrationLowLimit")));
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 = json.getAsJsonArray("country");
for (int i = 0; i < array.size(); i++) {
res.getCountry().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("referenceStrength")) {
JsonArray array = json.getAsJsonArray("referenceStrength");
for (int i = 0; i < array.size(); i++) {
res.getReferenceStrength().add(
parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(
JsonObject json, MedicinalProductIngredient owner) throws IOException, FHIRFormatError {
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent();
parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentProperties(
json, owner, res);
return res;
}
protected void parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentProperties(
JsonObject json, MedicinalProductIngredient owner,
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("substance"))
res.setSubstance(parseCodeableConcept(getJObject(json, "substance")));
if (json.has("strength"))
res.setStrength(parseRatio(getJObject(json, "strength")));
if (json.has("strengthLowLimit"))
res.setStrengthLowLimit(parseRatio(getJObject(json, "strengthLowLimit")));
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 = json.getAsJsonArray("country");
for (int i = 0; i < array.size(); i++) {
res.getCountry().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent(
JsonObject json, MedicinalProductIngredient owner) throws IOException, FHIRFormatError {
MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent();
parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentProperties(JsonObject json,
MedicinalProductIngredient owner, MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("strength")) {
JsonArray array = json.getAsJsonArray("strength");
for (int i = 0; i < array.size(); i++) {
res.getStrength()
.add(parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProductInteraction parseMedicinalProductInteraction(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductInteraction res = new MedicinalProductInteraction();
parseMedicinalProductInteractionProperties(json, res);
return res;
}
protected void parseMedicinalProductInteractionProperties(JsonObject json, MedicinalProductInteraction res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("subject")) {
JsonArray array = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("interactant")) {
JsonArray array = json.getAsJsonArray("interactant");
for (int i = 0; i < array.size(); i++) {
res.getInteractant().add(parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("effect"))
res.setEffect(parseCodeableConcept(getJObject(json, "effect")));
if (json.has("incidence"))
res.setIncidence(parseCodeableConcept(getJObject(json, "incidence")));
if (json.has("management"))
res.setManagement(parseCodeableConcept(getJObject(json, "management")));
}
protected MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponent(
JsonObject json, MedicinalProductInteraction owner) throws IOException, FHIRFormatError {
MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent res = new MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent();
parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponentProperties(
JsonObject json, MedicinalProductInteraction owner,
MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type item = parseType("item", json);
if (item != null)
res.setItem(item);
}
protected MedicinalProductManufactured parseMedicinalProductManufactured(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductManufactured res = new MedicinalProductManufactured();
parseMedicinalProductManufacturedProperties(json, res);
return res;
}
protected void parseMedicinalProductManufacturedProperties(JsonObject json, MedicinalProductManufactured res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("manufacturedDoseForm"))
res.setManufacturedDoseForm(parseCodeableConcept(getJObject(json, "manufacturedDoseForm")));
if (json.has("unitOfPresentation"))
res.setUnitOfPresentation(parseCodeableConcept(getJObject(json, "unitOfPresentation")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("manufacturer")) {
JsonArray array = json.getAsJsonArray("manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("ingredient")) {
JsonArray array = json.getAsJsonArray("ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("physicalCharacteristics"))
res.setPhysicalCharacteristics(parseProdCharacteristic(getJObject(json, "physicalCharacteristics")));
if (json.has("otherCharacteristics")) {
JsonArray array = json.getAsJsonArray("otherCharacteristics");
for (int i = 0; i < array.size(); i++) {
res.getOtherCharacteristics().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicinalProductPackaged parseMedicinalProductPackaged(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductPackaged res = new MedicinalProductPackaged();
parseMedicinalProductPackagedProperties(json, res);
return res;
}
protected void parseMedicinalProductPackagedProperties(JsonObject json, MedicinalProductPackaged res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("subject")) {
JsonArray array = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("legalStatusOfSupply"))
res.setLegalStatusOfSupply(parseCodeableConcept(getJObject(json, "legalStatusOfSupply")));
if (json.has("marketingStatus")) {
JsonArray array = json.getAsJsonArray("marketingStatus");
for (int i = 0; i < array.size(); i++) {
res.getMarketingStatus().add(parseMarketingStatus(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("marketingAuthorization"))
res.setMarketingAuthorization(parseReference(getJObject(json, "marketingAuthorization")));
if (json.has("manufacturer")) {
JsonArray array = json.getAsJsonArray("manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("batchIdentifier")) {
JsonArray array = json.getAsJsonArray("batchIdentifier");
for (int i = 0; i < array.size(); i++) {
res.getBatchIdentifier().add(parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("packageItem")) {
JsonArray array = json.getAsJsonArray("packageItem");
for (int i = 0; i < array.size(); i++) {
res.getPackageItem().add(parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent(
JsonObject json, MedicinalProductPackaged owner) throws IOException, FHIRFormatError {
MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent res = new MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent();
parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentProperties(
JsonObject json, MedicinalProductPackaged owner,
MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("outerPackaging"))
res.setOuterPackaging(parseIdentifier(getJObject(json, "outerPackaging")));
if (json.has("immediatePackaging"))
res.setImmediatePackaging(parseIdentifier(getJObject(json, "immediatePackaging")));
}
protected MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(
JsonObject json, MedicinalProductPackaged owner) throws IOException, FHIRFormatError {
MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent res = new MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent();
parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentProperties(json, owner, res);
return res;
}
protected void parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentProperties(JsonObject json,
MedicinalProductPackaged owner, MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("material")) {
JsonArray array = json.getAsJsonArray("material");
for (int i = 0; i < array.size(); i++) {
res.getMaterial().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("alternateMaterial")) {
JsonArray array = json.getAsJsonArray("alternateMaterial");
for (int i = 0; i < array.size(); i++) {
res.getAlternateMaterial().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("device")) {
JsonArray array = json.getAsJsonArray("device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("manufacturedItem")) {
JsonArray array = json.getAsJsonArray("manufacturedItem");
for (int i = 0; i < array.size(); i++) {
res.getManufacturedItem().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("packageItem")) {
JsonArray array = json.getAsJsonArray("packageItem");
for (int i = 0; i < array.size(); i++) {
res.getPackageItem().add(parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("physicalCharacteristics"))
res.setPhysicalCharacteristics(parseProdCharacteristic(getJObject(json, "physicalCharacteristics")));
if (json.has("otherCharacteristics")) {
JsonArray array = json.getAsJsonArray("otherCharacteristics");
for (int i = 0; i < array.size(); i++) {
res.getOtherCharacteristics().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("shelfLifeStorage")) {
JsonArray array = json.getAsJsonArray("shelfLifeStorage");
for (int i = 0; i < array.size(); i++) {
res.getShelfLifeStorage().add(parseProductShelfLife(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("manufacturer")) {
JsonArray array = json.getAsJsonArray("manufacturer");
for (int i = 0; i < array.size(); i++) {
res.getManufacturer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected MedicinalProductPharmaceutical parseMedicinalProductPharmaceutical(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductPharmaceutical res = new MedicinalProductPharmaceutical();
parseMedicinalProductPharmaceuticalProperties(json, res);
return res;
}
protected void parseMedicinalProductPharmaceuticalProperties(JsonObject json, MedicinalProductPharmaceutical res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("administrableDoseForm"))
res.setAdministrableDoseForm(parseCodeableConcept(getJObject(json, "administrableDoseForm")));
if (json.has("unitOfPresentation"))
res.setUnitOfPresentation(parseCodeableConcept(getJObject(json, "unitOfPresentation")));
if (json.has("ingredient")) {
JsonArray array = json.getAsJsonArray("ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("device")) {
JsonArray array = json.getAsJsonArray("device");
for (int i = 0; i < array.size(); i++) {
res.getDevice().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("characteristics")) {
JsonArray array = json.getAsJsonArray("characteristics");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristics()
.add(parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("routeOfAdministration")) {
JsonArray array = json.getAsJsonArray("routeOfAdministration");
for (int i = 0; i < array.size(); i++) {
res.getRouteOfAdministration()
.add(parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent(
JsonObject json, MedicinalProductPharmaceutical owner) throws IOException, FHIRFormatError {
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent();
parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentProperties(json, owner,
res);
return res;
}
protected void parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentProperties(
JsonObject json, MedicinalProductPharmaceutical owner,
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent 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")));
}
protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent(
JsonObject json, MedicinalProductPharmaceutical owner) throws IOException, FHIRFormatError {
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent();
parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentProperties(json,
owner, res);
return res;
}
protected void parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentProperties(
JsonObject json, MedicinalProductPharmaceutical owner,
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent 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 = json.getAsJsonArray("targetSpecies");
for (int i = 0; i < array.size(); i++) {
res.getTargetSpecies().add(
parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(
JsonObject json, MedicinalProductPharmaceutical owner) throws IOException, FHIRFormatError {
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent();
parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentProperties(
json, owner, res);
return res;
}
protected void parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentProperties(
JsonObject json, MedicinalProductPharmaceutical owner,
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("withdrawalPeriod")) {
JsonArray array = json.getAsJsonArray("withdrawalPeriod");
for (int i = 0; i < array.size(); i++) {
res.getWithdrawalPeriod().add(
parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(
JsonObject json, MedicinalProductPharmaceutical owner) throws IOException, FHIRFormatError {
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent();
parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentProperties(
json, owner, res);
return res;
}
protected void parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentProperties(
JsonObject json, MedicinalProductPharmaceutical owner,
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent 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 MedicinalProductUndesirableEffect parseMedicinalProductUndesirableEffect(JsonObject json)
throws IOException, FHIRFormatError {
MedicinalProductUndesirableEffect res = new MedicinalProductUndesirableEffect();
parseMedicinalProductUndesirableEffectProperties(json, res);
return res;
}
protected void parseMedicinalProductUndesirableEffectProperties(JsonObject json,
MedicinalProductUndesirableEffect res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("subject")) {
JsonArray array = json.getAsJsonArray("subject");
for (int i = 0; i < array.size(); i++) {
res.getSubject().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("symptomConditionEffect"))
res.setSymptomConditionEffect(parseCodeableConcept(getJObject(json, "symptomConditionEffect")));
if (json.has("classification"))
res.setClassification(parseCodeableConcept(getJObject(json, "classification")));
if (json.has("frequencyOfOccurrence"))
res.setFrequencyOfOccurrence(parseCodeableConcept(getJObject(json, "frequencyOfOccurrence")));
if (json.has("population")) {
JsonArray array = json.getAsJsonArray("population");
for (int i = 0; i < array.size(); i++) {
res.getPopulation().add(parsePopulation(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("replaces")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("base"))
res.setBaseElement(parseCanonical(json.get("base").getAsString()));
if (json.has("_base"))
parseElementProperties(getJObject(json, "_base"), res.getBaseElement());
if (json.has("parent")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getParent().get(i));
}
}
;
Type 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 = json.getAsJsonArray("focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseMessageDefinitionMessageDefinitionFocusComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("allowedResponse");
for (int i = 0; i < array.size(); i++) {
res.getAllowedResponse()
.add(parseMessageDefinitionMessageDefinitionAllowedResponseComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("graph")) {
JsonArray array = json.getAsJsonArray("graph");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getGraph().add(new CanonicalType());
} else {
res.getGraph().add(parseCanonical(array.get(i).getAsString()));
}
}
}
;
if (json.has("_graph")) {
JsonArray array = json.getAsJsonArray("_graph");
for (int i = 0; i < array.size(); i++) {
if (i == res.getGraph().size())
res.getGraph().add(parseCanonical(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getGraph().get(i));
}
}
;
}
protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionMessageDefinitionFocusComponent(
JsonObject json, MessageDefinition owner) throws IOException, FHIRFormatError {
MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent();
parseMessageDefinitionMessageDefinitionFocusComponentProperties(json, owner, res);
return res;
}
protected void parseMessageDefinitionMessageDefinitionFocusComponentProperties(JsonObject json,
MessageDefinition owner, 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 parseMessageDefinitionMessageDefinitionAllowedResponseComponent(
JsonObject json, MessageDefinition owner) throws IOException, FHIRFormatError {
MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent();
parseMessageDefinitionMessageDefinitionAllowedResponseComponentProperties(json, owner, res);
return res;
}
protected void parseMessageDefinitionMessageDefinitionAllowedResponseComponentProperties(JsonObject json,
MessageDefinition owner, 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);
Type event = parseType("event", json);
if (event != null)
res.setEvent(event);
if (json.has("destination")) {
JsonArray array = json.getAsJsonArray("destination");
for (int i = 0; i < array.size(); i++) {
res.getDestination().add(parseMessageHeaderMessageDestinationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("sender"))
res.setSender(parseReference(getJObject(json, "sender")));
if (json.has("enterer"))
res.setEnterer(parseReference(getJObject(json, "enterer")));
if (json.has("author"))
res.setAuthor(parseReference(getJObject(json, "author")));
if (json.has("source"))
res.setSource(parseMessageHeaderMessageSourceComponent(getJObject(json, "source"), res));
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(parseMessageHeaderMessageHeaderResponseComponent(getJObject(json, "response"), res));
if (json.has("focus")) {
JsonArray array = json.getAsJsonArray("focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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,
MessageHeader owner) throws IOException, FHIRFormatError {
MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent();
parseMessageHeaderMessageDestinationComponentProperties(json, owner, res);
return res;
}
protected void parseMessageHeaderMessageDestinationComponentProperties(JsonObject json, MessageHeader owner,
MessageHeader.MessageDestinationComponent 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("target"))
res.setTarget(parseReference(getJObject(json, "target")));
if (json.has("endpoint"))
res.setEndpointElement(parseUrl(json.get("endpoint").getAsString()));
if (json.has("_endpoint"))
parseElementProperties(getJObject(json, "_endpoint"), res.getEndpointElement());
if (json.has("receiver"))
res.setReceiver(parseReference(getJObject(json, "receiver")));
}
protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(JsonObject json,
MessageHeader owner) throws IOException, FHIRFormatError {
MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent();
parseMessageHeaderMessageSourceComponentProperties(json, owner, res);
return res;
}
protected void parseMessageHeaderMessageSourceComponentProperties(JsonObject json, MessageHeader owner,
MessageHeader.MessageSourceComponent 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("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")));
if (json.has("endpoint"))
res.setEndpointElement(parseUrl(json.get("endpoint").getAsString()));
if (json.has("_endpoint"))
parseElementProperties(getJObject(json, "_endpoint"), res.getEndpointElement());
}
protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderMessageHeaderResponseComponent(
JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError {
MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent();
parseMessageHeaderMessageHeaderResponseComponentProperties(json, owner, res);
return res;
}
protected void parseMessageHeaderMessageHeaderResponseComponentProperties(JsonObject json, MessageHeader owner,
MessageHeader.MessageHeaderResponseComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifierElement(parseId(json.get("identifier").getAsString()));
if (json.has("_identifier"))
parseElementProperties(getJObject(json, "_identifier"), res.getIdentifierElement());
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("coordinateSystem"))
res.setCoordinateSystemElement(parseInteger(json.get("coordinateSystem").getAsLong()));
if (json.has("_coordinateSystem"))
parseElementProperties(getJObject(json, "_coordinateSystem"), res.getCoordinateSystemElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
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("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("referenceSeq"))
res.setReferenceSeq(
parseMolecularSequenceMolecularSequenceReferenceSeqComponent(getJObject(json, "referenceSeq"), res));
if (json.has("variant")) {
JsonArray array = json.getAsJsonArray("variant");
for (int i = 0; i < array.size(); i++) {
res.getVariant()
.add(parseMolecularSequenceMolecularSequenceVariantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("observedSeq"))
res.setObservedSeqElement(parseString(json.get("observedSeq").getAsString()));
if (json.has("_observedSeq"))
parseElementProperties(getJObject(json, "_observedSeq"), res.getObservedSeqElement());
if (json.has("quality")) {
JsonArray array = json.getAsJsonArray("quality");
for (int i = 0; i < array.size(); i++) {
res.getQuality()
.add(parseMolecularSequenceMolecularSequenceQualityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("readCoverage"))
res.setReadCoverageElement(parseInteger(json.get("readCoverage").getAsLong()));
if (json.has("_readCoverage"))
parseElementProperties(getJObject(json, "_readCoverage"), res.getReadCoverageElement());
if (json.has("repository")) {
JsonArray array = json.getAsJsonArray("repository");
for (int i = 0; i < array.size(); i++) {
res.getRepository()
.add(parseMolecularSequenceMolecularSequenceRepositoryComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("pointer")) {
JsonArray array = json.getAsJsonArray("pointer");
for (int i = 0; i < array.size(); i++) {
res.getPointer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("structureVariant")) {
JsonArray array = json.getAsJsonArray("structureVariant");
for (int i = 0; i < array.size(); i++) {
res.getStructureVariant()
.add(parseMolecularSequenceMolecularSequenceStructureVariantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected MolecularSequence.MolecularSequenceReferenceSeqComponent parseMolecularSequenceMolecularSequenceReferenceSeqComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceReferenceSeqComponent res = new MolecularSequence.MolecularSequenceReferenceSeqComponent();
parseMolecularSequenceMolecularSequenceReferenceSeqComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceReferenceSeqComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceReferenceSeqComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("chromosome"))
res.setChromosome(parseCodeableConcept(getJObject(json, "chromosome")));
if (json.has("genomeBuild"))
res.setGenomeBuildElement(parseString(json.get("genomeBuild").getAsString()));
if (json.has("_genomeBuild"))
parseElementProperties(getJObject(json, "_genomeBuild"), res.getGenomeBuildElement());
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("referenceSeqId"))
res.setReferenceSeqId(parseCodeableConcept(getJObject(json, "referenceSeqId")));
if (json.has("referenceSeqPointer"))
res.setReferenceSeqPointer(parseReference(getJObject(json, "referenceSeqPointer")));
if (json.has("referenceSeqString"))
res.setReferenceSeqStringElement(parseString(json.get("referenceSeqString").getAsString()));
if (json.has("_referenceSeqString"))
parseElementProperties(getJObject(json, "_referenceSeqString"), res.getReferenceSeqStringElement());
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());
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());
}
protected MolecularSequence.MolecularSequenceVariantComponent parseMolecularSequenceMolecularSequenceVariantComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceVariantComponent res = new MolecularSequence.MolecularSequenceVariantComponent();
parseMolecularSequenceMolecularSequenceVariantComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceVariantComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceVariantComponent 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("observedAllele"))
res.setObservedAlleleElement(parseString(json.get("observedAllele").getAsString()));
if (json.has("_observedAllele"))
parseElementProperties(getJObject(json, "_observedAllele"), res.getObservedAlleleElement());
if (json.has("referenceAllele"))
res.setReferenceAlleleElement(parseString(json.get("referenceAllele").getAsString()));
if (json.has("_referenceAllele"))
parseElementProperties(getJObject(json, "_referenceAllele"), res.getReferenceAlleleElement());
if (json.has("cigar"))
res.setCigarElement(parseString(json.get("cigar").getAsString()));
if (json.has("_cigar"))
parseElementProperties(getJObject(json, "_cigar"), res.getCigarElement());
if (json.has("variantPointer"))
res.setVariantPointer(parseReference(getJObject(json, "variantPointer")));
}
protected MolecularSequence.MolecularSequenceQualityComponent parseMolecularSequenceMolecularSequenceQualityComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceQualityComponent res = new MolecularSequence.MolecularSequenceQualityComponent();
parseMolecularSequenceMolecularSequenceQualityComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceQualityComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceQualityComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MolecularSequence.QualityType.NULL,
new MolecularSequence.QualityTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("standardSequence"))
res.setStandardSequence(parseCodeableConcept(getJObject(json, "standardSequence")));
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("score"))
res.setScore(parseQuantity(getJObject(json, "score")));
if (json.has("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("truthTP"))
res.setTruthTPElement(parseDecimal(json.get("truthTP").getAsBigDecimal()));
if (json.has("_truthTP"))
parseElementProperties(getJObject(json, "_truthTP"), res.getTruthTPElement());
if (json.has("queryTP"))
res.setQueryTPElement(parseDecimal(json.get("queryTP").getAsBigDecimal()));
if (json.has("_queryTP"))
parseElementProperties(getJObject(json, "_queryTP"), res.getQueryTPElement());
if (json.has("truthFN"))
res.setTruthFNElement(parseDecimal(json.get("truthFN").getAsBigDecimal()));
if (json.has("_truthFN"))
parseElementProperties(getJObject(json, "_truthFN"), res.getTruthFNElement());
if (json.has("queryFP"))
res.setQueryFPElement(parseDecimal(json.get("queryFP").getAsBigDecimal()));
if (json.has("_queryFP"))
parseElementProperties(getJObject(json, "_queryFP"), res.getQueryFPElement());
if (json.has("gtFP"))
res.setGtFPElement(parseDecimal(json.get("gtFP").getAsBigDecimal()));
if (json.has("_gtFP"))
parseElementProperties(getJObject(json, "_gtFP"), res.getGtFPElement());
if (json.has("precision"))
res.setPrecisionElement(parseDecimal(json.get("precision").getAsBigDecimal()));
if (json.has("_precision"))
parseElementProperties(getJObject(json, "_precision"), res.getPrecisionElement());
if (json.has("recall"))
res.setRecallElement(parseDecimal(json.get("recall").getAsBigDecimal()));
if (json.has("_recall"))
parseElementProperties(getJObject(json, "_recall"), res.getRecallElement());
if (json.has("fScore"))
res.setFScoreElement(parseDecimal(json.get("fScore").getAsBigDecimal()));
if (json.has("_fScore"))
parseElementProperties(getJObject(json, "_fScore"), res.getFScoreElement());
if (json.has("roc"))
res.setRoc(parseMolecularSequenceMolecularSequenceQualityRocComponent(getJObject(json, "roc"), owner));
}
protected MolecularSequence.MolecularSequenceQualityRocComponent parseMolecularSequenceMolecularSequenceQualityRocComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceQualityRocComponent res = new MolecularSequence.MolecularSequenceQualityRocComponent();
parseMolecularSequenceMolecularSequenceQualityRocComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceQualityRocComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceQualityRocComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("score")) {
JsonArray array = json.getAsJsonArray("score");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getScore().add(new IntegerType());
} else {
res.getScore().add(parseInteger(array.get(i).getAsLong()));
}
}
}
;
if (json.has("_score")) {
JsonArray array = json.getAsJsonArray("_score");
for (int i = 0; i < array.size(); i++) {
if (i == res.getScore().size())
res.getScore().add(parseInteger(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getScore().get(i));
}
}
;
if (json.has("numTP")) {
JsonArray array = json.getAsJsonArray("numTP");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNumTP().add(new IntegerType());
} else {
res.getNumTP().add(parseInteger(array.get(i).getAsLong()));
}
}
}
;
if (json.has("_numTP")) {
JsonArray array = json.getAsJsonArray("_numTP");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNumTP().size())
res.getNumTP().add(parseInteger(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getNumTP().get(i));
}
}
;
if (json.has("numFP")) {
JsonArray array = json.getAsJsonArray("numFP");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNumFP().add(new IntegerType());
} else {
res.getNumFP().add(parseInteger(array.get(i).getAsLong()));
}
}
}
;
if (json.has("_numFP")) {
JsonArray array = json.getAsJsonArray("_numFP");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNumFP().size())
res.getNumFP().add(parseInteger(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getNumFP().get(i));
}
}
;
if (json.has("numFN")) {
JsonArray array = json.getAsJsonArray("numFN");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getNumFN().add(new IntegerType());
} else {
res.getNumFN().add(parseInteger(array.get(i).getAsLong()));
}
}
}
;
if (json.has("_numFN")) {
JsonArray array = json.getAsJsonArray("_numFN");
for (int i = 0; i < array.size(); i++) {
if (i == res.getNumFN().size())
res.getNumFN().add(parseInteger(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getNumFN().get(i));
}
}
;
if (json.has("precision")) {
JsonArray array = json.getAsJsonArray("precision");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPrecision().add(new DecimalType());
} else {
res.getPrecision().add(parseDecimal(array.get(i).getAsBigDecimal()));
}
}
}
;
if (json.has("_precision")) {
JsonArray array = json.getAsJsonArray("_precision");
for (int i = 0; i < array.size(); i++) {
if (i == res.getPrecision().size())
res.getPrecision().add(parseDecimal(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getPrecision().get(i));
}
}
;
if (json.has("sensitivity")) {
JsonArray array = json.getAsJsonArray("sensitivity");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getSensitivity().add(new DecimalType());
} else {
res.getSensitivity().add(parseDecimal(array.get(i).getAsBigDecimal()));
}
}
}
;
if (json.has("_sensitivity")) {
JsonArray array = json.getAsJsonArray("_sensitivity");
for (int i = 0; i < array.size(); i++) {
if (i == res.getSensitivity().size())
res.getSensitivity().add(parseDecimal(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getSensitivity().get(i));
}
}
;
if (json.has("fMeasure")) {
JsonArray array = json.getAsJsonArray("fMeasure");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getFMeasure().add(new DecimalType());
} else {
res.getFMeasure().add(parseDecimal(array.get(i).getAsBigDecimal()));
}
}
}
;
if (json.has("_fMeasure")) {
JsonArray array = json.getAsJsonArray("_fMeasure");
for (int i = 0; i < array.size(); i++) {
if (i == res.getFMeasure().size())
res.getFMeasure().add(parseDecimal(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getFMeasure().get(i));
}
}
;
}
protected MolecularSequence.MolecularSequenceRepositoryComponent parseMolecularSequenceMolecularSequenceRepositoryComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceRepositoryComponent res = new MolecularSequence.MolecularSequenceRepositoryComponent();
parseMolecularSequenceMolecularSequenceRepositoryComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceRepositoryComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceRepositoryComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MolecularSequence.RepositoryType.NULL,
new MolecularSequence.RepositoryTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("url"))
res.setUrlElement(parseUri(json.get("url").getAsString()));
if (json.has("_url"))
parseElementProperties(getJObject(json, "_url"), res.getUrlElement());
if (json.has("name"))
res.setNameElement(parseString(json.get("name").getAsString()));
if (json.has("_name"))
parseElementProperties(getJObject(json, "_name"), res.getNameElement());
if (json.has("datasetId"))
res.setDatasetIdElement(parseString(json.get("datasetId").getAsString()));
if (json.has("_datasetId"))
parseElementProperties(getJObject(json, "_datasetId"), res.getDatasetIdElement());
if (json.has("variantsetId"))
res.setVariantsetIdElement(parseString(json.get("variantsetId").getAsString()));
if (json.has("_variantsetId"))
parseElementProperties(getJObject(json, "_variantsetId"), res.getVariantsetIdElement());
if (json.has("readsetId"))
res.setReadsetIdElement(parseString(json.get("readsetId").getAsString()));
if (json.has("_readsetId"))
parseElementProperties(getJObject(json, "_readsetId"), res.getReadsetIdElement());
}
protected MolecularSequence.MolecularSequenceStructureVariantComponent parseMolecularSequenceMolecularSequenceStructureVariantComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceStructureVariantComponent res = new MolecularSequence.MolecularSequenceStructureVariantComponent();
parseMolecularSequenceMolecularSequenceStructureVariantComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceStructureVariantComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceStructureVariantComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("variantType"))
res.setVariantType(parseCodeableConcept(getJObject(json, "variantType")));
if (json.has("exact"))
res.setExactElement(parseBoolean(json.get("exact").getAsBoolean()));
if (json.has("_exact"))
parseElementProperties(getJObject(json, "_exact"), res.getExactElement());
if (json.has("length"))
res.setLengthElement(parseInteger(json.get("length").getAsLong()));
if (json.has("_length"))
parseElementProperties(getJObject(json, "_length"), res.getLengthElement());
if (json.has("outer"))
res.setOuter(
parseMolecularSequenceMolecularSequenceStructureVariantOuterComponent(getJObject(json, "outer"), owner));
if (json.has("inner"))
res.setInner(
parseMolecularSequenceMolecularSequenceStructureVariantInnerComponent(getJObject(json, "inner"), owner));
}
protected MolecularSequence.MolecularSequenceStructureVariantOuterComponent parseMolecularSequenceMolecularSequenceStructureVariantOuterComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceStructureVariantOuterComponent res = new MolecularSequence.MolecularSequenceStructureVariantOuterComponent();
parseMolecularSequenceMolecularSequenceStructureVariantOuterComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceStructureVariantOuterComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceStructureVariantOuterComponent 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());
}
protected MolecularSequence.MolecularSequenceStructureVariantInnerComponent parseMolecularSequenceMolecularSequenceStructureVariantInnerComponent(
JsonObject json, MolecularSequence owner) throws IOException, FHIRFormatError {
MolecularSequence.MolecularSequenceStructureVariantInnerComponent res = new MolecularSequence.MolecularSequenceStructureVariantInnerComponent();
parseMolecularSequenceMolecularSequenceStructureVariantInnerComponentProperties(json, owner, res);
return res;
}
protected void parseMolecularSequenceMolecularSequenceStructureVariantInnerComponentProperties(JsonObject json,
MolecularSequence owner, MolecularSequence.MolecularSequenceStructureVariantInnerComponent 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());
}
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 {
parseDomainResourceProperties(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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("uniqueId");
for (int i = 0; i < array.size(); i++) {
res.getUniqueId().add(parseNamingSystemNamingSystemUniqueIdComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemNamingSystemUniqueIdComponent(JsonObject json,
NamingSystem owner) throws IOException, FHIRFormatError {
NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent();
parseNamingSystemNamingSystemUniqueIdComponentProperties(json, owner, res);
return res;
}
protected void parseNamingSystemNamingSystemUniqueIdComponentProperties(JsonObject json, NamingSystem owner,
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")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("instantiates")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiates().get(i));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), NutritionOrder.NutritionOrderStatus.NULL,
new NutritionOrder.NutritionOrderStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), NutritionOrder.NutritiionOrderIntent.NULL,
new NutritionOrder.NutritiionOrderIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("patient"))
res.setPatient(parseReference(getJObject(json, "patient")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
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("allergyIntolerance")) {
JsonArray array = json.getAsJsonArray("allergyIntolerance");
for (int i = 0; i < array.size(); i++) {
res.getAllergyIntolerance().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("foodPreferenceModifier")) {
JsonArray array = json.getAsJsonArray("foodPreferenceModifier");
for (int i = 0; i < array.size(); i++) {
res.getFoodPreferenceModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("excludeFoodModifier")) {
JsonArray array = json.getAsJsonArray("excludeFoodModifier");
for (int i = 0; i < array.size(); i++) {
res.getExcludeFoodModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("oralDiet"))
res.setOralDiet(parseNutritionOrderNutritionOrderOralDietComponent(getJObject(json, "oralDiet"), res));
if (json.has("supplement")) {
JsonArray array = json.getAsJsonArray("supplement");
for (int i = 0; i < array.size(); i++) {
res.getSupplement()
.add(parseNutritionOrderNutritionOrderSupplementComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("enteralFormula"))
res.setEnteralFormula(
parseNutritionOrderNutritionOrderEnteralFormulaComponent(getJObject(json, "enteralFormula"), res));
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderNutritionOrderOralDietComponent(
JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent();
parseNutritionOrderNutritionOrderOralDietComponentProperties(json, owner, res);
return res;
}
protected void parseNutritionOrderNutritionOrderOralDietComponentProperties(JsonObject json, NutritionOrder owner,
NutritionOrder.NutritionOrderOralDietComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type")) {
JsonArray array = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("schedule")) {
JsonArray array = json.getAsJsonArray("schedule");
for (int i = 0; i < array.size(); i++) {
res.getSchedule().add(parseTiming(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("nutrient")) {
JsonArray array = json.getAsJsonArray("nutrient");
for (int i = 0; i < array.size(); i++) {
res.getNutrient()
.add(parseNutritionOrderNutritionOrderOralDietNutrientComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("texture")) {
JsonArray array = json.getAsJsonArray("texture");
for (int i = 0; i < array.size(); i++) {
res.getTexture()
.add(parseNutritionOrderNutritionOrderOralDietTextureComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("fluidConsistencyType")) {
JsonArray array = json.getAsJsonArray("fluidConsistencyType");
for (int i = 0; i < array.size(); i++) {
res.getFluidConsistencyType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instruction"))
res.setInstructionElement(parseString(json.get("instruction").getAsString()));
if (json.has("_instruction"))
parseElementProperties(getJObject(json, "_instruction"), res.getInstructionElement());
}
protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderNutritionOrderOralDietNutrientComponent(
JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent();
parseNutritionOrderNutritionOrderOralDietNutrientComponentProperties(json, owner, res);
return res;
}
protected void parseNutritionOrderNutritionOrderOralDietNutrientComponentProperties(JsonObject json,
NutritionOrder owner, 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 parseNutritionOrderNutritionOrderOralDietTextureComponent(
JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent();
parseNutritionOrderNutritionOrderOralDietTextureComponentProperties(json, owner, res);
return res;
}
protected void parseNutritionOrderNutritionOrderOralDietTextureComponentProperties(JsonObject json,
NutritionOrder owner, 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 parseNutritionOrderNutritionOrderSupplementComponent(
JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent();
parseNutritionOrderNutritionOrderSupplementComponentProperties(json, owner, res);
return res;
}
protected void parseNutritionOrderNutritionOrderSupplementComponentProperties(JsonObject json, NutritionOrder owner,
NutritionOrder.NutritionOrderSupplementComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(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")) {
JsonArray array = json.getAsJsonArray("schedule");
for (int i = 0; i < array.size(); i++) {
res.getSchedule().add(parseTiming(array.get(i).getAsJsonObject()));
}
}
;
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.NutritionOrderEnteralFormulaComponent parseNutritionOrderNutritionOrderEnteralFormulaComponent(
JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent();
parseNutritionOrderNutritionOrderEnteralFormulaComponentProperties(json, owner, res);
return res;
}
protected void parseNutritionOrderNutritionOrderEnteralFormulaComponentProperties(JsonObject json,
NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("baseFormulaType"))
res.setBaseFormulaType(parseCodeableConcept(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("additiveType"))
res.setAdditiveType(parseCodeableConcept(getJObject(json, "additiveType")));
if (json.has("additiveProductName"))
res.setAdditiveProductNameElement(parseString(json.get("additiveProductName").getAsString()));
if (json.has("_additiveProductName"))
parseElementProperties(getJObject(json, "_additiveProductName"), res.getAdditiveProductNameElement());
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 = json.getAsJsonArray("administration");
for (int i = 0; i < array.size(); i++) {
res.getAdministration().add(parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("maxVolumeToDeliver"))
res.setMaxVolumeToDeliver(parseQuantity(getJObject(json, "maxVolumeToDeliver")));
if (json.has("administrationInstruction"))
res.setAdministrationInstructionElement(parseString(json.get("administrationInstruction").getAsString()));
if (json.has("_administrationInstruction"))
parseElementProperties(getJObject(json, "_administrationInstruction"), res.getAdministrationInstructionElement());
}
protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(
JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError {
NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent();
parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentProperties(json, owner, res);
return res;
}
protected void parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentProperties(JsonObject json,
NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("schedule"))
res.setSchedule(parseTiming(getJObject(json, "schedule")));
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
Type rate = parseType("rate", json);
if (rate != null)
res.setRate(rate);
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Observation.ObservationStatus.NULL,
new Observation.ObservationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type 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 = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type 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 = json.getAsJsonArray("interpretation");
for (int i = 0; i < array.size(); i++) {
res.getInterpretation().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
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 = json.getAsJsonArray("referenceRange");
for (int i = 0; i < array.size(); i++) {
res.getReferenceRange()
.add(parseObservationObservationReferenceRangeComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("hasMember")) {
JsonArray array = json.getAsJsonArray("hasMember");
for (int i = 0; i < array.size(); i++) {
res.getHasMember().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("derivedFrom")) {
JsonArray array = json.getAsJsonArray("derivedFrom");
for (int i = 0; i < array.size(); i++) {
res.getDerivedFrom().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("component")) {
JsonArray array = json.getAsJsonArray("component");
for (int i = 0; i < array.size(); i++) {
res.getComponent().add(parseObservationObservationComponentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Observation.ObservationReferenceRangeComponent parseObservationObservationReferenceRangeComponent(
JsonObject json, Observation owner) throws IOException, FHIRFormatError {
Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent();
parseObservationObservationReferenceRangeComponentProperties(json, owner, res);
return res;
}
protected void parseObservationObservationReferenceRangeComponentProperties(JsonObject json, Observation owner,
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("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("appliesTo")) {
JsonArray array = json.getAsJsonArray("appliesTo");
for (int i = 0; i < array.size(); i++) {
res.getAppliesTo().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("age"))
res.setAge(parseRange(getJObject(json, "age")));
if (json.has("text"))
res.setTextElement(parseString(json.get("text").getAsString()));
if (json.has("_text"))
parseElementProperties(getJObject(json, "_text"), res.getTextElement());
}
protected Observation.ObservationComponentComponent parseObservationObservationComponentComponent(JsonObject json,
Observation owner) throws IOException, FHIRFormatError {
Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent();
parseObservationObservationComponentComponentProperties(json, owner, res);
return res;
}
protected void parseObservationObservationComponentComponentProperties(JsonObject json, Observation owner,
Observation.ObservationComponentComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
Type 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 = json.getAsJsonArray("interpretation");
for (int i = 0; i < array.size(); i++) {
res.getInterpretation().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("referenceRange")) {
JsonArray array = json.getAsJsonArray("referenceRange");
for (int i = 0; i < array.size(); i++) {
res.getReferenceRange()
.add(parseObservationObservationReferenceRangeComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
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("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("permittedDataType")) {
JsonArray array = json.getAsJsonArray("permittedDataType");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getPermittedDataType().add(new Enumeration());
} else {
res.getPermittedDataType()
.add(parseEnumeration(array.get(i).getAsString(), ObservationDefinition.ObservationDataType.NULL,
new ObservationDefinition.ObservationDataTypeEnumFactory()));
}
}
}
;
if (json.has("_permittedDataType")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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("method"))
res.setMethod(parseCodeableConcept(getJObject(json, "method")));
if (json.has("preferredReportName"))
res.setPreferredReportNameElement(parseString(json.get("preferredReportName").getAsString()));
if (json.has("_preferredReportName"))
parseElementProperties(getJObject(json, "_preferredReportName"), res.getPreferredReportNameElement());
if (json.has("quantitativeDetails"))
res.setQuantitativeDetails(parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponent(
getJObject(json, "quantitativeDetails"), res));
if (json.has("qualifiedInterval")) {
JsonArray array = json.getAsJsonArray("qualifiedInterval");
for (int i = 0; i < array.size(); i++) {
res.getQualifiedInterval().add(parseObservationDefinitionObservationDefinitionQualifiedIntervalComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("validCodedValueSet"))
res.setValidCodedValueSet(parseReference(getJObject(json, "validCodedValueSet")));
if (json.has("normalCodedValueSet"))
res.setNormalCodedValueSet(parseReference(getJObject(json, "normalCodedValueSet")));
if (json.has("abnormalCodedValueSet"))
res.setAbnormalCodedValueSet(parseReference(getJObject(json, "abnormalCodedValueSet")));
if (json.has("criticalCodedValueSet"))
res.setCriticalCodedValueSet(parseReference(getJObject(json, "criticalCodedValueSet")));
}
protected ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponent(
JsonObject json, ObservationDefinition owner) throws IOException, FHIRFormatError {
ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent res = new ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent();
parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponentProperties(json, owner, res);
return res;
}
protected void parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponentProperties(JsonObject json,
ObservationDefinition owner, ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("customaryUnit"))
res.setCustomaryUnit(parseCodeableConcept(getJObject(json, "customaryUnit")));
if (json.has("unit"))
res.setUnit(parseCodeableConcept(getJObject(json, "unit")));
if (json.has("conversionFactor"))
res.setConversionFactorElement(parseDecimal(json.get("conversionFactor").getAsBigDecimal()));
if (json.has("_conversionFactor"))
parseElementProperties(getJObject(json, "_conversionFactor"), res.getConversionFactorElement());
if (json.has("decimalPrecision"))
res.setDecimalPrecisionElement(parseInteger(json.get("decimalPrecision").getAsLong()));
if (json.has("_decimalPrecision"))
parseElementProperties(getJObject(json, "_decimalPrecision"), res.getDecimalPrecisionElement());
}
protected ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent parseObservationDefinitionObservationDefinitionQualifiedIntervalComponent(
JsonObject json, ObservationDefinition owner) throws IOException, FHIRFormatError {
ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent res = new ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent();
parseObservationDefinitionObservationDefinitionQualifiedIntervalComponentProperties(json, owner, res);
return res;
}
protected void parseObservationDefinitionObservationDefinitionQualifiedIntervalComponentProperties(JsonObject json,
ObservationDefinition owner, ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("category"))
res.setCategoryElement(
parseEnumeration(json.get("category").getAsString(), ObservationDefinition.ObservationRangeCategory.NULL,
new ObservationDefinition.ObservationRangeCategoryEnumFactory()));
if (json.has("_category"))
parseElementProperties(getJObject(json, "_category"), res.getCategoryElement());
if (json.has("range"))
res.setRange(parseRange(getJObject(json, "range")));
if (json.has("context"))
res.setContext(parseCodeableConcept(getJObject(json, "context")));
if (json.has("appliesTo")) {
JsonArray array = json.getAsJsonArray("appliesTo");
for (int i = 0; i < array.size(); i++) {
res.getAppliesTo().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
}
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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("purpose"))
res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString()));
if (json.has("_purpose"))
parseElementProperties(getJObject(json, "_purpose"), res.getPurposeElement());
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 = json.getAsJsonArray("resource");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getResource().add(new CodeType());
} else {
res.getResource().add(parseCode(array.get(i).getAsString()));
}
}
}
;
if (json.has("_resource")) {
JsonArray array = json.getAsJsonArray("_resource");
for (int i = 0; i < array.size(); i++) {
if (i == res.getResource().size())
res.getResource().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter()
.add(parseOperationDefinitionOperationDefinitionParameterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("overload")) {
JsonArray array = json.getAsJsonArray("overload");
for (int i = 0; i < array.size(); i++) {
res.getOverload()
.add(parseOperationDefinitionOperationDefinitionOverloadComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionOperationDefinitionParameterComponent(
JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent();
parseOperationDefinitionOperationDefinitionParameterComponentProperties(json, owner, res);
return res;
}
protected void parseOperationDefinitionOperationDefinitionParameterComponentProperties(JsonObject json,
OperationDefinition owner, 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(), OperationDefinition.OperationParameterUse.NULL,
new OperationDefinition.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(parseCode(json.get("type").getAsString()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("targetProfile")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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(
parseOperationDefinitionOperationDefinitionParameterBindingComponent(getJObject(json, "binding"), owner));
if (json.has("referencedFrom")) {
JsonArray array = json.getAsJsonArray("referencedFrom");
for (int i = 0; i < array.size(); i++) {
res.getReferencedFrom().add(parseOperationDefinitionOperationDefinitionParameterReferencedFromComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("part")) {
JsonArray array = json.getAsJsonArray("part");
for (int i = 0; i < array.size(); i++) {
res.getPart()
.add(parseOperationDefinitionOperationDefinitionParameterComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionOperationDefinitionParameterBindingComponent(
JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent();
parseOperationDefinitionOperationDefinitionParameterBindingComponentProperties(json, owner, res);
return res;
}
protected void parseOperationDefinitionOperationDefinitionParameterBindingComponentProperties(JsonObject json,
OperationDefinition owner, 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 parseOperationDefinitionOperationDefinitionParameterReferencedFromComponent(
JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionParameterReferencedFromComponent res = new OperationDefinition.OperationDefinitionParameterReferencedFromComponent();
parseOperationDefinitionOperationDefinitionParameterReferencedFromComponentProperties(json, owner, res);
return res;
}
protected void parseOperationDefinitionOperationDefinitionParameterReferencedFromComponentProperties(JsonObject json,
OperationDefinition owner, 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 parseOperationDefinitionOperationDefinitionOverloadComponent(
JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError {
OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent();
parseOperationDefinitionOperationDefinitionOverloadComponentProperties(json, owner, res);
return res;
}
protected void parseOperationDefinitionOperationDefinitionOverloadComponentProperties(JsonObject json,
OperationDefinition owner, OperationDefinition.OperationDefinitionOverloadComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("parameterName")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("issue");
for (int i = 0; i < array.size(); i++) {
res.getIssue().add(parseOperationOutcomeOperationOutcomeIssueComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeOperationOutcomeIssueComponent(
JsonObject json, OperationOutcome owner) throws IOException, FHIRFormatError {
OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent();
parseOperationOutcomeOperationOutcomeIssueComponentProperties(json, owner, res);
return res;
}
protected void parseOperationOutcomeOperationOutcomeIssueComponentProperties(JsonObject json, OperationOutcome owner,
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLocation().get(i));
}
}
;
if (json.has("expression")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getAlias().get(i));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("address")) {
JsonArray array = json.getAsJsonArray("address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf"))
res.setPartOf(parseReference(getJObject(json, "partOf")));
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseOrganizationOrganizationContactComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Organization.OrganizationContactComponent parseOrganizationOrganizationContactComponent(JsonObject json,
Organization owner) throws IOException, FHIRFormatError {
Organization.OrganizationContactComponent res = new Organization.OrganizationContactComponent();
parseOrganizationOrganizationContactComponentProperties(json, owner, res);
return res;
}
protected void parseOrganizationOrganizationContactComponentProperties(JsonObject json, Organization owner,
Organization.OrganizationContactComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("purpose"))
res.setPurpose(parseCodeableConcept(getJObject(json, "purpose")));
if (json.has("name"))
res.setName(parseHumanName(getJObject(json, "name")));
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("address"))
res.setAddress(parseAddress(getJObject(json, "address")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("network");
for (int i = 0; i < array.size(); i++) {
res.getNetwork().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialty")) {
JsonArray array = json.getAsJsonArray("specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("location")) {
JsonArray array = json.getAsJsonArray("location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("healthcareService")) {
JsonArray array = json.getAsJsonArray("healthcareService");
for (int i = 0; i < array.size(); i++) {
res.getHealthcareService().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
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());
Type deceased = parseType("deceased", json);
if (deceased != null)
res.setDeceased(deceased);
if (json.has("address")) {
JsonArray array = json.getAsJsonArray("address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("maritalStatus"))
res.setMaritalStatus(parseCodeableConcept(getJObject(json, "maritalStatus")));
Type multipleBirth = parseType("multipleBirth", json);
if (multipleBirth != null)
res.setMultipleBirth(multipleBirth);
if (json.has("photo")) {
JsonArray array = json.getAsJsonArray("photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parsePatientContactComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("communication")) {
JsonArray array = json.getAsJsonArray("communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parsePatientPatientCommunicationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("generalPractitioner")) {
JsonArray array = json.getAsJsonArray("generalPractitioner");
for (int i = 0; i < array.size(); i++) {
res.getGeneralPractitioner().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("link")) {
JsonArray array = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parsePatientPatientLinkComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Patient.ContactComponent parsePatientContactComponent(JsonObject json, Patient owner)
throws IOException, FHIRFormatError {
Patient.ContactComponent res = new Patient.ContactComponent();
parsePatientContactComponentProperties(json, owner, res);
return res;
}
protected void parsePatientContactComponentProperties(JsonObject json, Patient owner, Patient.ContactComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("relationship")) {
JsonArray array = json.getAsJsonArray("relationship");
for (int i = 0; i < array.size(); i++) {
res.getRelationship().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("name"))
res.setName(parseHumanName(getJObject(json, "name")));
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
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 parsePatientPatientCommunicationComponent(JsonObject json,
Patient owner) throws IOException, FHIRFormatError {
Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent();
parsePatientPatientCommunicationComponentProperties(json, owner, res);
return res;
}
protected void parsePatientPatientCommunicationComponentProperties(JsonObject json, Patient owner,
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 parsePatientPatientLinkComponent(JsonObject json, Patient owner)
throws IOException, FHIRFormatError {
Patient.PatientLinkComponent res = new Patient.PatientLinkComponent();
parsePatientPatientLinkComponentProperties(json, owner, res);
return res;
}
protected void parsePatientPatientLinkComponentProperties(JsonObject json, Patient owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), PaymentNotice.PaymentNoticeStatus.NULL,
new PaymentNotice.PaymentNoticeStatusEnumFactory()));
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("provider"))
res.setProvider(parseReference(getJObject(json, "provider")));
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(
parseEnumeration(json.get("status").getAsString(), PaymentReconciliation.PaymentReconciliationStatus.NULL,
new PaymentReconciliation.PaymentReconciliationStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
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("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(), Enumerations.RemittanceOutcome.NULL,
new Enumerations.RemittanceOutcomeEnumFactory()));
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("paymentDate"))
res.setPaymentDateElement(parseDate(json.get("paymentDate").getAsString()));
if (json.has("_paymentDate"))
parseElementProperties(getJObject(json, "_paymentDate"), res.getPaymentDateElement());
if (json.has("paymentAmount"))
res.setPaymentAmount(parseMoney(getJObject(json, "paymentAmount")));
if (json.has("paymentIdentifier"))
res.setPaymentIdentifier(parseIdentifier(getJObject(json, "paymentIdentifier")));
if (json.has("detail")) {
JsonArray array = json.getAsJsonArray("detail");
for (int i = 0; i < array.size(); i++) {
res.getDetail().add(parsePaymentReconciliationDetailsComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("formCode"))
res.setFormCode(parseCodeableConcept(getJObject(json, "formCode")));
if (json.has("processNote")) {
JsonArray array = json.getAsJsonArray("processNote");
for (int i = 0; i < array.size(); i++) {
res.getProcessNote().add(parsePaymentReconciliationNotesComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected PaymentReconciliation.DetailsComponent parsePaymentReconciliationDetailsComponent(JsonObject json,
PaymentReconciliation owner) throws IOException, FHIRFormatError {
PaymentReconciliation.DetailsComponent res = new PaymentReconciliation.DetailsComponent();
parsePaymentReconciliationDetailsComponentProperties(json, owner, res);
return res;
}
protected void parsePaymentReconciliationDetailsComponentProperties(JsonObject json, PaymentReconciliation owner,
PaymentReconciliation.DetailsComponent 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("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("request"))
res.setRequest(parseReference(getJObject(json, "request")));
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,
PaymentReconciliation owner) throws IOException, FHIRFormatError {
PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent();
parsePaymentReconciliationNotesComponentProperties(json, owner, res);
return res;
}
protected void parsePaymentReconciliationNotesComponentProperties(JsonObject json, PaymentReconciliation owner,
PaymentReconciliation.NotesComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL,
new Enumerations.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 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("name")) {
JsonArray array = json.getAsJsonArray("name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("photo"))
res.setPhoto(parseAttachment(getJObject(json, "photo")));
if (json.has("managingOrganization"))
res.setManagingOrganization(parseReference(getJObject(json, "managingOrganization")));
if (json.has("active"))
res.setActiveElement(parseBoolean(json.get("active").getAsBoolean()));
if (json.has("_active"))
parseElementProperties(getJObject(json, "_active"), res.getActiveElement());
if (json.has("link")) {
JsonArray array = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parsePersonPersonLinkComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Person.PersonLinkComponent parsePersonPersonLinkComponent(JsonObject json, Person owner)
throws IOException, FHIRFormatError {
Person.PersonLinkComponent res = new Person.PersonLinkComponent();
parsePersonPersonLinkComponentProperties(json, owner, res);
return res;
}
protected void parsePersonPersonLinkComponentProperties(JsonObject json, Person owner, 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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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());
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("library")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLibrary().get(i));
}
}
;
if (json.has("goal")) {
JsonArray array = json.getAsJsonArray("goal");
for (int i = 0; i < array.size(); i++) {
res.getGoal().add(parsePlanDefinitionPlanDefinitionGoalComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionPlanDefinitionGoalComponent(JsonObject json,
PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent();
parsePlanDefinitionPlanDefinitionGoalComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionGoalComponentProperties(JsonObject json, PlanDefinition owner,
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 = json.getAsJsonArray("addresses");
for (int i = 0; i < array.size(); i++) {
res.getAddresses().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("documentation")) {
JsonArray array = json.getAsJsonArray("documentation");
for (int i = 0; i < array.size(); i++) {
res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget()
.add(parsePlanDefinitionPlanDefinitionGoalTargetComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionPlanDefinitionGoalTargetComponent(
JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent();
parsePlanDefinitionPlanDefinitionGoalTargetComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionGoalTargetComponentProperties(JsonObject json, PlanDefinition owner,
PlanDefinition.PlanDefinitionGoalTargetComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("measure"))
res.setMeasure(parseCodeableConcept(getJObject(json, "measure")));
Type detail = parseType("detail", json);
if (detail != null)
res.setDetail(detail);
if (json.has("due"))
res.setDue(parseDuration(getJObject(json, "due")));
}
protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionPlanDefinitionActionComponent(
JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent();
parsePlanDefinitionPlanDefinitionActionComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionActionComponentProperties(JsonObject json, PlanDefinition owner,
PlanDefinition.PlanDefinitionActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("textEquivalent"))
res.setTextEquivalentElement(parseString(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(), PlanDefinition.RequestPriority.NULL,
new PlanDefinition.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reason")) {
JsonArray array = json.getAsJsonArray("reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("documentation")) {
JsonArray array = json.getAsJsonArray("documentation");
for (int i = 0; i < array.size(); i++) {
res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("goalId")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getGoalId().get(i));
}
}
;
Type subject = parseType("subject", json);
if (subject != null)
res.setSubject(subject);
if (json.has("trigger")) {
JsonArray array = json.getAsJsonArray("trigger");
for (int i = 0; i < array.size(); i++) {
res.getTrigger().add(parseTriggerDefinition(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("condition")) {
JsonArray array = json.getAsJsonArray("condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition()
.add(parsePlanDefinitionPlanDefinitionActionConditionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("input")) {
JsonArray array = json.getAsJsonArray("input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseDataRequirement(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("output")) {
JsonArray array = json.getAsJsonArray("output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parseDataRequirement(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedAction")) {
JsonArray array = json.getAsJsonArray("relatedAction");
for (int i = 0; i < array.size(); i++) {
res.getRelatedAction()
.add(parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant()
.add(parsePlanDefinitionPlanDefinitionActionParticipantComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("groupingBehavior"))
res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(),
PlanDefinition.ActionGroupingBehavior.NULL, new PlanDefinition.ActionGroupingBehaviorEnumFactory()));
if (json.has("_groupingBehavior"))
parseElementProperties(getJObject(json, "_groupingBehavior"), res.getGroupingBehaviorElement());
if (json.has("selectionBehavior"))
res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(),
PlanDefinition.ActionSelectionBehavior.NULL, new PlanDefinition.ActionSelectionBehaviorEnumFactory()));
if (json.has("_selectionBehavior"))
parseElementProperties(getJObject(json, "_selectionBehavior"), res.getSelectionBehaviorElement());
if (json.has("requiredBehavior"))
res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(),
PlanDefinition.ActionRequiredBehavior.NULL, new PlanDefinition.ActionRequiredBehaviorEnumFactory()));
if (json.has("_requiredBehavior"))
parseElementProperties(getJObject(json, "_requiredBehavior"), res.getRequiredBehaviorElement());
if (json.has("precheckBehavior"))
res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(),
PlanDefinition.ActionPrecheckBehavior.NULL, new PlanDefinition.ActionPrecheckBehaviorEnumFactory()));
if (json.has("_precheckBehavior"))
parseElementProperties(getJObject(json, "_precheckBehavior"), res.getPrecheckBehaviorElement());
if (json.has("cardinalityBehavior"))
res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(),
PlanDefinition.ActionCardinalityBehavior.NULL, new PlanDefinition.ActionCardinalityBehaviorEnumFactory()));
if (json.has("_cardinalityBehavior"))
parseElementProperties(getJObject(json, "_cardinalityBehavior"), res.getCardinalityBehaviorElement());
Type 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 = json.getAsJsonArray("dynamicValue");
for (int i = 0; i < array.size(); i++) {
res.getDynamicValue()
.add(parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionPlanDefinitionActionConditionComponent(
JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent();
parsePlanDefinitionPlanDefinitionActionConditionComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionActionConditionComponentProperties(JsonObject json,
PlanDefinition owner, PlanDefinition.PlanDefinitionActionConditionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), PlanDefinition.ActionConditionKind.NULL,
new PlanDefinition.ActionConditionKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(
JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent();
parsePlanDefinitionPlanDefinitionActionRelatedActionComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionActionRelatedActionComponentProperties(JsonObject json,
PlanDefinition owner, PlanDefinition.PlanDefinitionActionRelatedActionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("actionId"))
res.setActionIdElement(parseId(json.get("actionId").getAsString()));
if (json.has("_actionId"))
parseElementProperties(getJObject(json, "_actionId"), res.getActionIdElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(),
PlanDefinition.ActionRelationshipType.NULL, new PlanDefinition.ActionRelationshipTypeEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(getJObject(json, "_relationship"), res.getRelationshipElement());
Type offset = parseType("offset", json);
if (offset != null)
res.setOffset(offset);
}
protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionPlanDefinitionActionParticipantComponent(
JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent();
parsePlanDefinitionPlanDefinitionActionParticipantComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionActionParticipantComponentProperties(JsonObject json,
PlanDefinition owner, PlanDefinition.PlanDefinitionActionParticipantComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), PlanDefinition.ActionParticipantType.NULL,
new PlanDefinition.ActionParticipantTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("role"))
res.setRole(parseCodeableConcept(getJObject(json, "role")));
}
protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(
JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError {
PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent();
parsePlanDefinitionPlanDefinitionActionDynamicValueComponentProperties(json, owner, res);
return res;
}
protected void parsePlanDefinitionPlanDefinitionActionDynamicValueComponentProperties(JsonObject json,
PlanDefinition owner, 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("address")) {
JsonArray array = json.getAsJsonArray("address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(array.get(i).getAsJsonObject()));
}
}
;
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("photo")) {
JsonArray array = json.getAsJsonArray("photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("qualification")) {
JsonArray array = json.getAsJsonArray("qualification");
for (int i = 0; i < array.size(); i++) {
res.getQualification()
.add(parsePractitionerPractitionerQualificationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("communication")) {
JsonArray array = json.getAsJsonArray("communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected Practitioner.PractitionerQualificationComponent parsePractitionerPractitionerQualificationComponent(
JsonObject json, Practitioner owner) throws IOException, FHIRFormatError {
Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent();
parsePractitionerPractitionerQualificationComponentProperties(json, owner, res);
return res;
}
protected void parsePractitionerPractitionerQualificationComponentProperties(JsonObject json, Practitioner owner,
Practitioner.PractitionerQualificationComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialty")) {
JsonArray array = json.getAsJsonArray("specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("location")) {
JsonArray array = json.getAsJsonArray("location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("healthcareService")) {
JsonArray array = json.getAsJsonArray("healthcareService");
for (int i = 0; i < array.size(); i++) {
res.getHealthcareService().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("availableTime")) {
JsonArray array = json.getAsJsonArray("availableTime");
for (int i = 0; i < array.size(); i++) {
res.getAvailableTime()
.add(parsePractitionerRolePractitionerRoleAvailableTimeComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("notAvailable")) {
JsonArray array = json.getAsJsonArray("notAvailable");
for (int i = 0; i < array.size(); i++) {
res.getNotAvailable()
.add(parsePractitionerRolePractitionerRoleNotAvailableComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("availabilityExceptions"))
res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString()));
if (json.has("_availabilityExceptions"))
parseElementProperties(getJObject(json, "_availabilityExceptions"), res.getAvailabilityExceptionsElement());
if (json.has("endpoint")) {
JsonArray array = json.getAsJsonArray("endpoint");
for (int i = 0; i < array.size(); i++) {
res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected PractitionerRole.PractitionerRoleAvailableTimeComponent parsePractitionerRolePractitionerRoleAvailableTimeComponent(
JsonObject json, PractitionerRole owner) throws IOException, FHIRFormatError {
PractitionerRole.PractitionerRoleAvailableTimeComponent res = new PractitionerRole.PractitionerRoleAvailableTimeComponent();
parsePractitionerRolePractitionerRoleAvailableTimeComponentProperties(json, owner, res);
return res;
}
protected void parsePractitionerRolePractitionerRoleAvailableTimeComponentProperties(JsonObject json,
PractitionerRole owner, PractitionerRole.PractitionerRoleAvailableTimeComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("daysOfWeek")) {
JsonArray array = json.getAsJsonArray("daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getDaysOfWeek().add(new Enumeration());
} else {
res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), PractitionerRole.DaysOfWeek.NULL,
new PractitionerRole.DaysOfWeekEnumFactory()));
}
}
}
;
if (json.has("_daysOfWeek")) {
JsonArray array = json.getAsJsonArray("_daysOfWeek");
for (int i = 0; i < array.size(); i++) {
if (i == res.getDaysOfWeek().size())
res.getDaysOfWeek().add(
parseEnumeration(null, PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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 PractitionerRole.PractitionerRoleNotAvailableComponent parsePractitionerRolePractitionerRoleNotAvailableComponent(
JsonObject json, PractitionerRole owner) throws IOException, FHIRFormatError {
PractitionerRole.PractitionerRoleNotAvailableComponent res = new PractitionerRole.PractitionerRoleNotAvailableComponent();
parsePractitionerRolePractitionerRoleNotAvailableComponentProperties(json, owner, res);
return res;
}
protected void parsePractitionerRolePractitionerRoleNotAvailableComponentProperties(JsonObject json,
PractitionerRole owner, PractitionerRole.PractitionerRoleNotAvailableComponent 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("during"))
res.setDuring(parsePeriod(getJObject(json, "during")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Procedure.ProcedureStatus.NULL,
new Procedure.ProcedureStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("statusReason"))
res.setStatusReason(parseCodeableConcept(getJObject(json, "statusReason")));
if (json.has("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
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")));
Type performed = parseType("performed", json);
if (performed != null)
res.setPerformed(performed);
if (json.has("recorder"))
res.setRecorder(parseReference(getJObject(json, "recorder")));
if (json.has("asserter"))
res.setAsserter(parseReference(getJObject(json, "asserter")));
if (json.has("performer")) {
JsonArray array = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseProcedureProcedurePerformerComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite")) {
JsonArray array = json.getAsJsonArray("bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
if (json.has("report")) {
JsonArray array = json.getAsJsonArray("report");
for (int i = 0; i < array.size(); i++) {
res.getReport().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("complication")) {
JsonArray array = json.getAsJsonArray("complication");
for (int i = 0; i < array.size(); i++) {
res.getComplication().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("complicationDetail")) {
JsonArray array = json.getAsJsonArray("complicationDetail");
for (int i = 0; i < array.size(); i++) {
res.getComplicationDetail().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("followUp")) {
JsonArray array = json.getAsJsonArray("followUp");
for (int i = 0; i < array.size(); i++) {
res.getFollowUp().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("focalDevice")) {
JsonArray array = json.getAsJsonArray("focalDevice");
for (int i = 0; i < array.size(); i++) {
res.getFocalDevice().add(parseProcedureProcedureFocalDeviceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("usedReference")) {
JsonArray array = json.getAsJsonArray("usedReference");
for (int i = 0; i < array.size(); i++) {
res.getUsedReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("usedCode")) {
JsonArray array = json.getAsJsonArray("usedCode");
for (int i = 0; i < array.size(); i++) {
res.getUsedCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected Procedure.ProcedurePerformerComponent parseProcedureProcedurePerformerComponent(JsonObject json,
Procedure owner) throws IOException, FHIRFormatError {
Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent();
parseProcedureProcedurePerformerComponentProperties(json, owner, res);
return res;
}
protected void parseProcedureProcedurePerformerComponentProperties(JsonObject json, Procedure owner,
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")));
}
protected Procedure.ProcedureFocalDeviceComponent parseProcedureProcedureFocalDeviceComponent(JsonObject json,
Procedure owner) throws IOException, FHIRFormatError {
Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent();
parseProcedureProcedureFocalDeviceComponentProperties(json, owner, res);
return res;
}
protected void parseProcedureProcedureFocalDeviceComponentProperties(JsonObject json, Procedure owner,
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 = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getPolicy().get(i));
}
}
;
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reason")) {
JsonArray array = json.getAsJsonArray("reason");
for (int i = 0; i < array.size(); i++) {
res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("activity"))
res.setActivity(parseCodeableConcept(getJObject(json, "activity")));
if (json.has("agent")) {
JsonArray array = json.getAsJsonArray("agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseProvenanceProvenanceAgentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("entity")) {
JsonArray array = json.getAsJsonArray("entity");
for (int i = 0; i < array.size(); i++) {
res.getEntity().add(parseProvenanceProvenanceEntityComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("signature")) {
JsonArray array = json.getAsJsonArray("signature");
for (int i = 0; i < array.size(); i++) {
res.getSignature().add(parseSignature(array.get(i).getAsJsonObject()));
}
}
;
}
protected Provenance.ProvenanceAgentComponent parseProvenanceProvenanceAgentComponent(JsonObject json,
Provenance owner) throws IOException, FHIRFormatError {
Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent();
parseProvenanceProvenanceAgentComponentProperties(json, owner, res);
return res;
}
protected void parseProvenanceProvenanceAgentComponentProperties(JsonObject json, Provenance owner,
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 = json.getAsJsonArray("role");
for (int i = 0; i < array.size(); i++) {
res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("who"))
res.setWho(parseReference(getJObject(json, "who")));
if (json.has("onBehalfOf"))
res.setOnBehalfOf(parseReference(getJObject(json, "onBehalfOf")));
}
protected Provenance.ProvenanceEntityComponent parseProvenanceProvenanceEntityComponent(JsonObject json,
Provenance owner) throws IOException, FHIRFormatError {
Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent();
parseProvenanceProvenanceEntityComponentProperties(json, owner, res);
return res;
}
protected void parseProvenanceProvenanceEntityComponentProperties(JsonObject json, Provenance owner,
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 = json.getAsJsonArray("agent");
for (int i = 0; i < array.size(); i++) {
res.getAgent().add(parseProvenanceProvenanceAgentComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("derivedFrom")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireQuestionnaireItemComponent(JsonObject json,
Questionnaire owner) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent();
parseQuestionnaireQuestionnaireItemComponentProperties(json, owner, res);
return res;
}
protected void parseQuestionnaireQuestionnaireItemComponentProperties(JsonObject json, Questionnaire owner,
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 = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("enableWhen");
for (int i = 0; i < array.size(); i++) {
res.getEnableWhen()
.add(parseQuestionnaireQuestionnaireItemEnableWhenComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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("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("answerValueSet"))
res.setAnswerValueSetElement(parseCanonical(json.get("answerValueSet").getAsString()));
if (json.has("_answerValueSet"))
parseElementProperties(getJObject(json, "_answerValueSet"), res.getAnswerValueSetElement());
if (json.has("answerOption")) {
JsonArray array = json.getAsJsonArray("answerOption");
for (int i = 0; i < array.size(); i++) {
res.getAnswerOption()
.add(parseQuestionnaireQuestionnaireItemAnswerOptionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("initial")) {
JsonArray array = json.getAsJsonArray("initial");
for (int i = 0; i < array.size(); i++) {
res.getInitial()
.add(parseQuestionnaireQuestionnaireItemInitialComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireQuestionnaireItemEnableWhenComponent(
JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent();
parseQuestionnaireQuestionnaireItemEnableWhenComponentProperties(json, owner, res);
return res;
}
protected void parseQuestionnaireQuestionnaireItemEnableWhenComponentProperties(JsonObject json, Questionnaire owner,
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());
Type answer = parseType("answer", json);
if (answer != null)
res.setAnswer(answer);
}
protected Questionnaire.QuestionnaireItemAnswerOptionComponent parseQuestionnaireQuestionnaireItemAnswerOptionComponent(
JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemAnswerOptionComponent res = new Questionnaire.QuestionnaireItemAnswerOptionComponent();
parseQuestionnaireQuestionnaireItemAnswerOptionComponentProperties(json, owner, res);
return res;
}
protected void parseQuestionnaireQuestionnaireItemAnswerOptionComponentProperties(JsonObject json,
Questionnaire owner, Questionnaire.QuestionnaireItemAnswerOptionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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 parseQuestionnaireQuestionnaireItemInitialComponent(
JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError {
Questionnaire.QuestionnaireItemInitialComponent res = new Questionnaire.QuestionnaireItemInitialComponent();
parseQuestionnaireQuestionnaireItemInitialComponentProperties(json, owner, res);
return res;
}
protected void parseQuestionnaireQuestionnaireItemInitialComponentProperties(JsonObject json, Questionnaire owner,
Questionnaire.QuestionnaireItemInitialComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type 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"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem()
.add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseQuestionnaireResponseItemComponent(
JsonObject json, QuestionnaireResponse owner) throws IOException, FHIRFormatError {
QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent();
parseQuestionnaireResponseQuestionnaireResponseItemComponentProperties(json, owner, res);
return res;
}
protected void parseQuestionnaireResponseQuestionnaireResponseItemComponentProperties(JsonObject json,
QuestionnaireResponse owner, 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 = json.getAsJsonArray("answer");
for (int i = 0; i < array.size(); i++) {
res.getAnswer().add(
parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem()
.add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(
JsonObject json, QuestionnaireResponse owner) throws IOException, FHIRFormatError {
QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent();
parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentProperties(json, owner, res);
return res;
}
protected void parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentProperties(JsonObject json,
QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
if (json.has("item")) {
JsonArray array = json.getAsJsonArray("item");
for (int i = 0; i < array.size(); i++) {
res.getItem()
.add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("relationship");
for (int i = 0; i < array.size(); i++) {
res.getRelationship().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("name")) {
JsonArray array = json.getAsJsonArray("name");
for (int i = 0; i < array.size(); i++) {
res.getName().add(parseHumanName(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("telecom")) {
JsonArray array = json.getAsJsonArray("telecom");
for (int i = 0; i < array.size(); i++) {
res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("address");
for (int i = 0; i < array.size(); i++) {
res.getAddress().add(parseAddress(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("photo")) {
JsonArray array = json.getAsJsonArray("photo");
for (int i = 0; i < array.size(); i++) {
res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("communication")) {
JsonArray array = json.getAsJsonArray("communication");
for (int i = 0; i < array.size(); i++) {
res.getCommunication()
.add(parseRelatedPersonRelatedPersonCommunicationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected RelatedPerson.RelatedPersonCommunicationComponent parseRelatedPersonRelatedPersonCommunicationComponent(
JsonObject json, RelatedPerson owner) throws IOException, FHIRFormatError {
RelatedPerson.RelatedPersonCommunicationComponent res = new RelatedPerson.RelatedPersonCommunicationComponent();
parseRelatedPersonRelatedPersonCommunicationComponentProperties(json, owner, res);
return res;
}
protected void parseRelatedPersonRelatedPersonCommunicationComponentProperties(JsonObject json, RelatedPerson owner,
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 RequestGroup parseRequestGroup(JsonObject json) throws IOException, FHIRFormatError {
RequestGroup res = new RequestGroup();
parseRequestGroupProperties(json, res);
return res;
}
protected void parseRequestGroupProperties(JsonObject json, RequestGroup res) throws IOException, FHIRFormatError {
parseDomainResourceProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("replaces")) {
JsonArray array = json.getAsJsonArray("replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), RequestGroup.RequestStatus.NULL,
new RequestGroup.RequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), RequestGroup.RequestIntent.NULL,
new RequestGroup.RequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), RequestGroup.RequestPriority.NULL,
new RequestGroup.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("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseRequestGroupRequestGroupActionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected RequestGroup.RequestGroupActionComponent parseRequestGroupRequestGroupActionComponent(JsonObject json,
RequestGroup owner) throws IOException, FHIRFormatError {
RequestGroup.RequestGroupActionComponent res = new RequestGroup.RequestGroupActionComponent();
parseRequestGroupRequestGroupActionComponentProperties(json, owner, res);
return res;
}
protected void parseRequestGroupRequestGroupActionComponentProperties(JsonObject json, RequestGroup owner,
RequestGroup.RequestGroupActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
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(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("textEquivalent"))
res.setTextEquivalentElement(parseString(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(), RequestGroup.RequestPriority.NULL,
new RequestGroup.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("documentation")) {
JsonArray array = json.getAsJsonArray("documentation");
for (int i = 0; i < array.size(); i++) {
res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("condition")) {
JsonArray array = json.getAsJsonArray("condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition()
.add(parseRequestGroupRequestGroupActionConditionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("relatedAction")) {
JsonArray array = json.getAsJsonArray("relatedAction");
for (int i = 0; i < array.size(); i++) {
res.getRelatedAction()
.add(parseRequestGroupRequestGroupActionRelatedActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
Type timing = parseType("timing", json);
if (timing != null)
res.setTiming(timing);
if (json.has("participant")) {
JsonArray array = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("groupingBehavior"))
res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(),
RequestGroup.ActionGroupingBehavior.NULL, new RequestGroup.ActionGroupingBehaviorEnumFactory()));
if (json.has("_groupingBehavior"))
parseElementProperties(getJObject(json, "_groupingBehavior"), res.getGroupingBehaviorElement());
if (json.has("selectionBehavior"))
res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(),
RequestGroup.ActionSelectionBehavior.NULL, new RequestGroup.ActionSelectionBehaviorEnumFactory()));
if (json.has("_selectionBehavior"))
parseElementProperties(getJObject(json, "_selectionBehavior"), res.getSelectionBehaviorElement());
if (json.has("requiredBehavior"))
res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(),
RequestGroup.ActionRequiredBehavior.NULL, new RequestGroup.ActionRequiredBehaviorEnumFactory()));
if (json.has("_requiredBehavior"))
parseElementProperties(getJObject(json, "_requiredBehavior"), res.getRequiredBehaviorElement());
if (json.has("precheckBehavior"))
res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(),
RequestGroup.ActionPrecheckBehavior.NULL, new RequestGroup.ActionPrecheckBehaviorEnumFactory()));
if (json.has("_precheckBehavior"))
parseElementProperties(getJObject(json, "_precheckBehavior"), res.getPrecheckBehaviorElement());
if (json.has("cardinalityBehavior"))
res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(),
RequestGroup.ActionCardinalityBehavior.NULL, new RequestGroup.ActionCardinalityBehaviorEnumFactory()));
if (json.has("_cardinalityBehavior"))
parseElementProperties(getJObject(json, "_cardinalityBehavior"), res.getCardinalityBehaviorElement());
if (json.has("resource"))
res.setResource(parseReference(getJObject(json, "resource")));
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseRequestGroupRequestGroupActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected RequestGroup.RequestGroupActionConditionComponent parseRequestGroupRequestGroupActionConditionComponent(
JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError {
RequestGroup.RequestGroupActionConditionComponent res = new RequestGroup.RequestGroupActionConditionComponent();
parseRequestGroupRequestGroupActionConditionComponentProperties(json, owner, res);
return res;
}
protected void parseRequestGroupRequestGroupActionConditionComponentProperties(JsonObject json, RequestGroup owner,
RequestGroup.RequestGroupActionConditionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("kind"))
res.setKindElement(parseEnumeration(json.get("kind").getAsString(), RequestGroup.ActionConditionKind.NULL,
new RequestGroup.ActionConditionKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("expression"))
res.setExpression(parseExpression(getJObject(json, "expression")));
}
protected RequestGroup.RequestGroupActionRelatedActionComponent parseRequestGroupRequestGroupActionRelatedActionComponent(
JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError {
RequestGroup.RequestGroupActionRelatedActionComponent res = new RequestGroup.RequestGroupActionRelatedActionComponent();
parseRequestGroupRequestGroupActionRelatedActionComponentProperties(json, owner, res);
return res;
}
protected void parseRequestGroupRequestGroupActionRelatedActionComponentProperties(JsonObject json,
RequestGroup owner, RequestGroup.RequestGroupActionRelatedActionComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("actionId"))
res.setActionIdElement(parseId(json.get("actionId").getAsString()));
if (json.has("_actionId"))
parseElementProperties(getJObject(json, "_actionId"), res.getActionIdElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(),
RequestGroup.ActionRelationshipType.NULL, new RequestGroup.ActionRelationshipTypeEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(getJObject(json, "_relationship"), res.getRelationshipElement());
Type offset = parseType("offset", json);
if (offset != null)
res.setOffset(offset);
}
protected ResearchDefinition parseResearchDefinition(JsonObject json) throws IOException, FHIRFormatError {
ResearchDefinition res = new ResearchDefinition();
parseResearchDefinitionProperties(json, res);
return res;
}
protected void parseResearchDefinitionProperties(JsonObject json, ResearchDefinition 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("shortTitle"))
res.setShortTitleElement(parseString(json.get("shortTitle").getAsString()));
if (json.has("_shortTitle"))
parseElementProperties(getJObject(json, "_shortTitle"), res.getShortTitleElement());
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());
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("comment")) {
JsonArray array = json.getAsJsonArray("comment");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getComment().add(new StringType());
} else {
res.getComment().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_comment")) {
JsonArray array = json.getAsJsonArray("_comment");
for (int i = 0; i < array.size(); i++) {
if (i == res.getComment().size())
res.getComment().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getComment().get(i));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("library")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLibrary().get(i));
}
}
;
if (json.has("population"))
res.setPopulation(parseReference(getJObject(json, "population")));
if (json.has("exposure"))
res.setExposure(parseReference(getJObject(json, "exposure")));
if (json.has("exposureAlternative"))
res.setExposureAlternative(parseReference(getJObject(json, "exposureAlternative")));
if (json.has("outcome"))
res.setOutcome(parseReference(getJObject(json, "outcome")));
}
protected ResearchElementDefinition parseResearchElementDefinition(JsonObject json)
throws IOException, FHIRFormatError {
ResearchElementDefinition res = new ResearchElementDefinition();
parseResearchElementDefinitionProperties(json, res);
return res;
}
protected void parseResearchElementDefinitionProperties(JsonObject json, ResearchElementDefinition 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("shortTitle"))
res.setShortTitleElement(parseString(json.get("shortTitle").getAsString()));
if (json.has("_shortTitle"))
parseElementProperties(getJObject(json, "_shortTitle"), res.getShortTitleElement());
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());
Type 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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("comment")) {
JsonArray array = json.getAsJsonArray("comment");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getComment().add(new StringType());
} else {
res.getComment().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_comment")) {
JsonArray array = json.getAsJsonArray("_comment");
for (int i = 0; i < array.size(); i++) {
if (i == res.getComment().size())
res.getComment().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getComment().get(i));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseString(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("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 = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("library")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getLibrary().get(i));
}
}
;
if (json.has("type"))
res.setTypeElement(
parseEnumeration(json.get("type").getAsString(), ResearchElementDefinition.ResearchElementType.NULL,
new ResearchElementDefinition.ResearchElementTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("variableType"))
res.setVariableTypeElement(parseEnumeration(json.get("variableType").getAsString(),
ResearchElementDefinition.VariableType.NULL, new ResearchElementDefinition.VariableTypeEnumFactory()));
if (json.has("_variableType"))
parseElementProperties(getJObject(json, "_variableType"), res.getVariableTypeElement());
if (json.has("characteristic")) {
JsonArray array = json.getAsJsonArray("characteristic");
for (int i = 0; i < array.size(); i++) {
res.getCharacteristic().add(parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponent(
JsonObject json, ResearchElementDefinition owner) throws IOException, FHIRFormatError {
ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent res = new ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent();
parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponentProperties(json, owner, res);
return res;
}
protected void parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponentProperties(
JsonObject json, ResearchElementDefinition owner,
ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type definition = parseType("definition", json);
if (definition != null)
res.setDefinition(definition);
if (json.has("usageContext")) {
JsonArray array = json.getAsJsonArray("usageContext");
for (int i = 0; i < array.size(); i++) {
res.getUsageContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("exclude"))
res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean()));
if (json.has("_exclude"))
parseElementProperties(getJObject(json, "_exclude"), res.getExcludeElement());
if (json.has("unitOfMeasure"))
res.setUnitOfMeasure(parseCodeableConcept(getJObject(json, "unitOfMeasure")));
if (json.has("studyEffectiveDescription"))
res.setStudyEffectiveDescriptionElement(parseString(json.get("studyEffectiveDescription").getAsString()));
if (json.has("_studyEffectiveDescription"))
parseElementProperties(getJObject(json, "_studyEffectiveDescription"), res.getStudyEffectiveDescriptionElement());
Type studyEffective = parseType("studyEffective", json);
if (studyEffective != null)
res.setStudyEffective(studyEffective);
if (json.has("studyEffectiveTimeFromStart"))
res.setStudyEffectiveTimeFromStart(parseDuration(getJObject(json, "studyEffectiveTimeFromStart")));
if (json.has("studyEffectiveGroupMeasure"))
res.setStudyEffectiveGroupMeasureElement(parseEnumeration(json.get("studyEffectiveGroupMeasure").getAsString(),
ResearchElementDefinition.GroupMeasure.NULL, new ResearchElementDefinition.GroupMeasureEnumFactory()));
if (json.has("_studyEffectiveGroupMeasure"))
parseElementProperties(getJObject(json, "_studyEffectiveGroupMeasure"),
res.getStudyEffectiveGroupMeasureElement());
if (json.has("participantEffectiveDescription"))
res.setParticipantEffectiveDescriptionElement(
parseString(json.get("participantEffectiveDescription").getAsString()));
if (json.has("_participantEffectiveDescription"))
parseElementProperties(getJObject(json, "_participantEffectiveDescription"),
res.getParticipantEffectiveDescriptionElement());
Type participantEffective = parseType("participantEffective", json);
if (participantEffective != null)
res.setParticipantEffective(participantEffective);
if (json.has("participantEffectiveTimeFromStart"))
res.setParticipantEffectiveTimeFromStart(parseDuration(getJObject(json, "participantEffectiveTimeFromStart")));
if (json.has("participantEffectiveGroupMeasure"))
res.setParticipantEffectiveGroupMeasureElement(
parseEnumeration(json.get("participantEffectiveGroupMeasure").getAsString(),
ResearchElementDefinition.GroupMeasure.NULL, new ResearchElementDefinition.GroupMeasureEnumFactory()));
if (json.has("_participantEffectiveGroupMeasure"))
parseElementProperties(getJObject(json, "_participantEffectiveGroupMeasure"),
res.getParticipantEffectiveGroupMeasureElement());
}
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("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("title"))
res.setTitleElement(parseString(json.get("title").getAsString()));
if (json.has("_title"))
parseElementProperties(getJObject(json, "_title"), res.getTitleElement());
if (json.has("protocol")) {
JsonArray array = json.getAsJsonArray("protocol");
for (int i = 0; i < array.size(); i++) {
res.getProtocol().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ResearchStudy.ResearchStudyStatus.NULL,
new ResearchStudy.ResearchStudyStatusEnumFactory()));
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("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("focus")) {
JsonArray array = json.getAsJsonArray("focus");
for (int i = 0; i < array.size(); i++) {
res.getFocus().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("condition")) {
JsonArray array = json.getAsJsonArray("condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("keyword")) {
JsonArray array = json.getAsJsonArray("keyword");
for (int i = 0; i < array.size(); i++) {
res.getKeyword().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("location")) {
JsonArray array = json.getAsJsonArray("location");
for (int i = 0; i < array.size(); i++) {
res.getLocation().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("description"))
res.setDescriptionElement(parseMarkdown(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("enrollment")) {
JsonArray array = json.getAsJsonArray("enrollment");
for (int i = 0; i < array.size(); i++) {
res.getEnrollment().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("sponsor"))
res.setSponsor(parseReference(getJObject(json, "sponsor")));
if (json.has("principalInvestigator"))
res.setPrincipalInvestigator(parseReference(getJObject(json, "principalInvestigator")));
if (json.has("site")) {
JsonArray array = json.getAsJsonArray("site");
for (int i = 0; i < array.size(); i++) {
res.getSite().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonStopped"))
res.setReasonStopped(parseCodeableConcept(getJObject(json, "reasonStopped")));
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("arm")) {
JsonArray array = json.getAsJsonArray("arm");
for (int i = 0; i < array.size(); i++) {
res.getArm().add(parseResearchStudyResearchStudyArmComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("objective")) {
JsonArray array = json.getAsJsonArray("objective");
for (int i = 0; i < array.size(); i++) {
res.getObjective().add(parseResearchStudyResearchStudyObjectiveComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected ResearchStudy.ResearchStudyArmComponent parseResearchStudyResearchStudyArmComponent(JsonObject json,
ResearchStudy owner) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyArmComponent res = new ResearchStudy.ResearchStudyArmComponent();
parseResearchStudyResearchStudyArmComponentProperties(json, owner, res);
return res;
}
protected void parseResearchStudyResearchStudyArmComponentProperties(JsonObject json, ResearchStudy owner,
ResearchStudy.ResearchStudyArmComponent 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(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
}
protected ResearchStudy.ResearchStudyObjectiveComponent parseResearchStudyResearchStudyObjectiveComponent(
JsonObject json, ResearchStudy owner) throws IOException, FHIRFormatError {
ResearchStudy.ResearchStudyObjectiveComponent res = new ResearchStudy.ResearchStudyObjectiveComponent();
parseResearchStudyResearchStudyObjectiveComponentProperties(json, owner, res);
return res;
}
protected void parseResearchStudyResearchStudyObjectiveComponentProperties(JsonObject json, ResearchStudy owner,
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")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(),
ResearchSubject.ResearchSubjectStatus.NULL, new ResearchSubject.ResearchSubjectStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("period"))
res.setPeriod(parsePeriod(getJObject(json, "period")));
if (json.has("study"))
res.setStudy(parseReference(getJObject(json, "study")));
if (json.has("individual"))
res.setIndividual(parseReference(getJObject(json, "individual")));
if (json.has("assignedArm"))
res.setAssignedArmElement(parseString(json.get("assignedArm").getAsString()));
if (json.has("_assignedArm"))
parseElementProperties(getJObject(json, "_assignedArm"), res.getAssignedArmElement());
if (json.has("actualArm"))
res.setActualArmElement(parseString(json.get("actualArm").getAsString()));
if (json.has("_actualArm"))
parseElementProperties(getJObject(json, "_actualArm"), res.getActualArmElement());
if (json.has("consent"))
res.setConsent(parseReference(getJObject(json, "consent")));
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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(), RiskAssessment.RiskAssessmentStatus.NULL,
new RiskAssessment.RiskAssessmentStatusEnumFactory()));
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")));
Type 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("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basis")) {
JsonArray array = json.getAsJsonArray("basis");
for (int i = 0; i < array.size(); i++) {
res.getBasis().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("prediction")) {
JsonArray array = json.getAsJsonArray("prediction");
for (int i = 0; i < array.size(); i++) {
res.getPrediction()
.add(parseRiskAssessmentRiskAssessmentPredictionComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentRiskAssessmentPredictionComponent(
JsonObject json, RiskAssessment owner) throws IOException, FHIRFormatError {
RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent();
parseRiskAssessmentRiskAssessmentPredictionComponentProperties(json, owner, res);
return res;
}
protected void parseRiskAssessmentRiskAssessmentPredictionComponentProperties(JsonObject json, RiskAssessment owner,
RiskAssessment.RiskAssessmentPredictionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("outcome"))
res.setOutcome(parseCodeableConcept(getJObject(json, "outcome")));
Type 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());
Type 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 RiskEvidenceSynthesis parseRiskEvidenceSynthesis(JsonObject json) throws IOException, FHIRFormatError {
RiskEvidenceSynthesis res = new RiskEvidenceSynthesis();
parseRiskEvidenceSynthesisProperties(json, res);
return res;
}
protected void parseRiskEvidenceSynthesisProperties(JsonObject json, RiskEvidenceSynthesis 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("useContext")) {
JsonArray array = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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());
if (json.has("effectivePeriod"))
res.setEffectivePeriod(parsePeriod(getJObject(json, "effectivePeriod")));
if (json.has("topic")) {
JsonArray array = json.getAsJsonArray("topic");
for (int i = 0; i < array.size(); i++) {
res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("author")) {
JsonArray array = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("editor")) {
JsonArray array = json.getAsJsonArray("editor");
for (int i = 0; i < array.size(); i++) {
res.getEditor().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reviewer")) {
JsonArray array = json.getAsJsonArray("reviewer");
for (int i = 0; i < array.size(); i++) {
res.getReviewer().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("endorser")) {
JsonArray array = json.getAsJsonArray("endorser");
for (int i = 0; i < array.size(); i++) {
res.getEndorser().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relatedArtifact")) {
JsonArray array = json.getAsJsonArray("relatedArtifact");
for (int i = 0; i < array.size(); i++) {
res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("synthesisType"))
res.setSynthesisType(parseCodeableConcept(getJObject(json, "synthesisType")));
if (json.has("studyType"))
res.setStudyType(parseCodeableConcept(getJObject(json, "studyType")));
if (json.has("population"))
res.setPopulation(parseReference(getJObject(json, "population")));
if (json.has("exposure"))
res.setExposure(parseReference(getJObject(json, "exposure")));
if (json.has("outcome"))
res.setOutcome(parseReference(getJObject(json, "outcome")));
if (json.has("sampleSize"))
res.setSampleSize(
parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent(getJObject(json, "sampleSize"), res));
if (json.has("riskEstimate"))
res.setRiskEstimate(
parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent(getJObject(json, "riskEstimate"), res));
if (json.has("certainty")) {
JsonArray array = json.getAsJsonArray("certainty");
for (int i = 0; i < array.size(); i++) {
res.getCertainty().add(
parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent(
JsonObject json, RiskEvidenceSynthesis owner) throws IOException, FHIRFormatError {
RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent();
parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentProperties(json, owner, res);
return res;
}
protected void parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentProperties(JsonObject json,
RiskEvidenceSynthesis owner, RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent 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("numberOfStudies"))
res.setNumberOfStudiesElement(parseInteger(json.get("numberOfStudies").getAsLong()));
if (json.has("_numberOfStudies"))
parseElementProperties(getJObject(json, "_numberOfStudies"), res.getNumberOfStudiesElement());
if (json.has("numberOfParticipants"))
res.setNumberOfParticipantsElement(parseInteger(json.get("numberOfParticipants").getAsLong()));
if (json.has("_numberOfParticipants"))
parseElementProperties(getJObject(json, "_numberOfParticipants"), res.getNumberOfParticipantsElement());
}
protected RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent(
JsonObject json, RiskEvidenceSynthesis owner) throws IOException, FHIRFormatError {
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent();
parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentProperties(json, owner, res);
return res;
}
protected void parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentProperties(JsonObject json,
RiskEvidenceSynthesis owner, RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent 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("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("value"))
res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
if (json.has("unitOfMeasure"))
res.setUnitOfMeasure(parseCodeableConcept(getJObject(json, "unitOfMeasure")));
if (json.has("denominatorCount"))
res.setDenominatorCountElement(parseInteger(json.get("denominatorCount").getAsLong()));
if (json.has("_denominatorCount"))
parseElementProperties(getJObject(json, "_denominatorCount"), res.getDenominatorCountElement());
if (json.has("numeratorCount"))
res.setNumeratorCountElement(parseInteger(json.get("numeratorCount").getAsLong()));
if (json.has("_numeratorCount"))
parseElementProperties(getJObject(json, "_numeratorCount"), res.getNumeratorCountElement());
if (json.has("precisionEstimate")) {
JsonArray array = json.getAsJsonArray("precisionEstimate");
for (int i = 0; i < array.size(); i++) {
res.getPrecisionEstimate()
.add(parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(
JsonObject json, RiskEvidenceSynthesis owner) throws IOException, FHIRFormatError {
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent();
parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentProperties(json, owner, res);
return res;
}
protected void parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentProperties(
JsonObject json, RiskEvidenceSynthesis owner,
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("level"))
res.setLevelElement(parseDecimal(json.get("level").getAsBigDecimal()));
if (json.has("_level"))
parseElementProperties(getJObject(json, "_level"), res.getLevelElement());
if (json.has("from"))
res.setFromElement(parseDecimal(json.get("from").getAsBigDecimal()));
if (json.has("_from"))
parseElementProperties(getJObject(json, "_from"), res.getFromElement());
if (json.has("to"))
res.setToElement(parseDecimal(json.get("to").getAsBigDecimal()));
if (json.has("_to"))
parseElementProperties(getJObject(json, "_to"), res.getToElement());
}
protected RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent(
JsonObject json, RiskEvidenceSynthesis owner) throws IOException, FHIRFormatError {
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent();
parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentProperties(json, owner, res);
return res;
}
protected void parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentProperties(JsonObject json,
RiskEvidenceSynthesis owner, RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("rating")) {
JsonArray array = json.getAsJsonArray("rating");
for (int i = 0; i < array.size(); i++) {
res.getRating().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("certaintySubcomponent")) {
JsonArray array = json.getAsJsonArray("certaintySubcomponent");
for (int i = 0; i < array.size(); i++) {
res.getCertaintySubcomponent()
.add(parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(
JsonObject json, RiskEvidenceSynthesis owner) throws IOException, FHIRFormatError {
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent();
parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentProperties(json, owner, res);
return res;
}
protected void parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentProperties(
JsonObject json, RiskEvidenceSynthesis owner,
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("rating")) {
JsonArray array = json.getAsJsonArray("rating");
for (int i = 0; i < array.size(); i++) {
res.getRating().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("serviceCategory");
for (int i = 0; i < array.size(); i++) {
res.getServiceCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("serviceType")) {
JsonArray array = json.getAsJsonArray("serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialty")) {
JsonArray array = json.getAsJsonArray("specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("actor")) {
JsonArray array = json.getAsJsonArray("actor");
for (int i = 0; i < array.size(); i++) {
res.getActor().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("planningHorizon"))
res.setPlanningHorizon(parsePeriod(getJObject(json, "planningHorizon")));
if (json.has("comment"))
res.setCommentElement(parseString(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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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(parseCode(json.get("code").getAsString()));
if (json.has("_code"))
parseElementProperties(getJObject(json, "_code"), res.getCodeElement());
if (json.has("base")) {
JsonArray array = json.getAsJsonArray("base");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getBase().add(new CodeType());
} else {
res.getBase().add(parseCode(array.get(i).getAsString()));
}
}
}
;
if (json.has("_base")) {
JsonArray array = json.getAsJsonArray("_base");
for (int i = 0; i < array.size(); i++) {
if (i == res.getBase().size())
res.getBase().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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("xpath"))
res.setXpathElement(parseString(json.get("xpath").getAsString()));
if (json.has("_xpath"))
parseElementProperties(getJObject(json, "_xpath"), res.getXpathElement());
if (json.has("xpathUsage"))
res.setXpathUsageElement(parseEnumeration(json.get("xpathUsage").getAsString(),
SearchParameter.XPathUsageType.NULL, new SearchParameter.XPathUsageTypeEnumFactory()));
if (json.has("_xpathUsage"))
parseElementProperties(getJObject(json, "_xpathUsage"), res.getXpathUsageElement());
if (json.has("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getTarget().add(new CodeType());
} else {
res.getTarget().add(parseCode(array.get(i).getAsString()));
}
}
}
;
if (json.has("_target")) {
JsonArray array = json.getAsJsonArray("_target");
for (int i = 0; i < array.size(); i++) {
if (i == res.getTarget().size())
res.getTarget().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("comparator");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getComparator().add(new Enumeration());
} else {
res.getComparator().add(parseEnumeration(array.get(i).getAsString(), SearchParameter.SearchComparator.NULL,
new SearchParameter.SearchComparatorEnumFactory()));
}
}
}
;
if (json.has("_comparator")) {
JsonArray array = json.getAsJsonArray("_comparator");
for (int i = 0; i < array.size(); i++) {
if (i == res.getComparator().size())
res.getComparator().add(parseEnumeration(null, SearchParameter.SearchComparator.NULL,
new SearchParameter.SearchComparatorEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getComparator().get(i));
}
}
;
if (json.has("modifier")) {
JsonArray array = json.getAsJsonArray("modifier");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getModifier().add(new Enumeration());
} else {
res.getModifier().add(parseEnumeration(array.get(i).getAsString(), SearchParameter.SearchModifierCode.NULL,
new SearchParameter.SearchModifierCodeEnumFactory()));
}
}
}
;
if (json.has("_modifier")) {
JsonArray array = json.getAsJsonArray("_modifier");
for (int i = 0; i < array.size(); i++) {
if (i == res.getModifier().size())
res.getModifier().add(parseEnumeration(null, SearchParameter.SearchModifierCode.NULL,
new SearchParameter.SearchModifierCodeEnumFactory()));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getModifier().get(i));
}
}
;
if (json.has("chain")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getChain().get(i));
}
}
;
if (json.has("component")) {
JsonArray array = json.getAsJsonArray("component");
for (int i = 0; i < array.size(); i++) {
res.getComponent()
.add(parseSearchParameterSearchParameterComponentComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SearchParameter.SearchParameterComponentComponent parseSearchParameterSearchParameterComponentComponent(
JsonObject json, SearchParameter owner) throws IOException, FHIRFormatError {
SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent();
parseSearchParameterSearchParameterComponentComponentProperties(json, owner, res);
return res;
}
protected void parseSearchParameterSearchParameterComponentComponentProperties(JsonObject json, SearchParameter owner,
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("instantiatesCanonical")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesCanonical().get(i));
}
}
;
if (json.has("instantiatesUri")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getInstantiatesUri().get(i));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("replaces")) {
JsonArray array = json.getAsJsonArray("replaces");
for (int i = 0; i < array.size(); i++) {
res.getReplaces().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("requisition"))
res.setRequisition(parseIdentifier(getJObject(json, "requisition")));
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ServiceRequest.ServiceRequestStatus.NULL,
new ServiceRequest.ServiceRequestStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("intent"))
res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), ServiceRequest.ServiceRequestIntent.NULL,
new ServiceRequest.ServiceRequestIntentEnumFactory()));
if (json.has("_intent"))
parseElementProperties(getJObject(json, "_intent"), res.getIntentElement());
if (json.has("category")) {
JsonArray array = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(),
ServiceRequest.ServiceRequestPriority.NULL, new ServiceRequest.ServiceRequestPriorityEnumFactory()));
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("orderDetail")) {
JsonArray array = json.getAsJsonArray("orderDetail");
for (int i = 0; i < array.size(); i++) {
res.getOrderDetail().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
Type quantity = parseType("quantity", json);
if (quantity != null)
res.setQuantity(quantity);
if (json.has("subject"))
res.setSubject(parseReference(getJObject(json, "subject")));
if (json.has("encounter"))
res.setEncounter(parseReference(getJObject(json, "encounter")));
Type occurrence = parseType("occurrence", json);
if (occurrence != null)
res.setOccurrence(occurrence);
Type 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 = json.getAsJsonArray("performer");
for (int i = 0; i < array.size(); i++) {
res.getPerformer().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("locationCode")) {
JsonArray array = json.getAsJsonArray("locationCode");
for (int i = 0; i < array.size(); i++) {
res.getLocationCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("locationReference")) {
JsonArray array = json.getAsJsonArray("locationReference");
for (int i = 0; i < array.size(); i++) {
res.getLocationReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("supportingInfo")) {
JsonArray array = json.getAsJsonArray("supportingInfo");
for (int i = 0; i < array.size(); i++) {
res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specimen")) {
JsonArray array = json.getAsJsonArray("specimen");
for (int i = 0; i < array.size(); i++) {
res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("bodySite")) {
JsonArray array = json.getAsJsonArray("bodySite");
for (int i = 0; i < array.size(); i++) {
res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("patientInstruction"))
res.setPatientInstructionElement(parseString(json.get("patientInstruction").getAsString()));
if (json.has("_patientInstruction"))
parseElementProperties(getJObject(json, "_patientInstruction"), res.getPatientInstructionElement());
if (json.has("relevantHistory")) {
JsonArray array = json.getAsJsonArray("relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("serviceCategory")) {
JsonArray array = json.getAsJsonArray("serviceCategory");
for (int i = 0; i < array.size(); i++) {
res.getServiceCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("serviceType")) {
JsonArray array = json.getAsJsonArray("serviceType");
for (int i = 0; i < array.size(); i++) {
res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("specialty")) {
JsonArray array = json.getAsJsonArray("specialty");
for (int i = 0; i < array.size(); i++) {
res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("appointmentType"))
res.setAppointmentType(parseCodeableConcept(getJObject(json, "appointmentType")));
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("parent");
for (int i = 0; i < array.size(); i++) {
res.getParent().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("request")) {
JsonArray array = json.getAsJsonArray("request");
for (int i = 0; i < array.size(); i++) {
res.getRequest().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("collection"))
res.setCollection(parseSpecimenSpecimenCollectionComponent(getJObject(json, "collection"), res));
if (json.has("processing")) {
JsonArray array = json.getAsJsonArray("processing");
for (int i = 0; i < array.size(); i++) {
res.getProcessing().add(parseSpecimenSpecimenProcessingComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("container")) {
JsonArray array = json.getAsJsonArray("container");
for (int i = 0; i < array.size(); i++) {
res.getContainer().add(parseSpecimenSpecimenContainerComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("condition")) {
JsonArray array = json.getAsJsonArray("condition");
for (int i = 0; i < array.size(); i++) {
res.getCondition().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected Specimen.SpecimenCollectionComponent parseSpecimenSpecimenCollectionComponent(JsonObject json,
Specimen owner) throws IOException, FHIRFormatError {
Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent();
parseSpecimenSpecimenCollectionComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenSpecimenCollectionComponentProperties(JsonObject json, Specimen owner,
Specimen.SpecimenCollectionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("collector"))
res.setCollector(parseReference(getJObject(json, "collector")));
Type 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("bodySite"))
res.setBodySite(parseCodeableConcept(getJObject(json, "bodySite")));
Type fastingStatus = parseType("fastingStatus", json);
if (fastingStatus != null)
res.setFastingStatus(fastingStatus);
}
protected Specimen.SpecimenProcessingComponent parseSpecimenSpecimenProcessingComponent(JsonObject json,
Specimen owner) throws IOException, FHIRFormatError {
Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent();
parseSpecimenSpecimenProcessingComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenSpecimenProcessingComponentProperties(JsonObject json, Specimen owner,
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("procedure"))
res.setProcedure(parseCodeableConcept(getJObject(json, "procedure")));
if (json.has("additive")) {
JsonArray array = json.getAsJsonArray("additive");
for (int i = 0; i < array.size(); i++) {
res.getAdditive().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
Type time = parseType("time", json);
if (time != null)
res.setTime(time);
}
protected Specimen.SpecimenContainerComponent parseSpecimenSpecimenContainerComponent(JsonObject json, Specimen owner)
throws IOException, FHIRFormatError {
Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent();
parseSpecimenSpecimenContainerComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenSpecimenContainerComponentProperties(JsonObject json, Specimen owner,
Specimen.SpecimenContainerComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier")) {
JsonArray array = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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.setType(parseCodeableConcept(getJObject(json, "type")));
if (json.has("capacity"))
res.setCapacity(parseQuantity(getJObject(json, "capacity")));
if (json.has("specimenQuantity"))
res.setSpecimenQuantity(parseQuantity(getJObject(json, "specimenQuantity")));
Type additive = parseType("additive", json);
if (additive != null)
res.setAdditive(additive);
}
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("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("typeCollected"))
res.setTypeCollected(parseCodeableConcept(getJObject(json, "typeCollected")));
if (json.has("patientPreparation")) {
JsonArray array = json.getAsJsonArray("patientPreparation");
for (int i = 0; i < array.size(); i++) {
res.getPatientPreparation().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("collection");
for (int i = 0; i < array.size(); i++) {
res.getCollection().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("typeTested")) {
JsonArray array = json.getAsJsonArray("typeTested");
for (int i = 0; i < array.size(); i++) {
res.getTypeTested()
.add(parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponent(
JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedComponent();
parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponentProperties(JsonObject json,
SpecimenDefinition owner, 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(
parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent(getJObject(json, "container"), owner));
if (json.has("requirement"))
res.setRequirementElement(parseString(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("rejectionCriterion")) {
JsonArray array = json.getAsJsonArray("rejectionCriterion");
for (int i = 0; i < array.size(); i++) {
res.getRejectionCriterion().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("handling")) {
JsonArray array = json.getAsJsonArray("handling");
for (int i = 0; i < array.size(); i++) {
res.getHandling().add(parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent(
JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent();
parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentProperties(JsonObject json,
SpecimenDefinition owner, 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(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("capacity"))
res.setCapacity(parseQuantity(getJObject(json, "capacity")));
Type minimumVolume = parseType("minimumVolume", json);
if (minimumVolume != null)
res.setMinimumVolume(minimumVolume);
if (json.has("additive")) {
JsonArray array = json.getAsJsonArray("additive");
for (int i = 0; i < array.size(); i++) {
res.getAdditive().add(parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("preparation"))
res.setPreparationElement(parseString(json.get("preparation").getAsString()));
if (json.has("_preparation"))
parseElementProperties(getJObject(json, "_preparation"), res.getPreparationElement());
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent(
JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent();
parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentProperties(
JsonObject json, SpecimenDefinition owner,
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type additive = parseType("additive", json);
if (additive != null)
res.setAdditive(additive);
}
protected SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent(
JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError {
SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent();
parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentProperties(json, owner, res);
return res;
}
protected void parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentProperties(JsonObject json,
SpecimenDefinition owner, 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(parseString(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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("keyword")) {
JsonArray array = json.getAsJsonArray("keyword");
for (int i = 0; i < array.size(); i++) {
res.getKeyword().add(parseCoding(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("mapping");
for (int i = 0; i < array.size(); i++) {
res.getMapping()
.add(parseStructureDefinitionStructureDefinitionMappingComponent(array.get(i).getAsJsonObject(), res));
}
}
;
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 = json.getAsJsonArray("context");
for (int i = 0; i < array.size(); i++) {
res.getContext()
.add(parseStructureDefinitionStructureDefinitionContextComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("contextInvariant")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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(parseStructureDefinitionStructureDefinitionSnapshotComponent(getJObject(json, "snapshot"), res));
if (json.has("differential"))
res.setDifferential(
parseStructureDefinitionStructureDefinitionDifferentialComponent(getJObject(json, "differential"), res));
}
protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionStructureDefinitionMappingComponent(
JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent();
parseStructureDefinitionStructureDefinitionMappingComponentProperties(json, owner, res);
return res;
}
protected void parseStructureDefinitionStructureDefinitionMappingComponentProperties(JsonObject json,
StructureDefinition owner, 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 parseStructureDefinitionStructureDefinitionContextComponent(
JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionContextComponent res = new StructureDefinition.StructureDefinitionContextComponent();
parseStructureDefinitionStructureDefinitionContextComponentProperties(json, owner, res);
return res;
}
protected void parseStructureDefinitionStructureDefinitionContextComponentProperties(JsonObject json,
StructureDefinition owner, 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 parseStructureDefinitionStructureDefinitionSnapshotComponent(
JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent();
parseStructureDefinitionStructureDefinitionSnapshotComponentProperties(json, owner, res);
return res;
}
protected void parseStructureDefinitionStructureDefinitionSnapshotComponentProperties(JsonObject json,
StructureDefinition owner, StructureDefinition.StructureDefinitionSnapshotComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("element")) {
JsonArray array = json.getAsJsonArray("element");
for (int i = 0; i < array.size(); i++) {
res.getElement().add(parseElementDefinition(array.get(i).getAsJsonObject()));
}
}
;
}
protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionStructureDefinitionDifferentialComponent(
JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError {
StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent();
parseStructureDefinitionStructureDefinitionDifferentialComponentProperties(json, owner, res);
return res;
}
protected void parseStructureDefinitionStructureDefinitionDifferentialComponentProperties(JsonObject json,
StructureDefinition owner, StructureDefinition.StructureDefinitionDifferentialComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("element")) {
JsonArray array = json.getAsJsonArray("element");
for (int i = 0; i < array.size(); i++) {
res.getElement().add(parseElementDefinition(array.get(i).getAsJsonObject()));
}
}
;
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("structure")) {
JsonArray array = json.getAsJsonArray("structure");
for (int i = 0; i < array.size(); i++) {
res.getStructure().add(parseStructureMapStructureMapStructureComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("import")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getImport().get(i));
}
}
;
if (json.has("group")) {
JsonArray array = json.getAsJsonArray("group");
for (int i = 0; i < array.size(); i++) {
res.getGroup().add(parseStructureMapStructureMapGroupComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected StructureMap.StructureMapStructureComponent parseStructureMapStructureMapStructureComponent(JsonObject json,
StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent();
parseStructureMapStructureMapStructureComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapStructureComponentProperties(JsonObject json, StructureMap owner,
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.StructureMapGroupComponent parseStructureMapStructureMapGroupComponent(JsonObject json,
StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent();
parseStructureMapStructureMapGroupComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupComponentProperties(JsonObject json, StructureMap owner,
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 = json.getAsJsonArray("input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseStructureMapStructureMapGroupInputComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("rule")) {
JsonArray array = json.getAsJsonArray("rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected StructureMap.StructureMapGroupInputComponent parseStructureMapStructureMapGroupInputComponent(
JsonObject json, StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent();
parseStructureMapStructureMapGroupInputComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupInputComponentProperties(JsonObject json, StructureMap owner,
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 parseStructureMapStructureMapGroupRuleComponent(JsonObject json,
StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent();
parseStructureMapStructureMapGroupRuleComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupRuleComponentProperties(JsonObject json, StructureMap owner,
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 = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource()
.add(parseStructureMapStructureMapGroupRuleSourceComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget()
.add(parseStructureMapStructureMapGroupRuleTargetComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("rule")) {
JsonArray array = json.getAsJsonArray("rule");
for (int i = 0; i < array.size(); i++) {
res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("dependent")) {
JsonArray array = json.getAsJsonArray("dependent");
for (int i = 0; i < array.size(); i++) {
res.getDependent()
.add(parseStructureMapStructureMapGroupRuleDependentComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("documentation"))
res.setDocumentationElement(parseString(json.get("documentation").getAsString()));
if (json.has("_documentation"))
parseElementProperties(getJObject(json, "_documentation"), res.getDocumentationElement());
}
protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapStructureMapGroupRuleSourceComponent(
JsonObject json, StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent();
parseStructureMapStructureMapGroupRuleSourceComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupRuleSourceComponentProperties(JsonObject json, StructureMap owner,
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());
Type defaultValue = parseType("defaultValue", json);
if (defaultValue != null)
res.setDefaultValue(defaultValue);
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 parseStructureMapStructureMapGroupRuleTargetComponent(
JsonObject json, StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent();
parseStructureMapStructureMapGroupRuleTargetComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupRuleTargetComponentProperties(JsonObject json, StructureMap owner,
StructureMap.StructureMapGroupRuleTargetComponent 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("contextType"))
res.setContextTypeElement(parseEnumeration(json.get("contextType").getAsString(),
StructureMap.StructureMapContextType.NULL, new StructureMap.StructureMapContextTypeEnumFactory()));
if (json.has("_contextType"))
parseElementProperties(getJObject(json, "_contextType"), res.getContextTypeElement());
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 = json.getAsJsonArray("listMode");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getListMode().add(new Enumeration());
} else {
res.getListMode().add(parseEnumeration(array.get(i).getAsString(),
StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory()));
}
}
}
;
if (json.has("_listMode")) {
JsonArray array = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter()
.add(parseStructureMapStructureMapGroupRuleTargetParameterComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapStructureMapGroupRuleTargetParameterComponent(
JsonObject json, StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent();
parseStructureMapStructureMapGroupRuleTargetParameterComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupRuleTargetParameterComponentProperties(JsonObject json,
StructureMap owner, StructureMap.StructureMapGroupRuleTargetParameterComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapStructureMapGroupRuleDependentComponent(
JsonObject json, StructureMap owner) throws IOException, FHIRFormatError {
StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent();
parseStructureMapStructureMapGroupRuleDependentComponentProperties(json, owner, res);
return res;
}
protected void parseStructureMapStructureMapGroupRuleDependentComponentProperties(JsonObject json, StructureMap owner,
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("variable")) {
JsonArray array = json.getAsJsonArray("variable");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getVariable().add(new StringType());
} else {
res.getVariable().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_variable")) {
JsonArray array = json.getAsJsonArray("_variable");
for (int i = 0; i < array.size(); i++) {
if (i == res.getVariable().size())
res.getVariable().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getVariable().get(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("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Subscription.SubscriptionStatus.NULL,
new Subscription.SubscriptionStatusEnumFactory()));
if (json.has("_status"))
parseElementProperties(getJObject(json, "_status"), res.getStatusElement());
if (json.has("contact")) {
JsonArray array = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("end"))
res.setEndElement(parseInstant(json.get("end").getAsString()));
if (json.has("_end"))
parseElementProperties(getJObject(json, "_end"), res.getEndElement());
if (json.has("reason"))
res.setReasonElement(parseString(json.get("reason").getAsString()));
if (json.has("_reason"))
parseElementProperties(getJObject(json, "_reason"), res.getReasonElement());
if (json.has("criteria"))
res.setCriteriaElement(parseString(json.get("criteria").getAsString()));
if (json.has("_criteria"))
parseElementProperties(getJObject(json, "_criteria"), res.getCriteriaElement());
if (json.has("error"))
res.setErrorElement(parseString(json.get("error").getAsString()));
if (json.has("_error"))
parseElementProperties(getJObject(json, "_error"), res.getErrorElement());
if (json.has("channel"))
res.setChannel(parseSubscriptionSubscriptionChannelComponent(getJObject(json, "channel"), res));
}
protected Subscription.SubscriptionChannelComponent parseSubscriptionSubscriptionChannelComponent(JsonObject json,
Subscription owner) throws IOException, FHIRFormatError {
Subscription.SubscriptionChannelComponent res = new Subscription.SubscriptionChannelComponent();
parseSubscriptionSubscriptionChannelComponentProperties(json, owner, res);
return res;
}
protected void parseSubscriptionSubscriptionChannelComponentProperties(JsonObject json, Subscription owner,
Subscription.SubscriptionChannelComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Subscription.SubscriptionChannelType.NULL,
new Subscription.SubscriptionChannelTypeEnumFactory()));
if (json.has("_type"))
parseElementProperties(getJObject(json, "_type"), res.getTypeElement());
if (json.has("endpoint"))
res.setEndpointElement(parseUrl(json.get("endpoint").getAsString()));
if (json.has("_endpoint"))
parseElementProperties(getJObject(json, "_endpoint"), res.getEndpointElement());
if (json.has("payload"))
res.setPayloadElement(parseCode(json.get("payload").getAsString()));
if (json.has("_payload"))
parseElementProperties(getJObject(json, "_payload"), res.getPayloadElement());
if (json.has("header")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getHeader().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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("category");
for (int i = 0; i < array.size(); i++) {
res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("instance")) {
JsonArray array = json.getAsJsonArray("instance");
for (int i = 0; i < array.size(); i++) {
res.getInstance().add(parseSubstanceSubstanceInstanceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("ingredient")) {
JsonArray array = json.getAsJsonArray("ingredient");
for (int i = 0; i < array.size(); i++) {
res.getIngredient().add(parseSubstanceSubstanceIngredientComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Substance.SubstanceInstanceComponent parseSubstanceSubstanceInstanceComponent(JsonObject json,
Substance owner) throws IOException, FHIRFormatError {
Substance.SubstanceInstanceComponent res = new Substance.SubstanceInstanceComponent();
parseSubstanceSubstanceInstanceComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSubstanceInstanceComponentProperties(JsonObject json, Substance owner,
Substance.SubstanceInstanceComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
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")));
}
protected Substance.SubstanceIngredientComponent parseSubstanceSubstanceIngredientComponent(JsonObject json,
Substance owner) throws IOException, FHIRFormatError {
Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent();
parseSubstanceSubstanceIngredientComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSubstanceIngredientComponentProperties(JsonObject json, Substance owner,
Substance.SubstanceIngredientComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseRatio(getJObject(json, "quantity")));
Type substance = parseType("substance", json);
if (substance != null)
res.setSubstance(substance);
}
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 = json.getAsJsonArray("subunit");
for (int i = 0; i < array.size(); i++) {
res.getSubunit()
.add(parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent(
JsonObject json, SubstanceNucleicAcid owner) throws IOException, FHIRFormatError {
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent();
parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentProperties(JsonObject json,
SubstanceNucleicAcid owner, 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 = json.getAsJsonArray("linkage");
for (int i = 0; i < array.size(); i++) {
res.getLinkage().add(parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("sugar")) {
JsonArray array = json.getAsJsonArray("sugar");
for (int i = 0; i < array.size(); i++) {
res.getSugar().add(
parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent(
JsonObject json, SubstanceNucleicAcid owner) throws IOException, FHIRFormatError {
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent();
parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentProperties(JsonObject json,
SubstanceNucleicAcid owner, 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 parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent(
JsonObject json, SubstanceNucleicAcid owner) throws IOException, FHIRFormatError {
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent();
parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentProperties(JsonObject json,
SubstanceNucleicAcid owner, 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("class"))
res.setClass_(parseCodeableConcept(getJObject(json, "class")));
if (json.has("geometry"))
res.setGeometry(parseCodeableConcept(getJObject(json, "geometry")));
if (json.has("copolymerConnectivity")) {
JsonArray array = json.getAsJsonArray("copolymerConnectivity");
for (int i = 0; i < array.size(); i++) {
res.getCopolymerConnectivity().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("modification")) {
JsonArray array = json.getAsJsonArray("modification");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getModification().add(new StringType());
} else {
res.getModification().add(parseString(array.get(i).getAsString()));
}
}
}
;
if (json.has("_modification")) {
JsonArray array = json.getAsJsonArray("_modification");
for (int i = 0; i < array.size(); i++) {
if (i == res.getModification().size())
res.getModification().add(parseString(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getModification().get(i));
}
}
;
if (json.has("monomerSet")) {
JsonArray array = json.getAsJsonArray("monomerSet");
for (int i = 0; i < array.size(); i++) {
res.getMonomerSet()
.add(parseSubstancePolymerSubstancePolymerMonomerSetComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("repeat")) {
JsonArray array = json.getAsJsonArray("repeat");
for (int i = 0; i < array.size(); i++) {
res.getRepeat().add(parseSubstancePolymerSubstancePolymerRepeatComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SubstancePolymer.SubstancePolymerMonomerSetComponent parseSubstancePolymerSubstancePolymerMonomerSetComponent(
JsonObject json, SubstancePolymer owner) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerMonomerSetComponent res = new SubstancePolymer.SubstancePolymerMonomerSetComponent();
parseSubstancePolymerSubstancePolymerMonomerSetComponentProperties(json, owner, res);
return res;
}
protected void parseSubstancePolymerSubstancePolymerMonomerSetComponentProperties(JsonObject json,
SubstancePolymer owner, 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 = json.getAsJsonArray("startingMaterial");
for (int i = 0; i < array.size(); i++) {
res.getStartingMaterial().add(parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent(
JsonObject json, SubstancePolymer owner) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent res = new SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent();
parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentProperties(json, owner, res);
return res;
}
protected void parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentProperties(JsonObject json,
SubstancePolymer owner, SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent 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("isDefining"))
res.setIsDefiningElement(parseBoolean(json.get("isDefining").getAsBoolean()));
if (json.has("_isDefining"))
parseElementProperties(getJObject(json, "_isDefining"), res.getIsDefiningElement());
if (json.has("amount"))
res.setAmount(parseSubstanceAmount(getJObject(json, "amount")));
}
protected SubstancePolymer.SubstancePolymerRepeatComponent parseSubstancePolymerSubstancePolymerRepeatComponent(
JsonObject json, SubstancePolymer owner) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatComponent res = new SubstancePolymer.SubstancePolymerRepeatComponent();
parseSubstancePolymerSubstancePolymerRepeatComponentProperties(json, owner, res);
return res;
}
protected void parseSubstancePolymerSubstancePolymerRepeatComponentProperties(JsonObject json, SubstancePolymer owner,
SubstancePolymer.SubstancePolymerRepeatComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("numberOfUnits"))
res.setNumberOfUnitsElement(parseInteger(json.get("numberOfUnits").getAsLong()));
if (json.has("_numberOfUnits"))
parseElementProperties(getJObject(json, "_numberOfUnits"), res.getNumberOfUnitsElement());
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 = json.getAsJsonArray("repeatUnit");
for (int i = 0; i < array.size(); i++) {
res.getRepeatUnit()
.add(parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent(
JsonObject json, SubstancePolymer owner) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent();
parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentProperties(json, owner, res);
return res;
}
protected void parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentProperties(JsonObject json,
SubstancePolymer owner, SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("orientationOfPolymerisation"))
res.setOrientationOfPolymerisation(parseCodeableConcept(getJObject(json, "orientationOfPolymerisation")));
if (json.has("repeatUnit"))
res.setRepeatUnitElement(parseString(json.get("repeatUnit").getAsString()));
if (json.has("_repeatUnit"))
parseElementProperties(getJObject(json, "_repeatUnit"), res.getRepeatUnitElement());
if (json.has("amount"))
res.setAmount(parseSubstanceAmount(getJObject(json, "amount")));
if (json.has("degreeOfPolymerisation")) {
JsonArray array = json.getAsJsonArray("degreeOfPolymerisation");
for (int i = 0; i < array.size(); i++) {
res.getDegreeOfPolymerisation()
.add(parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("structuralRepresentation")) {
JsonArray array = json.getAsJsonArray("structuralRepresentation");
for (int i = 0; i < array.size(); i++) {
res.getStructuralRepresentation()
.add(parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(
JsonObject json, SubstancePolymer owner) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent();
parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentProperties(json, owner, res);
return res;
}
protected void parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentProperties(
JsonObject json, SubstancePolymer owner,
SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("degree"))
res.setDegree(parseCodeableConcept(getJObject(json, "degree")));
if (json.has("amount"))
res.setAmount(parseSubstanceAmount(getJObject(json, "amount")));
}
protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(
JsonObject json, SubstancePolymer owner) throws IOException, FHIRFormatError {
SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent();
parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentProperties(json, owner, res);
return res;
}
protected void parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentProperties(
JsonObject json, SubstancePolymer owner,
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("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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getDisulfideLinkage().get(i));
}
}
;
if (json.has("subunit")) {
JsonArray array = json.getAsJsonArray("subunit");
for (int i = 0; i < array.size(); i++) {
res.getSubunit()
.add(parseSubstanceProteinSubstanceProteinSubunitComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SubstanceProtein.SubstanceProteinSubunitComponent parseSubstanceProteinSubstanceProteinSubunitComponent(
JsonObject json, SubstanceProtein owner) throws IOException, FHIRFormatError {
SubstanceProtein.SubstanceProteinSubunitComponent res = new SubstanceProtein.SubstanceProteinSubunitComponent();
parseSubstanceProteinSubstanceProteinSubunitComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceProteinSubstanceProteinSubunitComponentProperties(JsonObject json,
SubstanceProtein owner, 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 = json.getAsJsonArray("gene");
for (int i = 0; i < array.size(); i++) {
res.getGene().add(parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("geneElement")) {
JsonArray array = json.getAsJsonArray("geneElement");
for (int i = 0; i < array.size(); i++) {
res.getGeneElement().add(parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("classification")) {
JsonArray array = json.getAsJsonArray("classification");
for (int i = 0; i < array.size(); i++) {
res.getClassification()
.add(parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("target")) {
JsonArray array = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent(
JsonObject json, SubstanceReferenceInformation owner) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent();
parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentProperties(JsonObject json,
SubstanceReferenceInformation owner, 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 = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent(
JsonObject json, SubstanceReferenceInformation owner) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent();
parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentProperties(
JsonObject json, SubstanceReferenceInformation owner,
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 = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent(
JsonObject json, SubstanceReferenceInformation owner) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent();
parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentProperties(
JsonObject json, SubstanceReferenceInformation owner,
SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("domain"))
res.setDomain(parseCodeableConcept(getJObject(json, "domain")));
if (json.has("classification"))
res.setClassification(parseCodeableConcept(getJObject(json, "classification")));
if (json.has("subtype")) {
JsonArray array = json.getAsJsonArray("subtype");
for (int i = 0; i < array.size(); i++) {
res.getSubtype().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("source")) {
JsonArray array = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent(
JsonObject json, SubstanceReferenceInformation owner) throws IOException, FHIRFormatError {
SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent();
parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentProperties(
JsonObject json, SubstanceReferenceInformation owner,
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")));
Type 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 = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("parentSubstanceId");
for (int i = 0; i < array.size(); i++) {
res.getParentSubstanceId().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("parentSubstanceName")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getParentSubstanceName().get(i));
}
}
;
if (json.has("countryOfOrigin")) {
JsonArray array = json.getAsJsonArray("countryOfOrigin");
for (int i = 0; i < array.size(); i++) {
res.getCountryOfOrigin().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("geographicalLocation")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getGeographicalLocation().get(i));
}
}
;
if (json.has("developmentStage"))
res.setDevelopmentStage(parseCodeableConcept(getJObject(json, "developmentStage")));
if (json.has("fractionDescription")) {
JsonArray array = json.getAsJsonArray("fractionDescription");
for (int i = 0; i < array.size(); i++) {
res.getFractionDescription()
.add(parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("organism"))
res.setOrganism(
parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent(getJObject(json, "organism"), res));
if (json.has("partDescription")) {
JsonArray array = json.getAsJsonArray("partDescription");
for (int i = 0; i < array.size(); i++) {
res.getPartDescription().add(parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent(
JsonObject json, SubstanceSourceMaterial owner) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent();
parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentProperties(
JsonObject json, SubstanceSourceMaterial owner,
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 parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent(
JsonObject json, SubstanceSourceMaterial owner) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent();
parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentProperties(JsonObject json,
SubstanceSourceMaterial owner, 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 = json.getAsJsonArray("author");
for (int i = 0; i < array.size(); i++) {
res.getAuthor().add(parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("hybrid"))
res.setHybrid(parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent(
getJObject(json, "hybrid"), owner));
if (json.has("organismGeneral"))
res.setOrganismGeneral(parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent(
getJObject(json, "organismGeneral"), owner));
}
protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent(
JsonObject json, SubstanceSourceMaterial owner) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent();
parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentProperties(JsonObject json,
SubstanceSourceMaterial owner, 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 parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent(
JsonObject json, SubstanceSourceMaterial owner) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent();
parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentProperties(JsonObject json,
SubstanceSourceMaterial owner, 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 parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent(
JsonObject json, SubstanceSourceMaterial owner) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent();
parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentProperties(
JsonObject json, SubstanceSourceMaterial owner,
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 parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent(
JsonObject json, SubstanceSourceMaterial owner) throws IOException, FHIRFormatError {
SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent();
parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentProperties(JsonObject json,
SubstanceSourceMaterial owner, 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 SubstanceSpecification parseSubstanceSpecification(JsonObject json) throws IOException, FHIRFormatError {
SubstanceSpecification res = new SubstanceSpecification();
parseSubstanceSpecificationProperties(json, res);
return res;
}
protected void parseSubstanceSpecificationProperties(JsonObject json, SubstanceSpecification res)
throws IOException, FHIRFormatError {
parseDomainResourceProperties(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")));
if (json.has("domain"))
res.setDomain(parseCodeableConcept(getJObject(json, "domain")));
if (json.has("description"))
res.setDescriptionElement(parseString(json.get("description").getAsString()));
if (json.has("_description"))
parseElementProperties(getJObject(json, "_description"), res.getDescriptionElement());
if (json.has("source")) {
JsonArray array = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("moiety")) {
JsonArray array = json.getAsJsonArray("moiety");
for (int i = 0; i < array.size(); i++) {
res.getMoiety()
.add(parseSubstanceSpecificationSubstanceSpecificationMoietyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("property")) {
JsonArray array = json.getAsJsonArray("property");
for (int i = 0; i < array.size(); i++) {
res.getProperty().add(
parseSubstanceSpecificationSubstanceSpecificationPropertyComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("referenceInformation"))
res.setReferenceInformation(parseReference(getJObject(json, "referenceInformation")));
if (json.has("structure"))
res.setStructure(
parseSubstanceSpecificationSubstanceSpecificationStructureComponent(getJObject(json, "structure"), res));
if (json.has("code")) {
JsonArray array = json.getAsJsonArray("code");
for (int i = 0; i < array.size(); i++) {
res.getCode()
.add(parseSubstanceSpecificationSubstanceSpecificationCodeComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("name")) {
JsonArray array = json.getAsJsonArray("name");
for (int i = 0; i < array.size(); i++) {
res.getName()
.add(parseSubstanceSpecificationSubstanceSpecificationNameComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("molecularWeight")) {
JsonArray array = json.getAsJsonArray("molecularWeight");
for (int i = 0; i < array.size(); i++) {
res.getMolecularWeight()
.add(parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("relationship")) {
JsonArray array = json.getAsJsonArray("relationship");
for (int i = 0; i < array.size(); i++) {
res.getRelationship().add(parseSubstanceSpecificationSubstanceSpecificationRelationshipComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
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(parseReference(getJObject(json, "sourceMaterial")));
}
protected SubstanceSpecification.SubstanceSpecificationMoietyComponent parseSubstanceSpecificationSubstanceSpecificationMoietyComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationMoietyComponent res = new SubstanceSpecification.SubstanceSpecificationMoietyComponent();
parseSubstanceSpecificationSubstanceSpecificationMoietyComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationMoietyComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationMoietyComponent 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());
Type amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
}
protected SubstanceSpecification.SubstanceSpecificationPropertyComponent parseSubstanceSpecificationSubstanceSpecificationPropertyComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationPropertyComponent res = new SubstanceSpecification.SubstanceSpecificationPropertyComponent();
parseSubstanceSpecificationSubstanceSpecificationPropertyComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationPropertyComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationPropertyComponent 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")));
if (json.has("parameters"))
res.setParametersElement(parseString(json.get("parameters").getAsString()));
if (json.has("_parameters"))
parseElementProperties(getJObject(json, "_parameters"), res.getParametersElement());
Type definingSubstance = parseType("definingSubstance", json);
if (definingSubstance != null)
res.setDefiningSubstance(definingSubstance);
Type amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
}
protected SubstanceSpecification.SubstanceSpecificationStructureComponent parseSubstanceSpecificationSubstanceSpecificationStructureComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationStructureComponent res = new SubstanceSpecification.SubstanceSpecificationStructureComponent();
parseSubstanceSpecificationSubstanceSpecificationStructureComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationStructureComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationStructureComponent 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("isotope")) {
JsonArray array = json.getAsJsonArray("isotope");
for (int i = 0; i < array.size(); i++) {
res.getIsotope().add(parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("molecularWeight"))
res.setMolecularWeight(parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(
getJObject(json, "molecularWeight"), owner));
if (json.has("source")) {
JsonArray array = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("representation")) {
JsonArray array = json.getAsJsonArray("representation");
for (int i = 0; i < array.size(); i++) {
res.getRepresentation().add(parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent res = new SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent();
parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("identifier"))
res.setIdentifier(parseIdentifier(getJObject(json, "identifier")));
if (json.has("name"))
res.setName(parseCodeableConcept(getJObject(json, "name")));
if (json.has("substitution"))
res.setSubstitution(parseCodeableConcept(getJObject(json, "substitution")));
if (json.has("halfLife"))
res.setHalfLife(parseQuantity(getJObject(json, "halfLife")));
if (json.has("molecularWeight"))
res.setMolecularWeight(parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(
getJObject(json, "molecularWeight"), owner));
}
protected SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent res = new SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent();
parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentProperties(json, owner,
res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentProperties(
JsonObject json, SubstanceSpecification owner,
SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent 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 SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent res = new SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent();
parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentProperties(
JsonObject json, SubstanceSpecification owner,
SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent 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("attachment"))
res.setAttachment(parseAttachment(getJObject(json, "attachment")));
}
protected SubstanceSpecification.SubstanceSpecificationCodeComponent parseSubstanceSpecificationSubstanceSpecificationCodeComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationCodeComponent res = new SubstanceSpecification.SubstanceSpecificationCodeComponent();
parseSubstanceSpecificationSubstanceSpecificationCodeComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationCodeComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationCodeComponent 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("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
parseElementProperties(getJObject(json, "_comment"), res.getCommentElement());
if (json.has("source")) {
JsonArray array = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected SubstanceSpecification.SubstanceSpecificationNameComponent parseSubstanceSpecificationSubstanceSpecificationNameComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationNameComponent res = new SubstanceSpecification.SubstanceSpecificationNameComponent();
parseSubstanceSpecificationSubstanceSpecificationNameComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationNameComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationNameComponent 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 = json.getAsJsonArray("language");
for (int i = 0; i < array.size(); i++) {
res.getLanguage().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("domain")) {
JsonArray array = json.getAsJsonArray("domain");
for (int i = 0; i < array.size(); i++) {
res.getDomain().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("synonym")) {
JsonArray array = json.getAsJsonArray("synonym");
for (int i = 0; i < array.size(); i++) {
res.getSynonym()
.add(parseSubstanceSpecificationSubstanceSpecificationNameComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("translation")) {
JsonArray array = json.getAsJsonArray("translation");
for (int i = 0; i < array.size(); i++) {
res.getTranslation()
.add(parseSubstanceSpecificationSubstanceSpecificationNameComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("official")) {
JsonArray array = json.getAsJsonArray("official");
for (int i = 0; i < array.size(); i++) {
res.getOfficial().add(parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("source")) {
JsonArray array = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected SubstanceSpecification.SubstanceSpecificationNameOfficialComponent parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationNameOfficialComponent res = new SubstanceSpecification.SubstanceSpecificationNameOfficialComponent();
parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationNameOfficialComponent 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 SubstanceSpecification.SubstanceSpecificationRelationshipComponent parseSubstanceSpecificationSubstanceSpecificationRelationshipComponent(
JsonObject json, SubstanceSpecification owner) throws IOException, FHIRFormatError {
SubstanceSpecification.SubstanceSpecificationRelationshipComponent res = new SubstanceSpecification.SubstanceSpecificationRelationshipComponent();
parseSubstanceSpecificationSubstanceSpecificationRelationshipComponentProperties(json, owner, res);
return res;
}
protected void parseSubstanceSpecificationSubstanceSpecificationRelationshipComponentProperties(JsonObject json,
SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationRelationshipComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
Type substance = parseType("substance", json);
if (substance != null)
res.setSubstance(substance);
if (json.has("relationship"))
res.setRelationship(parseCodeableConcept(getJObject(json, "relationship")));
if (json.has("isDefining"))
res.setIsDefiningElement(parseBoolean(json.get("isDefining").getAsBoolean()));
if (json.has("_isDefining"))
parseElementProperties(getJObject(json, "_isDefining"), res.getIsDefiningElement());
Type amount = parseType("amount", json);
if (amount != null)
res.setAmount(amount);
if (json.has("amountRatioLowLimit"))
res.setAmountRatioLowLimit(parseRatio(getJObject(json, "amountRatioLowLimit")));
if (json.has("amountType"))
res.setAmountType(parseCodeableConcept(getJObject(json, "amountType")));
if (json.has("source")) {
JsonArray array = json.getAsJsonArray("source");
for (int i = 0; i < array.size(); i++) {
res.getSource().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("basedOn")) {
JsonArray array = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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"))
res.setSuppliedItem(
parseSupplyDeliverySupplyDeliverySuppliedItemComponent(getJObject(json, "suppliedItem"), res));
Type 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 = json.getAsJsonArray("receiver");
for (int i = 0; i < array.size(); i++) {
res.getReceiver().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySupplyDeliverySuppliedItemComponent(
JsonObject json, SupplyDelivery owner) throws IOException, FHIRFormatError {
SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent();
parseSupplyDeliverySupplyDeliverySuppliedItemComponentProperties(json, owner, res);
return res;
}
protected void parseSupplyDeliverySupplyDeliverySuppliedItemComponentProperties(JsonObject json, SupplyDelivery owner,
SupplyDelivery.SupplyDeliverySuppliedItemComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("category"))
res.setCategory(parseCodeableConcept(getJObject(json, "category")));
if (json.has("priority"))
res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), SupplyRequest.RequestPriority.NULL,
new SupplyRequest.RequestPriorityEnumFactory()));
if (json.has("_priority"))
parseElementProperties(getJObject(json, "_priority"), res.getPriorityElement());
Type item = parseType("item", json);
if (item != null)
res.setItem(item);
if (json.has("quantity"))
res.setQuantity(parseQuantity(getJObject(json, "quantity")));
if (json.has("parameter")) {
JsonArray array = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseSupplyRequestSupplyRequestParameterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
Type 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 = json.getAsJsonArray("supplier");
for (int i = 0; i < array.size(); i++) {
res.getSupplier().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonCode")) {
JsonArray array = json.getAsJsonArray("reasonCode");
for (int i = 0; i < array.size(); i++) {
res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("reasonReference")) {
JsonArray array = json.getAsJsonArray("reasonReference");
for (int i = 0; i < array.size(); i++) {
res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("deliverFrom"))
res.setDeliverFrom(parseReference(getJObject(json, "deliverFrom")));
if (json.has("deliverTo"))
res.setDeliverTo(parseReference(getJObject(json, "deliverTo")));
}
protected SupplyRequest.SupplyRequestParameterComponent parseSupplyRequestSupplyRequestParameterComponent(
JsonObject json, SupplyRequest owner) throws IOException, FHIRFormatError {
SupplyRequest.SupplyRequestParameterComponent res = new SupplyRequest.SupplyRequestParameterComponent();
parseSupplyRequestSupplyRequestParameterComponentProperties(json, owner, res);
return res;
}
protected void parseSupplyRequestSupplyRequestParameterComponentProperties(JsonObject json, SupplyRequest owner,
SupplyRequest.SupplyRequestParameterComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("code"))
res.setCode(parseCodeableConcept(getJObject(json, "code")));
Type 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("basedOn");
for (int i = 0; i < array.size(); i++) {
res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("groupIdentifier"))
res.setGroupIdentifier(parseIdentifier(getJObject(json, "groupIdentifier")));
if (json.has("partOf")) {
JsonArray array = json.getAsJsonArray("partOf");
for (int i = 0; i < array.size(); i++) {
res.getPartOf().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
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(parseCodeableConcept(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(), Task.TaskPriority.NULL,
new Task.TaskPriorityEnumFactory()));
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("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("performerType")) {
JsonArray array = json.getAsJsonArray("performerType");
for (int i = 0; i < array.size(); i++) {
res.getPerformerType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("owner"))
res.setOwner(parseReference(getJObject(json, "owner")));
if (json.has("location"))
res.setLocation(parseReference(getJObject(json, "location")));
if (json.has("reasonCode"))
res.setReasonCode(parseCodeableConcept(getJObject(json, "reasonCode")));
if (json.has("reasonReference"))
res.setReasonReference(parseReference(getJObject(json, "reasonReference")));
if (json.has("insurance")) {
JsonArray array = json.getAsJsonArray("insurance");
for (int i = 0; i < array.size(); i++) {
res.getInsurance().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("note")) {
JsonArray array = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("relevantHistory")) {
JsonArray array = json.getAsJsonArray("relevantHistory");
for (int i = 0; i < array.size(); i++) {
res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("restriction"))
res.setRestriction(parseTaskTaskRestrictionComponent(getJObject(json, "restriction"), res));
if (json.has("input")) {
JsonArray array = json.getAsJsonArray("input");
for (int i = 0; i < array.size(); i++) {
res.getInput().add(parseTaskParameterComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("output")) {
JsonArray array = json.getAsJsonArray("output");
for (int i = 0; i < array.size(); i++) {
res.getOutput().add(parseTaskTaskOutputComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected Task.TaskRestrictionComponent parseTaskTaskRestrictionComponent(JsonObject json, Task owner)
throws IOException, FHIRFormatError {
Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent();
parseTaskTaskRestrictionComponentProperties(json, owner, res);
return res;
}
protected void parseTaskTaskRestrictionComponentProperties(JsonObject json, Task owner,
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 = json.getAsJsonArray("recipient");
for (int i = 0; i < array.size(); i++) {
res.getRecipient().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
}
protected Task.ParameterComponent parseTaskParameterComponent(JsonObject json, Task owner)
throws IOException, FHIRFormatError {
Task.ParameterComponent res = new Task.ParameterComponent();
parseTaskParameterComponentProperties(json, owner, res);
return res;
}
protected void parseTaskParameterComponentProperties(JsonObject json, Task owner, Task.ParameterComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected Task.TaskOutputComponent parseTaskTaskOutputComponent(JsonObject json, Task owner)
throws IOException, FHIRFormatError {
Task.TaskOutputComponent res = new Task.TaskOutputComponent();
parseTaskTaskOutputComponentProperties(json, owner, res);
return res;
}
protected void parseTaskTaskOutputComponentProperties(JsonObject json, Task owner, Task.TaskOutputComponent res)
throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("type"))
res.setType(parseCodeableConcept(getJObject(json, "type")));
Type 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 {
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("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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("kind"))
res.setKindElement(
parseEnumeration(json.get("kind").getAsString(), TerminologyCapabilities.CapabilityStatementKind.NULL,
new TerminologyCapabilities.CapabilityStatementKindEnumFactory()));
if (json.has("_kind"))
parseElementProperties(getJObject(json, "_kind"), res.getKindElement());
if (json.has("software"))
res.setSoftware(
parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent(getJObject(json, "software"), res));
if (json.has("implementation"))
res.setImplementation(parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent(
getJObject(json, "implementation"), res));
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 = json.getAsJsonArray("codeSystem");
for (int i = 0; i < array.size(); i++) {
res.getCodeSystem().add(parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(
array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("expansion"))
res.setExpansion(
parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(getJObject(json, "expansion"), res));
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(parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent(
getJObject(json, "validateCode"), res));
if (json.has("translation"))
res.setTranslation(parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent(
getJObject(json, "translation"), res));
if (json.has("closure"))
res.setClosure(
parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(getJObject(json, "closure"), res));
}
protected TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent res = new TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent res = new TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 = json.getAsJsonArray("version");
for (int i = 0; i < array.size(); i++) {
res.getVersion().add(parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("subsumption"))
res.setSubsumptionElement(parseBoolean(json.get("subsumption").getAsBoolean()));
if (json.has("_subsumption"))
parseElementProperties(getJObject(json, "_subsumption"), res.getSubsumptionElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentProperties(
JsonObject json, TerminologyCapabilities owner,
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 = json.getAsJsonArray("language");
for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) {
res.getLanguage().add(new CodeType());
} else {
res.getLanguage().add(parseCode(array.get(i).getAsString()));
}
}
}
;
if (json.has("_language")) {
JsonArray array = json.getAsJsonArray("_language");
for (int i = 0; i < array.size(); i++) {
if (i == res.getLanguage().size())
res.getLanguage().add(parseCode(null));
if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getLanguage().get(i));
}
}
;
if (json.has("filter")) {
JsonArray array = json.getAsJsonArray("filter");
for (int i = 0; i < array.size(); i++) {
res.getFilter().add(parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("property")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getProperty().get(i));
}
}
;
}
protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentProperties(
JsonObject json, TerminologyCapabilities owner,
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getOp().get(i));
}
}
;
}
protected TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent res = new TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(
array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("textFilter"))
res.setTextFilterElement(parseMarkdown(json.get("textFilter").getAsString()));
if (json.has("_textFilter"))
parseElementProperties(getJObject(json, "_textFilter"), res.getTextFilterElement());
}
protected TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent res = new TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentProperties(
JsonObject json, TerminologyCapabilities owner,
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 parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent res = new TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent res = new TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(
JsonObject json, TerminologyCapabilities owner) throws IOException, FHIRFormatError {
TerminologyCapabilities.TerminologyCapabilitiesClosureComponent res = new TerminologyCapabilities.TerminologyCapabilitiesClosureComponent();
parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentProperties(json, owner, res);
return res;
}
protected void parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentProperties(JsonObject json,
TerminologyCapabilities owner, 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 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.setTestScript(parseReference(getJObject(json, "testScript")));
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 = json.getAsJsonArray("participant");
for (int i = 0; i < array.size(); i++) {
res.getParticipant().add(parseTestReportTestReportParticipantComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("setup"))
res.setSetup(parseTestReportTestReportSetupComponent(getJObject(json, "setup"), res));
if (json.has("test")) {
JsonArray array = json.getAsJsonArray("test");
for (int i = 0; i < array.size(); i++) {
res.getTest().add(parseTestReportTestReportTestComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("teardown"))
res.setTeardown(parseTestReportTestReportTeardownComponent(getJObject(json, "teardown"), res));
}
protected TestReport.TestReportParticipantComponent parseTestReportTestReportParticipantComponent(JsonObject json,
TestReport owner) throws IOException, FHIRFormatError {
TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent();
parseTestReportTestReportParticipantComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportTestReportParticipantComponentProperties(JsonObject json, TestReport owner,
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 parseTestReportTestReportSetupComponent(JsonObject json,
TestReport owner) throws IOException, FHIRFormatError {
TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent();
parseTestReportTestReportSetupComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportTestReportSetupComponentProperties(JsonObject json, TestReport owner,
TestReport.TestReportSetupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestReportSetupActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(JsonObject json, TestReport owner)
throws IOException, FHIRFormatError {
TestReport.SetupActionComponent res = new TestReport.SetupActionComponent();
parseTestReportSetupActionComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportSetupActionComponentProperties(JsonObject json, TestReport owner,
TestReport.SetupActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestReportSetupActionOperationComponent(getJObject(json, "operation"), owner));
if (json.has("assert"))
res.setAssert(parseTestReportSetupActionAssertComponent(getJObject(json, "assert"), owner));
}
protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(JsonObject json,
TestReport owner) throws IOException, FHIRFormatError {
TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent();
parseTestReportSetupActionOperationComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportSetupActionOperationComponentProperties(JsonObject json, TestReport owner,
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,
TestReport owner) throws IOException, FHIRFormatError {
TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent();
parseTestReportSetupActionAssertComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportSetupActionAssertComponentProperties(JsonObject json, TestReport owner,
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());
}
protected TestReport.TestReportTestComponent parseTestReportTestReportTestComponent(JsonObject json, TestReport owner)
throws IOException, FHIRFormatError {
TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent();
parseTestReportTestReportTestComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportTestReportTestComponentProperties(JsonObject json, TestReport owner,
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 = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestReportTestActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestReport.TestActionComponent parseTestReportTestActionComponent(JsonObject json, TestReport owner)
throws IOException, FHIRFormatError {
TestReport.TestActionComponent res = new TestReport.TestActionComponent();
parseTestReportTestActionComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportTestActionComponentProperties(JsonObject json, TestReport owner,
TestReport.TestActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestReportSetupActionOperationComponent(getJObject(json, "operation"), owner));
if (json.has("assert"))
res.setAssert(parseTestReportSetupActionAssertComponent(getJObject(json, "assert"), owner));
}
protected TestReport.TestReportTeardownComponent parseTestReportTestReportTeardownComponent(JsonObject json,
TestReport owner) throws IOException, FHIRFormatError {
TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent();
parseTestReportTestReportTeardownComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportTestReportTeardownComponentProperties(JsonObject json, TestReport owner,
TestReport.TestReportTeardownComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestReportTeardownActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(JsonObject json, TestReport owner)
throws IOException, FHIRFormatError {
TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent();
parseTestReportTeardownActionComponentProperties(json, owner, res);
return res;
}
protected void parseTestReportTeardownActionComponentProperties(JsonObject json, TestReport owner,
TestReport.TeardownActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestReportSetupActionOperationComponent(getJObject(json, "operation"), owner));
}
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 {
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());
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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("origin")) {
JsonArray array = json.getAsJsonArray("origin");
for (int i = 0; i < array.size(); i++) {
res.getOrigin().add(parseTestScriptTestScriptOriginComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("destination")) {
JsonArray array = json.getAsJsonArray("destination");
for (int i = 0; i < array.size(); i++) {
res.getDestination().add(parseTestScriptTestScriptDestinationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("metadata"))
res.setMetadata(parseTestScriptTestScriptMetadataComponent(getJObject(json, "metadata"), res));
if (json.has("fixture")) {
JsonArray array = json.getAsJsonArray("fixture");
for (int i = 0; i < array.size(); i++) {
res.getFixture().add(parseTestScriptTestScriptFixtureComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("profile")) {
JsonArray array = json.getAsJsonArray("profile");
for (int i = 0; i < array.size(); i++) {
res.getProfile().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("variable")) {
JsonArray array = json.getAsJsonArray("variable");
for (int i = 0; i < array.size(); i++) {
res.getVariable().add(parseTestScriptTestScriptVariableComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("setup"))
res.setSetup(parseTestScriptTestScriptSetupComponent(getJObject(json, "setup"), res));
if (json.has("test")) {
JsonArray array = json.getAsJsonArray("test");
for (int i = 0; i < array.size(); i++) {
res.getTest().add(parseTestScriptTestScriptTestComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("teardown"))
res.setTeardown(parseTestScriptTestScriptTeardownComponent(getJObject(json, "teardown"), res));
}
protected TestScript.TestScriptOriginComponent parseTestScriptTestScriptOriginComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent();
parseTestScriptTestScriptOriginComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptOriginComponentProperties(JsonObject json, TestScript owner,
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")));
}
protected TestScript.TestScriptDestinationComponent parseTestScriptTestScriptDestinationComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent();
parseTestScriptTestScriptDestinationComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptDestinationComponentProperties(JsonObject json, TestScript owner,
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")));
}
protected TestScript.TestScriptMetadataComponent parseTestScriptTestScriptMetadataComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent();
parseTestScriptTestScriptMetadataComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptMetadataComponentProperties(JsonObject json, TestScript owner,
TestScript.TestScriptMetadataComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("link")) {
JsonArray array = json.getAsJsonArray("link");
for (int i = 0; i < array.size(); i++) {
res.getLink().add(parseTestScriptTestScriptMetadataLinkComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("capability")) {
JsonArray array = json.getAsJsonArray("capability");
for (int i = 0; i < array.size(); i++) {
res.getCapability()
.add(parseTestScriptTestScriptMetadataCapabilityComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestScript.TestScriptMetadataLinkComponent parseTestScriptTestScriptMetadataLinkComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent();
parseTestScriptTestScriptMetadataLinkComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptMetadataLinkComponentProperties(JsonObject json, TestScript owner,
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 parseTestScriptTestScriptMetadataCapabilityComponent(
JsonObject json, TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent();
parseTestScriptTestScriptMetadataCapabilityComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptMetadataCapabilityComponentProperties(JsonObject json, TestScript owner,
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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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 = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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.TestScriptFixtureComponent parseTestScriptTestScriptFixtureComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent();
parseTestScriptTestScriptFixtureComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptFixtureComponentProperties(JsonObject json, TestScript owner,
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 parseTestScriptTestScriptVariableComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent();
parseTestScriptTestScriptVariableComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptVariableComponentProperties(JsonObject json, TestScript owner,
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 parseTestScriptTestScriptSetupComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent();
parseTestScriptTestScriptSetupComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptSetupComponentProperties(JsonObject json, TestScript owner,
TestScript.TestScriptSetupComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestScriptSetupActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(JsonObject json, TestScript owner)
throws IOException, FHIRFormatError {
TestScript.SetupActionComponent res = new TestScript.SetupActionComponent();
parseTestScriptSetupActionComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptSetupActionComponentProperties(JsonObject json, TestScript owner,
TestScript.SetupActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestScriptSetupActionOperationComponent(getJObject(json, "operation"), owner));
if (json.has("assert"))
res.setAssert(parseTestScriptSetupActionAssertComponent(getJObject(json, "assert"), owner));
}
protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent();
parseTestScriptSetupActionOperationComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptSetupActionOperationComponentProperties(JsonObject json, TestScript owner,
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(parseCode(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 = json.getAsJsonArray("requestHeader");
for (int i = 0; i < array.size(); i++) {
res.getRequestHeader()
.add(parseTestScriptSetupActionOperationRequestHeaderComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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, TestScript owner) throws IOException, FHIRFormatError {
TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent();
parseTestScriptSetupActionOperationRequestHeaderComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptSetupActionOperationRequestHeaderComponentProperties(JsonObject json, TestScript owner,
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,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent();
parseTestScriptSetupActionAssertComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptSetupActionAssertComponentProperties(JsonObject json, TestScript owner,
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("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(parseCode(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("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());
}
protected TestScript.TestScriptTestComponent parseTestScriptTestScriptTestComponent(JsonObject json, TestScript owner)
throws IOException, FHIRFormatError {
TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent();
parseTestScriptTestScriptTestComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptTestComponentProperties(JsonObject json, TestScript owner,
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 = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestScriptTestActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestScript.TestActionComponent parseTestScriptTestActionComponent(JsonObject json, TestScript owner)
throws IOException, FHIRFormatError {
TestScript.TestActionComponent res = new TestScript.TestActionComponent();
parseTestScriptTestActionComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestActionComponentProperties(JsonObject json, TestScript owner,
TestScript.TestActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestScriptSetupActionOperationComponent(getJObject(json, "operation"), owner));
if (json.has("assert"))
res.setAssert(parseTestScriptSetupActionAssertComponent(getJObject(json, "assert"), owner));
}
protected TestScript.TestScriptTeardownComponent parseTestScriptTestScriptTeardownComponent(JsonObject json,
TestScript owner) throws IOException, FHIRFormatError {
TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent();
parseTestScriptTestScriptTeardownComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTestScriptTeardownComponentProperties(JsonObject json, TestScript owner,
TestScript.TestScriptTeardownComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("action")) {
JsonArray array = json.getAsJsonArray("action");
for (int i = 0; i < array.size(); i++) {
res.getAction().add(parseTestScriptTeardownActionComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(JsonObject json, TestScript owner)
throws IOException, FHIRFormatError {
TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent();
parseTestScriptTeardownActionComponentProperties(json, owner, res);
return res;
}
protected void parseTestScriptTeardownActionComponentProperties(JsonObject json, TestScript owner,
TestScript.TeardownActionComponent res) throws IOException, FHIRFormatError {
parseBackboneElementProperties(json, res);
if (json.has("operation"))
res.setOperation(parseTestScriptSetupActionOperationComponent(getJObject(json, "operation"), owner));
}
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 {
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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
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("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 = json.getAsJsonArray("contact");
for (int i = 0; i < array.size(); i++) {
res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("useContext");
for (int i = 0; i < array.size(); i++) {
res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("jurisdiction")) {
JsonArray array = json.getAsJsonArray("jurisdiction");
for (int i = 0; i < array.size(); i++) {
res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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("compose"))
res.setCompose(parseValueSetValueSetComposeComponent(getJObject(json, "compose"), res));
if (json.has("expansion"))
res.setExpansion(parseValueSetValueSetExpansionComponent(getJObject(json, "expansion"), res));
}
protected ValueSet.ValueSetComposeComponent parseValueSetValueSetComposeComponent(JsonObject json, ValueSet owner)
throws IOException, FHIRFormatError {
ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent();
parseValueSetValueSetComposeComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetValueSetComposeComponentProperties(JsonObject json, ValueSet owner,
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 = json.getAsJsonArray("include");
for (int i = 0; i < array.size(); i++) {
res.getInclude().add(parseValueSetConceptSetComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("exclude")) {
JsonArray array = json.getAsJsonArray("exclude");
for (int i = 0; i < array.size(); i++) {
res.getExclude().add(parseValueSetConceptSetComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(JsonObject json, ValueSet owner)
throws IOException, FHIRFormatError {
ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent();
parseValueSetConceptSetComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetConceptSetComponentProperties(JsonObject json, ValueSet owner,
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 = json.getAsJsonArray("concept");
for (int i = 0; i < array.size(); i++) {
res.getConcept().add(parseValueSetConceptReferenceComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("filter")) {
JsonArray array = json.getAsJsonArray("filter");
for (int i = 0; i < array.size(); i++) {
res.getFilter().add(parseValueSetConceptSetFilterComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("valueSet")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), res.getValueSet().get(i));
}
}
;
}
protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(JsonObject json, ValueSet owner)
throws IOException, FHIRFormatError {
ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent();
parseValueSetConceptReferenceComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetConceptReferenceComponentProperties(JsonObject json, ValueSet owner,
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 = json.getAsJsonArray("designation");
for (int i = 0; i < array.size(); i++) {
res.getDesignation()
.add(parseValueSetConceptReferenceDesignationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent(
JsonObject json, ValueSet owner) throws IOException, FHIRFormatError {
ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent();
parseValueSetConceptReferenceDesignationComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetConceptReferenceDesignationComponentProperties(JsonObject json, ValueSet owner,
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("value"))
res.setValueElement(parseString(json.get("value").getAsString()));
if (json.has("_value"))
parseElementProperties(getJObject(json, "_value"), res.getValueElement());
}
protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(JsonObject json, ValueSet owner)
throws IOException, FHIRFormatError {
ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent();
parseValueSetConceptSetFilterComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetConceptSetFilterComponentProperties(JsonObject json, ValueSet owner,
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(), ValueSet.FilterOperator.NULL,
new ValueSet.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 parseValueSetValueSetExpansionComponent(JsonObject json, ValueSet owner)
throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent();
parseValueSetValueSetExpansionComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetValueSetExpansionComponentProperties(JsonObject json, ValueSet owner,
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("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 = json.getAsJsonArray("parameter");
for (int i = 0; i < array.size(); i++) {
res.getParameter().add(parseValueSetValueSetExpansionParameterComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("contains")) {
JsonArray array = json.getAsJsonArray("contains");
for (int i = 0; i < array.size(); i++) {
res.getContains().add(parseValueSetValueSetExpansionContainsComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
protected ValueSet.ValueSetExpansionParameterComponent parseValueSetValueSetExpansionParameterComponent(
JsonObject json, ValueSet owner) throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent();
parseValueSetValueSetExpansionParameterComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetValueSetExpansionParameterComponentProperties(JsonObject json, ValueSet owner,
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());
Type value = parseType("value", json);
if (value != null)
res.setValue(value);
}
protected ValueSet.ValueSetExpansionContainsComponent parseValueSetValueSetExpansionContainsComponent(JsonObject json,
ValueSet owner) throws IOException, FHIRFormatError {
ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent();
parseValueSetValueSetExpansionContainsComponentProperties(json, owner, res);
return res;
}
protected void parseValueSetValueSetExpansionContainsComponentProperties(JsonObject json, ValueSet owner,
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 = json.getAsJsonArray("designation");
for (int i = 0; i < array.size(); i++) {
res.getDesignation()
.add(parseValueSetConceptReferenceDesignationComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
if (json.has("contains")) {
JsonArray array = json.getAsJsonArray("contains");
for (int i = 0; i < array.size(); i++) {
res.getContains().add(parseValueSetValueSetExpansionContainsComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
}
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 = json.getAsJsonArray("target");
for (int i = 0; i < array.size(); i++) {
res.getTarget().add(parseReference(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("targetLocation")) {
JsonArray array = json.getAsJsonArray("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 = json.getAsJsonArray("_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(array.get(i).getAsJsonObject(), 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.Status.NULL,
new VerificationResult.StatusEnumFactory()));
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 = json.getAsJsonArray("validationProcess");
for (int i = 0; i < array.size(); i++) {
res.getValidationProcess().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("primarySource");
for (int i = 0; i < array.size(); i++) {
res.getPrimarySource()
.add(parseVerificationResultVerificationResultPrimarySourceComponent(array.get(i).getAsJsonObject(), res));
}
}
;
if (json.has("attestation"))
res.setAttestation(
parseVerificationResultVerificationResultAttestationComponent(getJObject(json, "attestation"), res));
if (json.has("validator")) {
JsonArray array = json.getAsJsonArray("validator");
for (int i = 0; i < array.size(); i++) {
res.getValidator()
.add(parseVerificationResultVerificationResultValidatorComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected VerificationResult.VerificationResultPrimarySourceComponent parseVerificationResultVerificationResultPrimarySourceComponent(
JsonObject json, VerificationResult owner) throws IOException, FHIRFormatError {
VerificationResult.VerificationResultPrimarySourceComponent res = new VerificationResult.VerificationResultPrimarySourceComponent();
parseVerificationResultVerificationResultPrimarySourceComponentProperties(json, owner, res);
return res;
}
protected void parseVerificationResultVerificationResultPrimarySourceComponentProperties(JsonObject json,
VerificationResult owner, 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 = json.getAsJsonArray("type");
for (int i = 0; i < array.size(); i++) {
res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("communicationMethod")) {
JsonArray array = json.getAsJsonArray("communicationMethod");
for (int i = 0; i < array.size(); i++) {
res.getCommunicationMethod().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
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 = json.getAsJsonArray("pushTypeAvailable");
for (int i = 0; i < array.size(); i++) {
res.getPushTypeAvailable().add(parseCodeableConcept(array.get(i).getAsJsonObject()));
}
}
;
}
protected VerificationResult.VerificationResultAttestationComponent parseVerificationResultVerificationResultAttestationComponent(
JsonObject json, VerificationResult owner) throws IOException, FHIRFormatError {
VerificationResult.VerificationResultAttestationComponent res = new VerificationResult.VerificationResultAttestationComponent();
parseVerificationResultVerificationResultAttestationComponentProperties(json, owner, res);
return res;
}
protected void parseVerificationResultVerificationResultAttestationComponentProperties(JsonObject json,
VerificationResult owner, 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 parseVerificationResultVerificationResultValidatorComponent(
JsonObject json, VerificationResult owner) throws IOException, FHIRFormatError {
VerificationResult.VerificationResultValidatorComponent res = new VerificationResult.VerificationResultValidatorComponent();
parseVerificationResultVerificationResultValidatorComponentProperties(json, owner, res);
return res;
}
protected void parseVerificationResultVerificationResultValidatorComponentProperties(JsonObject json,
VerificationResult owner, 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 = json.getAsJsonArray("identifier");
for (int i = 0; i < array.size(); i++) {
res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject()));
}
}
;
if (json.has("status"))
res.setStatusElement(parseEnumeration(json.get("status").getAsString(), VisionPrescription.VisionStatus.NULL,
new VisionPrescription.VisionStatusEnumFactory()));
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 = json.getAsJsonArray("lensSpecification");
for (int i = 0; i < array.size(); i++) {
res.getLensSpecification().add(
parseVisionPrescriptionVisionPrescriptionLensSpecificationComponent(array.get(i).getAsJsonObject(), res));
}
}
;
}
protected VisionPrescription.VisionPrescriptionLensSpecificationComponent parseVisionPrescriptionVisionPrescriptionLensSpecificationComponent(
JsonObject json, VisionPrescription owner) throws IOException, FHIRFormatError {
VisionPrescription.VisionPrescriptionLensSpecificationComponent res = new VisionPrescription.VisionPrescriptionLensSpecificationComponent();
parseVisionPrescriptionVisionPrescriptionLensSpecificationComponentProperties(json, owner, res);
return res;
}
protected void parseVisionPrescriptionVisionPrescriptionLensSpecificationComponentProperties(JsonObject json,
VisionPrescription owner, 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 = json.getAsJsonArray("prism");
for (int i = 0; i < array.size(); i++) {
res.getPrism().add(parseVisionPrescriptionPrismComponent(array.get(i).getAsJsonObject(), owner));
}
}
;
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 = json.getAsJsonArray("note");
for (int i = 0; i < array.size(); i++) {
res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject()));
}
}
;
}
protected VisionPrescription.PrismComponent parseVisionPrescriptionPrismComponent(JsonObject json,
VisionPrescription owner) throws IOException, FHIRFormatError {
VisionPrescription.PrismComponent res = new VisionPrescription.PrismComponent();
parseVisionPrescriptionPrismComponentProperties(json, owner, res);
return res;
}
protected void parseVisionPrescriptionPrismComponentProperties(JsonObject json, VisionPrescription owner,
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?");
if (t.equals("Parameters"))
return parseParameters(json);
else if (t.equals("Account"))
return parseAccount(json);
else if (t.equals("ActivityDefinition"))
return parseActivityDefinition(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("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("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("CatalogEntry"))
return parseCatalogEntry(json);
else if (t.equals("ChargeItem"))
return parseChargeItem(json);
else if (t.equals("ChargeItemDefinition"))
return parseChargeItemDefinition(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("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("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("DeviceDefinition"))
return parseDeviceDefinition(json);
else if (t.equals("DeviceMetric"))
return parseDeviceMetric(json);
else if (t.equals("DeviceRequest"))
return parseDeviceRequest(json);
else if (t.equals("DeviceUseStatement"))
return parseDeviceUseStatement(json);
else if (t.equals("DiagnosticReport"))
return parseDiagnosticReport(json);
else if (t.equals("DocumentManifest"))
return parseDocumentManifest(json);
else if (t.equals("DocumentReference"))
return parseDocumentReference(json);
else if (t.equals("EffectEvidenceSynthesis"))
return parseEffectEvidenceSynthesis(json);
else if (t.equals("Encounter"))
return parseEncounter(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("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("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("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("InsurancePlan"))
return parseInsurancePlan(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("Measure"))
return parseMeasure(json);
else if (t.equals("MeasureReport"))
return parseMeasureReport(json);
else if (t.equals("Media"))
return parseMedia(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("MedicinalProduct"))
return parseMedicinalProduct(json);
else if (t.equals("MedicinalProductAuthorization"))
return parseMedicinalProductAuthorization(json);
else if (t.equals("MedicinalProductContraindication"))
return parseMedicinalProductContraindication(json);
else if (t.equals("MedicinalProductIndication"))
return parseMedicinalProductIndication(json);
else if (t.equals("MedicinalProductIngredient"))
return parseMedicinalProductIngredient(json);
else if (t.equals("MedicinalProductInteraction"))
return parseMedicinalProductInteraction(json);
else if (t.equals("MedicinalProductManufactured"))
return parseMedicinalProductManufactured(json);
else if (t.equals("MedicinalProductPackaged"))
return parseMedicinalProductPackaged(json);
else if (t.equals("MedicinalProductPharmaceutical"))
return parseMedicinalProductPharmaceutical(json);
else if (t.equals("MedicinalProductUndesirableEffect"))
return parseMedicinalProductUndesirableEffect(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("NutritionOrder"))
return parseNutritionOrder(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("Patient"))
return parsePatient(json);
else if (t.equals("PaymentNotice"))
return parsePaymentNotice(json);
else if (t.equals("PaymentReconciliation"))
return parsePaymentReconciliation(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("RelatedPerson"))
return parseRelatedPerson(json);
else if (t.equals("RequestGroup"))
return parseRequestGroup(json);
else if (t.equals("ResearchDefinition"))
return parseResearchDefinition(json);
else if (t.equals("ResearchElementDefinition"))
return parseResearchElementDefinition(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("RiskEvidenceSynthesis"))
return parseRiskEvidenceSynthesis(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("Substance"))
return parseSubstance(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("SubstanceSpecification"))
return parseSubstanceSpecification(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("TestReport"))
return parseTestReport(json);
else if (t.equals("TestScript"))
return parseTestScript(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 if (t.equals("Binary"))
return parseBinary(json);
throw new FHIRFormatError("Unknown.Unrecognised resource type '" + t + "' (in property 'resourceType')");
}
protected Type parseType(String prefix, JsonObject json) throws IOException, FHIRFormatError {
if (json.has(prefix + "Extension"))
return parseExtension(getJObject(json, prefix + "Extension"));
else if (json.has(prefix + "Narrative"))
return parseNarrative(getJObject(json, prefix + "Narrative"));
else if (json.has(prefix + "Meta"))
return parseMeta(getJObject(json, prefix + "Meta"));
else if (json.has(prefix + "Address"))
return parseAddress(getJObject(json, prefix + "Address"));
else if (json.has(prefix + "Contributor"))
return parseContributor(getJObject(json, prefix + "Contributor"));
else if (json.has(prefix + "Attachment"))
return parseAttachment(getJObject(json, prefix + "Attachment"));
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 + "Dosage"))
return parseDosage(getJObject(json, prefix + "Dosage"));
else if (json.has(prefix + "Money"))
return parseMoney(getJObject(json, prefix + "Money"));
else if (json.has(prefix + "HumanName"))
return parseHumanName(getJObject(json, prefix + "HumanName"));
else if (json.has(prefix + "ContactPoint"))
return parseContactPoint(getJObject(json, prefix + "ContactPoint"));
else if (json.has(prefix + "MarketingStatus"))
return parseMarketingStatus(getJObject(json, prefix + "MarketingStatus"));
else if (json.has(prefix + "Identifier"))
return parseIdentifier(getJObject(json, prefix + "Identifier"));
else if (json.has(prefix + "SubstanceAmount"))
return parseSubstanceAmount(getJObject(json, prefix + "SubstanceAmount"));
else if (json.has(prefix + "Coding"))
return parseCoding(getJObject(json, prefix + "Coding"));
else if (json.has(prefix + "SampledData"))
return parseSampledData(getJObject(json, prefix + "SampledData"));
else if (json.has(prefix + "Population"))
return parsePopulation(getJObject(json, prefix + "Population"));
else if (json.has(prefix + "Ratio"))
return parseRatio(getJObject(json, prefix + "Ratio"));
else if (json.has(prefix + "Distance"))
return parseDistance(getJObject(json, prefix + "Distance"));
else if (json.has(prefix + "Age"))
return parseAge(getJObject(json, prefix + "Age"));
else if (json.has(prefix + "Reference"))
return parseReference(getJObject(json, prefix + "Reference"));
else if (json.has(prefix + "TriggerDefinition"))
return parseTriggerDefinition(getJObject(json, prefix + "TriggerDefinition"));
else if (json.has(prefix + "Quantity"))
return parseQuantity(getJObject(json, prefix + "Quantity"));
else if (json.has(prefix + "Period"))
return parsePeriod(getJObject(json, prefix + "Period"));
else if (json.has(prefix + "Duration"))
return parseDuration(getJObject(json, prefix + "Duration"));
else if (json.has(prefix + "Range"))
return parseRange(getJObject(json, prefix + "Range"));
else if (json.has(prefix + "RelatedArtifact"))
return parseRelatedArtifact(getJObject(json, prefix + "RelatedArtifact"));
else if (json.has(prefix + "Annotation"))
return parseAnnotation(getJObject(json, prefix + "Annotation"));
else if (json.has(prefix + "ProductShelfLife"))
return parseProductShelfLife(getJObject(json, prefix + "ProductShelfLife"));
else if (json.has(prefix + "ContactDetail"))
return parseContactDetail(getJObject(json, prefix + "ContactDetail"));
else if (json.has(prefix + "UsageContext"))
return parseUsageContext(getJObject(json, prefix + "UsageContext"));
else if (json.has(prefix + "Expression"))
return parseExpression(getJObject(json, prefix + "Expression"));
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 + "ProdCharacteristic"))
return parseProdCharacteristic(getJObject(json, prefix + "ProdCharacteristic"));
else if (json.has(prefix + "CodeableConcept"))
return parseCodeableConcept(getJObject(json, prefix + "CodeableConcept"));
else if (json.has(prefix + "ParameterDefinition"))
return parseParameterDefinition(getJObject(json, prefix + "ParameterDefinition"));
else if (json.has(prefix + "Date") || json.has("_" + prefix + "Date")) {
Type t = json.has(prefix + "Date") ? parseDate(json.get(prefix + "Date").getAsString()) : new DateType();
if (json.has("_" + prefix + "Date"))
parseElementProperties(getJObject(json, "_" + prefix + "Date"), t);
return t;
} else if (json.has(prefix + "DateTime") || json.has("_" + prefix + "DateTime")) {
Type t = json.has(prefix + "DateTime") ? parseDateTime(json.get(prefix + "DateTime").getAsString())
: new DateTimeType();
if (json.has("_" + prefix + "DateTime"))
parseElementProperties(getJObject(json, "_" + prefix + "DateTime"), t);
return t;
} else if (json.has(prefix + "Code") || json.has("_" + prefix + "Code")) {
Type t = json.has(prefix + "Code") ? parseCode(json.get(prefix + "Code").getAsString()) : new CodeType();
if (json.has("_" + prefix + "Code"))
parseElementProperties(getJObject(json, "_" + prefix + "Code"), t);
return t;
} else if (json.has(prefix + "String") || json.has("_" + prefix + "String")) {
Type t = json.has(prefix + "String") ? parseString(json.get(prefix + "String").getAsString()) : new StringType();
if (json.has("_" + prefix + "String"))
parseElementProperties(getJObject(json, "_" + prefix + "String"), t);
return t;
} else if (json.has(prefix + "Integer") || json.has("_" + prefix + "Integer")) {
Type t = json.has(prefix + "Integer") ? parseInteger(json.get(prefix + "Integer").getAsLong())
: new IntegerType();
if (json.has("_" + prefix + "Integer"))
parseElementProperties(getJObject(json, "_" + prefix + "Integer"), t);
return t;
} else if (json.has(prefix + "Oid") || json.has("_" + prefix + "Oid")) {
Type t = json.has(prefix + "Oid") ? parseOid(json.get(prefix + "Oid").getAsString()) : new OidType();
if (json.has("_" + prefix + "Oid"))
parseElementProperties(getJObject(json, "_" + prefix + "Oid"), t);
return t;
} else if (json.has(prefix + "Canonical") || json.has("_" + prefix + "Canonical")) {
Type t = json.has(prefix + "Canonical") ? parseCanonical(json.get(prefix + "Canonical").getAsString())
: new CanonicalType();
if (json.has("_" + prefix + "Canonical"))
parseElementProperties(getJObject(json, "_" + prefix + "Canonical"), t);
return t;
} else if (json.has(prefix + "Uri") || json.has("_" + prefix + "Uri")) {
Type t = json.has(prefix + "Uri") ? parseUri(json.get(prefix + "Uri").getAsString()) : new UriType();
if (json.has("_" + prefix + "Uri"))
parseElementProperties(getJObject(json, "_" + prefix + "Uri"), t);
return t;
} else if (json.has(prefix + "Uuid") || json.has("_" + prefix + "Uuid")) {
Type t = json.has(prefix + "Uuid") ? parseUuid(json.get(prefix + "Uuid").getAsString()) : new UuidType();
if (json.has("_" + prefix + "Uuid"))
parseElementProperties(getJObject(json, "_" + prefix + "Uuid"), t);
return t;
} else if (json.has(prefix + "Url") || json.has("_" + prefix + "Url")) {
Type t = json.has(prefix + "Url") ? parseUrl(json.get(prefix + "Url").getAsString()) : new UrlType();
if (json.has("_" + prefix + "Url"))
parseElementProperties(getJObject(json, "_" + prefix + "Url"), t);
return t;
} else if (json.has(prefix + "Instant") || json.has("_" + prefix + "Instant")) {
Type t = json.has(prefix + "Instant") ? parseInstant(json.get(prefix + "Instant").getAsString())
: new InstantType();
if (json.has("_" + prefix + "Instant"))
parseElementProperties(getJObject(json, "_" + prefix + "Instant"), t);
return t;
} else if (json.has(prefix + "Boolean") || json.has("_" + prefix + "Boolean")) {
Type t = json.has(prefix + "Boolean") ? parseBoolean(json.get(prefix + "Boolean").getAsBoolean())
: new BooleanType();
if (json.has("_" + prefix + "Boolean"))
parseElementProperties(getJObject(json, "_" + prefix + "Boolean"), t);
return t;
} else if (json.has(prefix + "Base64Binary") || json.has("_" + prefix + "Base64Binary")) {
Type t = json.has(prefix + "Base64Binary") ? parseBase64Binary(json.get(prefix + "Base64Binary").getAsString())
: new Base64BinaryType();
if (json.has("_" + prefix + "Base64Binary"))
parseElementProperties(getJObject(json, "_" + prefix + "Base64Binary"), t);
return t;
} else if (json.has(prefix + "UnsignedInt") || json.has("_" + prefix + "UnsignedInt")) {
Type t = json.has(prefix + "UnsignedInt") ? parseUnsignedInt(json.get(prefix + "UnsignedInt").getAsString())
: new UnsignedIntType();
if (json.has("_" + prefix + "UnsignedInt"))
parseElementProperties(getJObject(json, "_" + prefix + "UnsignedInt"), t);
return t;
} else if (json.has(prefix + "Markdown") || json.has("_" + prefix + "Markdown")) {
Type t = json.has(prefix + "Markdown") ? parseMarkdown(json.get(prefix + "Markdown").getAsString())
: new MarkdownType();
if (json.has("_" + prefix + "Markdown"))
parseElementProperties(getJObject(json, "_" + prefix + "Markdown"), t);
return t;
} else if (json.has(prefix + "Time") || json.has("_" + prefix + "Time")) {
Type t = json.has(prefix + "Time") ? parseTime(json.get(prefix + "Time").getAsString()) : new TimeType();
if (json.has("_" + prefix + "Time"))
parseElementProperties(getJObject(json, "_" + prefix + "Time"), t);
return t;
} else if (json.has(prefix + "Id") || json.has("_" + prefix + "Id")) {
Type t = json.has(prefix + "Id") ? parseId(json.get(prefix + "Id").getAsString()) : new IdType();
if (json.has("_" + prefix + "Id"))
parseElementProperties(getJObject(json, "_" + prefix + "Id"), t);
return t;
} else if (json.has(prefix + "PositiveInt") || json.has("_" + prefix + "PositiveInt")) {
Type t = json.has(prefix + "PositiveInt") ? parsePositiveInt(json.get(prefix + "PositiveInt").getAsString())
: new PositiveIntType();
if (json.has("_" + prefix + "PositiveInt"))
parseElementProperties(getJObject(json, "_" + prefix + "PositiveInt"), t);
return t;
} else if (json.has(prefix + "Decimal") || json.has("_" + prefix + "Decimal")) {
Type t = json.has(prefix + "Decimal") ? parseDecimal(json.get(prefix + "Decimal").getAsBigDecimal())
: new DecimalType();
if (json.has("_" + prefix + "Decimal"))
parseElementProperties(getJObject(json, "_" + prefix + "Decimal"), t);
return t;
}
return null;
}
protected Type parseType(JsonObject json, String type) throws IOException, FHIRFormatError {
if (type.equals("Extension"))
return parseExtension(json);
else if (type.equals("Narrative"))
return parseNarrative(json);
else if (type.equals("Meta"))
return parseMeta(json);
else if (type.equals("Address"))
return parseAddress(json);
else if (type.equals("Contributor"))
return parseContributor(json);
else if (type.equals("Attachment"))
return parseAttachment(json);
else if (type.equals("Count"))
return parseCount(json);
else if (type.equals("DataRequirement"))
return parseDataRequirement(json);
else if (type.equals("Dosage"))
return parseDosage(json);
else if (type.equals("Money"))
return parseMoney(json);
else if (type.equals("HumanName"))
return parseHumanName(json);
else if (type.equals("ContactPoint"))
return parseContactPoint(json);
else if (type.equals("MarketingStatus"))
return parseMarketingStatus(json);
else if (type.equals("Identifier"))
return parseIdentifier(json);
else if (type.equals("SubstanceAmount"))
return parseSubstanceAmount(json);
else if (type.equals("Coding"))
return parseCoding(json);
else if (type.equals("SampledData"))
return parseSampledData(json);
else if (type.equals("Population"))
return parsePopulation(json);
else if (type.equals("Ratio"))
return parseRatio(json);
else if (type.equals("Distance"))
return parseDistance(json);
else if (type.equals("Age"))
return parseAge(json);
else if (type.equals("Reference"))
return parseReference(json);
else if (type.equals("TriggerDefinition"))
return parseTriggerDefinition(json);
else if (type.equals("Quantity"))
return parseQuantity(json);
else if (type.equals("Period"))
return parsePeriod(json);
else if (type.equals("Duration"))
return parseDuration(json);
else if (type.equals("Range"))
return parseRange(json);
else if (type.equals("RelatedArtifact"))
return parseRelatedArtifact(json);
else if (type.equals("Annotation"))
return parseAnnotation(json);
else if (type.equals("ProductShelfLife"))
return parseProductShelfLife(json);
else if (type.equals("ContactDetail"))
return parseContactDetail(json);
else if (type.equals("UsageContext"))
return parseUsageContext(json);
else if (type.equals("Expression"))
return parseExpression(json);
else if (type.equals("Signature"))
return parseSignature(json);
else if (type.equals("Timing"))
return parseTiming(json);
else if (type.equals("ProdCharacteristic"))
return parseProdCharacteristic(json);
else if (type.equals("CodeableConcept"))
return parseCodeableConcept(json);
else if (type.equals("ParameterDefinition"))
return parseParameterDefinition(json);
throw new FHIRFormatError("Unknown Type " + type);
}
protected boolean hasTypeName(JsonObject json, String prefix) {
if (json.has(prefix + "Extension"))
return true;
if (json.has(prefix + "Narrative"))
return true;
if (json.has(prefix + "Meta"))
return true;
if (json.has(prefix + "Address"))
return true;
if (json.has(prefix + "Contributor"))
return true;
if (json.has(prefix + "Attachment"))
return true;
if (json.has(prefix + "Count"))
return true;
if (json.has(prefix + "DataRequirement"))
return true;
if (json.has(prefix + "Dosage"))
return true;
if (json.has(prefix + "Money"))
return true;
if (json.has(prefix + "HumanName"))
return true;
if (json.has(prefix + "ContactPoint"))
return true;
if (json.has(prefix + "MarketingStatus"))
return true;
if (json.has(prefix + "Identifier"))
return true;
if (json.has(prefix + "SubstanceAmount"))
return true;
if (json.has(prefix + "Coding"))
return true;
if (json.has(prefix + "SampledData"))
return true;
if (json.has(prefix + "Population"))
return true;
if (json.has(prefix + "Ratio"))
return true;
if (json.has(prefix + "Distance"))
return true;
if (json.has(prefix + "Age"))
return true;
if (json.has(prefix + "Reference"))
return true;
if (json.has(prefix + "TriggerDefinition"))
return true;
if (json.has(prefix + "Quantity"))
return true;
if (json.has(prefix + "Period"))
return true;
if (json.has(prefix + "Duration"))
return true;
if (json.has(prefix + "Range"))
return true;
if (json.has(prefix + "RelatedArtifact"))
return true;
if (json.has(prefix + "Annotation"))
return true;
if (json.has(prefix + "ProductShelfLife"))
return true;
if (json.has(prefix + "ContactDetail"))
return true;
if (json.has(prefix + "UsageContext"))
return true;
if (json.has(prefix + "Expression"))
return true;
if (json.has(prefix + "Signature"))
return true;
if (json.has(prefix + "Timing"))
return true;
if (json.has(prefix + "ProdCharacteristic"))
return true;
if (json.has(prefix + "CodeableConcept"))
return true;
if (json.has(prefix + "ParameterDefinition"))
return true;
if (json.has(prefix + "Parameters"))
return true;
if (json.has(prefix + "Account"))
return true;
if (json.has(prefix + "ActivityDefinition"))
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 + "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 + "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 + "CatalogEntry"))
return true;
if (json.has(prefix + "ChargeItem"))
return true;
if (json.has(prefix + "ChargeItemDefinition"))
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 + "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 + "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 + "DeviceDefinition"))
return true;
if (json.has(prefix + "DeviceMetric"))
return true;
if (json.has(prefix + "DeviceRequest"))
return true;
if (json.has(prefix + "DeviceUseStatement"))
return true;
if (json.has(prefix + "DiagnosticReport"))
return true;
if (json.has(prefix + "DocumentManifest"))
return true;
if (json.has(prefix + "DocumentReference"))
return true;
if (json.has(prefix + "EffectEvidenceSynthesis"))
return true;
if (json.has(prefix + "Encounter"))
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 + "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 + "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 + "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 + "InsurancePlan"))
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 + "Measure"))
return true;
if (json.has(prefix + "MeasureReport"))
return true;
if (json.has(prefix + "Media"))
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 + "MedicinalProduct"))
return true;
if (json.has(prefix + "MedicinalProductAuthorization"))
return true;
if (json.has(prefix + "MedicinalProductContraindication"))
return true;
if (json.has(prefix + "MedicinalProductIndication"))
return true;
if (json.has(prefix + "MedicinalProductIngredient"))
return true;
if (json.has(prefix + "MedicinalProductInteraction"))
return true;
if (json.has(prefix + "MedicinalProductManufactured"))
return true;
if (json.has(prefix + "MedicinalProductPackaged"))
return true;
if (json.has(prefix + "MedicinalProductPharmaceutical"))
return true;
if (json.has(prefix + "MedicinalProductUndesirableEffect"))
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 + "NutritionOrder"))
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 + "Patient"))
return true;
if (json.has(prefix + "PaymentNotice"))
return true;
if (json.has(prefix + "PaymentReconciliation"))
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 + "RelatedPerson"))
return true;
if (json.has(prefix + "RequestGroup"))
return true;
if (json.has(prefix + "ResearchDefinition"))
return true;
if (json.has(prefix + "ResearchElementDefinition"))
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 + "RiskEvidenceSynthesis"))
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 + "Substance"))
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 + "SubstanceSpecification"))
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 + "TestReport"))
return true;
if (json.has(prefix + "TestScript"))
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 + "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;
}
protected Type parseAnyType(JsonObject json, String type) throws IOException, FHIRFormatError {
if (type.equals("ElementDefinition"))
return parseElementDefinition(json);
else if (type.equals("DataRequirement"))
return parseDataRequirement(json);
else
return parseType(json, type);
}
protected void composeElement(Element element) throws IOException {
if (element.hasId())
prop("id", element.getId());
if (makeComments(element)) {
openArray("fhir_comments");
for (String s : element.getFormatCommentsPre())
prop(null, s);
for (String s : element.getFormatCommentsPost())
prop(null, s);
closeArray();
}
if (element.hasExtension()) {
openArray("extension");
for (Extension e : element.getExtension())
composeExtension(null, e);
closeArray();
}
}
protected void composeBackboneElementInner(BackboneElement element) throws IOException {
composeBackbone(element);
}
protected void composeBackbone(BackboneElement element) throws IOException {
composeElement(element);
if (element.hasModifierExtension()) {
openArray("modifierExtension");
for (Extension e : element.getModifierExtension())
composeExtension(null, e);
closeArray();
}
}
protected void composeBackbone(BackboneType element) throws IOException {
composeElement(element);
if (element.hasModifierExtension()) {
openArray("modifierExtension");
for (Extension e : element.getModifierExtension())
composeExtension(null, e);
closeArray();
}
}
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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(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);
composeElement(value);
close();
} else if (inArray)
writeNull(name);
}
protected void composeExtension(String name, Extension element) throws IOException {
if (element != null) {
open(name);
composeExtensionInner(element);
close();
}
}
protected void composeExtensionInner(Extension element) throws IOException {
composeElement(element);
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeNarrative(String name, Narrative element) throws IOException {
if (element != null) {
open(name);
composeNarrativeInner(element);
close();
}
}
protected void composeNarrativeInner(Narrative element) throws IOException {
composeElement(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 composeCount(String name, Count element) throws IOException {
if (element != null) {
open(name);
composeCountInner(element);
close();
}
}
protected void composeCountInner(Count element) throws IOException {
composeQuantityInner(element);
}
protected void composeDosage(String name, Dosage element) throws IOException {
if (element != null) {
open(name);
composeDosageInner(element);
close();
}
}
protected void composeDosageInner(Dosage element) throws IOException {
composeBackbone(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.hasAsNeeded()) {
composeType("asNeeded", element.getAsNeeded());
}
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())
composeDosageDosageDoseAndRateComponent(null, e);
closeArray();
}
;
if (element.hasMaxDosePerPeriod()) {
composeRatio("maxDosePerPeriod", element.getMaxDosePerPeriod());
}
if (element.hasMaxDosePerAdministration()) {
composeQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration());
}
if (element.hasMaxDosePerLifetime()) {
composeQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime());
}
}
protected void composeDosageDosageDoseAndRateComponent(String name, Dosage.DosageDoseAndRateComponent element)
throws IOException {
if (element != null) {
open(name);
composeDosageDosageDoseAndRateComponentInner(element);
close();
}
}
protected void composeDosageDosageDoseAndRateComponentInner(Dosage.DosageDoseAndRateComponent element)
throws IOException {
composeElement(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDose()) {
composeType("dose", element.getDose());
}
if (element.hasRate()) {
composeType("rate", element.getRate());
}
}
protected void composeMarketingStatus(String name, MarketingStatus element) throws IOException {
if (element != null) {
open(name);
composeMarketingStatusInner(element);
close();
}
}
protected void composeMarketingStatusInner(MarketingStatus element) throws IOException {
composeBackbone(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 composeSubstanceAmount(String name, SubstanceAmount element) throws IOException {
if (element != null) {
open(name);
composeSubstanceAmountInner(element);
close();
}
}
protected void composeSubstanceAmountInner(SubstanceAmount element) throws IOException {
composeBackbone(element);
if (element.hasAmount()) {
composeType("amount", element.getAmount());
}
if (element.hasAmountType()) {
composeCodeableConcept("amountType", element.getAmountType());
}
if (element.hasAmountTextElement()) {
composeStringCore("amountText", element.getAmountTextElement(), false);
composeStringExtras("amountText", element.getAmountTextElement(), false);
}
if (element.hasReferenceRange()) {
composeSubstanceAmountSubstanceAmountReferenceRangeComponent("referenceRange", element.getReferenceRange());
}
}
protected void composeSubstanceAmountSubstanceAmountReferenceRangeComponent(String name,
SubstanceAmount.SubstanceAmountReferenceRangeComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceAmountSubstanceAmountReferenceRangeComponentInner(element);
close();
}
}
protected void composeSubstanceAmountSubstanceAmountReferenceRangeComponentInner(
SubstanceAmount.SubstanceAmountReferenceRangeComponent element) throws IOException {
composeElement(element);
if (element.hasLowLimit()) {
composeQuantity("lowLimit", element.getLowLimit());
}
if (element.hasHighLimit()) {
composeQuantity("highLimit", element.getHighLimit());
}
}
protected void composePopulation(String name, Population element) throws IOException {
if (element != null) {
open(name);
composePopulationInner(element);
close();
}
}
protected void composePopulationInner(Population element) throws IOException {
composeBackbone(element);
if (element.hasAge()) {
composeType("age", element.getAge());
}
if (element.hasGender()) {
composeCodeableConcept("gender", element.getGender());
}
if (element.hasRace()) {
composeCodeableConcept("race", element.getRace());
}
if (element.hasPhysiologicalCondition()) {
composeCodeableConcept("physiologicalCondition", element.getPhysiologicalCondition());
}
}
protected void composeDistance(String name, Distance element) throws IOException {
if (element != null) {
open(name);
composeDistanceInner(element);
close();
}
}
protected void composeDistanceInner(Distance element) throws IOException {
composeQuantityInner(element);
}
protected void composeAge(String name, Age element) throws IOException {
if (element != null) {
open(name);
composeAgeInner(element);
close();
}
}
protected void composeAgeInner(Age element) throws IOException {
composeQuantityInner(element);
}
protected void composeDuration(String name, Duration element) throws IOException {
if (element != null) {
open(name);
composeDurationInner(element);
close();
}
}
protected void composeDurationInner(Duration element) throws IOException {
composeQuantityInner(element);
}
protected void composeProductShelfLife(String name, ProductShelfLife element) throws IOException {
if (element != null) {
open(name);
composeProductShelfLifeInner(element);
close();
}
}
protected void composeProductShelfLifeInner(ProductShelfLife element) throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPeriod()) {
composeQuantity("period", element.getPeriod());
}
if (element.hasSpecialPrecautionsForStorage()) {
openArray("specialPrecautionsForStorage");
for (CodeableConcept e : element.getSpecialPrecautionsForStorage())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeTiming(String name, Timing element) throws IOException {
if (element != null) {
open(name);
composeTimingInner(element);
close();
}
}
protected void composeTimingInner(Timing element) throws IOException {
composeBackbone(element);
if (element.hasEvent()) {
openArray("event");
for (DateTimeType e : element.getEvent())
composeDateTimeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getEvent())) {
openArray("_event");
for (DateTimeType e : element.getEvent())
composeDateTimeExtras(null, e, true);
closeArray();
}
}
;
if (element.hasRepeat()) {
composeTimingTimingRepeatComponent("repeat", element.getRepeat());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeTimingTimingRepeatComponent(String name, Timing.TimingRepeatComponent element)
throws IOException {
if (element != null) {
open(name);
composeTimingTimingRepeatComponentInner(element);
close();
}
}
protected void composeTimingTimingRepeatComponentInner(Timing.TimingRepeatComponent element) throws IOException {
composeElement(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 Timing.DayOfWeekEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getDayOfWeek())) {
openArray("_dayOfWeek");
for (Enumeration e : element.getDayOfWeek())
composeEnumerationExtras(null, e, new Timing.DayOfWeekEnumFactory(), true);
closeArray();
}
}
;
if (element.hasTimeOfDay()) {
openArray("timeOfDay");
for (TimeType e : element.getTimeOfDay())
composeTimeCore(null, e, true);
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 composeProdCharacteristic(String name, ProdCharacteristic element) throws IOException {
if (element != null) {
open(name);
composeProdCharacteristicInner(element);
close();
}
}
protected void composeProdCharacteristicInner(ProdCharacteristic element) throws IOException {
composeBackbone(element);
if (element.hasHeight()) {
composeQuantity("height", element.getHeight());
}
if (element.hasWidth()) {
composeQuantity("width", element.getWidth());
}
if (element.hasDepth()) {
composeQuantity("depth", element.getDepth());
}
if (element.hasWeight()) {
composeQuantity("weight", element.getWeight());
}
if (element.hasNominalVolume()) {
composeQuantity("nominalVolume", element.getNominalVolume());
}
if (element.hasExternalDiameter()) {
composeQuantity("externalDiameter", element.getExternalDiameter());
}
if (element.hasShapeElement()) {
composeStringCore("shape", element.getShapeElement(), false);
composeStringExtras("shape", element.getShapeElement(), false);
}
if (element.hasColor()) {
openArray("color");
for (StringType e : element.getColor())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getColor())) {
openArray("_color");
for (StringType e : element.getColor())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasImprint()) {
openArray("imprint");
for (StringType e : element.getImprint())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getImprint())) {
openArray("_imprint");
for (StringType e : element.getImprint())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasImage()) {
openArray("image");
for (Attachment e : element.getImage())
composeAttachment(null, e);
closeArray();
}
;
if (element.hasScoring()) {
composeCodeableConcept("scoring", element.getScoring());
}
}
protected void composeMeta(String name, Meta element) throws IOException {
if (element != null) {
open(name);
composeMetaInner(element);
close();
}
}
protected void composeMetaInner(Meta element) throws IOException {
composeElement(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()) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, true);
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 composeAddress(String name, Address element) throws IOException {
if (element != null) {
open(name);
composeAddressInner(element);
close();
}
}
protected void composeAddressInner(Address element) throws IOException {
composeElement(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()) {
openArray("line");
for (StringType e : element.getLine())
composeStringCore(null, e, true);
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 composeContributor(String name, Contributor element) throws IOException {
if (element != null) {
open(name);
composeContributorInner(element);
close();
}
}
protected void composeContributorInner(Contributor element) throws IOException {
composeElement(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 composeAttachment(String name, Attachment element) throws IOException {
if (element != null) {
open(name);
composeAttachmentInner(element);
close();
}
}
protected void composeAttachmentInner(Attachment element) throws IOException {
composeElement(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()) {
composeUnsignedIntCore("size", element.getSizeElement(), false);
composeUnsignedIntExtras("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);
}
}
protected void composeDataRequirement(String name, DataRequirement element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementInner(element);
close();
}
}
protected void composeDataRequirementInner(DataRequirement element) throws IOException {
composeElement(element);
if (element.hasTypeElement()) {
composeCodeCore("type", element.getTypeElement(), false);
composeCodeExtras("type", element.getTypeElement(), false);
}
if (element.hasProfile()) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, true);
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()) {
openArray("mustSupport");
for (StringType e : element.getMustSupport())
composeStringCore(null, e, true);
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())
composeDataRequirementDataRequirementCodeFilterComponent(null, e);
closeArray();
}
;
if (element.hasDateFilter()) {
openArray("dateFilter");
for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter())
composeDataRequirementDataRequirementDateFilterComponent(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())
composeDataRequirementDataRequirementSortComponent(null, e);
closeArray();
}
;
}
protected void composeDataRequirementDataRequirementCodeFilterComponent(String name,
DataRequirement.DataRequirementCodeFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementDataRequirementCodeFilterComponentInner(element);
close();
}
}
protected void composeDataRequirementDataRequirementCodeFilterComponentInner(
DataRequirement.DataRequirementCodeFilterComponent element) throws IOException {
composeElement(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 composeDataRequirementDataRequirementDateFilterComponent(String name,
DataRequirement.DataRequirementDateFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementDataRequirementDateFilterComponentInner(element);
close();
}
}
protected void composeDataRequirementDataRequirementDateFilterComponentInner(
DataRequirement.DataRequirementDateFilterComponent element) throws IOException {
composeElement(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 composeDataRequirementDataRequirementSortComponent(String name,
DataRequirement.DataRequirementSortComponent element) throws IOException {
if (element != null) {
open(name);
composeDataRequirementDataRequirementSortComponentInner(element);
close();
}
}
protected void composeDataRequirementDataRequirementSortComponentInner(
DataRequirement.DataRequirementSortComponent element) throws IOException {
composeElement(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 composeMoney(String name, Money element) throws IOException {
if (element != null) {
open(name);
composeMoneyInner(element);
close();
}
}
protected void composeMoneyInner(Money element) throws IOException {
composeElement(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 composeHumanName(String name, HumanName element) throws IOException {
if (element != null) {
open(name);
composeHumanNameInner(element);
close();
}
}
protected void composeHumanNameInner(HumanName element) throws IOException {
composeElement(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()) {
openArray("given");
for (StringType e : element.getGiven())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getGiven())) {
openArray("_given");
for (StringType e : element.getGiven())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPrefix()) {
openArray("prefix");
for (StringType e : element.getPrefix())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPrefix())) {
openArray("_prefix");
for (StringType e : element.getPrefix())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSuffix()) {
openArray("suffix");
for (StringType e : element.getSuffix())
composeStringCore(null, e, true);
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 composeContactPoint(String name, ContactPoint element) throws IOException {
if (element != null) {
open(name);
composeContactPointInner(element);
close();
}
}
protected void composeContactPointInner(ContactPoint element) throws IOException {
composeElement(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 composeIdentifier(String name, Identifier element) throws IOException {
if (element != null) {
open(name);
composeIdentifierInner(element);
close();
}
}
protected void composeIdentifierInner(Identifier element) throws IOException {
composeElement(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 composeCoding(String name, Coding element) throws IOException {
if (element != null) {
open(name);
composeCodingInner(element);
close();
}
}
protected void composeCodingInner(Coding element) throws IOException {
composeElement(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 composeSampledData(String name, SampledData element) throws IOException {
if (element != null) {
open(name);
composeSampledDataInner(element);
close();
}
}
protected void composeSampledDataInner(SampledData element) throws IOException {
composeElement(element);
if (element.hasOrigin()) {
composeQuantity("origin", element.getOrigin());
}
if (element.hasPeriodElement()) {
composeDecimalCore("period", element.getPeriodElement(), false);
composeDecimalExtras("period", element.getPeriodElement(), 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.hasDataElement()) {
composeStringCore("data", element.getDataElement(), false);
composeStringExtras("data", element.getDataElement(), false);
}
}
protected void composeRatio(String name, Ratio element) throws IOException {
if (element != null) {
open(name);
composeRatioInner(element);
close();
}
}
protected void composeRatioInner(Ratio element) throws IOException {
composeElement(element);
if (element.hasNumerator()) {
composeQuantity("numerator", element.getNumerator());
}
if (element.hasDenominator()) {
composeQuantity("denominator", element.getDenominator());
}
}
protected void composeReference(String name, Reference element) throws IOException {
if (element != null) {
open(name);
composeReferenceInner(element);
close();
}
}
protected void composeReferenceInner(Reference element) throws IOException {
composeElement(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 composeTriggerDefinition(String name, TriggerDefinition element) throws IOException {
if (element != null) {
open(name);
composeTriggerDefinitionInner(element);
close();
}
}
protected void composeTriggerDefinitionInner(TriggerDefinition element) throws IOException {
composeElement(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.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 composeQuantity(String name, Quantity element) throws IOException {
if (element != null) {
open(name);
composeQuantityInner(element);
close();
}
}
protected void composeQuantityInner(Quantity element) throws IOException {
composeElement(element);
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
if (element.hasComparatorElement()) {
composeEnumerationCore("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory(),
false);
composeEnumerationExtras("comparator", element.getComparatorElement(),
new Quantity.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 composePeriod(String name, Period element) throws IOException {
if (element != null) {
open(name);
composePeriodInner(element);
close();
}
}
protected void composePeriodInner(Period element) throws IOException {
composeElement(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 composeRange(String name, Range element) throws IOException {
if (element != null) {
open(name);
composeRangeInner(element);
close();
}
}
protected void composeRangeInner(Range element) throws IOException {
composeElement(element);
if (element.hasLow()) {
composeQuantity("low", element.getLow());
}
if (element.hasHigh()) {
composeQuantity("high", element.getHigh());
}
}
protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException {
if (element != null) {
open(name);
composeRelatedArtifactInner(element);
close();
}
}
protected void composeRelatedArtifactInner(RelatedArtifact element) throws IOException {
composeElement(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(),
false);
}
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.hasUrlElement()) {
composeUrlCore("url", element.getUrlElement(), false);
composeUrlExtras("url", element.getUrlElement(), false);
}
if (element.hasDocument()) {
composeAttachment("document", element.getDocument());
}
if (element.hasResourceElement()) {
composeCanonicalCore("resource", element.getResourceElement(), false);
composeCanonicalExtras("resource", element.getResourceElement(), false);
}
}
protected void composeAnnotation(String name, Annotation element) throws IOException {
if (element != null) {
open(name);
composeAnnotationInner(element);
close();
}
}
protected void composeAnnotationInner(Annotation element) throws IOException {
composeElement(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 composeContactDetail(String name, ContactDetail element) throws IOException {
if (element != null) {
open(name);
composeContactDetailInner(element);
close();
}
}
protected void composeContactDetailInner(ContactDetail element) throws IOException {
composeElement(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 composeUsageContext(String name, UsageContext element) throws IOException {
if (element != null) {
open(name);
composeUsageContextInner(element);
close();
}
}
protected void composeUsageContextInner(UsageContext element) throws IOException {
composeElement(element);
if (element.hasCode()) {
composeCoding("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeExpression(String name, Expression element) throws IOException {
if (element != null) {
open(name);
composeExpressionInner(element);
close();
}
}
protected void composeExpressionInner(Expression element) throws IOException {
composeElement(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("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 composeSignature(String name, Signature element) throws IOException {
if (element != null) {
open(name);
composeSignatureInner(element);
close();
}
}
protected void composeSignatureInner(Signature element) throws IOException {
composeElement(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 composeCodeableConcept(String name, CodeableConcept element) throws IOException {
if (element != null) {
open(name);
composeCodeableConceptInner(element);
close();
}
}
protected void composeCodeableConceptInner(CodeableConcept element) throws IOException {
composeElement(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 composeParameterDefinition(String name, ParameterDefinition element) throws IOException {
if (element != null) {
open(name);
composeParameterDefinitionInner(element);
close();
}
}
protected void composeParameterDefinitionInner(ParameterDefinition element) throws IOException {
composeElement(element);
if (element.hasNameElement()) {
composeCodeCore("name", element.getNameElement(), false);
composeCodeExtras("name", element.getNameElement(), false);
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory(),
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()) {
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 composeElementDefinition(String name, ElementDefinition element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionInner(element);
close();
}
}
protected void composeElementDefinitionInner(ElementDefinition element) throws IOException {
composeBackbone(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()) {
composeElementDefinitionElementDefinitionSlicingComponent("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()) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, true);
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()) {
composeElementDefinitionElementDefinitionBaseComponent("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())
composeElementDefinitionTypeRefComponent(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())
composeElementDefinitionElementDefinitionExampleComponent(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()) {
openArray("condition");
for (IdType e : element.getCondition())
composeIdCore(null, e, true);
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())
composeElementDefinitionElementDefinitionConstraintComponent(null, e);
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()) {
composeElementDefinitionElementDefinitionBindingComponent("binding", element.getBinding());
}
if (element.hasMapping()) {
openArray("mapping");
for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping())
composeElementDefinitionElementDefinitionMappingComponent(null, e);
closeArray();
}
;
}
protected void composeElementDefinitionElementDefinitionSlicingComponent(String name,
ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionSlicingComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionSlicingComponentInner(
ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException {
composeElement(element);
if (element.hasDiscriminator()) {
openArray("discriminator");
for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator())
composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(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 composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(String name,
ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentInner(
ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException {
composeElement(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 composeElementDefinitionElementDefinitionBaseComponent(String name,
ElementDefinition.ElementDefinitionBaseComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionBaseComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionBaseComponentInner(
ElementDefinition.ElementDefinitionBaseComponent element) throws IOException {
composeElement(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 composeElementDefinitionTypeRefComponent(String name, ElementDefinition.TypeRefComponent element)
throws IOException {
if (element != null) {
open(name);
composeElementDefinitionTypeRefComponentInner(element);
close();
}
}
protected void composeElementDefinitionTypeRefComponentInner(ElementDefinition.TypeRefComponent element)
throws IOException {
composeElement(element);
if (element.hasCodeElement()) {
composeUriCore("code", element.getCodeElement(), false);
composeUriExtras("code", element.getCodeElement(), false);
}
if (element.hasProfile()) {
openArray("profile");
for (CanonicalType e : element.getProfile())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getProfile())) {
openArray("_profile");
for (CanonicalType e : element.getProfile())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasTargetProfile()) {
openArray("targetProfile");
for (CanonicalType e : element.getTargetProfile())
composeCanonicalCore(null, e, true);
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 composeElementDefinitionElementDefinitionExampleComponent(String name,
ElementDefinition.ElementDefinitionExampleComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionExampleComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionExampleComponentInner(
ElementDefinition.ElementDefinitionExampleComponent element) throws IOException {
composeElement(element);
if (element.hasLabelElement()) {
composeStringCore("label", element.getLabelElement(), false);
composeStringExtras("label", element.getLabelElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeElementDefinitionElementDefinitionConstraintComponent(String name,
ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionConstraintComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionConstraintComponentInner(
ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException {
composeElement(element);
if (element.hasKeyElement()) {
composeIdCore("key", element.getKeyElement(), false);
composeIdExtras("key", element.getKeyElement(), false);
}
if (element.hasRequirementsElement()) {
composeStringCore("requirements", element.getRequirementsElement(), false);
composeStringExtras("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.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.hasXpathElement()) {
composeStringCore("xpath", element.getXpathElement(), false);
composeStringExtras("xpath", element.getXpathElement(), false);
}
if (element.hasSourceElement()) {
composeCanonicalCore("source", element.getSourceElement(), false);
composeCanonicalExtras("source", element.getSourceElement(), false);
}
}
protected void composeElementDefinitionElementDefinitionBindingComponent(String name,
ElementDefinition.ElementDefinitionBindingComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionBindingComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionBindingComponentInner(
ElementDefinition.ElementDefinitionBindingComponent element) throws IOException {
composeElement(element);
if (element.hasStrengthElement()) {
composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(),
false);
composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(),
false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasValueSetElement()) {
composeCanonicalCore("valueSet", element.getValueSetElement(), false);
composeCanonicalExtras("valueSet", element.getValueSetElement(), false);
}
}
protected void composeElementDefinitionElementDefinitionMappingComponent(String name,
ElementDefinition.ElementDefinitionMappingComponent element) throws IOException {
if (element != null) {
open(name);
composeElementDefinitionElementDefinitionMappingComponentInner(element);
close();
}
}
protected void composeElementDefinitionElementDefinitionMappingComponentInner(
ElementDefinition.ElementDefinitionMappingComponent element) throws IOException {
composeElement(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()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeDomainResourceElements(DomainResource element) throws IOException {
composeResourceElements(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 composeParameters(String name, Parameters element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeParametersInner(element);
}
}
protected void composeParametersInner(Parameters element) throws IOException {
composeResourceElements(element);
if (element.hasParameter()) {
openArray("parameter");
for (Parameters.ParametersParameterComponent e : element.getParameter())
composeParametersParametersParameterComponent(null, e);
closeArray();
}
;
}
protected void composeParametersParametersParameterComponent(String name,
Parameters.ParametersParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeParametersParametersParameterComponentInner(element);
close();
}
}
protected void composeParametersParametersParameterComponentInner(Parameters.ParametersParameterComponent element)
throws IOException {
composeBackbone(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())
composeParametersParametersParameterComponent(null, e);
closeArray();
}
;
}
protected void composeResourceElements(Resource element) throws IOException {
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);
composeAccountInner(element);
}
}
protected void composeAccountInner(Account element) throws IOException {
composeDomainResourceElements(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.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())
composeAccountCoverageComponent(null, e);
closeArray();
}
;
if (element.hasOwner()) {
composeReference("owner", element.getOwner());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasGuarantor()) {
openArray("guarantor");
for (Account.GuarantorComponent e : element.getGuarantor())
composeAccountGuarantorComponent(null, e);
closeArray();
}
;
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
}
protected void composeAccountCoverageComponent(String name, Account.CoverageComponent element) throws IOException {
if (element != null) {
open(name);
composeAccountCoverageComponentInner(element);
close();
}
}
protected void composeAccountCoverageComponentInner(Account.CoverageComponent element) throws IOException {
composeBackbone(element);
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasPriorityElement()) {
composePositiveIntCore("priority", element.getPriorityElement(), false);
composePositiveIntExtras("priority", element.getPriorityElement(), false);
}
}
protected void composeAccountGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException {
if (element != null) {
open(name);
composeAccountGuarantorComponentInner(element);
close();
}
}
protected void composeAccountGuarantorComponentInner(Account.GuarantorComponent element) throws IOException {
composeBackbone(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 composeActivityDefinition(String name, ActivityDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeActivityDefinitionInner(element);
}
}
protected void composeActivityDefinitionInner(ActivityDefinition element) throws IOException {
composeDomainResourceElements(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.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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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()) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, true);
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.ActivityDefinitionKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(),
new ActivityDefinition.ActivityDefinitionKindEnumFactory(), 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 ActivityDefinition.RequestIntentEnumFactory(),
false);
composeEnumerationExtras("intent", element.getIntentElement(), new ActivityDefinition.RequestIntentEnumFactory(),
false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(),
new ActivityDefinition.RequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(),
new ActivityDefinition.RequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasParticipant()) {
openArray("participant");
for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant())
composeActivityDefinitionActivityDefinitionParticipantComponent(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()) {
openArray("specimenRequirement");
for (Reference e : element.getSpecimenRequirement())
composeReference(null, e);
closeArray();
}
;
if (element.hasObservationRequirement()) {
openArray("observationRequirement");
for (Reference e : element.getObservationRequirement())
composeReference(null, e);
closeArray();
}
;
if (element.hasObservationResultRequirement()) {
openArray("observationResultRequirement");
for (Reference e : element.getObservationResultRequirement())
composeReference(null, e);
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())
composeActivityDefinitionActivityDefinitionDynamicValueComponent(null, e);
closeArray();
}
;
}
protected void composeActivityDefinitionActivityDefinitionParticipantComponent(String name,
ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeActivityDefinitionActivityDefinitionParticipantComponentInner(element);
close();
}
}
protected void composeActivityDefinitionActivityDefinitionParticipantComponentInner(
ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(),
new ActivityDefinition.ActivityParticipantTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(),
new ActivityDefinition.ActivityParticipantTypeEnumFactory(), false);
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(String name,
ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException {
if (element != null) {
open(name);
composeActivityDefinitionActivityDefinitionDynamicValueComponentInner(element);
close();
}
}
protected void composeActivityDefinitionActivityDefinitionDynamicValueComponentInner(
ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException {
composeBackbone(element);
if (element.hasPathElement()) {
composeStringCore("path", element.getPathElement(), false);
composeStringExtras("path", element.getPathElement(), false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAdverseEventInner(element);
}
}
protected void composeAdverseEventInner(AdverseEvent element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
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.hasEvent()) {
composeCodeableConcept("event", element.getEvent());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
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.hasResultingCondition()) {
openArray("resultingCondition");
for (Reference e : element.getResultingCondition())
composeReference(null, e);
closeArray();
}
;
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasSeriousness()) {
composeCodeableConcept("seriousness", element.getSeriousness());
}
if (element.hasSeverity()) {
composeCodeableConcept("severity", element.getSeverity());
}
if (element.hasOutcome()) {
composeCodeableConcept("outcome", element.getOutcome());
}
if (element.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasContributor()) {
openArray("contributor");
for (Reference e : element.getContributor())
composeReference(null, e);
closeArray();
}
;
if (element.hasSuspectEntity()) {
openArray("suspectEntity");
for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity())
composeAdverseEventAdverseEventSuspectEntityComponent(null, e);
closeArray();
}
;
if (element.hasSubjectMedicalHistory()) {
openArray("subjectMedicalHistory");
for (Reference e : element.getSubjectMedicalHistory())
composeReference(null, e);
closeArray();
}
;
if (element.hasReferenceDocument()) {
openArray("referenceDocument");
for (Reference e : element.getReferenceDocument())
composeReference(null, e);
closeArray();
}
;
if (element.hasStudy()) {
openArray("study");
for (Reference e : element.getStudy())
composeReference(null, e);
closeArray();
}
;
}
protected void composeAdverseEventAdverseEventSuspectEntityComponent(String name,
AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventAdverseEventSuspectEntityComponentInner(element);
close();
}
}
protected void composeAdverseEventAdverseEventSuspectEntityComponentInner(
AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException {
composeBackbone(element);
if (element.hasInstance()) {
composeReference("instance", element.getInstance());
}
if (element.hasCausality()) {
openArray("causality");
for (AdverseEvent.AdverseEventSuspectEntityCausalityComponent e : element.getCausality())
composeAdverseEventAdverseEventSuspectEntityCausalityComponent(null, e);
closeArray();
}
;
}
protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(String name,
AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException {
if (element != null) {
open(name);
composeAdverseEventAdverseEventSuspectEntityCausalityComponentInner(element);
close();
}
}
protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponentInner(
AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException {
composeBackbone(element);
if (element.hasAssessment()) {
composeCodeableConcept("assessment", element.getAssessment());
}
if (element.hasProductRelatednessElement()) {
composeStringCore("productRelatedness", element.getProductRelatednessElement(), false);
composeStringExtras("productRelatedness", element.getProductRelatednessElement(), false);
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
}
protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAllergyIntoleranceInner(element);
}
}
protected void composeAllergyIntoleranceInner(AllergyIntolerance element) throws IOException {
composeDomainResourceElements(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.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(),
new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(),
new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory(), false);
}
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.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasAsserter()) {
composeReference("asserter", element.getAsserter());
}
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())
composeAllergyIntoleranceAllergyIntoleranceReactionComponent(null, e);
closeArray();
}
;
}
protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(String name,
AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException {
if (element != null) {
open(name);
composeAllergyIntoleranceAllergyIntoleranceReactionComponentInner(element);
close();
}
}
protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponentInner(
AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException {
composeBackbone(element);
if (element.hasSubstance()) {
composeCodeableConcept("substance", element.getSubstance());
}
if (element.hasManifestation()) {
openArray("manifestation");
for (CodeableConcept e : element.getManifestation())
composeCodeableConcept(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);
composeAppointmentInner(element);
}
}
protected void composeAppointmentInner(Appointment element) throws IOException {
composeDomainResourceElements(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.hasCancelationReason()) {
composeCodeableConcept("cancelationReason", element.getCancelationReason());
}
if (element.hasServiceCategory()) {
openArray("serviceCategory");
for (CodeableConcept e : element.getServiceCategory())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasServiceType()) {
openArray("serviceType");
for (CodeableConcept e : element.getServiceType())
composeCodeableConcept(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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasPriorityElement()) {
composeUnsignedIntCore("priority", element.getPriorityElement(), false);
composeUnsignedIntExtras("priority", element.getPriorityElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
}
;
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.hasSlot()) {
openArray("slot");
for (Reference e : element.getSlot())
composeReference(null, e);
closeArray();
}
;
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasPatientInstructionElement()) {
composeStringCore("patientInstruction", element.getPatientInstructionElement(), false);
composeStringExtras("patientInstruction", element.getPatientInstructionElement(), false);
}
if (element.hasBasedOn()) {
openArray("basedOn");
for (Reference e : element.getBasedOn())
composeReference(null, e);
closeArray();
}
;
if (element.hasParticipant()) {
openArray("participant");
for (Appointment.AppointmentParticipantComponent e : element.getParticipant())
composeAppointmentAppointmentParticipantComponent(null, e);
closeArray();
}
;
if (element.hasRequestedPeriod()) {
openArray("requestedPeriod");
for (Period e : element.getRequestedPeriod())
composePeriod(null, e);
closeArray();
}
;
}
protected void composeAppointmentAppointmentParticipantComponent(String name,
Appointment.AppointmentParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeAppointmentAppointmentParticipantComponentInner(element);
close();
}
}
protected void composeAppointmentAppointmentParticipantComponentInner(
Appointment.AppointmentParticipantComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
if (element.hasRequiredElement()) {
composeEnumerationCore("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory(),
false);
composeEnumerationExtras("required", element.getRequiredElement(),
new Appointment.ParticipantRequiredEnumFactory(), false);
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(),
false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAppointmentResponseInner(element);
}
}
protected void composeAppointmentResponseInner(AppointmentResponse element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasAppointment()) {
composeReference("appointment", element.getAppointment());
}
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.ParticipantStatusEnumFactory(), false);
composeEnumerationExtras("participantStatus", element.getParticipantStatusElement(),
new AppointmentResponse.ParticipantStatusEnumFactory(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeAuditEvent(String name, AuditEvent element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeAuditEventInner(element);
}
}
protected void composeAuditEventInner(AuditEvent element) throws IOException {
composeDomainResourceElements(element);
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasSubtype()) {
openArray("subtype");
for (Coding e : element.getSubtype())
composeCoding(null, e);
closeArray();
}
;
if (element.hasActionElement()) {
composeEnumerationCore("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false);
composeEnumerationExtras("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(),
false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasRecordedElement()) {
composeInstantCore("recorded", element.getRecordedElement(), false);
composeInstantExtras("recorded", element.getRecordedElement(), false);
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory(),
false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory(),
false);
}
if (element.hasOutcomeDescElement()) {
composeStringCore("outcomeDesc", element.getOutcomeDescElement(), false);
composeStringExtras("outcomeDesc", element.getOutcomeDescElement(), false);
}
if (element.hasPurposeOfEvent()) {
openArray("purposeOfEvent");
for (CodeableConcept e : element.getPurposeOfEvent())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasAgent()) {
openArray("agent");
for (AuditEvent.AuditEventAgentComponent e : element.getAgent())
composeAuditEventAuditEventAgentComponent(null, e);
closeArray();
}
;
if (element.hasSource()) {
composeAuditEventAuditEventSourceComponent("source", element.getSource());
}
if (element.hasEntity()) {
openArray("entity");
for (AuditEvent.AuditEventEntityComponent e : element.getEntity())
composeAuditEventAuditEventEntityComponent(null, e);
closeArray();
}
;
}
protected void composeAuditEventAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element)
throws IOException {
if (element != null) {
open(name);
composeAuditEventAuditEventAgentComponentInner(element);
close();
}
}
protected void composeAuditEventAuditEventAgentComponentInner(AuditEvent.AuditEventAgentComponent element)
throws IOException {
composeBackbone(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.hasAltIdElement()) {
composeStringCore("altId", element.getAltIdElement(), false);
composeStringExtras("altId", element.getAltIdElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasRequestorElement()) {
composeBooleanCore("requestor", element.getRequestorElement(), false);
composeBooleanExtras("requestor", element.getRequestorElement(), false);
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasPolicy()) {
openArray("policy");
for (UriType e : element.getPolicy())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPolicy())) {
openArray("_policy");
for (UriType e : element.getPolicy())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasMedia()) {
composeCoding("media", element.getMedia());
}
if (element.hasNetwork()) {
composeAuditEventAuditEventAgentNetworkComponent("network", element.getNetwork());
}
if (element.hasPurposeOfUse()) {
openArray("purposeOfUse");
for (CodeableConcept e : element.getPurposeOfUse())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeAuditEventAuditEventAgentNetworkComponent(String name,
AuditEvent.AuditEventAgentNetworkComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventAuditEventAgentNetworkComponentInner(element);
close();
}
}
protected void composeAuditEventAuditEventAgentNetworkComponentInner(
AuditEvent.AuditEventAgentNetworkComponent element) throws IOException {
composeBackbone(element);
if (element.hasAddressElement()) {
composeStringCore("address", element.getAddressElement(), false);
composeStringExtras("address", element.getAddressElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory(),
false);
}
}
protected void composeAuditEventAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element)
throws IOException {
if (element != null) {
open(name);
composeAuditEventAuditEventSourceComponentInner(element);
close();
}
}
protected void composeAuditEventAuditEventSourceComponentInner(AuditEvent.AuditEventSourceComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSiteElement()) {
composeStringCore("site", element.getSiteElement(), false);
composeStringExtras("site", element.getSiteElement(), false);
}
if (element.hasObserver()) {
composeReference("observer", element.getObserver());
}
if (element.hasType()) {
openArray("type");
for (Coding e : element.getType())
composeCoding(null, e);
closeArray();
}
;
}
protected void composeAuditEventAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element)
throws IOException {
if (element != null) {
open(name);
composeAuditEventAuditEventEntityComponentInner(element);
close();
}
}
protected void composeAuditEventAuditEventEntityComponentInner(AuditEvent.AuditEventEntityComponent element)
throws IOException {
composeBackbone(element);
if (element.hasWhat()) {
composeReference("what", element.getWhat());
}
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasRole()) {
composeCoding("role", element.getRole());
}
if (element.hasLifecycle()) {
composeCoding("lifecycle", element.getLifecycle());
}
if (element.hasSecurityLabel()) {
openArray("securityLabel");
for (Coding e : element.getSecurityLabel())
composeCoding(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.hasQueryElement()) {
composeBase64BinaryCore("query", element.getQueryElement(), false);
composeBase64BinaryExtras("query", element.getQueryElement(), false);
}
if (element.hasDetail()) {
openArray("detail");
for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail())
composeAuditEventAuditEventEntityDetailComponent(null, e);
closeArray();
}
;
}
protected void composeAuditEventAuditEventEntityDetailComponent(String name,
AuditEvent.AuditEventEntityDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeAuditEventAuditEventEntityDetailComponentInner(element);
close();
}
}
protected void composeAuditEventAuditEventEntityDetailComponentInner(
AuditEvent.AuditEventEntityDetailComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeStringCore("type", element.getTypeElement(), false);
composeStringExtras("type", element.getTypeElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeBasic(String name, Basic element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBasicInner(element);
}
}
protected void composeBasicInner(Basic element) throws IOException {
composeDomainResourceElements(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()) {
composeDateCore("created", element.getCreatedElement(), false);
composeDateExtras("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);
composeBinaryInner(element);
}
}
protected void composeBinaryInner(Binary element) throws IOException {
composeResourceElements(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);
composeBiologicallyDerivedProductInner(element);
}
}
protected void composeBiologicallyDerivedProductInner(BiologicallyDerivedProduct element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasProductCategoryElement()) {
composeEnumerationCore("productCategory", element.getProductCategoryElement(),
new BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory(), false);
composeEnumerationExtras("productCategory", element.getProductCategoryElement(),
new BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory(), false);
}
if (element.hasProductCode()) {
composeCodeableConcept("productCode", element.getProductCode());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory(), false);
}
if (element.hasRequest()) {
openArray("request");
for (Reference e : element.getRequest())
composeReference(null, e);
closeArray();
}
;
if (element.hasQuantityElement()) {
composeIntegerCore("quantity", element.getQuantityElement(), false);
composeIntegerExtras("quantity", element.getQuantityElement(), false);
}
if (element.hasParent()) {
openArray("parent");
for (Reference e : element.getParent())
composeReference(null, e);
closeArray();
}
;
if (element.hasCollection()) {
composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent("collection",
element.getCollection());
}
if (element.hasProcessing()) {
openArray("processing");
for (BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent e : element.getProcessing())
composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent(null, e);
closeArray();
}
;
if (element.hasManipulation()) {
composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent("manipulation",
element.getManipulation());
}
if (element.hasStorage()) {
openArray("storage");
for (BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent e : element.getStorage())
composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent(null, e);
closeArray();
}
;
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent(String name,
BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentInner(element);
close();
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentInner(
BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element) throws IOException {
composeBackbone(element);
if (element.hasCollector()) {
composeReference("collector", element.getCollector());
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasCollected()) {
composeType("collected", element.getCollected());
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent(String name,
BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentInner(element);
close();
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentInner(
BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasProcedure()) {
composeCodeableConcept("procedure", element.getProcedure());
}
if (element.hasAdditive()) {
composeReference("additive", element.getAdditive());
}
if (element.hasTime()) {
composeType("time", element.getTime());
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent(String name,
BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentInner(element);
close();
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentInner(
BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTime()) {
composeType("time", element.getTime());
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent(String name,
BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent element) throws IOException {
if (element != null) {
open(name);
composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentInner(element);
close();
}
}
protected void composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentInner(
BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTemperatureElement()) {
composeDecimalCore("temperature", element.getTemperatureElement(), false);
composeDecimalExtras("temperature", element.getTemperatureElement(), false);
}
if (element.hasScaleElement()) {
composeEnumerationCore("scale", element.getScaleElement(),
new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory(), false);
composeEnumerationExtras("scale", element.getScaleElement(),
new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory(), false);
}
if (element.hasDuration()) {
composePeriod("duration", element.getDuration());
}
}
protected void composeBodyStructure(String name, BodyStructure element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBodyStructureInner(element);
}
}
protected void composeBodyStructureInner(BodyStructure element) throws IOException {
composeDomainResourceElements(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.hasLocation()) {
composeCodeableConcept("location", element.getLocation());
}
if (element.hasLocationQualifier()) {
openArray("locationQualifier");
for (CodeableConcept e : element.getLocationQualifier())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("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 composeBundle(String name, Bundle element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeBundleInner(element);
}
}
protected void composeBundleInner(Bundle element) throws IOException {
composeResourceElements(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())
composeBundleBundleLinkComponent(null, e);
closeArray();
}
;
if (element.hasEntry()) {
openArray("entry");
for (Bundle.BundleEntryComponent e : element.getEntry())
composeBundleBundleEntryComponent(null, e);
closeArray();
}
;
if (element.hasSignature()) {
composeSignature("signature", element.getSignature());
}
}
protected void composeBundleBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeBundleBundleLinkComponentInner(element);
close();
}
}
protected void composeBundleBundleLinkComponentInner(Bundle.BundleLinkComponent element) throws IOException {
composeBackbone(element);
if (element.hasRelationElement()) {
composeStringCore("relation", element.getRelationElement(), false);
composeStringExtras("relation", element.getRelationElement(), false);
}
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
}
protected void composeBundleBundleEntryComponent(String name, Bundle.BundleEntryComponent element)
throws IOException {
if (element != null) {
open(name);
composeBundleBundleEntryComponentInner(element);
close();
}
}
protected void composeBundleBundleEntryComponentInner(Bundle.BundleEntryComponent element) throws IOException {
composeBackbone(element);
if (element.hasLink()) {
openArray("link");
for (Bundle.BundleLinkComponent e : element.getLink())
composeBundleBundleLinkComponent(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()) {
composeBundleBundleEntrySearchComponent("search", element.getSearch());
}
if (element.hasRequest()) {
composeBundleBundleEntryRequestComponent("request", element.getRequest());
}
if (element.hasResponse()) {
composeBundleBundleEntryResponseComponent("response", element.getResponse());
}
}
protected void composeBundleBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element)
throws IOException {
if (element != null) {
open(name);
composeBundleBundleEntrySearchComponentInner(element);
close();
}
}
protected void composeBundleBundleEntrySearchComponentInner(Bundle.BundleEntrySearchComponent element)
throws IOException {
composeBackbone(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 composeBundleBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element)
throws IOException {
if (element != null) {
open(name);
composeBundleBundleEntryRequestComponentInner(element);
close();
}
}
protected void composeBundleBundleEntryRequestComponentInner(Bundle.BundleEntryRequestComponent element)
throws IOException {
composeBackbone(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 composeBundleBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element)
throws IOException {
if (element != null) {
open(name);
composeBundleBundleEntryResponseComponentInner(element);
close();
}
}
protected void composeBundleBundleEntryResponseComponentInner(Bundle.BundleEntryResponseComponent element)
throws IOException {
composeBackbone(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);
composeCapabilityStatementInner(element);
}
}
protected void composeCapabilityStatementInner(CapabilityStatement element) throws IOException {
composeDomainResourceElements(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.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.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(),
new CapabilityStatement.CapabilityStatementKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(),
new CapabilityStatement.CapabilityStatementKindEnumFactory(), false);
}
if (element.hasInstantiates()) {
openArray("instantiates");
for (CanonicalType e : element.getInstantiates())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiates())) {
openArray("_instantiates");
for (CanonicalType e : element.getInstantiates())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasImports()) {
openArray("imports");
for (CanonicalType e : element.getImports())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getImports())) {
openArray("_imports");
for (CanonicalType e : element.getImports())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSoftware()) {
composeCapabilityStatementCapabilityStatementSoftwareComponent("software", element.getSoftware());
}
if (element.hasImplementation()) {
composeCapabilityStatementCapabilityStatementImplementationComponent("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()) {
openArray("format");
for (CodeType e : element.getFormat())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getFormat())) {
openArray("_format");
for (CodeType e : element.getFormat())
composeCodeExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPatchFormat()) {
openArray("patchFormat");
for (CodeType e : element.getPatchFormat())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPatchFormat())) {
openArray("_patchFormat");
for (CodeType e : element.getPatchFormat())
composeCodeExtras(null, e, true);
closeArray();
}
}
;
if (element.hasImplementationGuide()) {
openArray("implementationGuide");
for (CanonicalType e : element.getImplementationGuide())
composeCanonicalCore(null, e, true);
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())
composeCapabilityStatementCapabilityStatementRestComponent(null, e);
closeArray();
}
;
if (element.hasMessaging()) {
openArray("messaging");
for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging())
composeCapabilityStatementCapabilityStatementMessagingComponent(null, e);
closeArray();
}
;
if (element.hasDocument()) {
openArray("document");
for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument())
composeCapabilityStatementCapabilityStatementDocumentComponent(null, e);
closeArray();
}
;
}
protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(String name,
CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementSoftwareComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementSoftwareComponentInner(
CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementCapabilityStatementImplementationComponent(String name,
CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementImplementationComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementImplementationComponentInner(
CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException {
composeBackbone(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);
}
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
}
protected void composeCapabilityStatementCapabilityStatementRestComponent(String name,
CapabilityStatement.CapabilityStatementRestComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementRestComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementRestComponentInner(
CapabilityStatement.CapabilityStatementRestComponent element) throws IOException {
composeBackbone(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()) {
composeCapabilityStatementCapabilityStatementRestSecurityComponent("security", element.getSecurity());
}
if (element.hasResource()) {
openArray("resource");
for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource())
composeCapabilityStatementCapabilityStatementRestResourceComponent(null, e);
closeArray();
}
;
if (element.hasInteraction()) {
openArray("interaction");
for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction())
composeCapabilityStatementSystemInteractionComponent(null, e);
closeArray();
}
;
if (element.hasSearchParam()) {
openArray("searchParam");
for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam())
composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(null, e);
closeArray();
}
;
if (element.hasOperation()) {
openArray("operation");
for (CapabilityStatement.CapabilityStatementRestResourceOperationComponent e : element.getOperation())
composeCapabilityStatementCapabilityStatementRestResourceOperationComponent(null, e);
closeArray();
}
;
if (element.hasCompartment()) {
openArray("compartment");
for (CanonicalType e : element.getCompartment())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getCompartment())) {
openArray("_compartment");
for (CanonicalType e : element.getCompartment())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(String name,
CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementRestSecurityComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementRestSecurityComponentInner(
CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementCapabilityStatementRestResourceComponent(String name,
CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementRestResourceComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementRestResourceComponentInner(
CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException {
composeBackbone(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()) {
openArray("supportedProfile");
for (CanonicalType e : element.getSupportedProfile())
composeCanonicalCore(null, e, true);
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())
composeCapabilityStatementResourceInteractionComponent(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.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()) {
openArray("searchInclude");
for (StringType e : element.getSearchInclude())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSearchInclude())) {
openArray("_searchInclude");
for (StringType e : element.getSearchInclude())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSearchRevInclude()) {
openArray("searchRevInclude");
for (StringType e : element.getSearchRevInclude())
composeStringCore(null, e, true);
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())
composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(null, e);
closeArray();
}
;
if (element.hasOperation()) {
openArray("operation");
for (CapabilityStatement.CapabilityStatementRestResourceOperationComponent e : element.getOperation())
composeCapabilityStatementCapabilityStatementRestResourceOperationComponent(null, e);
closeArray();
}
;
}
protected void composeCapabilityStatementResourceInteractionComponent(String name,
CapabilityStatement.ResourceInteractionComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementResourceInteractionComponentInner(element);
close();
}
}
protected void composeCapabilityStatementResourceInteractionComponentInner(
CapabilityStatement.ResourceInteractionComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(String name,
CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentInner(
CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementCapabilityStatementRestResourceOperationComponent(String name,
CapabilityStatement.CapabilityStatementRestResourceOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementRestResourceOperationComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementRestResourceOperationComponentInner(
CapabilityStatement.CapabilityStatementRestResourceOperationComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementSystemInteractionComponent(String name,
CapabilityStatement.SystemInteractionComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementSystemInteractionComponentInner(element);
close();
}
}
protected void composeCapabilityStatementSystemInteractionComponentInner(
CapabilityStatement.SystemInteractionComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementCapabilityStatementMessagingComponent(String name,
CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementMessagingComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementMessagingComponentInner(
CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException {
composeBackbone(element);
if (element.hasEndpoint()) {
openArray("endpoint");
for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint())
composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(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())
composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(null, e);
closeArray();
}
;
}
protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(String name,
CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementMessagingEndpointComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponentInner(
CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException {
composeBackbone(element);
if (element.hasProtocol()) {
composeCoding("protocol", element.getProtocol());
}
if (element.hasAddressElement()) {
composeUrlCore("address", element.getAddressElement(), false);
composeUrlExtras("address", element.getAddressElement(), false);
}
}
protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(String name,
CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentInner(
CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException {
composeBackbone(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 composeCapabilityStatementCapabilityStatementDocumentComponent(String name,
CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException {
if (element != null) {
open(name);
composeCapabilityStatementCapabilityStatementDocumentComponentInner(element);
close();
}
}
protected void composeCapabilityStatementCapabilityStatementDocumentComponentInner(
CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException {
composeBackbone(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);
composeCarePlanInner(element);
}
}
protected void composeCarePlanInner(CarePlan element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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 CarePlan.CarePlanStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory(), 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.hasAuthor()) {
composeReference("author", element.getAuthor());
}
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 (Reference e : element.getAddresses())
composeReference(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())
composeCarePlanCarePlanActivityComponent(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeCarePlanCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element)
throws IOException {
if (element != null) {
open(name);
composeCarePlanCarePlanActivityComponentInner(element);
close();
}
}
protected void composeCarePlanCarePlanActivityComponentInner(CarePlan.CarePlanActivityComponent element)
throws IOException {
composeBackbone(element);
if (element.hasOutcomeCodeableConcept()) {
openArray("outcomeCodeableConcept");
for (CodeableConcept e : element.getOutcomeCodeableConcept())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasOutcomeReference()) {
openArray("outcomeReference");
for (Reference e : element.getOutcomeReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasProgress()) {
openArray("progress");
for (Annotation e : element.getProgress())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasDetail()) {
composeCarePlanCarePlanActivityDetailComponent("detail", element.getDetail());
}
}
protected void composeCarePlanCarePlanActivityDetailComponent(String name,
CarePlan.CarePlanActivityDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeCarePlanCarePlanActivityDetailComponentInner(element);
close();
}
}
protected void composeCarePlanCarePlanActivityDetailComponentInner(CarePlan.CarePlanActivityDetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new CarePlan.CarePlanActivityKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(), new CarePlan.CarePlanActivityKindEnumFactory(), false);
}
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasGoal()) {
openArray("goal");
for (Reference e : element.getGoal())
composeReference(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory(),
false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasScheduled()) {
composeType("scheduled", element.getScheduled());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasPerformer()) {
openArray("performer");
for (Reference e : element.getPerformer())
composeReference(null, e);
closeArray();
}
;
if (element.hasProduct()) {
composeType("product", element.getProduct());
}
if (element.hasDailyAmount()) {
composeQuantity("dailyAmount", element.getDailyAmount());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeCareTeam(String name, CareTeam element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCareTeamInner(element);
}
}
protected void composeCareTeamInner(CareTeam element) throws IOException {
composeDomainResourceElements(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.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasParticipant()) {
openArray("participant");
for (CareTeam.CareTeamParticipantComponent e : element.getParticipant())
composeCareTeamCareTeamParticipantComponent(null, e);
closeArray();
}
;
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(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 composeCareTeamCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element)
throws IOException {
if (element != null) {
open(name);
composeCareTeamCareTeamParticipantComponentInner(element);
close();
}
}
protected void composeCareTeamCareTeamParticipantComponentInner(CareTeam.CareTeamParticipantComponent element)
throws IOException {
composeBackbone(element);
if (element.hasRole()) {
openArray("role");
for (CodeableConcept e : element.getRole())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasMember()) {
composeReference("member", element.getMember());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeCatalogEntry(String name, CatalogEntry element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCatalogEntryInner(element);
}
}
protected void composeCatalogEntryInner(CatalogEntry element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasOrderableElement()) {
composeBooleanCore("orderable", element.getOrderableElement(), false);
composeBooleanExtras("orderable", element.getOrderableElement(), false);
}
if (element.hasReferencedItem()) {
composeReference("referencedItem", element.getReferencedItem());
}
if (element.hasAdditionalIdentifier()) {
openArray("additionalIdentifier");
for (Identifier e : element.getAdditionalIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasClassification()) {
openArray("classification");
for (CodeableConcept e : element.getClassification())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(),
false);
}
if (element.hasValidityPeriod()) {
composePeriod("validityPeriod", element.getValidityPeriod());
}
if (element.hasValidToElement()) {
composeDateTimeCore("validTo", element.getValidToElement(), false);
composeDateTimeExtras("validTo", element.getValidToElement(), false);
}
if (element.hasLastUpdatedElement()) {
composeDateTimeCore("lastUpdated", element.getLastUpdatedElement(), false);
composeDateTimeExtras("lastUpdated", element.getLastUpdatedElement(), false);
}
if (element.hasAdditionalCharacteristic()) {
openArray("additionalCharacteristic");
for (CodeableConcept e : element.getAdditionalCharacteristic())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasAdditionalClassification()) {
openArray("additionalClassification");
for (CodeableConcept e : element.getAdditionalClassification())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasRelatedEntry()) {
openArray("relatedEntry");
for (CatalogEntry.CatalogEntryRelatedEntryComponent e : element.getRelatedEntry())
composeCatalogEntryCatalogEntryRelatedEntryComponent(null, e);
closeArray();
}
;
}
protected void composeCatalogEntryCatalogEntryRelatedEntryComponent(String name,
CatalogEntry.CatalogEntryRelatedEntryComponent element) throws IOException {
if (element != null) {
open(name);
composeCatalogEntryCatalogEntryRelatedEntryComponentInner(element);
close();
}
}
protected void composeCatalogEntryCatalogEntryRelatedEntryComponentInner(
CatalogEntry.CatalogEntryRelatedEntryComponent element) throws IOException {
composeBackbone(element);
if (element.hasRelationtypeElement()) {
composeEnumerationCore("relationtype", element.getRelationtypeElement(),
new CatalogEntry.CatalogEntryRelationTypeEnumFactory(), false);
composeEnumerationExtras("relationtype", element.getRelationtypeElement(),
new CatalogEntry.CatalogEntryRelationTypeEnumFactory(), false);
}
if (element.hasItem()) {
composeReference("item", element.getItem());
}
}
protected void composeChargeItem(String name, ChargeItem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeChargeItemInner(element);
}
}
protected void composeChargeItemInner(ChargeItem element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasDefinitionUri()) {
openArray("definitionUri");
for (UriType e : element.getDefinitionUri())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDefinitionUri())) {
openArray("_definitionUri");
for (UriType e : element.getDefinitionUri())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasDefinitionCanonical()) {
openArray("definitionCanonical");
for (CanonicalType e : element.getDefinitionCanonical())
composeCanonicalCore(null, e, true);
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.hasContext()) {
composeReference("context", element.getContext());
}
if (element.hasOccurrence()) {
composeType("occurrence", element.getOccurrence());
}
if (element.hasPerformer()) {
openArray("performer");
for (ChargeItem.ChargeItemPerformerComponent e : element.getPerformer())
composeChargeItemChargeItemPerformerComponent(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.hasFactorOverrideElement()) {
composeDecimalCore("factorOverride", element.getFactorOverrideElement(), false);
composeDecimalExtras("factorOverride", element.getFactorOverrideElement(), false);
}
if (element.hasPriceOverride()) {
composeMoney("priceOverride", element.getPriceOverride());
}
if (element.hasOverrideReasonElement()) {
composeStringCore("overrideReason", element.getOverrideReasonElement(), false);
composeStringExtras("overrideReason", element.getOverrideReasonElement(), false);
}
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 (Reference e : element.getService())
composeReference(null, e);
closeArray();
}
;
if (element.hasProduct()) {
composeType("product", element.getProduct());
}
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 composeChargeItemChargeItemPerformerComponent(String name,
ChargeItem.ChargeItemPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemChargeItemPerformerComponentInner(element);
close();
}
}
protected void composeChargeItemChargeItemPerformerComponentInner(ChargeItem.ChargeItemPerformerComponent element)
throws IOException {
composeBackbone(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);
composeChargeItemDefinitionInner(element);
}
}
protected void composeChargeItemDefinitionInner(ChargeItemDefinition element) throws IOException {
composeDomainResourceElements(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.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasDerivedFromUri()) {
openArray("derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDerivedFromUri())) {
openArray("_derivedFromUri");
for (UriType e : element.getDerivedFromUri())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPartOf()) {
openArray("partOf");
for (CanonicalType e : element.getPartOf())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPartOf())) {
openArray("_partOf");
for (CanonicalType e : element.getPartOf())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasReplaces()) {
openArray("replaces");
for (CanonicalType e : element.getReplaces())
composeCanonicalCore(null, e, true);
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.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.hasEffectivePeriod()) {
composePeriod("effectivePeriod", element.getEffectivePeriod());
}
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())
composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(null, e);
closeArray();
}
;
if (element.hasPropertyGroup()) {
openArray("propertyGroup");
for (ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent e : element.getPropertyGroup())
composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent(null, e);
closeArray();
}
;
}
protected void composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(String name,
ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponentInner(element);
close();
}
}
protected void composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponentInner(
ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasLanguageElement()) {
composeStringCore("language", element.getLanguageElement(), false);
composeStringExtras("language", element.getLanguageElement(), false);
}
if (element.hasExpressionElement()) {
composeStringCore("expression", element.getExpressionElement(), false);
composeStringExtras("expression", element.getExpressionElement(), false);
}
}
protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent(String name,
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentInner(element);
close();
}
}
protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentInner(
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element) throws IOException {
composeBackbone(element);
if (element.hasApplicability()) {
openArray("applicability");
for (ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent e : element.getApplicability())
composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(null, e);
closeArray();
}
;
if (element.hasPriceComponent()) {
openArray("priceComponent");
for (ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent e : element
.getPriceComponent())
composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent(null, e);
closeArray();
}
;
}
protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent(String name,
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentInner(element);
close();
}
}
protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentInner(
ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(),
new ChargeItemDefinition.ChargeItemDefinitionPriceComponentTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(),
new ChargeItemDefinition.ChargeItemDefinitionPriceComponentTypeEnumFactory(), 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 composeClaim(String name, Claim element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeClaimInner(element);
}
}
protected void composeClaimInner(Claim element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new Claim.UseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new Claim.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())
composeClaimRelatedClaimComponent(null, e);
closeArray();
}
;
if (element.hasPrescription()) {
composeReference("prescription", element.getPrescription());
}
if (element.hasOriginalPrescription()) {
composeReference("originalPrescription", element.getOriginalPrescription());
}
if (element.hasPayee()) {
composeClaimPayeeComponent("payee", element.getPayee());
}
if (element.hasReferral()) {
composeReference("referral", element.getReferral());
}
if (element.hasFacility()) {
composeReference("facility", element.getFacility());
}
if (element.hasCareTeam()) {
openArray("careTeam");
for (Claim.CareTeamComponent e : element.getCareTeam())
composeClaimCareTeamComponent(null, e);
closeArray();
}
;
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (Claim.SupportingInformationComponent e : element.getSupportingInfo())
composeClaimSupportingInformationComponent(null, e);
closeArray();
}
;
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (Claim.DiagnosisComponent e : element.getDiagnosis())
composeClaimDiagnosisComponent(null, e);
closeArray();
}
;
if (element.hasProcedure()) {
openArray("procedure");
for (Claim.ProcedureComponent e : element.getProcedure())
composeClaimProcedureComponent(null, e);
closeArray();
}
;
if (element.hasInsurance()) {
openArray("insurance");
for (Claim.InsuranceComponent e : element.getInsurance())
composeClaimInsuranceComponent(null, e);
closeArray();
}
;
if (element.hasAccident()) {
composeClaimAccidentComponent("accident", element.getAccident());
}
if (element.hasItem()) {
openArray("item");
for (Claim.ItemComponent e : element.getItem())
composeClaimItemComponent(null, e);
closeArray();
}
;
if (element.hasTotal()) {
composeMoney("total", element.getTotal());
}
}
protected void composeClaimRelatedClaimComponent(String name, Claim.RelatedClaimComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimRelatedClaimComponentInner(element);
close();
}
}
protected void composeClaimRelatedClaimComponentInner(Claim.RelatedClaimComponent element) throws IOException {
composeBackbone(element);
if (element.hasClaim()) {
composeReference("claim", element.getClaim());
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasReference()) {
composeIdentifier("reference", element.getReference());
}
}
protected void composeClaimPayeeComponent(String name, Claim.PayeeComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimPayeeComponentInner(element);
close();
}
}
protected void composeClaimPayeeComponentInner(Claim.PayeeComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeClaimCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimCareTeamComponentInner(element);
close();
}
}
protected void composeClaimCareTeamComponentInner(Claim.CareTeamComponent element) throws IOException {
composeBackbone(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.hasQualification()) {
composeCodeableConcept("qualification", element.getQualification());
}
}
protected void composeClaimSupportingInformationComponent(String name, Claim.SupportingInformationComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimSupportingInformationComponentInner(element);
close();
}
}
protected void composeClaimSupportingInformationComponentInner(Claim.SupportingInformationComponent element)
throws IOException {
composeBackbone(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 composeClaimDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimDiagnosisComponentInner(element);
close();
}
}
protected void composeClaimDiagnosisComponentInner(Claim.DiagnosisComponent element) throws IOException {
composeBackbone(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());
}
if (element.hasPackageCode()) {
composeCodeableConcept("packageCode", element.getPackageCode());
}
}
protected void composeClaimProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimProcedureComponentInner(element);
close();
}
}
protected void composeClaimProcedureComponentInner(Claim.ProcedureComponent element) throws IOException {
composeBackbone(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 composeClaimInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimInsuranceComponentInner(element);
close();
}
}
protected void composeClaimInsuranceComponentInner(Claim.InsuranceComponent element) throws IOException {
composeBackbone(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()) {
openArray("preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringCore(null, e, true);
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 composeClaimAccidentComponent(String name, Claim.AccidentComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimAccidentComponentInner(element);
close();
}
}
protected void composeClaimAccidentComponentInner(Claim.AccidentComponent element) throws IOException {
composeBackbone(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 composeClaimItemComponent(String name, Claim.ItemComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimItemComponentInner(element);
close();
}
}
protected void composeClaimItemComponentInner(Claim.ItemComponent element) throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCareTeamSequence()) {
openArray("careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getCareTeamSequence())) {
openArray("_careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasDiagnosisSequence()) {
openArray("diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDiagnosisSequence())) {
openArray("_diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasProcedureSequence()) {
openArray("procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getProcedureSequence())) {
openArray("_procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInformationSequence()) {
openArray("informationSequence");
for (PositiveIntType e : element.getInformationSequence())
composePositiveIntCore(null, e, true);
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.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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
}
;
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(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())
composeClaimDetailComponent(null, e);
closeArray();
}
;
}
protected void composeClaimDetailComponent(String name, Claim.DetailComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimDetailComponentInner(element);
close();
}
}
protected void composeClaimDetailComponentInner(Claim.DetailComponent element) throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
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.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
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.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())
composeClaimSubDetailComponent(null, e);
closeArray();
}
;
}
protected void composeClaimSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimSubDetailComponentInner(element);
close();
}
}
protected void composeClaimSubDetailComponentInner(Claim.SubDetailComponent element) throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
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.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
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.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);
composeClaimResponseInner(element);
}
}
protected void composeClaimResponseInner(ClaimResponse element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory(),
false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubType()) {
composeCodeableConcept("subType", element.getSubType());
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new ClaimResponse.UseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new ClaimResponse.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 ClaimResponse.RemittanceOutcomeEnumFactory(),
false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new ClaimResponse.RemittanceOutcomeEnumFactory(),
false);
}
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.hasPayeeType()) {
composeCodeableConcept("payeeType", element.getPayeeType());
}
if (element.hasItem()) {
openArray("item");
for (ClaimResponse.ItemComponent e : element.getItem())
composeClaimResponseItemComponent(null, e);
closeArray();
}
;
if (element.hasAddItem()) {
openArray("addItem");
for (ClaimResponse.AddedItemComponent e : element.getAddItem())
composeClaimResponseAddedItemComponent(null, e);
closeArray();
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasTotal()) {
openArray("total");
for (ClaimResponse.TotalComponent e : element.getTotal())
composeClaimResponseTotalComponent(null, e);
closeArray();
}
;
if (element.hasPayment()) {
composeClaimResponsePaymentComponent("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())
composeClaimResponseNoteComponent(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())
composeClaimResponseInsuranceComponent(null, e);
closeArray();
}
;
if (element.hasError()) {
openArray("error");
for (ClaimResponse.ErrorComponent e : element.getError())
composeClaimResponseErrorComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseItemComponent(String name, ClaimResponse.ItemComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseItemComponentInner(element);
close();
}
}
protected void composeClaimResponseItemComponentInner(ClaimResponse.ItemComponent element) throws IOException {
composeBackbone(element);
if (element.hasItemSequenceElement()) {
composePositiveIntCore("itemSequence", element.getItemSequenceElement(), false);
composePositiveIntExtras("itemSequence", element.getItemSequenceElement(), false);
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasDetail()) {
openArray("detail");
for (ClaimResponse.ItemDetailComponent e : element.getDetail())
composeClaimResponseItemDetailComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseAdjudicationComponentInner(element);
close();
}
}
protected void composeClaimResponseAdjudicationComponentInner(ClaimResponse.AdjudicationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
}
protected void composeClaimResponseItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseItemDetailComponentInner(element);
close();
}
}
protected void composeClaimResponseItemDetailComponentInner(ClaimResponse.ItemDetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasDetailSequenceElement()) {
composePositiveIntCore("detailSequence", element.getDetailSequenceElement(), false);
composePositiveIntExtras("detailSequence", element.getDetailSequenceElement(), false);
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasSubDetail()) {
openArray("subDetail");
for (ClaimResponse.SubDetailComponent e : element.getSubDetail())
composeClaimResponseSubDetailComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseSubDetailComponent(String name, ClaimResponse.SubDetailComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseSubDetailComponentInner(element);
close();
}
}
protected void composeClaimResponseSubDetailComponentInner(ClaimResponse.SubDetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSubDetailSequenceElement()) {
composePositiveIntCore("subDetailSequence", element.getSubDetailSequenceElement(), false);
composePositiveIntExtras("subDetailSequence", element.getSubDetailSequenceElement(), false);
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseAddedItemComponent(String name, ClaimResponse.AddedItemComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseAddedItemComponentInner(element);
close();
}
}
protected void composeClaimResponseAddedItemComponentInner(ClaimResponse.AddedItemComponent element)
throws IOException {
composeBackbone(element);
if (element.hasItemSequence()) {
openArray("itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getItemSequence())) {
openArray("_itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasDetailSequence()) {
openArray("detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDetailSequence())) {
openArray("_detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSubdetailSequence()) {
openArray("subdetailSequence");
for (PositiveIntType e : element.getSubdetailSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSubdetailSequence())) {
openArray("_subdetailSequence");
for (PositiveIntType e : element.getSubdetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasProvider()) {
openArray("provider");
for (Reference e : element.getProvider())
composeReference(null, e);
closeArray();
}
;
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasDetail()) {
openArray("detail");
for (ClaimResponse.AddedItemDetailComponent e : element.getDetail())
composeClaimResponseAddedItemDetailComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseAddedItemDetailComponent(String name,
ClaimResponse.AddedItemDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimResponseAddedItemDetailComponentInner(element);
close();
}
}
protected void composeClaimResponseAddedItemDetailComponentInner(ClaimResponse.AddedItemDetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasSubDetail()) {
openArray("subDetail");
for (ClaimResponse.AddedItemSubDetailComponent e : element.getSubDetail())
composeClaimResponseAddedItemSubDetailComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseAddedItemSubDetailComponent(String name,
ClaimResponse.AddedItemSubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeClaimResponseAddedItemSubDetailComponentInner(element);
close();
}
}
protected void composeClaimResponseAddedItemSubDetailComponentInner(ClaimResponse.AddedItemSubDetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ClaimResponse.AdjudicationComponent e : element.getAdjudication())
composeClaimResponseAdjudicationComponent(null, e);
closeArray();
}
;
}
protected void composeClaimResponseTotalComponent(String name, ClaimResponse.TotalComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseTotalComponentInner(element);
close();
}
}
protected void composeClaimResponseTotalComponentInner(ClaimResponse.TotalComponent element) throws IOException {
composeBackbone(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composeClaimResponsePaymentComponent(String name, ClaimResponse.PaymentComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponsePaymentComponentInner(element);
close();
}
}
protected void composeClaimResponsePaymentComponentInner(ClaimResponse.PaymentComponent element) throws IOException {
composeBackbone(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 composeClaimResponseNoteComponent(String name, ClaimResponse.NoteComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseNoteComponentInner(element);
close();
}
}
protected void composeClaimResponseNoteComponentInner(ClaimResponse.NoteComponent element) throws IOException {
composeBackbone(element);
if (element.hasNumberElement()) {
composePositiveIntCore("number", element.getNumberElement(), false);
composePositiveIntExtras("number", element.getNumberElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
}
protected void composeClaimResponseInsuranceComponent(String name, ClaimResponse.InsuranceComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseInsuranceComponentInner(element);
close();
}
}
protected void composeClaimResponseInsuranceComponentInner(ClaimResponse.InsuranceComponent element)
throws IOException {
composeBackbone(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 composeClaimResponseErrorComponent(String name, ClaimResponse.ErrorComponent element)
throws IOException {
if (element != null) {
open(name);
composeClaimResponseErrorComponentInner(element);
close();
}
}
protected void composeClaimResponseErrorComponentInner(ClaimResponse.ErrorComponent element) throws IOException {
composeBackbone(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());
}
}
protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeClinicalImpressionInner(element);
}
}
protected void composeClinicalImpressionInner(ClinicalImpression element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new ClinicalImpression.ClinicalImpressionStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new ClinicalImpression.ClinicalImpressionStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
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.hasAssessor()) {
composeReference("assessor", element.getAssessor());
}
if (element.hasPrevious()) {
composeReference("previous", element.getPrevious());
}
if (element.hasProblem()) {
openArray("problem");
for (Reference e : element.getProblem())
composeReference(null, e);
closeArray();
}
;
if (element.hasInvestigation()) {
openArray("investigation");
for (ClinicalImpression.ClinicalImpressionInvestigationComponent e : element.getInvestigation())
composeClinicalImpressionClinicalImpressionInvestigationComponent(null, e);
closeArray();
}
;
if (element.hasProtocol()) {
openArray("protocol");
for (UriType e : element.getProtocol())
composeUriCore(null, e, true);
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())
composeClinicalImpressionClinicalImpressionFindingComponent(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 composeClinicalImpressionClinicalImpressionInvestigationComponent(String name,
ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalImpressionClinicalImpressionInvestigationComponentInner(element);
close();
}
}
protected void composeClinicalImpressionClinicalImpressionInvestigationComponentInner(
ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasItem()) {
openArray("item");
for (Reference e : element.getItem())
composeReference(null, e);
closeArray();
}
;
}
protected void composeClinicalImpressionClinicalImpressionFindingComponent(String name,
ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException {
if (element != null) {
open(name);
composeClinicalImpressionClinicalImpressionFindingComponentInner(element);
close();
}
}
protected void composeClinicalImpressionClinicalImpressionFindingComponentInner(
ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException {
composeBackbone(element);
if (element.hasItemCodeableConcept()) {
composeCodeableConcept("itemCodeableConcept", element.getItemCodeableConcept());
}
if (element.hasItemReference()) {
composeReference("itemReference", element.getItemReference());
}
if (element.hasBasisElement()) {
composeStringCore("basis", element.getBasisElement(), false);
composeStringExtras("basis", element.getBasisElement(), false);
}
}
protected void composeCodeSystem(String name, CodeSystem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCodeSystemInner(element);
}
}
protected void composeCodeSystemInner(CodeSystem element) throws IOException {
composeDomainResourceElements(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.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.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 CodeSystem.CodeSystemContentModeEnumFactory(),
false);
composeEnumerationExtras("content", element.getContentElement(),
new CodeSystem.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())
composeCodeSystemCodeSystemFilterComponent(null, e);
closeArray();
}
;
if (element.hasProperty()) {
openArray("property");
for (CodeSystem.PropertyComponent e : element.getProperty())
composeCodeSystemPropertyComponent(null, e);
closeArray();
}
;
if (element.hasConcept()) {
openArray("concept");
for (CodeSystem.ConceptDefinitionComponent e : element.getConcept())
composeCodeSystemConceptDefinitionComponent(null, e);
closeArray();
}
;
}
protected void composeCodeSystemCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element)
throws IOException {
if (element != null) {
open(name);
composeCodeSystemCodeSystemFilterComponentInner(element);
close();
}
}
protected void composeCodeSystemCodeSystemFilterComponentInner(CodeSystem.CodeSystemFilterComponent element)
throws IOException {
composeBackbone(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 CodeSystem.FilterOperatorEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getOperator())) {
openArray("_operator");
for (Enumeration e : element.getOperator())
composeEnumerationExtras(null, e, new CodeSystem.FilterOperatorEnumFactory(), true);
closeArray();
}
}
;
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeCodeSystemPropertyComponent(String name, CodeSystem.PropertyComponent element)
throws IOException {
if (element != null) {
open(name);
composeCodeSystemPropertyComponentInner(element);
close();
}
}
protected void composeCodeSystemPropertyComponentInner(CodeSystem.PropertyComponent element) throws IOException {
composeBackbone(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 composeCodeSystemConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element)
throws IOException {
if (element != null) {
open(name);
composeCodeSystemConceptDefinitionComponentInner(element);
close();
}
}
protected void composeCodeSystemConceptDefinitionComponentInner(CodeSystem.ConceptDefinitionComponent element)
throws IOException {
composeBackbone(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())
composeCodeSystemConceptDefinitionDesignationComponent(null, e);
closeArray();
}
;
if (element.hasProperty()) {
openArray("property");
for (CodeSystem.ConceptPropertyComponent e : element.getProperty())
composeCodeSystemConceptPropertyComponent(null, e);
closeArray();
}
;
if (element.hasConcept()) {
openArray("concept");
for (CodeSystem.ConceptDefinitionComponent e : element.getConcept())
composeCodeSystemConceptDefinitionComponent(null, e);
closeArray();
}
;
}
protected void composeCodeSystemConceptDefinitionDesignationComponent(String name,
CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException {
if (element != null) {
open(name);
composeCodeSystemConceptDefinitionDesignationComponentInner(element);
close();
}
}
protected void composeCodeSystemConceptDefinitionDesignationComponentInner(
CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException {
composeBackbone(element);
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasUse()) {
composeCoding("use", element.getUse());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeCodeSystemConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element)
throws IOException {
if (element != null) {
open(name);
composeCodeSystemConceptPropertyComponentInner(element);
close();
}
}
protected void composeCodeSystemConceptPropertyComponentInner(CodeSystem.ConceptPropertyComponent element)
throws IOException {
composeBackbone(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);
composeCommunicationInner(element);
}
}
protected void composeCommunicationInner(Communication element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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 Communication.CommunicationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory(),
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 Communication.CommunicationPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(),
new Communication.CommunicationPriorityEnumFactory(), 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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasPayload()) {
openArray("payload");
for (Communication.CommunicationPayloadComponent e : element.getPayload())
composeCommunicationCommunicationPayloadComponent(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeCommunicationCommunicationPayloadComponent(String name,
Communication.CommunicationPayloadComponent element) throws IOException {
if (element != null) {
open(name);
composeCommunicationCommunicationPayloadComponentInner(element);
close();
}
}
protected void composeCommunicationCommunicationPayloadComponentInner(
Communication.CommunicationPayloadComponent element) throws IOException {
composeBackbone(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCommunicationRequestInner(element);
}
}
protected void composeCommunicationRequestInner(CommunicationRequest element) throws IOException {
composeDomainResourceElements(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 CommunicationRequest.CommunicationRequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new CommunicationRequest.CommunicationRequestStatusEnumFactory(), 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 CommunicationRequest.CommunicationPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(),
new CommunicationRequest.CommunicationPriorityEnumFactory(), 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())
composeCommunicationRequestCommunicationRequestPayloadComponent(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.hasSender()) {
composeReference("sender", element.getSender());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeCommunicationRequestCommunicationRequestPayloadComponent(String name,
CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException {
if (element != null) {
open(name);
composeCommunicationRequestCommunicationRequestPayloadComponentInner(element);
close();
}
}
protected void composeCommunicationRequestCommunicationRequestPayloadComponentInner(
CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException {
composeBackbone(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCompartmentDefinitionInner(element);
}
}
protected void composeCompartmentDefinitionInner(CompartmentDefinition element) throws IOException {
composeDomainResourceElements(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.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), 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 CompartmentDefinition.CompartmentTypeEnumFactory(),
false);
composeEnumerationExtras("code", element.getCodeElement(), new CompartmentDefinition.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())
composeCompartmentDefinitionCompartmentDefinitionResourceComponent(null, e);
closeArray();
}
;
}
protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(String name,
CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeCompartmentDefinitionCompartmentDefinitionResourceComponentInner(element);
close();
}
}
protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponentInner(
CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException {
composeBackbone(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasParam()) {
openArray("param");
for (StringType e : element.getParam())
composeStringCore(null, e, true);
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);
}
}
protected void composeComposition(String name, Composition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCompositionInner(element);
}
}
protected void composeCompositionInner(Composition element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Composition.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()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasAuthor()) {
openArray("author");
for (Reference e : element.getAuthor())
composeReference(null, e);
closeArray();
}
;
if (element.hasTitleElement()) {
composeStringCore("title", element.getTitleElement(), false);
composeStringExtras("title", element.getTitleElement(), false);
}
if (element.hasConfidentialityElement()) {
composeEnumerationCore("confidentiality", element.getConfidentialityElement(),
new Composition.DocumentConfidentialityEnumFactory(), false);
composeEnumerationExtras("confidentiality", element.getConfidentialityElement(),
new Composition.DocumentConfidentialityEnumFactory(), false);
}
if (element.hasAttester()) {
openArray("attester");
for (Composition.CompositionAttesterComponent e : element.getAttester())
composeCompositionCompositionAttesterComponent(null, e);
closeArray();
}
;
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
if (element.hasRelatesTo()) {
openArray("relatesTo");
for (Composition.CompositionRelatesToComponent e : element.getRelatesTo())
composeCompositionCompositionRelatesToComponent(null, e);
closeArray();
}
;
if (element.hasEvent()) {
openArray("event");
for (Composition.CompositionEventComponent e : element.getEvent())
composeCompositionCompositionEventComponent(null, e);
closeArray();
}
;
if (element.hasSection()) {
openArray("section");
for (Composition.SectionComponent e : element.getSection())
composeCompositionSectionComponent(null, e);
closeArray();
}
;
}
protected void composeCompositionCompositionAttesterComponent(String name,
Composition.CompositionAttesterComponent element) throws IOException {
if (element != null) {
open(name);
composeCompositionCompositionAttesterComponentInner(element);
close();
}
}
protected void composeCompositionCompositionAttesterComponentInner(Composition.CompositionAttesterComponent element)
throws IOException {
composeBackbone(element);
if (element.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new Composition.CompositionAttestationModeEnumFactory(),
false);
composeEnumerationExtras("mode", element.getModeElement(),
new Composition.CompositionAttestationModeEnumFactory(), false);
}
if (element.hasTimeElement()) {
composeDateTimeCore("time", element.getTimeElement(), false);
composeDateTimeExtras("time", element.getTimeElement(), false);
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeCompositionCompositionRelatesToComponent(String name,
Composition.CompositionRelatesToComponent element) throws IOException {
if (element != null) {
open(name);
composeCompositionCompositionRelatesToComponentInner(element);
close();
}
}
protected void composeCompositionCompositionRelatesToComponentInner(Composition.CompositionRelatesToComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory(),
false);
composeEnumerationExtras("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory(),
false);
}
if (element.hasTarget()) {
composeType("target", element.getTarget());
}
}
protected void composeCompositionCompositionEventComponent(String name, Composition.CompositionEventComponent element)
throws IOException {
if (element != null) {
open(name);
composeCompositionCompositionEventComponentInner(element);
close();
}
}
protected void composeCompositionCompositionEventComponentInner(Composition.CompositionEventComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasDetail()) {
openArray("detail");
for (Reference e : element.getDetail())
composeReference(null, e);
closeArray();
}
;
}
protected void composeCompositionSectionComponent(String name, Composition.SectionComponent element)
throws IOException {
if (element != null) {
open(name);
composeCompositionSectionComponentInner(element);
close();
}
}
protected void composeCompositionSectionComponentInner(Composition.SectionComponent element) throws IOException {
composeBackbone(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.hasModeElement()) {
composeEnumerationCore("mode", element.getModeElement(), new Composition.SectionModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new Composition.SectionModeEnumFactory(), false);
}
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())
composeCompositionSectionComponent(null, e);
closeArray();
}
;
}
protected void composeConceptMap(String name, ConceptMap element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConceptMapInner(element);
}
}
protected void composeConceptMapInner(ConceptMap element) throws IOException {
composeDomainResourceElements(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.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.hasSource()) {
composeType("source", element.getSource());
}
if (element.hasTarget()) {
composeType("target", element.getTarget());
}
if (element.hasGroup()) {
openArray("group");
for (ConceptMap.ConceptMapGroupComponent e : element.getGroup())
composeConceptMapConceptMapGroupComponent(null, e);
closeArray();
}
;
}
protected void composeConceptMapConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element)
throws IOException {
if (element != null) {
open(name);
composeConceptMapConceptMapGroupComponentInner(element);
close();
}
}
protected void composeConceptMapConceptMapGroupComponentInner(ConceptMap.ConceptMapGroupComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSourceElement()) {
composeUriCore("source", element.getSourceElement(), false);
composeUriExtras("source", element.getSourceElement(), false);
}
if (element.hasSourceVersionElement()) {
composeStringCore("sourceVersion", element.getSourceVersionElement(), false);
composeStringExtras("sourceVersion", element.getSourceVersionElement(), false);
}
if (element.hasTargetElement()) {
composeUriCore("target", element.getTargetElement(), false);
composeUriExtras("target", element.getTargetElement(), false);
}
if (element.hasTargetVersionElement()) {
composeStringCore("targetVersion", element.getTargetVersionElement(), false);
composeStringExtras("targetVersion", element.getTargetVersionElement(), false);
}
if (element.hasElement()) {
openArray("element");
for (ConceptMap.SourceElementComponent e : element.getElement())
composeConceptMapSourceElementComponent(null, e);
closeArray();
}
;
if (element.hasUnmapped()) {
composeConceptMapConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped());
}
}
protected void composeConceptMapSourceElementComponent(String name, ConceptMap.SourceElementComponent element)
throws IOException {
if (element != null) {
open(name);
composeConceptMapSourceElementComponentInner(element);
close();
}
}
protected void composeConceptMapSourceElementComponentInner(ConceptMap.SourceElementComponent element)
throws IOException {
composeBackbone(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.hasTarget()) {
openArray("target");
for (ConceptMap.TargetElementComponent e : element.getTarget())
composeConceptMapTargetElementComponent(null, e);
closeArray();
}
;
}
protected void composeConceptMapTargetElementComponent(String name, ConceptMap.TargetElementComponent element)
throws IOException {
if (element != null) {
open(name);
composeConceptMapTargetElementComponentInner(element);
close();
}
}
protected void composeConceptMapTargetElementComponentInner(ConceptMap.TargetElementComponent element)
throws IOException {
composeBackbone(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.hasEquivalenceElement()) {
composeEnumerationCore("equivalence", element.getEquivalenceElement(),
new Enumerations.ConceptMapEquivalenceEnumFactory(), false);
composeEnumerationExtras("equivalence", element.getEquivalenceElement(),
new Enumerations.ConceptMapEquivalenceEnumFactory(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasDependsOn()) {
openArray("dependsOn");
for (ConceptMap.OtherElementComponent e : element.getDependsOn())
composeConceptMapOtherElementComponent(null, e);
closeArray();
}
;
if (element.hasProduct()) {
openArray("product");
for (ConceptMap.OtherElementComponent e : element.getProduct())
composeConceptMapOtherElementComponent(null, e);
closeArray();
}
;
}
protected void composeConceptMapOtherElementComponent(String name, ConceptMap.OtherElementComponent element)
throws IOException {
if (element != null) {
open(name);
composeConceptMapOtherElementComponentInner(element);
close();
}
}
protected void composeConceptMapOtherElementComponentInner(ConceptMap.OtherElementComponent element)
throws IOException {
composeBackbone(element);
if (element.hasPropertyElement()) {
composeUriCore("property", element.getPropertyElement(), false);
composeUriExtras("property", element.getPropertyElement(), false);
}
if (element.hasSystemElement()) {
composeCanonicalCore("system", element.getSystemElement(), false);
composeCanonicalExtras("system", element.getSystemElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasDisplayElement()) {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
}
protected void composeConceptMapConceptMapGroupUnmappedComponent(String name,
ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException {
if (element != null) {
open(name);
composeConceptMapConceptMapGroupUnmappedComponentInner(element);
close();
}
}
protected void composeConceptMapConceptMapGroupUnmappedComponentInner(
ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException {
composeBackbone(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.hasUrlElement()) {
composeCanonicalCore("url", element.getUrlElement(), false);
composeCanonicalExtras("url", element.getUrlElement(), false);
}
}
protected void composeCondition(String name, Condition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConditionInner(element);
}
}
protected void composeConditionInner(Condition element) throws IOException {
composeDomainResourceElements(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.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasAsserter()) {
composeReference("asserter", element.getAsserter());
}
if (element.hasStage()) {
openArray("stage");
for (Condition.ConditionStageComponent e : element.getStage())
composeConditionConditionStageComponent(null, e);
closeArray();
}
;
if (element.hasEvidence()) {
openArray("evidence");
for (Condition.ConditionEvidenceComponent e : element.getEvidence())
composeConditionConditionEvidenceComponent(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeConditionConditionStageComponent(String name, Condition.ConditionStageComponent element)
throws IOException {
if (element != null) {
open(name);
composeConditionConditionStageComponentInner(element);
close();
}
}
protected void composeConditionConditionStageComponentInner(Condition.ConditionStageComponent element)
throws IOException {
composeBackbone(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 composeConditionConditionEvidenceComponent(String name, Condition.ConditionEvidenceComponent element)
throws IOException {
if (element != null) {
open(name);
composeConditionConditionEvidenceComponentInner(element);
close();
}
}
protected void composeConditionConditionEvidenceComponentInner(Condition.ConditionEvidenceComponent element)
throws IOException {
composeBackbone(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 composeConsent(String name, Consent element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeConsentInner(element);
}
}
protected void composeConsentInner(Consent element) throws IOException {
composeDomainResourceElements(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.hasScope()) {
composeCodeableConcept("scope", element.getScope());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasDateTimeElement()) {
composeDateTimeCore("dateTime", element.getDateTimeElement(), false);
composeDateTimeExtras("dateTime", element.getDateTimeElement(), false);
}
if (element.hasPerformer()) {
openArray("performer");
for (Reference e : element.getPerformer())
composeReference(null, e);
closeArray();
}
;
if (element.hasOrganization()) {
openArray("organization");
for (Reference e : element.getOrganization())
composeReference(null, e);
closeArray();
}
;
if (element.hasSource()) {
composeType("source", element.getSource());
}
if (element.hasPolicy()) {
openArray("policy");
for (Consent.ConsentPolicyComponent e : element.getPolicy())
composeConsentConsentPolicyComponent(null, e);
closeArray();
}
;
if (element.hasPolicyRule()) {
composeCodeableConcept("policyRule", element.getPolicyRule());
}
if (element.hasVerification()) {
openArray("verification");
for (Consent.ConsentVerificationComponent e : element.getVerification())
composeConsentConsentVerificationComponent(null, e);
closeArray();
}
;
if (element.hasProvision()) {
composeConsentprovisionComponent("provision", element.getProvision());
}
}
protected void composeConsentConsentPolicyComponent(String name, Consent.ConsentPolicyComponent element)
throws IOException {
if (element != null) {
open(name);
composeConsentConsentPolicyComponentInner(element);
close();
}
}
protected void composeConsentConsentPolicyComponentInner(Consent.ConsentPolicyComponent element) throws IOException {
composeBackbone(element);
if (element.hasAuthorityElement()) {
composeUriCore("authority", element.getAuthorityElement(), false);
composeUriExtras("authority", element.getAuthorityElement(), false);
}
if (element.hasUriElement()) {
composeUriCore("uri", element.getUriElement(), false);
composeUriExtras("uri", element.getUriElement(), false);
}
}
protected void composeConsentConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element)
throws IOException {
if (element != null) {
open(name);
composeConsentConsentVerificationComponentInner(element);
close();
}
}
protected void composeConsentConsentVerificationComponentInner(Consent.ConsentVerificationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasVerifiedElement()) {
composeBooleanCore("verified", element.getVerifiedElement(), false);
composeBooleanExtras("verified", element.getVerifiedElement(), false);
}
if (element.hasVerifiedWith()) {
composeReference("verifiedWith", element.getVerifiedWith());
}
if (element.hasVerificationDateElement()) {
composeDateTimeCore("verificationDate", element.getVerificationDateElement(), false);
composeDateTimeExtras("verificationDate", element.getVerificationDateElement(), false);
}
}
protected void composeConsentprovisionComponent(String name, Consent.provisionComponent element) throws IOException {
if (element != null) {
open(name);
composeConsentprovisionComponentInner(element);
close();
}
}
protected void composeConsentprovisionComponentInner(Consent.provisionComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasActor()) {
openArray("actor");
for (Consent.provisionActorComponent e : element.getActor())
composeConsentprovisionActorComponent(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.hasClass_()) {
openArray("class");
for (Coding e : element.getClass_())
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())
composeConsentprovisionDataComponent(null, e);
closeArray();
}
;
if (element.hasProvision()) {
openArray("provision");
for (Consent.provisionComponent e : element.getProvision())
composeConsentprovisionComponent(null, e);
closeArray();
}
;
}
protected void composeConsentprovisionActorComponent(String name, Consent.provisionActorComponent element)
throws IOException {
if (element != null) {
open(name);
composeConsentprovisionActorComponentInner(element);
close();
}
}
protected void composeConsentprovisionActorComponentInner(Consent.provisionActorComponent element)
throws IOException {
composeBackbone(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeConsentprovisionDataComponent(String name, Consent.provisionDataComponent element)
throws IOException {
if (element != null) {
open(name);
composeConsentprovisionDataComponentInner(element);
close();
}
}
protected void composeConsentprovisionDataComponentInner(Consent.provisionDataComponent element) throws IOException {
composeBackbone(element);
if (element.hasMeaningElement()) {
composeEnumerationCore("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory(),
false);
composeEnumerationExtras("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory(),
false);
}
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
}
protected void composeContract(String name, Contract element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeContractInner(element);
}
}
protected void composeContractInner(Contract element) throws IOException {
composeDomainResourceElements(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.ContractStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory(), 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()) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, true);
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()) {
composeContractContentDefinitionComponent("contentDefinition", element.getContentDefinition());
}
if (element.hasTerm()) {
openArray("term");
for (Contract.TermComponent e : element.getTerm())
composeContractTermComponent(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())
composeContractSignatoryComponent(null, e);
closeArray();
}
;
if (element.hasFriendly()) {
openArray("friendly");
for (Contract.FriendlyLanguageComponent e : element.getFriendly())
composeContractFriendlyLanguageComponent(null, e);
closeArray();
}
;
if (element.hasLegal()) {
openArray("legal");
for (Contract.LegalLanguageComponent e : element.getLegal())
composeContractLegalLanguageComponent(null, e);
closeArray();
}
;
if (element.hasRule()) {
openArray("rule");
for (Contract.ComputableLanguageComponent e : element.getRule())
composeContractComputableLanguageComponent(null, e);
closeArray();
}
;
if (element.hasLegallyBinding()) {
composeType("legallyBinding", element.getLegallyBinding());
}
}
protected void composeContractContentDefinitionComponent(String name, Contract.ContentDefinitionComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractContentDefinitionComponentInner(element);
close();
}
}
protected void composeContractContentDefinitionComponentInner(Contract.ContentDefinitionComponent element)
throws IOException {
composeBackbone(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.ContractPublicationStatusEnumFactory(), false);
composeEnumerationExtras("publicationStatus", element.getPublicationStatusElement(),
new Contract.ContractPublicationStatusEnumFactory(), false);
}
if (element.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
}
protected void composeContractTermComponent(String name, Contract.TermComponent element) throws IOException {
if (element != null) {
open(name);
composeContractTermComponentInner(element);
close();
}
}
protected void composeContractTermComponentInner(Contract.TermComponent element) throws IOException {
composeBackbone(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())
composeContractSecurityLabelComponent(null, e);
closeArray();
}
;
if (element.hasOffer()) {
composeContractContractOfferComponent("offer", element.getOffer());
}
if (element.hasAsset()) {
openArray("asset");
for (Contract.ContractAssetComponent e : element.getAsset())
composeContractContractAssetComponent(null, e);
closeArray();
}
;
if (element.hasAction()) {
openArray("action");
for (Contract.ActionComponent e : element.getAction())
composeContractActionComponent(null, e);
closeArray();
}
;
if (element.hasGroup()) {
openArray("group");
for (Contract.TermComponent e : element.getGroup())
composeContractTermComponent(null, e);
closeArray();
}
;
}
protected void composeContractSecurityLabelComponent(String name, Contract.SecurityLabelComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractSecurityLabelComponentInner(element);
close();
}
}
protected void composeContractSecurityLabelComponentInner(Contract.SecurityLabelComponent element)
throws IOException {
composeBackbone(element);
if (element.hasNumber()) {
openArray("number");
for (UnsignedIntType e : element.getNumber())
composeUnsignedIntCore(null, e, true);
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 composeContractContractOfferComponent(String name, Contract.ContractOfferComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractContractOfferComponentInner(element);
close();
}
}
protected void composeContractContractOfferComponentInner(Contract.ContractOfferComponent element)
throws IOException {
composeBackbone(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())
composeContractContractPartyComponent(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())
composeContractAnswerComponent(null, e);
closeArray();
}
;
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLinkId()) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getLinkId())) {
openArray("_linkId");
for (StringType e : element.getLinkId())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSecurityLabelNumber()) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeContractContractPartyComponent(String name, Contract.ContractPartyComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractContractPartyComponentInner(element);
close();
}
}
protected void composeContractContractPartyComponentInner(Contract.ContractPartyComponent element)
throws IOException {
composeBackbone(element);
if (element.hasReference()) {
openArray("reference");
for (Reference e : element.getReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composeContractAnswerComponent(String name, Contract.AnswerComponent element) throws IOException {
if (element != null) {
open(name);
composeContractAnswerComponentInner(element);
close();
}
}
protected void composeContractAnswerComponentInner(Contract.AnswerComponent element) throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeContractContractAssetComponent(String name, Contract.ContractAssetComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractContractAssetComponentInner(element);
close();
}
}
protected void composeContractContractAssetComponentInner(Contract.ContractAssetComponent element)
throws IOException {
composeBackbone(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())
composeContractAssetContextComponent(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()) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, true);
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())
composeContractAnswerComponent(null, e);
closeArray();
}
;
if (element.hasSecurityLabelNumber()) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, true);
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())
composeContractValuedItemComponent(null, e);
closeArray();
}
;
}
protected void composeContractAssetContextComponent(String name, Contract.AssetContextComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractAssetContextComponentInner(element);
close();
}
}
protected void composeContractAssetContextComponentInner(Contract.AssetContextComponent element) throws IOException {
composeBackbone(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 composeContractValuedItemComponent(String name, Contract.ValuedItemComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractValuedItemComponentInner(element);
close();
}
}
protected void composeContractValuedItemComponentInner(Contract.ValuedItemComponent element) throws IOException {
composeBackbone(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()) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getLinkId())) {
openArray("_linkId");
for (StringType e : element.getLinkId())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSecurityLabelNumber()) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeContractActionComponent(String name, Contract.ActionComponent element) throws IOException {
if (element != null) {
open(name);
composeContractActionComponentInner(element);
close();
}
}
protected void composeContractActionComponentInner(Contract.ActionComponent element) throws IOException {
composeBackbone(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())
composeContractActionSubjectComponent(null, e);
closeArray();
}
;
if (element.hasIntent()) {
composeCodeableConcept("intent", element.getIntent());
}
if (element.hasLinkId()) {
openArray("linkId");
for (StringType e : element.getLinkId())
composeStringCore(null, e, true);
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()) {
openArray("contextLinkId");
for (StringType e : element.getContextLinkId())
composeStringCore(null, e, true);
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()) {
openArray("requesterLinkId");
for (StringType e : element.getRequesterLinkId())
composeStringCore(null, e, true);
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()) {
openArray("performerLinkId");
for (StringType e : element.getPerformerLinkId())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPerformerLinkId())) {
openArray("_performerLinkId");
for (StringType e : element.getPerformerLinkId())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasReason()) {
openArray("reason");
for (StringType e : element.getReason())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getReason())) {
openArray("_reason");
for (StringType e : element.getReason())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasReasonLinkId()) {
openArray("reasonLinkId");
for (StringType e : element.getReasonLinkId())
composeStringCore(null, e, true);
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()) {
openArray("securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSecurityLabelNumber())) {
openArray("_securityLabelNumber");
for (UnsignedIntType e : element.getSecurityLabelNumber())
composeUnsignedIntExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeContractActionSubjectComponent(String name, Contract.ActionSubjectComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractActionSubjectComponentInner(element);
close();
}
}
protected void composeContractActionSubjectComponentInner(Contract.ActionSubjectComponent element)
throws IOException {
composeBackbone(element);
if (element.hasReference()) {
openArray("reference");
for (Reference e : element.getReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composeContractSignatoryComponent(String name, Contract.SignatoryComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractSignatoryComponentInner(element);
close();
}
}
protected void composeContractSignatoryComponentInner(Contract.SignatoryComponent element) throws IOException {
composeBackbone(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 composeContractFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractFriendlyLanguageComponentInner(element);
close();
}
}
protected void composeContractFriendlyLanguageComponentInner(Contract.FriendlyLanguageComponent element)
throws IOException {
composeBackbone(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeContractLegalLanguageComponent(String name, Contract.LegalLanguageComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractLegalLanguageComponentInner(element);
close();
}
}
protected void composeContractLegalLanguageComponentInner(Contract.LegalLanguageComponent element)
throws IOException {
composeBackbone(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeContractComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element)
throws IOException {
if (element != null) {
open(name);
composeContractComputableLanguageComponentInner(element);
close();
}
}
protected void composeContractComputableLanguageComponentInner(Contract.ComputableLanguageComponent element)
throws IOException {
composeBackbone(element);
if (element.hasContent()) {
composeType("content", element.getContent());
}
}
protected void composeCoverage(String name, Coverage element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeCoverageInner(element);
}
}
protected void composeCoverageInner(Coverage element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasPolicyHolder()) {
composeReference("policyHolder", element.getPolicyHolder());
}
if (element.hasSubscriber()) {
composeReference("subscriber", element.getSubscriber());
}
if (element.hasSubscriberIdElement()) {
composeStringCore("subscriberId", element.getSubscriberIdElement(), false);
composeStringExtras("subscriberId", element.getSubscriberIdElement(), false);
}
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.hasPayor()) {
openArray("payor");
for (Reference e : element.getPayor())
composeReference(null, e);
closeArray();
}
;
if (element.hasClass_()) {
openArray("class");
for (Coverage.ClassComponent e : element.getClass_())
composeCoverageClassComponent(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())
composeCoverageCostToBeneficiaryComponent(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();
}
;
}
protected void composeCoverageClassComponent(String name, Coverage.ClassComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageClassComponentInner(element);
close();
}
}
protected void composeCoverageClassComponentInner(Coverage.ClassComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
}
protected void composeCoverageCostToBeneficiaryComponent(String name, Coverage.CostToBeneficiaryComponent element)
throws IOException {
if (element != null) {
open(name);
composeCoverageCostToBeneficiaryComponentInner(element);
close();
}
}
protected void composeCoverageCostToBeneficiaryComponentInner(Coverage.CostToBeneficiaryComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasException()) {
openArray("exception");
for (Coverage.ExemptionComponent e : element.getException())
composeCoverageExemptionComponent(null, e);
closeArray();
}
;
}
protected void composeCoverageExemptionComponent(String name, Coverage.ExemptionComponent element)
throws IOException {
if (element != null) {
open(name);
composeCoverageExemptionComponentInner(element);
close();
}
}
protected void composeCoverageExemptionComponentInner(Coverage.ExemptionComponent element) throws IOException {
composeBackbone(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);
composeCoverageEligibilityRequestInner(element);
}
}
protected void composeCoverageEligibilityRequestInner(CoverageEligibilityRequest element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new CoverageEligibilityRequest.EligibilityRequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new CoverageEligibilityRequest.EligibilityRequestStatusEnumFactory(), 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.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())
composeCoverageEligibilityRequestSupportingInformationComponent(null, e);
closeArray();
}
;
if (element.hasInsurance()) {
openArray("insurance");
for (CoverageEligibilityRequest.InsuranceComponent e : element.getInsurance())
composeCoverageEligibilityRequestInsuranceComponent(null, e);
closeArray();
}
;
if (element.hasItem()) {
openArray("item");
for (CoverageEligibilityRequest.DetailsComponent e : element.getItem())
composeCoverageEligibilityRequestDetailsComponent(null, e);
closeArray();
}
;
}
protected void composeCoverageEligibilityRequestSupportingInformationComponent(String name,
CoverageEligibilityRequest.SupportingInformationComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityRequestSupportingInformationComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityRequestSupportingInformationComponentInner(
CoverageEligibilityRequest.SupportingInformationComponent element) throws IOException {
composeBackbone(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 composeCoverageEligibilityRequestInsuranceComponent(String name,
CoverageEligibilityRequest.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityRequestInsuranceComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityRequestInsuranceComponentInner(
CoverageEligibilityRequest.InsuranceComponent element) throws IOException {
composeBackbone(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 composeCoverageEligibilityRequestDetailsComponent(String name,
CoverageEligibilityRequest.DetailsComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityRequestDetailsComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityRequestDetailsComponentInner(
CoverageEligibilityRequest.DetailsComponent element) throws IOException {
composeBackbone(element);
if (element.hasSupportingInfoSequence()) {
openArray("supportingInfoSequence");
for (PositiveIntType e : element.getSupportingInfoSequence())
composePositiveIntCore(null, e, true);
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())
composeCoverageEligibilityRequestDiagnosisComponent(null, e);
closeArray();
}
;
if (element.hasDetail()) {
openArray("detail");
for (Reference e : element.getDetail())
composeReference(null, e);
closeArray();
}
;
}
protected void composeCoverageEligibilityRequestDiagnosisComponent(String name,
CoverageEligibilityRequest.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityRequestDiagnosisComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityRequestDiagnosisComponentInner(
CoverageEligibilityRequest.DiagnosisComponent element) throws IOException {
composeBackbone(element);
if (element.hasDiagnosis()) {
composeType("diagnosis", element.getDiagnosis());
}
}
protected void composeCoverageEligibilityResponse(String name, CoverageEligibilityResponse element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeCoverageEligibilityResponseInner(element);
}
}
protected void composeCoverageEligibilityResponseInner(CoverageEligibilityResponse element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new CoverageEligibilityResponse.EligibilityResponseStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new CoverageEligibilityResponse.EligibilityResponseStatusEnumFactory(), 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.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 Enumerations.RemittanceOutcomeEnumFactory(),
false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(),
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())
composeCoverageEligibilityResponseInsuranceComponent(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())
composeCoverageEligibilityResponseErrorsComponent(null, e);
closeArray();
}
;
}
protected void composeCoverageEligibilityResponseInsuranceComponent(String name,
CoverageEligibilityResponse.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityResponseInsuranceComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityResponseInsuranceComponentInner(
CoverageEligibilityResponse.InsuranceComponent element) throws IOException {
composeBackbone(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())
composeCoverageEligibilityResponseItemsComponent(null, e);
closeArray();
}
;
}
protected void composeCoverageEligibilityResponseItemsComponent(String name,
CoverageEligibilityResponse.ItemsComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityResponseItemsComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityResponseItemsComponentInner(
CoverageEligibilityResponse.ItemsComponent element) throws IOException {
composeBackbone(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())
composeCoverageEligibilityResponseBenefitComponent(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 composeCoverageEligibilityResponseBenefitComponent(String name,
CoverageEligibilityResponse.BenefitComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityResponseBenefitComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityResponseBenefitComponentInner(
CoverageEligibilityResponse.BenefitComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAllowed()) {
composeType("allowed", element.getAllowed());
}
if (element.hasUsed()) {
composeType("used", element.getUsed());
}
}
protected void composeCoverageEligibilityResponseErrorsComponent(String name,
CoverageEligibilityResponse.ErrorsComponent element) throws IOException {
if (element != null) {
open(name);
composeCoverageEligibilityResponseErrorsComponentInner(element);
close();
}
}
protected void composeCoverageEligibilityResponseErrorsComponentInner(
CoverageEligibilityResponse.ErrorsComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDetectedIssueInner(element);
}
}
protected void composeDetectedIssueInner(DetectedIssue element) throws IOException {
composeDomainResourceElements(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.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.hasPatient()) {
composeReference("patient", element.getPatient());
}
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())
composeDetectedIssueDetectedIssueEvidenceComponent(null, e);
closeArray();
}
;
if (element.hasDetailElement()) {
composeStringCore("detail", element.getDetailElement(), false);
composeStringExtras("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())
composeDetectedIssueDetectedIssueMitigationComponent(null, e);
closeArray();
}
;
}
protected void composeDetectedIssueDetectedIssueEvidenceComponent(String name,
DetectedIssue.DetectedIssueEvidenceComponent element) throws IOException {
if (element != null) {
open(name);
composeDetectedIssueDetectedIssueEvidenceComponentInner(element);
close();
}
}
protected void composeDetectedIssueDetectedIssueEvidenceComponentInner(
DetectedIssue.DetectedIssueEvidenceComponent element) throws IOException {
composeBackbone(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 composeDetectedIssueDetectedIssueMitigationComponent(String name,
DetectedIssue.DetectedIssueMitigationComponent element) throws IOException {
if (element != null) {
open(name);
composeDetectedIssueDetectedIssueMitigationComponentInner(element);
close();
}
}
protected void composeDetectedIssueDetectedIssueMitigationComponentInner(
DetectedIssue.DetectedIssueMitigationComponent element) throws IOException {
composeBackbone(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());
}
}
protected void composeDevice(String name, Device element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceInner(element);
}
}
protected void composeDeviceInner(Device element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasDefinition()) {
composeReference("definition", element.getDefinition());
}
if (element.hasUdiCarrier()) {
openArray("udiCarrier");
for (Device.DeviceUdiCarrierComponent e : element.getUdiCarrier())
composeDeviceDeviceUdiCarrierComponent(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
openArray("statusReason");
for (CodeableConcept e : element.getStatusReason())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasDistinctIdentifierElement()) {
composeStringCore("distinctIdentifier", element.getDistinctIdentifierElement(), false);
composeStringExtras("distinctIdentifier", element.getDistinctIdentifierElement(), false);
}
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.hasDeviceName()) {
openArray("deviceName");
for (Device.DeviceDeviceNameComponent e : element.getDeviceName())
composeDeviceDeviceDeviceNameComponent(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.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSpecialization()) {
openArray("specialization");
for (Device.DeviceSpecializationComponent e : element.getSpecialization())
composeDeviceDeviceSpecializationComponent(null, e);
closeArray();
}
;
if (element.hasVersion()) {
openArray("version");
for (Device.DeviceVersionComponent e : element.getVersion())
composeDeviceDeviceVersionComponent(null, e);
closeArray();
}
;
if (element.hasProperty()) {
openArray("property");
for (Device.DevicePropertyComponent e : element.getProperty())
composeDeviceDevicePropertyComponent(null, e);
closeArray();
}
;
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
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.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 composeDeviceDeviceUdiCarrierComponent(String name, Device.DeviceUdiCarrierComponent element)
throws IOException {
if (element != null) {
open(name);
composeDeviceDeviceUdiCarrierComponentInner(element);
close();
}
}
protected void composeDeviceDeviceUdiCarrierComponentInner(Device.DeviceUdiCarrierComponent element)
throws IOException {
composeBackbone(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 composeDeviceDeviceDeviceNameComponent(String name, Device.DeviceDeviceNameComponent element)
throws IOException {
if (element != null) {
open(name);
composeDeviceDeviceDeviceNameComponentInner(element);
close();
}
}
protected void composeDeviceDeviceDeviceNameComponentInner(Device.DeviceDeviceNameComponent element)
throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Device.DeviceNameTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Device.DeviceNameTypeEnumFactory(), false);
}
}
protected void composeDeviceDeviceSpecializationComponent(String name, Device.DeviceSpecializationComponent element)
throws IOException {
if (element != null) {
open(name);
composeDeviceDeviceSpecializationComponentInner(element);
close();
}
}
protected void composeDeviceDeviceSpecializationComponentInner(Device.DeviceSpecializationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSystemType()) {
composeCodeableConcept("systemType", element.getSystemType());
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
}
protected void composeDeviceDeviceVersionComponent(String name, Device.DeviceVersionComponent element)
throws IOException {
if (element != null) {
open(name);
composeDeviceDeviceVersionComponentInner(element);
close();
}
}
protected void composeDeviceDeviceVersionComponentInner(Device.DeviceVersionComponent element) throws IOException {
composeBackbone(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 composeDeviceDevicePropertyComponent(String name, Device.DevicePropertyComponent element)
throws IOException {
if (element != null) {
open(name);
composeDeviceDevicePropertyComponentInner(element);
close();
}
}
protected void composeDeviceDevicePropertyComponentInner(Device.DevicePropertyComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValueQuantity()) {
openArray("valueQuantity");
for (Quantity e : element.getValueQuantity())
composeQuantity(null, e);
closeArray();
}
;
if (element.hasValueCode()) {
openArray("valueCode");
for (CodeableConcept e : element.getValueCode())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeDeviceDefinition(String name, DeviceDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceDefinitionInner(element);
}
}
protected void composeDeviceDefinitionInner(DeviceDefinition element) throws IOException {
composeDomainResourceElements(element);
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())
composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent(null, e);
closeArray();
}
;
if (element.hasManufacturer()) {
composeType("manufacturer", element.getManufacturer());
}
if (element.hasDeviceName()) {
openArray("deviceName");
for (DeviceDefinition.DeviceDefinitionDeviceNameComponent e : element.getDeviceName())
composeDeviceDefinitionDeviceDefinitionDeviceNameComponent(null, e);
closeArray();
}
;
if (element.hasModelNumberElement()) {
composeStringCore("modelNumber", element.getModelNumberElement(), false);
composeStringExtras("modelNumber", element.getModelNumberElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSpecialization()) {
openArray("specialization");
for (DeviceDefinition.DeviceDefinitionSpecializationComponent e : element.getSpecialization())
composeDeviceDefinitionDeviceDefinitionSpecializationComponent(null, e);
closeArray();
}
;
if (element.hasVersion()) {
openArray("version");
for (StringType e : element.getVersion())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getVersion())) {
openArray("_version");
for (StringType e : element.getVersion())
composeStringExtras(null, e, true);
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.hasPhysicalCharacteristics()) {
composeProdCharacteristic("physicalCharacteristics", element.getPhysicalCharacteristics());
}
if (element.hasLanguageCode()) {
openArray("languageCode");
for (CodeableConcept e : element.getLanguageCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasCapability()) {
openArray("capability");
for (DeviceDefinition.DeviceDefinitionCapabilityComponent e : element.getCapability())
composeDeviceDefinitionDeviceDefinitionCapabilityComponent(null, e);
closeArray();
}
;
if (element.hasProperty()) {
openArray("property");
for (DeviceDefinition.DeviceDefinitionPropertyComponent e : element.getProperty())
composeDeviceDefinitionDeviceDefinitionPropertyComponent(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.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasOnlineInformationElement()) {
composeUriCore("onlineInformation", element.getOnlineInformationElement(), false);
composeUriExtras("onlineInformation", element.getOnlineInformationElement(), false);
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasParentDevice()) {
composeReference("parentDevice", element.getParentDevice());
}
if (element.hasMaterial()) {
openArray("material");
for (DeviceDefinition.DeviceDefinitionMaterialComponent e : element.getMaterial())
composeDeviceDefinitionDeviceDefinitionMaterialComponent(null, e);
closeArray();
}
;
}
protected void composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent(String name,
DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentInner(element);
close();
}
}
protected void composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentInner(
DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent element) throws IOException {
composeBackbone(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);
}
}
protected void composeDeviceDefinitionDeviceDefinitionDeviceNameComponent(String name,
DeviceDefinition.DeviceDefinitionDeviceNameComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceDefinitionDeviceNameComponentInner(element);
close();
}
}
protected void composeDeviceDefinitionDeviceDefinitionDeviceNameComponentInner(
DeviceDefinition.DeviceDefinitionDeviceNameComponent element) throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new DeviceDefinition.DeviceNameTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new DeviceDefinition.DeviceNameTypeEnumFactory(),
false);
}
}
protected void composeDeviceDefinitionDeviceDefinitionSpecializationComponent(String name,
DeviceDefinition.DeviceDefinitionSpecializationComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceDefinitionSpecializationComponentInner(element);
close();
}
}
protected void composeDeviceDefinitionDeviceDefinitionSpecializationComponentInner(
DeviceDefinition.DeviceDefinitionSpecializationComponent element) throws IOException {
composeBackbone(element);
if (element.hasSystemTypeElement()) {
composeStringCore("systemType", element.getSystemTypeElement(), false);
composeStringExtras("systemType", element.getSystemTypeElement(), false);
}
if (element.hasVersionElement()) {
composeStringCore("version", element.getVersionElement(), false);
composeStringExtras("version", element.getVersionElement(), false);
}
}
protected void composeDeviceDefinitionDeviceDefinitionCapabilityComponent(String name,
DeviceDefinition.DeviceDefinitionCapabilityComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceDefinitionCapabilityComponentInner(element);
close();
}
}
protected void composeDeviceDefinitionDeviceDefinitionCapabilityComponentInner(
DeviceDefinition.DeviceDefinitionCapabilityComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescription()) {
openArray("description");
for (CodeableConcept e : element.getDescription())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeDeviceDefinitionDeviceDefinitionPropertyComponent(String name,
DeviceDefinition.DeviceDefinitionPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceDefinitionPropertyComponentInner(element);
close();
}
}
protected void composeDeviceDefinitionDeviceDefinitionPropertyComponentInner(
DeviceDefinition.DeviceDefinitionPropertyComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValueQuantity()) {
openArray("valueQuantity");
for (Quantity e : element.getValueQuantity())
composeQuantity(null, e);
closeArray();
}
;
if (element.hasValueCode()) {
openArray("valueCode");
for (CodeableConcept e : element.getValueCode())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeDeviceDefinitionDeviceDefinitionMaterialComponent(String name,
DeviceDefinition.DeviceDefinitionMaterialComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceDefinitionDeviceDefinitionMaterialComponentInner(element);
close();
}
}
protected void composeDeviceDefinitionDeviceDefinitionMaterialComponentInner(
DeviceDefinition.DeviceDefinitionMaterialComponent element) throws IOException {
composeBackbone(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 composeDeviceMetric(String name, DeviceMetric element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceMetricInner(element);
}
}
protected void composeDeviceMetricInner(DeviceMetric element) throws IOException {
composeDomainResourceElements(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.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasParent()) {
composeReference("parent", element.getParent());
}
if (element.hasOperationalStatusElement()) {
composeEnumerationCore("operationalStatus", element.getOperationalStatusElement(),
new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false);
composeEnumerationExtras("operationalStatus", element.getOperationalStatusElement(),
new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false);
}
if (element.hasColorElement()) {
composeEnumerationCore("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory(),
false);
composeEnumerationExtras("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory(),
false);
}
if (element.hasCategoryElement()) {
composeEnumerationCore("category", element.getCategoryElement(),
new DeviceMetric.DeviceMetricCategoryEnumFactory(), false);
composeEnumerationExtras("category", element.getCategoryElement(),
new DeviceMetric.DeviceMetricCategoryEnumFactory(), false);
}
if (element.hasMeasurementPeriod()) {
composeTiming("measurementPeriod", element.getMeasurementPeriod());
}
if (element.hasCalibration()) {
openArray("calibration");
for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration())
composeDeviceMetricDeviceMetricCalibrationComponent(null, e);
closeArray();
}
;
}
protected void composeDeviceMetricDeviceMetricCalibrationComponent(String name,
DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceMetricDeviceMetricCalibrationComponentInner(element);
close();
}
}
protected void composeDeviceMetricDeviceMetricCalibrationComponentInner(
DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException {
composeBackbone(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);
composeDeviceRequestInner(element);
}
}
protected void composeDeviceRequestInner(DeviceRequest element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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.hasPriorRequest()) {
openArray("priorRequest");
for (Reference e : element.getPriorRequest())
composeReference(null, e);
closeArray();
}
;
if (element.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory(),
false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new DeviceRequest.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new DeviceRequest.RequestIntentEnumFactory(),
false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory(),
false);
composeEnumerationExtras("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory(),
false);
}
if (element.hasCode()) {
composeType("code", element.getCode());
}
if (element.hasParameter()) {
openArray("parameter");
for (DeviceRequest.DeviceRequestParameterComponent e : element.getParameter())
composeDeviceRequestDeviceRequestParameterComponent(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.hasPerformerType()) {
composeCodeableConcept("performerType", element.getPerformerType());
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
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 composeDeviceRequestDeviceRequestParameterComponent(String name,
DeviceRequest.DeviceRequestParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeDeviceRequestDeviceRequestParameterComponentInner(element);
close();
}
}
protected void composeDeviceRequestDeviceRequestParameterComponentInner(
DeviceRequest.DeviceRequestParameterComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeDeviceUseStatement(String name, DeviceUseStatement element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDeviceUseStatementInner(element);
}
}
protected void composeDeviceUseStatementInner(DeviceUseStatement element) throws IOException {
composeDomainResourceElements(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 DeviceUseStatement.DeviceUseStatementStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new DeviceUseStatement.DeviceUseStatementStatusEnumFactory(), false);
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
}
;
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasRecordedOnElement()) {
composeDateTimeCore("recordedOn", element.getRecordedOnElement(), false);
composeDateTimeExtras("recordedOn", element.getRecordedOnElement(), false);
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDiagnosticReportInner(element);
}
}
protected void composeDiagnosticReportInner(DiagnosticReport element) throws IOException {
composeDomainResourceElements(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.hasImagingStudy()) {
openArray("imagingStudy");
for (Reference e : element.getImagingStudy())
composeReference(null, e);
closeArray();
}
;
if (element.hasMedia()) {
openArray("media");
for (DiagnosticReport.DiagnosticReportMediaComponent e : element.getMedia())
composeDiagnosticReportDiagnosticReportMediaComponent(null, e);
closeArray();
}
;
if (element.hasConclusionElement()) {
composeStringCore("conclusion", element.getConclusionElement(), false);
composeStringExtras("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 composeDiagnosticReportDiagnosticReportMediaComponent(String name,
DiagnosticReport.DiagnosticReportMediaComponent element) throws IOException {
if (element != null) {
open(name);
composeDiagnosticReportDiagnosticReportMediaComponentInner(element);
close();
}
}
protected void composeDiagnosticReportDiagnosticReportMediaComponentInner(
DiagnosticReport.DiagnosticReportMediaComponent element) throws IOException {
composeBackbone(element);
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasLink()) {
composeReference("link", element.getLink());
}
}
protected void composeDocumentManifest(String name, DocumentManifest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDocumentManifestInner(element);
}
}
protected void composeDocumentManifestInner(DocumentManifest element) throws IOException {
composeDomainResourceElements(element);
if (element.hasMasterIdentifier()) {
composeIdentifier("masterIdentifier", element.getMasterIdentifier());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new Enumerations.DocumentReferenceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new Enumerations.DocumentReferenceStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
if (element.hasAuthor()) {
openArray("author");
for (Reference e : element.getAuthor())
composeReference(null, e);
closeArray();
}
;
if (element.hasRecipient()) {
openArray("recipient");
for (Reference e : element.getRecipient())
composeReference(null, e);
closeArray();
}
;
if (element.hasSourceElement()) {
composeUriCore("source", element.getSourceElement(), false);
composeUriExtras("source", element.getSourceElement(), false);
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasContent()) {
openArray("content");
for (Reference e : element.getContent())
composeReference(null, e);
closeArray();
}
;
if (element.hasRelated()) {
openArray("related");
for (DocumentManifest.DocumentManifestRelatedComponent e : element.getRelated())
composeDocumentManifestDocumentManifestRelatedComponent(null, e);
closeArray();
}
;
}
protected void composeDocumentManifestDocumentManifestRelatedComponent(String name,
DocumentManifest.DocumentManifestRelatedComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentManifestDocumentManifestRelatedComponentInner(element);
close();
}
}
protected void composeDocumentManifestDocumentManifestRelatedComponentInner(
DocumentManifest.DocumentManifestRelatedComponent element) throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasRef()) {
composeReference("ref", element.getRef());
}
}
protected void composeDocumentReference(String name, DocumentReference element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeDocumentReferenceInner(element);
}
}
protected void composeDocumentReferenceInner(DocumentReference element) throws IOException {
composeDomainResourceElements(element);
if (element.hasMasterIdentifier()) {
composeIdentifier("masterIdentifier", element.getMasterIdentifier());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new Enumerations.DocumentReferenceStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new Enumerations.DocumentReferenceStatusEnumFactory(), false);
}
if (element.hasDocStatusElement()) {
composeEnumerationCore("docStatus", element.getDocStatusElement(),
new DocumentReference.ReferredDocumentStatusEnumFactory(), false);
composeEnumerationExtras("docStatus", element.getDocStatusElement(),
new DocumentReference.ReferredDocumentStatusEnumFactory(), 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()) {
composeReference("subject", element.getSubject());
}
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.hasAuthenticator()) {
composeReference("authenticator", element.getAuthenticator());
}
if (element.hasCustodian()) {
composeReference("custodian", element.getCustodian());
}
if (element.hasRelatesTo()) {
openArray("relatesTo");
for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo())
composeDocumentReferenceDocumentReferenceRelatesToComponent(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("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())
composeDocumentReferenceDocumentReferenceContentComponent(null, e);
closeArray();
}
;
if (element.hasContext()) {
composeDocumentReferenceDocumentReferenceContextComponent("context", element.getContext());
}
}
protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(String name,
DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceDocumentReferenceRelatesToComponentInner(element);
close();
}
}
protected void composeDocumentReferenceDocumentReferenceRelatesToComponentInner(
DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException {
composeBackbone(element);
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(),
new DocumentReference.DocumentRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(),
new DocumentReference.DocumentRelationshipTypeEnumFactory(), false);
}
if (element.hasTarget()) {
composeReference("target", element.getTarget());
}
}
protected void composeDocumentReferenceDocumentReferenceContentComponent(String name,
DocumentReference.DocumentReferenceContentComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceDocumentReferenceContentComponentInner(element);
close();
}
}
protected void composeDocumentReferenceDocumentReferenceContentComponentInner(
DocumentReference.DocumentReferenceContentComponent element) throws IOException {
composeBackbone(element);
if (element.hasAttachment()) {
composeAttachment("attachment", element.getAttachment());
}
if (element.hasFormat()) {
composeCoding("format", element.getFormat());
}
}
protected void composeDocumentReferenceDocumentReferenceContextComponent(String name,
DocumentReference.DocumentReferenceContextComponent element) throws IOException {
if (element != null) {
open(name);
composeDocumentReferenceDocumentReferenceContextComponentInner(element);
close();
}
}
protected void composeDocumentReferenceDocumentReferenceContextComponentInner(
DocumentReference.DocumentReferenceContextComponent element) throws IOException {
composeBackbone(element);
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
}
;
if (element.hasEvent()) {
openArray("event");
for (CodeableConcept e : element.getEvent())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasFacilityType()) {
composeCodeableConcept("facilityType", element.getFacilityType());
}
if (element.hasPracticeSetting()) {
composeCodeableConcept("practiceSetting", element.getPracticeSetting());
}
if (element.hasSourcePatientInfo()) {
composeReference("sourcePatientInfo", element.getSourcePatientInfo());
}
if (element.hasRelated()) {
openArray("related");
for (Reference e : element.getRelated())
composeReference(null, e);
closeArray();
}
;
}
protected void composeEffectEvidenceSynthesis(String name, EffectEvidenceSynthesis element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEffectEvidenceSynthesisInner(element);
}
}
protected void composeEffectEvidenceSynthesisInner(EffectEvidenceSynthesis element) throws IOException {
composeDomainResourceElements(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.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(),
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.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
}
;
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.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.hasSynthesisType()) {
composeCodeableConcept("synthesisType", element.getSynthesisType());
}
if (element.hasStudyType()) {
composeCodeableConcept("studyType", element.getStudyType());
}
if (element.hasPopulation()) {
composeReference("population", element.getPopulation());
}
if (element.hasExposure()) {
composeReference("exposure", element.getExposure());
}
if (element.hasExposureAlternative()) {
composeReference("exposureAlternative", element.getExposureAlternative());
}
if (element.hasOutcome()) {
composeReference("outcome", element.getOutcome());
}
if (element.hasSampleSize()) {
composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent("sampleSize", element.getSampleSize());
}
if (element.hasResultsByExposure()) {
openArray("resultsByExposure");
for (EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent e : element.getResultsByExposure())
composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent(null, e);
closeArray();
}
;
if (element.hasEffectEstimate()) {
openArray("effectEstimate");
for (EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent e : element.getEffectEstimate())
composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent(null, e);
closeArray();
}
;
if (element.hasCertainty()) {
openArray("certainty");
for (EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent e : element.getCertainty())
composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent(null, e);
closeArray();
}
;
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent(String name,
EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent element) throws IOException {
if (element != null) {
open(name);
composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentInner(element);
close();
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentInner(
EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNumberOfStudiesElement()) {
composeIntegerCore("numberOfStudies", element.getNumberOfStudiesElement(), false);
composeIntegerExtras("numberOfStudies", element.getNumberOfStudiesElement(), false);
}
if (element.hasNumberOfParticipantsElement()) {
composeIntegerCore("numberOfParticipants", element.getNumberOfParticipantsElement(), false);
composeIntegerExtras("numberOfParticipants", element.getNumberOfParticipantsElement(), false);
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent(String name,
EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent element) throws IOException {
if (element != null) {
open(name);
composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentInner(element);
close();
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentInner(
EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasExposureStateElement()) {
composeEnumerationCore("exposureState", element.getExposureStateElement(),
new EffectEvidenceSynthesis.ExposureStateEnumFactory(), false);
composeEnumerationExtras("exposureState", element.getExposureStateElement(),
new EffectEvidenceSynthesis.ExposureStateEnumFactory(), false);
}
if (element.hasVariantState()) {
composeCodeableConcept("variantState", element.getVariantState());
}
if (element.hasRiskEvidenceSynthesis()) {
composeReference("riskEvidenceSynthesis", element.getRiskEvidenceSynthesis());
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent(String name,
EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent element) throws IOException {
if (element != null) {
open(name);
composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentInner(element);
close();
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentInner(
EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasVariantState()) {
composeCodeableConcept("variantState", element.getVariantState());
}
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
if (element.hasUnitOfMeasure()) {
composeCodeableConcept("unitOfMeasure", element.getUnitOfMeasure());
}
if (element.hasPrecisionEstimate()) {
openArray("precisionEstimate");
for (EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent e : element
.getPrecisionEstimate())
composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(null, e);
closeArray();
}
;
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(
String name, EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent element)
throws IOException {
if (element != null) {
open(name);
composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentInner(element);
close();
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentInner(
EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasLevelElement()) {
composeDecimalCore("level", element.getLevelElement(), false);
composeDecimalExtras("level", element.getLevelElement(), false);
}
if (element.hasFromElement()) {
composeDecimalCore("from", element.getFromElement(), false);
composeDecimalExtras("from", element.getFromElement(), false);
}
if (element.hasToElement()) {
composeDecimalCore("to", element.getToElement(), false);
composeDecimalExtras("to", element.getToElement(), false);
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent(String name,
EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent element) throws IOException {
if (element != null) {
open(name);
composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentInner(element);
close();
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentInner(
EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent element) throws IOException {
composeBackbone(element);
if (element.hasRating()) {
openArray("rating");
for (CodeableConcept e : element.getRating())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasCertaintySubcomponent()) {
openArray("certaintySubcomponent");
for (EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent e : element
.getCertaintySubcomponent())
composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(null, e);
closeArray();
}
;
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(
String name, EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent element)
throws IOException {
if (element != null) {
open(name);
composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentInner(element);
close();
}
}
protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentInner(
EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRating()) {
openArray("rating");
for (CodeableConcept e : element.getRating())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeEncounter(String name, Encounter element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEncounterInner(element);
}
}
protected void composeEncounterInner(Encounter element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false);
}
if (element.hasStatusHistory()) {
openArray("statusHistory");
for (Encounter.StatusHistoryComponent e : element.getStatusHistory())
composeEncounterStatusHistoryComponent(null, e);
closeArray();
}
;
if (element.hasClass_()) {
composeCoding("class", element.getClass_());
}
if (element.hasClassHistory()) {
openArray("classHistory");
for (Encounter.ClassHistoryComponent e : element.getClassHistory())
composeEncounterClassHistoryComponent(null, e);
closeArray();
}
;
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasServiceType()) {
composeCodeableConcept("serviceType", element.getServiceType());
}
if (element.hasPriority()) {
composeCodeableConcept("priority", element.getPriority());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
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.hasParticipant()) {
openArray("participant");
for (Encounter.EncounterParticipantComponent e : element.getParticipant())
composeEncounterEncounterParticipantComponent(null, e);
closeArray();
}
;
if (element.hasAppointment()) {
openArray("appointment");
for (Reference e : element.getAppointment())
composeReference(null, e);
closeArray();
}
;
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasLength()) {
composeDuration("length", element.getLength());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (Encounter.DiagnosisComponent e : element.getDiagnosis())
composeEncounterDiagnosisComponent(null, e);
closeArray();
}
;
if (element.hasAccount()) {
openArray("account");
for (Reference e : element.getAccount())
composeReference(null, e);
closeArray();
}
;
if (element.hasHospitalization()) {
composeEncounterEncounterHospitalizationComponent("hospitalization", element.getHospitalization());
}
if (element.hasLocation()) {
openArray("location");
for (Encounter.EncounterLocationComponent e : element.getLocation())
composeEncounterEncounterLocationComponent(null, e);
closeArray();
}
;
if (element.hasServiceProvider()) {
composeReference("serviceProvider", element.getServiceProvider());
}
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
}
protected void composeEncounterStatusHistoryComponent(String name, Encounter.StatusHistoryComponent element)
throws IOException {
if (element != null) {
open(name);
composeEncounterStatusHistoryComponentInner(element);
close();
}
}
protected void composeEncounterStatusHistoryComponentInner(Encounter.StatusHistoryComponent element)
throws IOException {
composeBackbone(element);
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeEncounterClassHistoryComponent(String name, Encounter.ClassHistoryComponent element)
throws IOException {
if (element != null) {
open(name);
composeEncounterClassHistoryComponentInner(element);
close();
}
}
protected void composeEncounterClassHistoryComponentInner(Encounter.ClassHistoryComponent element)
throws IOException {
composeBackbone(element);
if (element.hasClass_()) {
composeCoding("class", element.getClass_());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeEncounterEncounterParticipantComponent(String name,
Encounter.EncounterParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeEncounterEncounterParticipantComponentInner(element);
close();
}
}
protected void composeEncounterEncounterParticipantComponentInner(Encounter.EncounterParticipantComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasIndividual()) {
composeReference("individual", element.getIndividual());
}
}
protected void composeEncounterDiagnosisComponent(String name, Encounter.DiagnosisComponent element)
throws IOException {
if (element != null) {
open(name);
composeEncounterDiagnosisComponentInner(element);
close();
}
}
protected void composeEncounterDiagnosisComponentInner(Encounter.DiagnosisComponent element) throws IOException {
composeBackbone(element);
if (element.hasCondition()) {
composeReference("condition", element.getCondition());
}
if (element.hasUse()) {
composeCodeableConcept("use", element.getUse());
}
if (element.hasRankElement()) {
composePositiveIntCore("rank", element.getRankElement(), false);
composePositiveIntExtras("rank", element.getRankElement(), false);
}
}
protected void composeEncounterEncounterHospitalizationComponent(String name,
Encounter.EncounterHospitalizationComponent element) throws IOException {
if (element != null) {
open(name);
composeEncounterEncounterHospitalizationComponentInner(element);
close();
}
}
protected void composeEncounterEncounterHospitalizationComponentInner(
Encounter.EncounterHospitalizationComponent element) throws IOException {
composeBackbone(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.hasDietPreference()) {
openArray("dietPreference");
for (CodeableConcept e : element.getDietPreference())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasSpecialCourtesy()) {
openArray("specialCourtesy");
for (CodeableConcept e : element.getSpecialCourtesy())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasSpecialArrangement()) {
openArray("specialArrangement");
for (CodeableConcept e : element.getSpecialArrangement())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasDestination()) {
composeReference("destination", element.getDestination());
}
if (element.hasDischargeDisposition()) {
composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition());
}
}
protected void composeEncounterEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element)
throws IOException {
if (element != null) {
open(name);
composeEncounterEncounterLocationComponentInner(element);
close();
}
}
protected void composeEncounterEncounterLocationComponentInner(Encounter.EncounterLocationComponent element)
throws IOException {
composeBackbone(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.hasPhysicalType()) {
composeCodeableConcept("physicalType", element.getPhysicalType());
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
}
protected void composeEndpoint(String name, Endpoint element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEndpointInner(element);
}
}
protected void composeEndpointInner(Endpoint element) throws IOException {
composeDomainResourceElements(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()) {
composeCoding("connectionType", element.getConnectionType());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
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.hasPayloadType()) {
openArray("payloadType");
for (CodeableConcept e : element.getPayloadType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasPayloadMimeType()) {
openArray("payloadMimeType");
for (CodeType e : element.getPayloadMimeType())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPayloadMimeType())) {
openArray("_payloadMimeType");
for (CodeType e : element.getPayloadMimeType())
composeCodeExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAddressElement()) {
composeUrlCore("address", element.getAddressElement(), false);
composeUrlExtras("address", element.getAddressElement(), false);
}
if (element.hasHeader()) {
openArray("header");
for (StringType e : element.getHeader())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getHeader())) {
openArray("_header");
for (StringType e : element.getHeader())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEnrollmentRequestInner(element);
}
}
protected void composeEnrollmentRequestInner(EnrollmentRequest element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new EnrollmentRequest.EnrollmentRequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new EnrollmentRequest.EnrollmentRequestStatusEnumFactory(), 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);
composeEnrollmentResponseInner(element);
}
}
protected void composeEnrollmentResponseInner(EnrollmentResponse element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new EnrollmentResponse.EnrollmentResponseStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new EnrollmentResponse.EnrollmentResponseStatusEnumFactory(), false);
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasOutcomeElement()) {
composeEnumerationCore("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(),
false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(),
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);
composeEpisodeOfCareInner(element);
}
}
protected void composeEpisodeOfCareInner(EpisodeOfCare element) throws IOException {
composeDomainResourceElements(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())
composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(null, e);
closeArray();
}
;
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis())
composeEpisodeOfCareDiagnosisComponent(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.hasTeam()) {
openArray("team");
for (Reference e : element.getTeam())
composeReference(null, e);
closeArray();
}
;
if (element.hasAccount()) {
openArray("account");
for (Reference e : element.getAccount())
composeReference(null, e);
closeArray();
}
;
}
protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(String name,
EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException {
if (element != null) {
open(name);
composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentInner(element);
close();
}
}
protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentInner(
EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException {
composeBackbone(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 composeEpisodeOfCareDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element)
throws IOException {
if (element != null) {
open(name);
composeEpisodeOfCareDiagnosisComponentInner(element);
close();
}
}
protected void composeEpisodeOfCareDiagnosisComponentInner(EpisodeOfCare.DiagnosisComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCondition()) {
composeReference("condition", element.getCondition());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasRankElement()) {
composePositiveIntCore("rank", element.getRankElement(), false);
composePositiveIntExtras("rank", element.getRankElement(), false);
}
}
protected void composeEventDefinition(String name, EventDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEventDefinitionInner(element);
}
}
protected void composeEventDefinitionInner(EventDefinition element) throws IOException {
composeDomainResourceElements(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.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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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);
composeEvidenceInner(element);
}
}
protected void composeEvidenceInner(Evidence element) throws IOException {
composeDomainResourceElements(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.hasShortTitleElement()) {
composeStringCore("shortTitle", element.getShortTitleElement(), false);
composeStringExtras("shortTitle", element.getShortTitleElement(), 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.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.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
}
;
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.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.hasExposureBackground()) {
composeReference("exposureBackground", element.getExposureBackground());
}
if (element.hasExposureVariant()) {
openArray("exposureVariant");
for (Reference e : element.getExposureVariant())
composeReference(null, e);
closeArray();
}
;
if (element.hasOutcome()) {
openArray("outcome");
for (Reference e : element.getOutcome())
composeReference(null, e);
closeArray();
}
;
}
protected void composeEvidenceVariable(String name, EvidenceVariable element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeEvidenceVariableInner(element);
}
}
protected void composeEvidenceVariableInner(EvidenceVariable element) throws IOException {
composeDomainResourceElements(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.hasShortTitleElement()) {
composeStringCore("shortTitle", element.getShortTitleElement(), false);
composeStringExtras("shortTitle", element.getShortTitleElement(), 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.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.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
}
;
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.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.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new EvidenceVariable.EvidenceVariableTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new EvidenceVariable.EvidenceVariableTypeEnumFactory(),
false);
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (EvidenceVariable.EvidenceVariableCharacteristicComponent e : element.getCharacteristic())
composeEvidenceVariableEvidenceVariableCharacteristicComponent(null, e);
closeArray();
}
;
}
protected void composeEvidenceVariableEvidenceVariableCharacteristicComponent(String name,
EvidenceVariable.EvidenceVariableCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeEvidenceVariableEvidenceVariableCharacteristicComponentInner(element);
close();
}
}
protected void composeEvidenceVariableEvidenceVariableCharacteristicComponentInner(
EvidenceVariable.EvidenceVariableCharacteristicComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasDefinition()) {
composeType("definition", element.getDefinition());
}
if (element.hasUsageContext()) {
openArray("usageContext");
for (UsageContext e : element.getUsageContext())
composeUsageContext(null, e);
closeArray();
}
;
if (element.hasExcludeElement()) {
composeBooleanCore("exclude", element.getExcludeElement(), false);
composeBooleanExtras("exclude", element.getExcludeElement(), false);
}
if (element.hasParticipantEffective()) {
composeType("participantEffective", element.getParticipantEffective());
}
if (element.hasTimeFromStart()) {
composeDuration("timeFromStart", element.getTimeFromStart());
}
if (element.hasGroupMeasureElement()) {
composeEnumerationCore("groupMeasure", element.getGroupMeasureElement(),
new EvidenceVariable.GroupMeasureEnumFactory(), false);
composeEnumerationExtras("groupMeasure", element.getGroupMeasureElement(),
new EvidenceVariable.GroupMeasureEnumFactory(), false);
}
}
protected void composeExampleScenario(String name, ExampleScenario element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeExampleScenarioInner(element);
}
}
protected void composeExampleScenarioInner(ExampleScenario element) throws IOException {
composeDomainResourceElements(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.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.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.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), false);
}
if (element.hasPurposeElement()) {
composeMarkdownCore("purpose", element.getPurposeElement(), false);
composeMarkdownExtras("purpose", element.getPurposeElement(), false);
}
if (element.hasActor()) {
openArray("actor");
for (ExampleScenario.ExampleScenarioActorComponent e : element.getActor())
composeExampleScenarioExampleScenarioActorComponent(null, e);
closeArray();
}
;
if (element.hasInstance()) {
openArray("instance");
for (ExampleScenario.ExampleScenarioInstanceComponent e : element.getInstance())
composeExampleScenarioExampleScenarioInstanceComponent(null, e);
closeArray();
}
;
if (element.hasProcess()) {
openArray("process");
for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess())
composeExampleScenarioExampleScenarioProcessComponent(null, e);
closeArray();
}
;
if (element.hasWorkflow()) {
openArray("workflow");
for (CanonicalType e : element.getWorkflow())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getWorkflow())) {
openArray("_workflow");
for (CanonicalType e : element.getWorkflow())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeExampleScenarioExampleScenarioActorComponent(String name,
ExampleScenario.ExampleScenarioActorComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioActorComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioActorComponentInner(
ExampleScenario.ExampleScenarioActorComponent element) throws IOException {
composeBackbone(element);
if (element.hasActorIdElement()) {
composeStringCore("actorId", element.getActorIdElement(), false);
composeStringExtras("actorId", element.getActorIdElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(),
new ExampleScenario.ExampleScenarioActorTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(),
new ExampleScenario.ExampleScenarioActorTypeEnumFactory(), false);
}
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 composeExampleScenarioExampleScenarioInstanceComponent(String name,
ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioInstanceComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioInstanceComponentInner(
ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException {
composeBackbone(element);
if (element.hasResourceIdElement()) {
composeStringCore("resourceId", element.getResourceIdElement(), false);
composeStringExtras("resourceId", element.getResourceIdElement(), false);
}
if (element.hasResourceTypeElement()) {
composeEnumerationCore("resourceType", element.getResourceTypeElement(),
new ExampleScenario.FHIRResourceTypeEnumFactory(), false);
composeEnumerationExtras("resourceType", element.getResourceTypeElement(),
new ExampleScenario.FHIRResourceTypeEnumFactory(), false);
}
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.hasVersion()) {
openArray("version");
for (ExampleScenario.ExampleScenarioInstanceVersionComponent e : element.getVersion())
composeExampleScenarioExampleScenarioInstanceVersionComponent(null, e);
closeArray();
}
;
if (element.hasContainedInstance()) {
openArray("containedInstance");
for (ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent e : element.getContainedInstance())
composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(null, e);
closeArray();
}
;
}
protected void composeExampleScenarioExampleScenarioInstanceVersionComponent(String name,
ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioInstanceVersionComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioInstanceVersionComponentInner(
ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException {
composeBackbone(element);
if (element.hasVersionIdElement()) {
composeStringCore("versionId", element.getVersionIdElement(), false);
composeStringExtras("versionId", element.getVersionIdElement(), false);
}
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(String name,
ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentInner(
ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException {
composeBackbone(element);
if (element.hasResourceIdElement()) {
composeStringCore("resourceId", element.getResourceIdElement(), false);
composeStringExtras("resourceId", element.getResourceIdElement(), false);
}
if (element.hasVersionIdElement()) {
composeStringCore("versionId", element.getVersionIdElement(), false);
composeStringExtras("versionId", element.getVersionIdElement(), false);
}
}
protected void composeExampleScenarioExampleScenarioProcessComponent(String name,
ExampleScenario.ExampleScenarioProcessComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioProcessComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioProcessComponentInner(
ExampleScenario.ExampleScenarioProcessComponent element) throws IOException {
composeBackbone(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())
composeExampleScenarioExampleScenarioProcessStepComponent(null, e);
closeArray();
}
;
}
protected void composeExampleScenarioExampleScenarioProcessStepComponent(String name,
ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioProcessStepComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioProcessStepComponentInner(
ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException {
composeBackbone(element);
if (element.hasProcess()) {
openArray("process");
for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess())
composeExampleScenarioExampleScenarioProcessComponent(null, e);
closeArray();
}
;
if (element.hasPauseElement()) {
composeBooleanCore("pause", element.getPauseElement(), false);
composeBooleanExtras("pause", element.getPauseElement(), false);
}
if (element.hasOperation()) {
composeExampleScenarioExampleScenarioProcessStepOperationComponent("operation", element.getOperation());
}
if (element.hasAlternative()) {
openArray("alternative");
for (ExampleScenario.ExampleScenarioProcessStepAlternativeComponent e : element.getAlternative())
composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(null, e);
closeArray();
}
;
}
protected void composeExampleScenarioExampleScenarioProcessStepOperationComponent(String name,
ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioProcessStepOperationComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioProcessStepOperationComponentInner(
ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException {
composeBackbone(element);
if (element.hasNumberElement()) {
composeStringCore("number", element.getNumberElement(), false);
composeStringExtras("number", element.getNumberElement(), false);
}
if (element.hasTypeElement()) {
composeStringCore("type", element.getTypeElement(), false);
composeStringExtras("type", element.getTypeElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), 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()) {
composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("request", element.getRequest());
}
if (element.hasResponse()) {
composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("response", element.getResponse());
}
}
protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(String name,
ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException {
if (element != null) {
open(name);
composeExampleScenarioExampleScenarioProcessStepAlternativeComponentInner(element);
close();
}
}
protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponentInner(
ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException {
composeBackbone(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())
composeExampleScenarioExampleScenarioProcessStepComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeExplanationOfBenefitInner(element);
}
}
protected void composeExplanationOfBenefitInner(ExplanationOfBenefit element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
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 ExplanationOfBenefit.UseEnumFactory(), false);
composeEnumerationExtras("use", element.getUseElement(), new ExplanationOfBenefit.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())
composeExplanationOfBenefitRelatedClaimComponent(null, e);
closeArray();
}
;
if (element.hasPrescription()) {
composeReference("prescription", element.getPrescription());
}
if (element.hasOriginalPrescription()) {
composeReference("originalPrescription", element.getOriginalPrescription());
}
if (element.hasPayee()) {
composeExplanationOfBenefitPayeeComponent("payee", element.getPayee());
}
if (element.hasReferral()) {
composeReference("referral", element.getReferral());
}
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 ExplanationOfBenefit.RemittanceOutcomeEnumFactory(), false);
composeEnumerationExtras("outcome", element.getOutcomeElement(),
new ExplanationOfBenefit.RemittanceOutcomeEnumFactory(), false);
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasPreAuthRef()) {
openArray("preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringCore(null, e, true);
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.hasCareTeam()) {
openArray("careTeam");
for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam())
composeExplanationOfBenefitCareTeamComponent(null, e);
closeArray();
}
;
if (element.hasSupportingInfo()) {
openArray("supportingInfo");
for (ExplanationOfBenefit.SupportingInformationComponent e : element.getSupportingInfo())
composeExplanationOfBenefitSupportingInformationComponent(null, e);
closeArray();
}
;
if (element.hasDiagnosis()) {
openArray("diagnosis");
for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis())
composeExplanationOfBenefitDiagnosisComponent(null, e);
closeArray();
}
;
if (element.hasProcedure()) {
openArray("procedure");
for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure())
composeExplanationOfBenefitProcedureComponent(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())
composeExplanationOfBenefitInsuranceComponent(null, e);
closeArray();
}
;
if (element.hasAccident()) {
composeExplanationOfBenefitAccidentComponent("accident", element.getAccident());
}
if (element.hasItem()) {
openArray("item");
for (ExplanationOfBenefit.ItemComponent e : element.getItem())
composeExplanationOfBenefitItemComponent(null, e);
closeArray();
}
;
if (element.hasAddItem()) {
openArray("addItem");
for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem())
composeExplanationOfBenefitAddedItemComponent(null, e);
closeArray();
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasTotal()) {
openArray("total");
for (ExplanationOfBenefit.TotalComponent e : element.getTotal())
composeExplanationOfBenefitTotalComponent(null, e);
closeArray();
}
;
if (element.hasPayment()) {
composeExplanationOfBenefitPaymentComponent("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())
composeExplanationOfBenefitNoteComponent(null, e);
closeArray();
}
;
if (element.hasBenefitPeriod()) {
composePeriod("benefitPeriod", element.getBenefitPeriod());
}
if (element.hasBenefitBalance()) {
openArray("benefitBalance");
for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance())
composeExplanationOfBenefitBenefitBalanceComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitRelatedClaimComponent(String name,
ExplanationOfBenefit.RelatedClaimComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitRelatedClaimComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitRelatedClaimComponentInner(
ExplanationOfBenefit.RelatedClaimComponent element) throws IOException {
composeBackbone(element);
if (element.hasClaim()) {
composeReference("claim", element.getClaim());
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasReference()) {
composeIdentifier("reference", element.getReference());
}
}
protected void composeExplanationOfBenefitPayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitPayeeComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitPayeeComponentInner(ExplanationOfBenefit.PayeeComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasParty()) {
composeReference("party", element.getParty());
}
}
protected void composeExplanationOfBenefitCareTeamComponent(String name,
ExplanationOfBenefit.CareTeamComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitCareTeamComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitCareTeamComponentInner(ExplanationOfBenefit.CareTeamComponent element)
throws IOException {
composeBackbone(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.hasQualification()) {
composeCodeableConcept("qualification", element.getQualification());
}
}
protected void composeExplanationOfBenefitSupportingInformationComponent(String name,
ExplanationOfBenefit.SupportingInformationComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitSupportingInformationComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitSupportingInformationComponentInner(
ExplanationOfBenefit.SupportingInformationComponent element) throws IOException {
composeBackbone(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 composeExplanationOfBenefitDiagnosisComponent(String name,
ExplanationOfBenefit.DiagnosisComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitDiagnosisComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitDiagnosisComponentInner(ExplanationOfBenefit.DiagnosisComponent element)
throws IOException {
composeBackbone(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());
}
if (element.hasPackageCode()) {
composeCodeableConcept("packageCode", element.getPackageCode());
}
}
protected void composeExplanationOfBenefitProcedureComponent(String name,
ExplanationOfBenefit.ProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitProcedureComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitProcedureComponentInner(ExplanationOfBenefit.ProcedureComponent element)
throws IOException {
composeBackbone(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 composeExplanationOfBenefitInsuranceComponent(String name,
ExplanationOfBenefit.InsuranceComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitInsuranceComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitInsuranceComponentInner(ExplanationOfBenefit.InsuranceComponent element)
throws IOException {
composeBackbone(element);
if (element.hasFocalElement()) {
composeBooleanCore("focal", element.getFocalElement(), false);
composeBooleanExtras("focal", element.getFocalElement(), false);
}
if (element.hasCoverage()) {
composeReference("coverage", element.getCoverage());
}
if (element.hasPreAuthRef()) {
openArray("preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPreAuthRef())) {
openArray("_preAuthRef");
for (StringType e : element.getPreAuthRef())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeExplanationOfBenefitAccidentComponent(String name,
ExplanationOfBenefit.AccidentComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitAccidentComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitAccidentComponentInner(ExplanationOfBenefit.AccidentComponent element)
throws IOException {
composeBackbone(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 composeExplanationOfBenefitItemComponent(String name, ExplanationOfBenefit.ItemComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitItemComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitItemComponentInner(ExplanationOfBenefit.ItemComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasCareTeamSequence()) {
openArray("careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getCareTeamSequence())) {
openArray("_careTeamSequence");
for (PositiveIntType e : element.getCareTeamSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasDiagnosisSequence()) {
openArray("diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDiagnosisSequence())) {
openArray("_diagnosisSequence");
for (PositiveIntType e : element.getDiagnosisSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasProcedureSequence()) {
openArray("procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getProcedureSequence())) {
openArray("_procedureSequence");
for (PositiveIntType e : element.getProcedureSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInformationSequence()) {
openArray("informationSequence");
for (PositiveIntType e : element.getInformationSequence())
composePositiveIntCore(null, e, true);
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.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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
}
;
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasEncounter()) {
openArray("encounter");
for (Reference e : element.getEncounter())
composeReference(null, e);
closeArray();
}
;
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasDetail()) {
openArray("detail");
for (ExplanationOfBenefit.DetailComponent e : element.getDetail())
composeExplanationOfBenefitDetailComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitAdjudicationComponent(String name,
ExplanationOfBenefit.AdjudicationComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitAdjudicationComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitAdjudicationComponentInner(
ExplanationOfBenefit.AdjudicationComponent element) throws IOException {
composeBackbone(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
}
protected void composeExplanationOfBenefitDetailComponent(String name, ExplanationOfBenefit.DetailComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitDetailComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitDetailComponentInner(ExplanationOfBenefit.DetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
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.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
}
;
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasSubDetail()) {
openArray("subDetail");
for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail())
composeExplanationOfBenefitSubDetailComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitSubDetailComponent(String name,
ExplanationOfBenefit.SubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitSubDetailComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitSubDetailComponentInner(ExplanationOfBenefit.SubDetailComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasRevenue()) {
composeCodeableConcept("revenue", element.getRevenue());
}
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.hasProgramCode()) {
openArray("programCode");
for (CodeableConcept e : element.getProgramCode())
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasUdi()) {
openArray("udi");
for (Reference e : element.getUdi())
composeReference(null, e);
closeArray();
}
;
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitAddedItemComponent(String name,
ExplanationOfBenefit.AddedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitAddedItemComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitAddedItemComponentInner(ExplanationOfBenefit.AddedItemComponent element)
throws IOException {
composeBackbone(element);
if (element.hasItemSequence()) {
openArray("itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getItemSequence())) {
openArray("_itemSequence");
for (PositiveIntType e : element.getItemSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasDetailSequence()) {
openArray("detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDetailSequence())) {
openArray("_detailSequence");
for (PositiveIntType e : element.getDetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSubDetailSequence()) {
openArray("subDetailSequence");
for (PositiveIntType e : element.getSubDetailSequence())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSubDetailSequence())) {
openArray("_subDetailSequence");
for (PositiveIntType e : element.getSubDetailSequence())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasProvider()) {
openArray("provider");
for (Reference e : element.getProvider())
composeReference(null, e);
closeArray();
}
;
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasSubSite()) {
openArray("subSite");
for (CodeableConcept e : element.getSubSite())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasDetail()) {
openArray("detail");
for (ExplanationOfBenefit.AddedItemDetailComponent e : element.getDetail())
composeExplanationOfBenefitAddedItemDetailComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitAddedItemDetailComponent(String name,
ExplanationOfBenefit.AddedItemDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitAddedItemDetailComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitAddedItemDetailComponentInner(
ExplanationOfBenefit.AddedItemDetailComponent element) throws IOException {
composeBackbone(element);
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
if (element.hasSubDetail()) {
openArray("subDetail");
for (ExplanationOfBenefit.AddedItemDetailSubDetailComponent e : element.getSubDetail())
composeExplanationOfBenefitAddedItemDetailSubDetailComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitAddedItemDetailSubDetailComponent(String name,
ExplanationOfBenefit.AddedItemDetailSubDetailComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitAddedItemDetailSubDetailComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitAddedItemDetailSubDetailComponentInner(
ExplanationOfBenefit.AddedItemDetailSubDetailComponent element) throws IOException {
composeBackbone(element);
if (element.hasProductOrService()) {
composeCodeableConcept("productOrService", element.getProductOrService());
}
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.hasNet()) {
composeMoney("net", element.getNet());
}
if (element.hasNoteNumber()) {
openArray("noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNoteNumber())) {
openArray("_noteNumber");
for (PositiveIntType e : element.getNoteNumber())
composePositiveIntExtras(null, e, true);
closeArray();
}
}
;
if (element.hasAdjudication()) {
openArray("adjudication");
for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication())
composeExplanationOfBenefitAdjudicationComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitTotalComponent(String name, ExplanationOfBenefit.TotalComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitTotalComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitTotalComponentInner(ExplanationOfBenefit.TotalComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasAmount()) {
composeMoney("amount", element.getAmount());
}
}
protected void composeExplanationOfBenefitPaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitPaymentComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitPaymentComponentInner(ExplanationOfBenefit.PaymentComponent element)
throws IOException {
composeBackbone(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 composeExplanationOfBenefitNoteComponent(String name, ExplanationOfBenefit.NoteComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitNoteComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitNoteComponentInner(ExplanationOfBenefit.NoteComponent element)
throws IOException {
composeBackbone(element);
if (element.hasNumberElement()) {
composePositiveIntCore("number", element.getNumberElement(), false);
composePositiveIntExtras("number", element.getNumberElement(), false);
}
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
}
protected void composeExplanationOfBenefitBenefitBalanceComponent(String name,
ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitBenefitBalanceComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitBenefitBalanceComponentInner(
ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException {
composeBackbone(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())
composeExplanationOfBenefitBenefitComponent(null, e);
closeArray();
}
;
}
protected void composeExplanationOfBenefitBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element)
throws IOException {
if (element != null) {
open(name);
composeExplanationOfBenefitBenefitComponentInner(element);
close();
}
}
protected void composeExplanationOfBenefitBenefitComponentInner(ExplanationOfBenefit.BenefitComponent element)
throws IOException {
composeBackbone(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);
composeFamilyMemberHistoryInner(element);
}
}
protected void composeFamilyMemberHistoryInner(FamilyMemberHistory element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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.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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(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())
composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(null, e);
closeArray();
}
;
}
protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(String name,
FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException {
if (element != null) {
open(name);
composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentInner(element);
close();
}
}
protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentInner(
FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException {
composeBackbone(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 composeFlag(String name, Flag element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeFlagInner(element);
}
}
protected void composeFlagInner(Flag element) throws IOException {
composeDomainResourceElements(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 composeGoal(String name, Goal element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeGoalInner(element);
}
}
protected void composeGoalInner(Goal element) throws IOException {
composeDomainResourceElements(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.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())
composeGoalGoalTargetComponent(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.hasExpressedBy()) {
composeReference("expressedBy", element.getExpressedBy());
}
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.hasOutcomeCode()) {
openArray("outcomeCode");
for (CodeableConcept e : element.getOutcomeCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasOutcomeReference()) {
openArray("outcomeReference");
for (Reference e : element.getOutcomeReference())
composeReference(null, e);
closeArray();
}
;
}
protected void composeGoalGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeGoalGoalTargetComponentInner(element);
close();
}
}
protected void composeGoalGoalTargetComponentInner(Goal.GoalTargetComponent element) throws IOException {
composeBackbone(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);
composeGraphDefinitionInner(element);
}
}
protected void composeGraphDefinitionInner(GraphDefinition element) throws IOException {
composeDomainResourceElements(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.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), 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.hasStartElement()) {
composeCodeCore("start", element.getStartElement(), false);
composeCodeExtras("start", element.getStartElement(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
if (element.hasLink()) {
openArray("link");
for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink())
composeGraphDefinitionGraphDefinitionLinkComponent(null, e);
closeArray();
}
;
}
protected void composeGraphDefinitionGraphDefinitionLinkComponent(String name,
GraphDefinition.GraphDefinitionLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeGraphDefinitionGraphDefinitionLinkComponentInner(element);
close();
}
}
protected void composeGraphDefinitionGraphDefinitionLinkComponentInner(
GraphDefinition.GraphDefinitionLinkComponent element) throws IOException {
composeBackbone(element);
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.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.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTarget()) {
openArray("target");
for (GraphDefinition.GraphDefinitionLinkTargetComponent e : element.getTarget())
composeGraphDefinitionGraphDefinitionLinkTargetComponent(null, e);
closeArray();
}
;
}
protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(String name,
GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeGraphDefinitionGraphDefinitionLinkTargetComponentInner(element);
close();
}
}
protected void composeGraphDefinitionGraphDefinitionLinkTargetComponentInner(
GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeCodeCore("type", element.getTypeElement(), false);
composeCodeExtras("type", element.getTypeElement(), false);
}
if (element.hasParamsElement()) {
composeStringCore("params", element.getParamsElement(), false);
composeStringExtras("params", element.getParamsElement(), false);
}
if (element.hasProfileElement()) {
composeCanonicalCore("profile", element.getProfileElement(), false);
composeCanonicalExtras("profile", element.getProfileElement(), false);
}
if (element.hasCompartment()) {
openArray("compartment");
for (GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent e : element.getCompartment())
composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(null, e);
closeArray();
}
;
if (element.hasLink()) {
openArray("link");
for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink())
composeGraphDefinitionGraphDefinitionLinkComponent(null, e);
closeArray();
}
;
}
protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(String name,
GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException {
if (element != null) {
open(name);
composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentInner(element);
close();
}
}
protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentInner(
GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException {
composeBackbone(element);
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory(),
false);
composeEnumerationExtras("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory(),
false);
}
if (element.hasCodeElement()) {
composeEnumerationCore("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory(), false);
composeEnumerationExtras("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory(),
false);
}
if (element.hasRuleElement()) {
composeEnumerationCore("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(),
false);
composeEnumerationExtras("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(),
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);
composeGroupInner(element);
}
}
protected void composeGroupInner(Group element) throws IOException {
composeDomainResourceElements(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.hasActualElement()) {
composeBooleanCore("actual", element.getActualElement(), false);
composeBooleanExtras("actual", element.getActualElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), 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())
composeGroupGroupCharacteristicComponent(null, e);
closeArray();
}
;
if (element.hasMember()) {
openArray("member");
for (Group.GroupMemberComponent e : element.getMember())
composeGroupGroupMemberComponent(null, e);
closeArray();
}
;
}
protected void composeGroupGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element)
throws IOException {
if (element != null) {
open(name);
composeGroupGroupCharacteristicComponentInner(element);
close();
}
}
protected void composeGroupGroupCharacteristicComponentInner(Group.GroupCharacteristicComponent element)
throws IOException {
composeBackbone(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 composeGroupGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException {
if (element != null) {
open(name);
composeGroupGroupMemberComponentInner(element);
close();
}
}
protected void composeGroupGroupMemberComponentInner(Group.GroupMemberComponent element) throws IOException {
composeBackbone(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);
composeGuidanceResponseInner(element);
}
}
protected void composeGuidanceResponseInner(GuidanceResponse element) throws IOException {
composeDomainResourceElements(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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasEvaluationMessage()) {
openArray("evaluationMessage");
for (Reference e : element.getEvaluationMessage())
composeReference(null, e);
closeArray();
}
;
if (element.hasOutputParameters()) {
composeReference("outputParameters", element.getOutputParameters());
}
if (element.hasResult()) {
composeReference("result", element.getResult());
}
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);
composeHealthcareServiceInner(element);
}
}
protected void composeHealthcareServiceInner(HealthcareService element) throws IOException {
composeDomainResourceElements(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.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()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("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.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(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())
composeHealthcareServiceHealthcareServiceEligibilityComponent(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.hasAvailableTime()) {
openArray("availableTime");
for (HealthcareService.HealthcareServiceAvailableTimeComponent e : element.getAvailableTime())
composeHealthcareServiceHealthcareServiceAvailableTimeComponent(null, e);
closeArray();
}
;
if (element.hasNotAvailable()) {
openArray("notAvailable");
for (HealthcareService.HealthcareServiceNotAvailableComponent e : element.getNotAvailable())
composeHealthcareServiceHealthcareServiceNotAvailableComponent(null, e);
closeArray();
}
;
if (element.hasAvailabilityExceptionsElement()) {
composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false);
composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false);
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
}
;
}
protected void composeHealthcareServiceHealthcareServiceEligibilityComponent(String name,
HealthcareService.HealthcareServiceEligibilityComponent element) throws IOException {
if (element != null) {
open(name);
composeHealthcareServiceHealthcareServiceEligibilityComponentInner(element);
close();
}
}
protected void composeHealthcareServiceHealthcareServiceEligibilityComponentInner(
HealthcareService.HealthcareServiceEligibilityComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasCommentElement()) {
composeMarkdownCore("comment", element.getCommentElement(), false);
composeMarkdownExtras("comment", element.getCommentElement(), false);
}
}
protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(String name,
HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException {
if (element != null) {
open(name);
composeHealthcareServiceHealthcareServiceAvailableTimeComponentInner(element);
close();
}
}
protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponentInner(
HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException {
composeBackbone(element);
if (element.hasDaysOfWeek()) {
openArray("daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationCore(null, e, new HealthcareService.DaysOfWeekEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getDaysOfWeek())) {
openArray("_daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationExtras(null, e, new HealthcareService.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 composeHealthcareServiceHealthcareServiceNotAvailableComponent(String name,
HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException {
if (element != null) {
open(name);
composeHealthcareServiceHealthcareServiceNotAvailableComponentInner(element);
close();
}
}
protected void composeHealthcareServiceHealthcareServiceNotAvailableComponentInner(
HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasDuring()) {
composePeriod("during", element.getDuring());
}
}
protected void composeImagingStudy(String name, ImagingStudy element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImagingStudyInner(element);
}
}
protected void composeImagingStudyInner(ImagingStudy element) throws IOException {
composeDomainResourceElements(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 (Coding e : element.getModality())
composeCoding(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.hasReferrer()) {
composeReference("referrer", element.getReferrer());
}
if (element.hasInterpreter()) {
openArray("interpreter");
for (Reference e : element.getInterpreter())
composeReference(null, e);
closeArray();
}
;
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.hasProcedureReference()) {
composeReference("procedureReference", element.getProcedureReference());
}
if (element.hasProcedureCode()) {
openArray("procedureCode");
for (CodeableConcept e : element.getProcedureCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(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())
composeImagingStudyImagingStudySeriesComponent(null, e);
closeArray();
}
;
}
protected void composeImagingStudyImagingStudySeriesComponent(String name,
ImagingStudy.ImagingStudySeriesComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingStudyImagingStudySeriesComponentInner(element);
close();
}
}
protected void composeImagingStudyImagingStudySeriesComponentInner(ImagingStudy.ImagingStudySeriesComponent element)
throws IOException {
composeBackbone(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()) {
composeCoding("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()) {
composeCoding("bodySite", element.getBodySite());
}
if (element.hasLaterality()) {
composeCoding("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())
composeImagingStudyImagingStudySeriesPerformerComponent(null, e);
closeArray();
}
;
if (element.hasInstance()) {
openArray("instance");
for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance())
composeImagingStudyImagingStudySeriesInstanceComponent(null, e);
closeArray();
}
;
}
protected void composeImagingStudyImagingStudySeriesPerformerComponent(String name,
ImagingStudy.ImagingStudySeriesPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingStudyImagingStudySeriesPerformerComponentInner(element);
close();
}
}
protected void composeImagingStudyImagingStudySeriesPerformerComponentInner(
ImagingStudy.ImagingStudySeriesPerformerComponent element) throws IOException {
composeBackbone(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeImagingStudyImagingStudySeriesInstanceComponent(String name,
ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeImagingStudyImagingStudySeriesInstanceComponentInner(element);
close();
}
}
protected void composeImagingStudyImagingStudySeriesInstanceComponentInner(
ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException {
composeBackbone(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);
composeImmunizationInner(element);
}
}
protected void composeImmunizationInner(Immunization element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory(),
false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasVaccineCode()) {
composeCodeableConcept("vaccineCode", element.getVaccineCode());
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
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.hasPrimarySourceElement()) {
composeBooleanCore("primarySource", element.getPrimarySourceElement(), false);
composeBooleanExtras("primarySource", element.getPrimarySourceElement(), false);
}
if (element.hasReportOrigin()) {
composeCodeableConcept("reportOrigin", element.getReportOrigin());
}
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasManufacturer()) {
composeReference("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.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())
composeImmunizationImmunizationPerformerComponent(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(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.hasEducation()) {
openArray("education");
for (Immunization.ImmunizationEducationComponent e : element.getEducation())
composeImmunizationImmunizationEducationComponent(null, e);
closeArray();
}
;
if (element.hasProgramEligibility()) {
openArray("programEligibility");
for (CodeableConcept e : element.getProgramEligibility())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasFundingSource()) {
composeCodeableConcept("fundingSource", element.getFundingSource());
}
if (element.hasReaction()) {
openArray("reaction");
for (Immunization.ImmunizationReactionComponent e : element.getReaction())
composeImmunizationImmunizationReactionComponent(null, e);
closeArray();
}
;
if (element.hasProtocolApplied()) {
openArray("protocolApplied");
for (Immunization.ImmunizationProtocolAppliedComponent e : element.getProtocolApplied())
composeImmunizationImmunizationProtocolAppliedComponent(null, e);
closeArray();
}
;
}
protected void composeImmunizationImmunizationPerformerComponent(String name,
Immunization.ImmunizationPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationImmunizationPerformerComponentInner(element);
close();
}
}
protected void composeImmunizationImmunizationPerformerComponentInner(
Immunization.ImmunizationPerformerComponent element) throws IOException {
composeBackbone(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeImmunizationImmunizationEducationComponent(String name,
Immunization.ImmunizationEducationComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationImmunizationEducationComponentInner(element);
close();
}
}
protected void composeImmunizationImmunizationEducationComponentInner(
Immunization.ImmunizationEducationComponent element) throws IOException {
composeBackbone(element);
if (element.hasDocumentTypeElement()) {
composeStringCore("documentType", element.getDocumentTypeElement(), false);
composeStringExtras("documentType", element.getDocumentTypeElement(), false);
}
if (element.hasReferenceElement()) {
composeUriCore("reference", element.getReferenceElement(), false);
composeUriExtras("reference", element.getReferenceElement(), false);
}
if (element.hasPublicationDateElement()) {
composeDateTimeCore("publicationDate", element.getPublicationDateElement(), false);
composeDateTimeExtras("publicationDate", element.getPublicationDateElement(), false);
}
if (element.hasPresentationDateElement()) {
composeDateTimeCore("presentationDate", element.getPresentationDateElement(), false);
composeDateTimeExtras("presentationDate", element.getPresentationDateElement(), false);
}
}
protected void composeImmunizationImmunizationReactionComponent(String name,
Immunization.ImmunizationReactionComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationImmunizationReactionComponentInner(element);
close();
}
}
protected void composeImmunizationImmunizationReactionComponentInner(
Immunization.ImmunizationReactionComponent element) throws IOException {
composeBackbone(element);
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasDetail()) {
composeReference("detail", element.getDetail());
}
if (element.hasReportedElement()) {
composeBooleanCore("reported", element.getReportedElement(), false);
composeBooleanExtras("reported", element.getReportedElement(), false);
}
}
protected void composeImmunizationImmunizationProtocolAppliedComponent(String name,
Immunization.ImmunizationProtocolAppliedComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationImmunizationProtocolAppliedComponentInner(element);
close();
}
}
protected void composeImmunizationImmunizationProtocolAppliedComponentInner(
Immunization.ImmunizationProtocolAppliedComponent element) throws IOException {
composeBackbone(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.hasDoseNumber()) {
composeType("doseNumber", element.getDoseNumber());
}
if (element.hasSeriesDoses()) {
composeType("seriesDoses", element.getSeriesDoses());
}
}
protected void composeImmunizationEvaluation(String name, ImmunizationEvaluation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImmunizationEvaluationInner(element);
}
}
protected void composeImmunizationEvaluationInner(ImmunizationEvaluation element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory(), 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()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSeriesElement()) {
composeStringCore("series", element.getSeriesElement(), false);
composeStringExtras("series", element.getSeriesElement(), false);
}
if (element.hasDoseNumber()) {
composeType("doseNumber", element.getDoseNumber());
}
if (element.hasSeriesDoses()) {
composeType("seriesDoses", element.getSeriesDoses());
}
}
protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeImmunizationRecommendationInner(element);
}
}
protected void composeImmunizationRecommendationInner(ImmunizationRecommendation element) throws IOException {
composeDomainResourceElements(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())
composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(null, e);
closeArray();
}
;
}
protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(String name,
ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException {
if (element != null) {
open(name);
composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(element);
close();
}
}
protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(
ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException {
composeBackbone(element);
if (element.hasVaccineCode()) {
openArray("vaccineCode");
for (CodeableConcept e : element.getVaccineCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasTargetDisease()) {
composeCodeableConcept("targetDisease", element.getTargetDisease());
}
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())
composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSeriesElement()) {
composeStringCore("series", element.getSeriesElement(), false);
composeStringExtras("series", element.getSeriesElement(), false);
}
if (element.hasDoseNumber()) {
composeType("doseNumber", element.getDoseNumber());
}
if (element.hasSeriesDoses()) {
composeType("seriesDoses", element.getSeriesDoses());
}
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 composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(
String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element)
throws IOException {
if (element != null) {
open(name);
composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentInner(element);
close();
}
}
protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentInner(
ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element)
throws IOException {
composeBackbone(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);
composeImplementationGuideInner(element);
}
}
protected void composeImplementationGuideInner(ImplementationGuide element) throws IOException {
composeDomainResourceElements(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.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.hasCopyrightElement()) {
composeMarkdownCore("copyright", element.getCopyrightElement(), false);
composeMarkdownExtras("copyright", element.getCopyrightElement(), 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())
composeImplementationGuideImplementationGuideDependsOnComponent(null, e);
closeArray();
}
;
if (element.hasGlobal()) {
openArray("global");
for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal())
composeImplementationGuideImplementationGuideGlobalComponent(null, e);
closeArray();
}
;
if (element.hasDefinition()) {
composeImplementationGuideImplementationGuideDefinitionComponent("definition", element.getDefinition());
}
if (element.hasManifest()) {
composeImplementationGuideImplementationGuideManifestComponent("manifest", element.getManifest());
}
}
protected void composeImplementationGuideImplementationGuideDependsOnComponent(String name,
ImplementationGuide.ImplementationGuideDependsOnComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDependsOnComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDependsOnComponentInner(
ImplementationGuide.ImplementationGuideDependsOnComponent element) throws IOException {
composeBackbone(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);
}
}
protected void composeImplementationGuideImplementationGuideGlobalComponent(String name,
ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideGlobalComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideGlobalComponentInner(
ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException {
composeBackbone(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 composeImplementationGuideImplementationGuideDefinitionComponent(String name,
ImplementationGuide.ImplementationGuideDefinitionComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDefinitionComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDefinitionComponentInner(
ImplementationGuide.ImplementationGuideDefinitionComponent element) throws IOException {
composeBackbone(element);
if (element.hasGrouping()) {
openArray("grouping");
for (ImplementationGuide.ImplementationGuideDefinitionGroupingComponent e : element.getGrouping())
composeImplementationGuideImplementationGuideDefinitionGroupingComponent(null, e);
closeArray();
}
;
if (element.hasResource()) {
openArray("resource");
for (ImplementationGuide.ImplementationGuideDefinitionResourceComponent e : element.getResource())
composeImplementationGuideImplementationGuideDefinitionResourceComponent(null, e);
closeArray();
}
;
if (element.hasPage()) {
composeImplementationGuideImplementationGuideDefinitionPageComponent("page", element.getPage());
}
if (element.hasParameter()) {
openArray("parameter");
for (ImplementationGuide.ImplementationGuideDefinitionParameterComponent e : element.getParameter())
composeImplementationGuideImplementationGuideDefinitionParameterComponent(null, e);
closeArray();
}
;
if (element.hasTemplate()) {
openArray("template");
for (ImplementationGuide.ImplementationGuideDefinitionTemplateComponent e : element.getTemplate())
composeImplementationGuideImplementationGuideDefinitionTemplateComponent(null, e);
closeArray();
}
;
}
protected void composeImplementationGuideImplementationGuideDefinitionGroupingComponent(String name,
ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDefinitionGroupingComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDefinitionGroupingComponentInner(
ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element) throws IOException {
composeBackbone(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);
}
}
protected void composeImplementationGuideImplementationGuideDefinitionResourceComponent(String name,
ImplementationGuide.ImplementationGuideDefinitionResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDefinitionResourceComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDefinitionResourceComponentInner(
ImplementationGuide.ImplementationGuideDefinitionResourceComponent element) throws IOException {
composeBackbone(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()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasExample()) {
composeType("example", element.getExample());
}
if (element.hasGroupingIdElement()) {
composeIdCore("groupingId", element.getGroupingIdElement(), false);
composeIdExtras("groupingId", element.getGroupingIdElement(), false);
}
}
protected void composeImplementationGuideImplementationGuideDefinitionPageComponent(String name,
ImplementationGuide.ImplementationGuideDefinitionPageComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDefinitionPageComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDefinitionPageComponentInner(
ImplementationGuide.ImplementationGuideDefinitionPageComponent element) throws IOException {
composeBackbone(element);
if (element.hasName()) {
composeType("name", element.getName());
}
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())
composeImplementationGuideImplementationGuideDefinitionPageComponent(null, e);
closeArray();
}
;
}
protected void composeImplementationGuideImplementationGuideDefinitionParameterComponent(String name,
ImplementationGuide.ImplementationGuideDefinitionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDefinitionParameterComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDefinitionParameterComponentInner(
ImplementationGuide.ImplementationGuideDefinitionParameterComponent element) throws IOException {
composeBackbone(element);
if (element.hasCodeElement()) {
composeStringCore("code", element.getCodeElement(), false);
composeStringExtras("code", element.getCodeElement(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeImplementationGuideImplementationGuideDefinitionTemplateComponent(String name,
ImplementationGuide.ImplementationGuideDefinitionTemplateComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideDefinitionTemplateComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideDefinitionTemplateComponentInner(
ImplementationGuide.ImplementationGuideDefinitionTemplateComponent element) throws IOException {
composeBackbone(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 composeImplementationGuideImplementationGuideManifestComponent(String name,
ImplementationGuide.ImplementationGuideManifestComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideImplementationGuideManifestComponentInner(element);
close();
}
}
protected void composeImplementationGuideImplementationGuideManifestComponentInner(
ImplementationGuide.ImplementationGuideManifestComponent element) throws IOException {
composeBackbone(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())
composeImplementationGuideManifestResourceComponent(null, e);
closeArray();
}
;
if (element.hasPage()) {
openArray("page");
for (ImplementationGuide.ManifestPageComponent e : element.getPage())
composeImplementationGuideManifestPageComponent(null, e);
closeArray();
}
;
if (element.hasImage()) {
openArray("image");
for (StringType e : element.getImage())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getImage())) {
openArray("_image");
for (StringType e : element.getImage())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasOther()) {
openArray("other");
for (StringType e : element.getOther())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getOther())) {
openArray("_other");
for (StringType e : element.getOther())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeImplementationGuideManifestResourceComponent(String name,
ImplementationGuide.ManifestResourceComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideManifestResourceComponentInner(element);
close();
}
}
protected void composeImplementationGuideManifestResourceComponentInner(
ImplementationGuide.ManifestResourceComponent element) throws IOException {
composeBackbone(element);
if (element.hasReference()) {
composeReference("reference", element.getReference());
}
if (element.hasExample()) {
composeType("example", element.getExample());
}
if (element.hasRelativePathElement()) {
composeUrlCore("relativePath", element.getRelativePathElement(), false);
composeUrlExtras("relativePath", element.getRelativePathElement(), false);
}
}
protected void composeImplementationGuideManifestPageComponent(String name,
ImplementationGuide.ManifestPageComponent element) throws IOException {
if (element != null) {
open(name);
composeImplementationGuideManifestPageComponentInner(element);
close();
}
}
protected void composeImplementationGuideManifestPageComponentInner(ImplementationGuide.ManifestPageComponent element)
throws IOException {
composeBackbone(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()) {
openArray("anchor");
for (StringType e : element.getAnchor())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getAnchor())) {
openArray("_anchor");
for (StringType e : element.getAnchor())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeInsurancePlan(String name, InsurancePlan element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeInsurancePlanInner(element);
}
}
protected void composeInsurancePlanInner(InsurancePlan element) throws IOException {
composeDomainResourceElements(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()) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, true);
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 (InsurancePlan.InsurancePlanContactComponent e : element.getContact())
composeInsurancePlanInsurancePlanContactComponent(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())
composeInsurancePlanInsurancePlanCoverageComponent(null, e);
closeArray();
}
;
if (element.hasPlan()) {
openArray("plan");
for (InsurancePlan.InsurancePlanPlanComponent e : element.getPlan())
composeInsurancePlanInsurancePlanPlanComponent(null, e);
closeArray();
}
;
}
protected void composeInsurancePlanInsurancePlanContactComponent(String name,
InsurancePlan.InsurancePlanContactComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanInsurancePlanContactComponentInner(element);
close();
}
}
protected void composeInsurancePlanInsurancePlanContactComponentInner(
InsurancePlan.InsurancePlanContactComponent element) throws IOException {
composeBackbone(element);
if (element.hasPurpose()) {
composeCodeableConcept("purpose", element.getPurpose());
}
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());
}
}
protected void composeInsurancePlanInsurancePlanCoverageComponent(String name,
InsurancePlan.InsurancePlanCoverageComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanInsurancePlanCoverageComponentInner(element);
close();
}
}
protected void composeInsurancePlanInsurancePlanCoverageComponentInner(
InsurancePlan.InsurancePlanCoverageComponent element) throws IOException {
composeBackbone(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())
composeInsurancePlanCoverageBenefitComponent(null, e);
closeArray();
}
;
}
protected void composeInsurancePlanCoverageBenefitComponent(String name,
InsurancePlan.CoverageBenefitComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanCoverageBenefitComponentInner(element);
close();
}
}
protected void composeInsurancePlanCoverageBenefitComponentInner(InsurancePlan.CoverageBenefitComponent element)
throws IOException {
composeBackbone(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())
composeInsurancePlanCoverageBenefitLimitComponent(null, e);
closeArray();
}
;
}
protected void composeInsurancePlanCoverageBenefitLimitComponent(String name,
InsurancePlan.CoverageBenefitLimitComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanCoverageBenefitLimitComponentInner(element);
close();
}
}
protected void composeInsurancePlanCoverageBenefitLimitComponentInner(
InsurancePlan.CoverageBenefitLimitComponent element) throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeQuantity("value", element.getValue());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
}
protected void composeInsurancePlanInsurancePlanPlanComponent(String name,
InsurancePlan.InsurancePlanPlanComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanInsurancePlanPlanComponentInner(element);
close();
}
}
protected void composeInsurancePlanInsurancePlanPlanComponentInner(InsurancePlan.InsurancePlanPlanComponent element)
throws IOException {
composeBackbone(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())
composeInsurancePlanInsurancePlanPlanGeneralCostComponent(null, e);
closeArray();
}
;
if (element.hasSpecificCost()) {
openArray("specificCost");
for (InsurancePlan.InsurancePlanPlanSpecificCostComponent e : element.getSpecificCost())
composeInsurancePlanInsurancePlanPlanSpecificCostComponent(null, e);
closeArray();
}
;
}
protected void composeInsurancePlanInsurancePlanPlanGeneralCostComponent(String name,
InsurancePlan.InsurancePlanPlanGeneralCostComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanInsurancePlanPlanGeneralCostComponentInner(element);
close();
}
}
protected void composeInsurancePlanInsurancePlanPlanGeneralCostComponentInner(
InsurancePlan.InsurancePlanPlanGeneralCostComponent element) throws IOException {
composeBackbone(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 composeInsurancePlanInsurancePlanPlanSpecificCostComponent(String name,
InsurancePlan.InsurancePlanPlanSpecificCostComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanInsurancePlanPlanSpecificCostComponentInner(element);
close();
}
}
protected void composeInsurancePlanInsurancePlanPlanSpecificCostComponentInner(
InsurancePlan.InsurancePlanPlanSpecificCostComponent element) throws IOException {
composeBackbone(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasBenefit()) {
openArray("benefit");
for (InsurancePlan.PlanBenefitComponent e : element.getBenefit())
composeInsurancePlanPlanBenefitComponent(null, e);
closeArray();
}
;
}
protected void composeInsurancePlanPlanBenefitComponent(String name, InsurancePlan.PlanBenefitComponent element)
throws IOException {
if (element != null) {
open(name);
composeInsurancePlanPlanBenefitComponentInner(element);
close();
}
}
protected void composeInsurancePlanPlanBenefitComponentInner(InsurancePlan.PlanBenefitComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCost()) {
openArray("cost");
for (InsurancePlan.PlanBenefitCostComponent e : element.getCost())
composeInsurancePlanPlanBenefitCostComponent(null, e);
closeArray();
}
;
}
protected void composeInsurancePlanPlanBenefitCostComponent(String name,
InsurancePlan.PlanBenefitCostComponent element) throws IOException {
if (element != null) {
open(name);
composeInsurancePlanPlanBenefitCostComponentInner(element);
close();
}
}
protected void composeInsurancePlanPlanBenefitCostComponentInner(InsurancePlan.PlanBenefitCostComponent element)
throws IOException {
composeBackbone(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 composeInvoice(String name, Invoice element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeInvoiceInner(element);
}
}
protected void composeInvoiceInner(Invoice element) throws IOException {
composeDomainResourceElements(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.hasParticipant()) {
openArray("participant");
for (Invoice.InvoiceParticipantComponent e : element.getParticipant())
composeInvoiceInvoiceParticipantComponent(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())
composeInvoiceInvoiceLineItemComponent(null, e);
closeArray();
}
;
if (element.hasTotalPriceComponent()) {
openArray("totalPriceComponent");
for (Invoice.InvoiceLineItemPriceComponentComponent e : element.getTotalPriceComponent())
composeInvoiceInvoiceLineItemPriceComponentComponent(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 composeInvoiceInvoiceParticipantComponent(String name, Invoice.InvoiceParticipantComponent element)
throws IOException {
if (element != null) {
open(name);
composeInvoiceInvoiceParticipantComponentInner(element);
close();
}
}
protected void composeInvoiceInvoiceParticipantComponentInner(Invoice.InvoiceParticipantComponent element)
throws IOException {
composeBackbone(element);
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeInvoiceInvoiceLineItemComponent(String name, Invoice.InvoiceLineItemComponent element)
throws IOException {
if (element != null) {
open(name);
composeInvoiceInvoiceLineItemComponentInner(element);
close();
}
}
protected void composeInvoiceInvoiceLineItemComponentInner(Invoice.InvoiceLineItemComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSequenceElement()) {
composePositiveIntCore("sequence", element.getSequenceElement(), false);
composePositiveIntExtras("sequence", element.getSequenceElement(), false);
}
if (element.hasChargeItem()) {
composeType("chargeItem", element.getChargeItem());
}
if (element.hasPriceComponent()) {
openArray("priceComponent");
for (Invoice.InvoiceLineItemPriceComponentComponent e : element.getPriceComponent())
composeInvoiceInvoiceLineItemPriceComponentComponent(null, e);
closeArray();
}
;
}
protected void composeInvoiceInvoiceLineItemPriceComponentComponent(String name,
Invoice.InvoiceLineItemPriceComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeInvoiceInvoiceLineItemPriceComponentComponentInner(element);
close();
}
}
protected void composeInvoiceInvoiceLineItemPriceComponentComponentInner(
Invoice.InvoiceLineItemPriceComponentComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Invoice.InvoicePriceComponentTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new Invoice.InvoicePriceComponentTypeEnumFactory(),
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 composeLibrary(String name, Library element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeLibraryInner(element);
}
}
protected void composeLibraryInner(Library element) throws IOException {
composeDomainResourceElements(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.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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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);
composeLinkageInner(element);
}
}
protected void composeLinkageInner(Linkage element) throws IOException {
composeDomainResourceElements(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())
composeLinkageLinkageItemComponent(null, e);
closeArray();
}
;
}
protected void composeLinkageLinkageItemComponent(String name, Linkage.LinkageItemComponent element)
throws IOException {
if (element != null) {
open(name);
composeLinkageLinkageItemComponentInner(element);
close();
}
}
protected void composeLinkageLinkageItemComponentInner(Linkage.LinkageItemComponent element) throws IOException {
composeBackbone(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);
composeListResourceInner(element);
}
}
protected void composeListResourceInner(ListResource element) throws IOException {
composeDomainResourceElements(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 ListResource.ListModeEnumFactory(), false);
composeEnumerationExtras("mode", element.getModeElement(), new ListResource.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()) {
composeReference("subject", element.getSubject());
}
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.ListEntryComponent e : element.getEntry())
composeListResourceListEntryComponent(null, e);
closeArray();
}
;
if (element.hasEmptyReason()) {
composeCodeableConcept("emptyReason", element.getEmptyReason());
}
}
protected void composeListResourceListEntryComponent(String name, ListResource.ListEntryComponent element)
throws IOException {
if (element != null) {
open(name);
composeListResourceListEntryComponentInner(element);
close();
}
}
protected void composeListResourceListEntryComponentInner(ListResource.ListEntryComponent element)
throws IOException {
composeBackbone(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);
composeLocationInner(element);
}
}
protected void composeLocationInner(Location element) throws IOException {
composeDomainResourceElements(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()) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("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.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
}
;
if (element.hasAddress()) {
composeAddress("address", element.getAddress());
}
if (element.hasPhysicalType()) {
composeCodeableConcept("physicalType", element.getPhysicalType());
}
if (element.hasPosition()) {
composeLocationLocationPositionComponent("position", element.getPosition());
}
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
if (element.hasHoursOfOperation()) {
openArray("hoursOfOperation");
for (Location.LocationHoursOfOperationComponent e : element.getHoursOfOperation())
composeLocationLocationHoursOfOperationComponent(null, e);
closeArray();
}
;
if (element.hasAvailabilityExceptionsElement()) {
composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false);
composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false);
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
}
;
}
protected void composeLocationLocationPositionComponent(String name, Location.LocationPositionComponent element)
throws IOException {
if (element != null) {
open(name);
composeLocationLocationPositionComponentInner(element);
close();
}
}
protected void composeLocationLocationPositionComponentInner(Location.LocationPositionComponent element)
throws IOException {
composeBackbone(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 composeLocationLocationHoursOfOperationComponent(String name,
Location.LocationHoursOfOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeLocationLocationHoursOfOperationComponentInner(element);
close();
}
}
protected void composeLocationLocationHoursOfOperationComponentInner(
Location.LocationHoursOfOperationComponent element) throws IOException {
composeBackbone(element);
if (element.hasDaysOfWeek()) {
openArray("daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationCore(null, e, new Location.DaysOfWeekEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getDaysOfWeek())) {
openArray("_daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationExtras(null, e, new Location.DaysOfWeekEnumFactory(), true);
closeArray();
}
}
;
if (element.hasAllDayElement()) {
composeBooleanCore("allDay", element.getAllDayElement(), false);
composeBooleanExtras("allDay", element.getAllDayElement(), false);
}
if (element.hasOpeningTimeElement()) {
composeTimeCore("openingTime", element.getOpeningTimeElement(), false);
composeTimeExtras("openingTime", element.getOpeningTimeElement(), false);
}
if (element.hasClosingTimeElement()) {
composeTimeCore("closingTime", element.getClosingTimeElement(), false);
composeTimeExtras("closingTime", element.getClosingTimeElement(), false);
}
}
protected void composeMeasure(String name, Measure element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMeasureInner(element);
}
}
protected void composeMeasureInner(Measure element) throws IOException {
composeDomainResourceElements(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.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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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()) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, true);
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.hasCompositeScoring()) {
composeCodeableConcept("compositeScoring", element.getCompositeScoring());
}
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasRiskAdjustmentElement()) {
composeStringCore("riskAdjustment", element.getRiskAdjustmentElement(), false);
composeStringExtras("riskAdjustment", element.getRiskAdjustmentElement(), false);
}
if (element.hasRateAggregationElement()) {
composeStringCore("rateAggregation", element.getRateAggregationElement(), false);
composeStringExtras("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.hasDefinition()) {
openArray("definition");
for (MarkdownType e : element.getDefinition())
composeMarkdownCore(null, e, true);
closeArray();
if (anyHasExtras(element.getDefinition())) {
openArray("_definition");
for (MarkdownType e : element.getDefinition())
composeMarkdownExtras(null, e, true);
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())
composeMeasureMeasureGroupComponent(null, e);
closeArray();
}
;
if (element.hasSupplementalData()) {
openArray("supplementalData");
for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData())
composeMeasureMeasureSupplementalDataComponent(null, e);
closeArray();
}
;
}
protected void composeMeasureMeasureGroupComponent(String name, Measure.MeasureGroupComponent element)
throws IOException {
if (element != null) {
open(name);
composeMeasureMeasureGroupComponentInner(element);
close();
}
}
protected void composeMeasureMeasureGroupComponentInner(Measure.MeasureGroupComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasPopulation()) {
openArray("population");
for (Measure.MeasureGroupPopulationComponent e : element.getPopulation())
composeMeasureMeasureGroupPopulationComponent(null, e);
closeArray();
}
;
if (element.hasStratifier()) {
openArray("stratifier");
for (Measure.MeasureGroupStratifierComponent e : element.getStratifier())
composeMeasureMeasureGroupStratifierComponent(null, e);
closeArray();
}
;
}
protected void composeMeasureMeasureGroupPopulationComponent(String name,
Measure.MeasureGroupPopulationComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureMeasureGroupPopulationComponentInner(element);
close();
}
}
protected void composeMeasureMeasureGroupPopulationComponentInner(Measure.MeasureGroupPopulationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
}
protected void composeMeasureMeasureGroupStratifierComponent(String name,
Measure.MeasureGroupStratifierComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureMeasureGroupStratifierComponentInner(element);
close();
}
}
protected void composeMeasureMeasureGroupStratifierComponentInner(Measure.MeasureGroupStratifierComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
if (element.hasComponent()) {
openArray("component");
for (Measure.MeasureGroupStratifierComponentComponent e : element.getComponent())
composeMeasureMeasureGroupStratifierComponentComponent(null, e);
closeArray();
}
;
}
protected void composeMeasureMeasureGroupStratifierComponentComponent(String name,
Measure.MeasureGroupStratifierComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureMeasureGroupStratifierComponentComponentInner(element);
close();
}
}
protected void composeMeasureMeasureGroupStratifierComponentComponentInner(
Measure.MeasureGroupStratifierComponentComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasCriteria()) {
composeExpression("criteria", element.getCriteria());
}
}
protected void composeMeasureMeasureSupplementalDataComponent(String name,
Measure.MeasureSupplementalDataComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureMeasureSupplementalDataComponentInner(element);
close();
}
}
protected void composeMeasureMeasureSupplementalDataComponentInner(Measure.MeasureSupplementalDataComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasUsage()) {
openArray("usage");
for (CodeableConcept e : element.getUsage())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("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);
composeMeasureReportInner(element);
}
}
protected void composeMeasureReportInner(MeasureReport element) throws IOException {
composeDomainResourceElements(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.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.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasImprovementNotation()) {
composeCodeableConcept("improvementNotation", element.getImprovementNotation());
}
if (element.hasGroup()) {
openArray("group");
for (MeasureReport.MeasureReportGroupComponent e : element.getGroup())
composeMeasureReportMeasureReportGroupComponent(null, e);
closeArray();
}
;
if (element.hasEvaluatedResource()) {
openArray("evaluatedResource");
for (Reference e : element.getEvaluatedResource())
composeReference(null, e);
closeArray();
}
;
}
protected void composeMeasureReportMeasureReportGroupComponent(String name,
MeasureReport.MeasureReportGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportMeasureReportGroupComponentInner(element);
close();
}
}
protected void composeMeasureReportMeasureReportGroupComponentInner(MeasureReport.MeasureReportGroupComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasPopulation()) {
openArray("population");
for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation())
composeMeasureReportMeasureReportGroupPopulationComponent(null, e);
closeArray();
}
;
if (element.hasMeasureScore()) {
composeQuantity("measureScore", element.getMeasureScore());
}
if (element.hasStratifier()) {
openArray("stratifier");
for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier())
composeMeasureReportMeasureReportGroupStratifierComponent(null, e);
closeArray();
}
;
}
protected void composeMeasureReportMeasureReportGroupPopulationComponent(String name,
MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportMeasureReportGroupPopulationComponentInner(element);
close();
}
}
protected void composeMeasureReportMeasureReportGroupPopulationComponentInner(
MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException {
composeBackbone(element);
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());
}
}
protected void composeMeasureReportMeasureReportGroupStratifierComponent(String name,
MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportMeasureReportGroupStratifierComponentInner(element);
close();
}
}
protected void composeMeasureReportMeasureReportGroupStratifierComponentInner(
MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasStratum()) {
openArray("stratum");
for (MeasureReport.StratifierGroupComponent e : element.getStratum())
composeMeasureReportStratifierGroupComponent(null, e);
closeArray();
}
;
}
protected void composeMeasureReportStratifierGroupComponent(String name,
MeasureReport.StratifierGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportStratifierGroupComponentInner(element);
close();
}
}
protected void composeMeasureReportStratifierGroupComponentInner(MeasureReport.StratifierGroupComponent element)
throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeCodeableConcept("value", element.getValue());
}
if (element.hasComponent()) {
openArray("component");
for (MeasureReport.StratifierGroupComponentComponent e : element.getComponent())
composeMeasureReportStratifierGroupComponentComponent(null, e);
closeArray();
}
;
if (element.hasPopulation()) {
openArray("population");
for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation())
composeMeasureReportStratifierGroupPopulationComponent(null, e);
closeArray();
}
;
if (element.hasMeasureScore()) {
composeQuantity("measureScore", element.getMeasureScore());
}
}
protected void composeMeasureReportStratifierGroupComponentComponent(String name,
MeasureReport.StratifierGroupComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportStratifierGroupComponentComponentInner(element);
close();
}
}
protected void composeMeasureReportStratifierGroupComponentComponentInner(
MeasureReport.StratifierGroupComponentComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasValue()) {
composeCodeableConcept("value", element.getValue());
}
}
protected void composeMeasureReportStratifierGroupPopulationComponent(String name,
MeasureReport.StratifierGroupPopulationComponent element) throws IOException {
if (element != null) {
open(name);
composeMeasureReportStratifierGroupPopulationComponentInner(element);
close();
}
}
protected void composeMeasureReportStratifierGroupPopulationComponentInner(
MeasureReport.StratifierGroupPopulationComponent element) throws IOException {
composeBackbone(element);
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());
}
}
protected void composeMedia(String name, Media element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMediaInner(element);
}
}
protected void composeMediaInner(Media element) throws IOException {
composeDomainResourceElements(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 Media.MediaStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Media.MediaStatusEnumFactory(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasModality()) {
composeCodeableConcept("modality", element.getModality());
}
if (element.hasView()) {
composeCodeableConcept("view", element.getView());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasCreated()) {
composeType("created", element.getCreated());
}
if (element.hasIssuedElement()) {
composeInstantCore("issued", element.getIssuedElement(), false);
composeInstantExtras("issued", element.getIssuedElement(), false);
}
if (element.hasOperator()) {
composeReference("operator", element.getOperator());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasDeviceNameElement()) {
composeStringCore("deviceName", element.getDeviceNameElement(), false);
composeStringExtras("deviceName", element.getDeviceNameElement(), false);
}
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
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.hasContent()) {
composeAttachment("content", element.getContent());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeMedication(String name, Medication element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationInner(element);
}
}
protected void composeMedicationInner(Medication element) throws IOException {
composeDomainResourceElements(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.MedicationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory(),
false);
}
if (element.hasManufacturer()) {
composeReference("manufacturer", element.getManufacturer());
}
if (element.hasForm()) {
composeCodeableConcept("form", element.getForm());
}
if (element.hasAmount()) {
composeRatio("amount", element.getAmount());
}
if (element.hasIngredient()) {
openArray("ingredient");
for (Medication.MedicationIngredientComponent e : element.getIngredient())
composeMedicationMedicationIngredientComponent(null, e);
closeArray();
}
;
if (element.hasBatch()) {
composeMedicationMedicationBatchComponent("batch", element.getBatch());
}
}
protected void composeMedicationMedicationIngredientComponent(String name,
Medication.MedicationIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationMedicationIngredientComponentInner(element);
close();
}
}
protected void composeMedicationMedicationIngredientComponentInner(Medication.MedicationIngredientComponent element)
throws IOException {
composeBackbone(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
if (element.hasIsActiveElement()) {
composeBooleanCore("isActive", element.getIsActiveElement(), false);
composeBooleanExtras("isActive", element.getIsActiveElement(), false);
}
if (element.hasStrength()) {
composeRatio("strength", element.getStrength());
}
}
protected void composeMedicationMedicationBatchComponent(String name, Medication.MedicationBatchComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicationMedicationBatchComponentInner(element);
close();
}
}
protected void composeMedicationMedicationBatchComponentInner(Medication.MedicationBatchComponent element)
throws IOException {
composeBackbone(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);
composeMedicationAdministrationInner(element);
}
}
protected void composeMedicationAdministrationInner(MedicationAdministration element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiates()) {
openArray("instantiates");
for (UriType e : element.getInstantiates())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiates())) {
openArray("_instantiates");
for (UriType e : element.getInstantiates())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPartOf()) {
openArray("partOf");
for (Reference e : element.getPartOf())
composeReference(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new MedicationAdministration.MedicationAdministrationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new MedicationAdministration.MedicationAdministrationStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
openArray("statusReason");
for (CodeableConcept e : element.getStatusReason())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasMedication()) {
composeType("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasContext()) {
composeReference("context", element.getContext());
}
if (element.hasSupportingInformation()) {
openArray("supportingInformation");
for (Reference e : element.getSupportingInformation())
composeReference(null, e);
closeArray();
}
;
if (element.hasEffective()) {
composeType("effective", element.getEffective());
}
if (element.hasPerformer()) {
openArray("performer");
for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer())
composeMedicationAdministrationMedicationAdministrationPerformerComponent(null, e);
closeArray();
}
;
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
if (element.hasDevice()) {
openArray("device");
for (Reference e : element.getDevice())
composeReference(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasDosage()) {
composeMedicationAdministrationMedicationAdministrationDosageComponent("dosage", element.getDosage());
}
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
}
;
}
protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(String name,
MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationAdministrationMedicationAdministrationPerformerComponentInner(element);
close();
}
}
protected void composeMedicationAdministrationMedicationAdministrationPerformerComponentInner(
MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException {
composeBackbone(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(String name,
MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationAdministrationMedicationAdministrationDosageComponentInner(element);
close();
}
}
protected void composeMedicationAdministrationMedicationAdministrationDosageComponentInner(
MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException {
composeBackbone(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);
composeMedicationDispenseInner(element);
}
}
protected void composeMedicationDispenseInner(MedicationDispense element) throws IOException {
composeDomainResourceElements(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 MedicationDispense.MedicationDispenseStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new MedicationDispense.MedicationDispenseStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeType("statusReason", element.getStatusReason());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasMedication()) {
composeType("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasContext()) {
composeReference("context", element.getContext());
}
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())
composeMedicationDispenseMedicationDispensePerformerComponent(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.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.hasDosageInstruction()) {
openArray("dosageInstruction");
for (Dosage e : element.getDosageInstruction())
composeDosage(null, e);
closeArray();
}
;
if (element.hasSubstitution()) {
composeMedicationDispenseMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution());
}
if (element.hasDetectedIssue()) {
openArray("detectedIssue");
for (Reference e : element.getDetectedIssue())
composeReference(null, e);
closeArray();
}
;
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
}
;
}
protected void composeMedicationDispenseMedicationDispensePerformerComponent(String name,
MedicationDispense.MedicationDispensePerformerComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationDispenseMedicationDispensePerformerComponentInner(element);
close();
}
}
protected void composeMedicationDispenseMedicationDispensePerformerComponentInner(
MedicationDispense.MedicationDispensePerformerComponent element) throws IOException {
composeBackbone(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
}
protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(String name,
MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationDispenseMedicationDispenseSubstitutionComponentInner(element);
close();
}
}
protected void composeMedicationDispenseMedicationDispenseSubstitutionComponentInner(
MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException {
composeBackbone(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()) {
openArray("responsibleParty");
for (Reference e : element.getResponsibleParty())
composeReference(null, e);
closeArray();
}
;
}
protected void composeMedicationKnowledge(String name, MedicationKnowledge element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationKnowledgeInner(element);
}
}
protected void composeMedicationKnowledgeInner(MedicationKnowledge element) throws IOException {
composeDomainResourceElements(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new MedicationKnowledge.MedicationKnowledgeStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new MedicationKnowledge.MedicationKnowledgeStatusEnumFactory(), false);
}
if (element.hasManufacturer()) {
composeReference("manufacturer", element.getManufacturer());
}
if (element.hasDoseForm()) {
composeCodeableConcept("doseForm", element.getDoseForm());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
if (element.hasSynonym()) {
openArray("synonym");
for (StringType e : element.getSynonym())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSynonym())) {
openArray("_synonym");
for (StringType e : element.getSynonym())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasRelatedMedicationKnowledge()) {
openArray("relatedMedicationKnowledge");
for (MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent e : element
.getRelatedMedicationKnowledge())
composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent(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())
composeMedicationKnowledgeMedicationKnowledgeMonographComponent(null, e);
closeArray();
}
;
if (element.hasIngredient()) {
openArray("ingredient");
for (MedicationKnowledge.MedicationKnowledgeIngredientComponent e : element.getIngredient())
composeMedicationKnowledgeMedicationKnowledgeIngredientComponent(null, e);
closeArray();
}
;
if (element.hasPreparationInstructionElement()) {
composeMarkdownCore("preparationInstruction", element.getPreparationInstructionElement(), false);
composeMarkdownExtras("preparationInstruction", element.getPreparationInstructionElement(), false);
}
if (element.hasIntendedRoute()) {
openArray("intendedRoute");
for (CodeableConcept e : element.getIntendedRoute())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasCost()) {
openArray("cost");
for (MedicationKnowledge.MedicationKnowledgeCostComponent e : element.getCost())
composeMedicationKnowledgeMedicationKnowledgeCostComponent(null, e);
closeArray();
}
;
if (element.hasMonitoringProgram()) {
openArray("monitoringProgram");
for (MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent e : element.getMonitoringProgram())
composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent(null, e);
closeArray();
}
;
if (element.hasAdministrationGuidelines()) {
openArray("administrationGuidelines");
for (MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent e : element
.getAdministrationGuidelines())
composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent(null, e);
closeArray();
}
;
if (element.hasMedicineClassification()) {
openArray("medicineClassification");
for (MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent e : element
.getMedicineClassification())
composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent(null, e);
closeArray();
}
;
if (element.hasPackaging()) {
composeMedicationKnowledgeMedicationKnowledgePackagingComponent("packaging", element.getPackaging());
}
if (element.hasDrugCharacteristic()) {
openArray("drugCharacteristic");
for (MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent e : element.getDrugCharacteristic())
composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent(null, e);
closeArray();
}
;
if (element.hasContraindication()) {
openArray("contraindication");
for (Reference e : element.getContraindication())
composeReference(null, e);
closeArray();
}
;
if (element.hasRegulatory()) {
openArray("regulatory");
for (MedicationKnowledge.MedicationKnowledgeRegulatoryComponent e : element.getRegulatory())
composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponent(null, e);
closeArray();
}
;
if (element.hasKinetics()) {
openArray("kinetics");
for (MedicationKnowledge.MedicationKnowledgeKineticsComponent e : element.getKinetics())
composeMedicationKnowledgeMedicationKnowledgeKineticsComponent(null, e);
closeArray();
}
;
}
protected void composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent(String name,
MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentInner(
MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasReference()) {
openArray("reference");
for (Reference e : element.getReference())
composeReference(null, e);
closeArray();
}
;
}
protected void composeMedicationKnowledgeMedicationKnowledgeMonographComponent(String name,
MedicationKnowledge.MedicationKnowledgeMonographComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeMonographComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeMonographComponentInner(
MedicationKnowledge.MedicationKnowledgeMonographComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSource()) {
composeReference("source", element.getSource());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeIngredientComponent(String name,
MedicationKnowledge.MedicationKnowledgeIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeIngredientComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeIngredientComponentInner(
MedicationKnowledge.MedicationKnowledgeIngredientComponent element) throws IOException {
composeBackbone(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
if (element.hasIsActiveElement()) {
composeBooleanCore("isActive", element.getIsActiveElement(), false);
composeBooleanExtras("isActive", element.getIsActiveElement(), false);
}
if (element.hasStrength()) {
composeRatio("strength", element.getStrength());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeCostComponent(String name,
MedicationKnowledge.MedicationKnowledgeCostComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeCostComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeCostComponentInner(
MedicationKnowledge.MedicationKnowledgeCostComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasSourceElement()) {
composeStringCore("source", element.getSourceElement(), false);
composeStringExtras("source", element.getSourceElement(), false);
}
if (element.hasCost()) {
composeMoney("cost", element.getCost());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent(String name,
MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentInner(
MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent(String name,
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentInner(
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent element) throws IOException {
composeBackbone(element);
if (element.hasDosage()) {
openArray("dosage");
for (MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent e : element.getDosage())
composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent(null, e);
closeArray();
}
;
if (element.hasIndication()) {
composeType("indication", element.getIndication());
}
if (element.hasPatientCharacteristics()) {
openArray("patientCharacteristics");
for (MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent e : element
.getPatientCharacteristics())
composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(null, e);
closeArray();
}
;
}
protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent(String name,
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentInner(
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDosage()) {
openArray("dosage");
for (Dosage e : element.getDosage())
composeDosage(null, e);
closeArray();
}
;
}
protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(
String name,
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentInner(
element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentInner(
MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCharacteristic()) {
composeType("characteristic", element.getCharacteristic());
}
if (element.hasValue()) {
openArray("value");
for (StringType e : element.getValue())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getValue())) {
openArray("_value");
for (StringType e : element.getValue())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent(String name,
MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentInner(
MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasClassification()) {
openArray("classification");
for (CodeableConcept e : element.getClassification())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeMedicationKnowledgeMedicationKnowledgePackagingComponent(String name,
MedicationKnowledge.MedicationKnowledgePackagingComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgePackagingComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgePackagingComponentInner(
MedicationKnowledge.MedicationKnowledgePackagingComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent(String name,
MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentInner(
MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponent(String name,
MedicationKnowledge.MedicationKnowledgeRegulatoryComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponentInner(
MedicationKnowledge.MedicationKnowledgeRegulatoryComponent element) throws IOException {
composeBackbone(element);
if (element.hasRegulatoryAuthority()) {
composeReference("regulatoryAuthority", element.getRegulatoryAuthority());
}
if (element.hasSubstitution()) {
openArray("substitution");
for (MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent e : element.getSubstitution())
composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent(null, e);
closeArray();
}
;
if (element.hasSchedule()) {
openArray("schedule");
for (MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent e : element.getSchedule())
composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent(null, e);
closeArray();
}
;
if (element.hasMaxDispense()) {
composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent("maxDispense",
element.getMaxDispense());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent(String name,
MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentInner(
MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAllowedElement()) {
composeBooleanCore("allowed", element.getAllowedElement(), false);
composeBooleanExtras("allowed", element.getAllowedElement(), false);
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent(String name,
MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentInner(
MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent element) throws IOException {
composeBackbone(element);
if (element.hasSchedule()) {
composeCodeableConcept("schedule", element.getSchedule());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent(String name,
MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentInner(
MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent element) throws IOException {
composeBackbone(element);
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasPeriod()) {
composeDuration("period", element.getPeriod());
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeKineticsComponent(String name,
MedicationKnowledge.MedicationKnowledgeKineticsComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationKnowledgeMedicationKnowledgeKineticsComponentInner(element);
close();
}
}
protected void composeMedicationKnowledgeMedicationKnowledgeKineticsComponentInner(
MedicationKnowledge.MedicationKnowledgeKineticsComponent element) throws IOException {
composeBackbone(element);
if (element.hasAreaUnderCurve()) {
openArray("areaUnderCurve");
for (Quantity e : element.getAreaUnderCurve())
composeQuantity(null, e);
closeArray();
}
;
if (element.hasLethalDose50()) {
openArray("lethalDose50");
for (Quantity e : element.getLethalDose50())
composeQuantity(null, e);
closeArray();
}
;
if (element.hasHalfLifePeriod()) {
composeDuration("halfLifePeriod", element.getHalfLifePeriod());
}
}
protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicationRequestInner(element);
}
}
protected void composeMedicationRequestInner(MedicationRequest element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
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.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 MedicationRequest.MedicationRequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(),
new MedicationRequest.MedicationRequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasReported()) {
composeType("reported", element.getReported());
}
if (element.hasMedication()) {
composeType("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.hasAuthoredOnElement()) {
composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false);
composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false);
}
if (element.hasRequester()) {
composeReference("requester", element.getRequester());
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasPerformerType()) {
composeCodeableConcept("performerType", element.getPerformerType());
}
if (element.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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.hasGroupIdentifier()) {
composeIdentifier("groupIdentifier", element.getGroupIdentifier());
}
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.hasDosageInstruction()) {
openArray("dosageInstruction");
for (Dosage e : element.getDosageInstruction())
composeDosage(null, e);
closeArray();
}
;
if (element.hasDispenseRequest()) {
composeMedicationRequestMedicationRequestDispenseRequestComponent("dispenseRequest",
element.getDispenseRequest());
}
if (element.hasSubstitution()) {
composeMedicationRequestMedicationRequestSubstitutionComponent("substitution", element.getSubstitution());
}
if (element.hasPriorPrescription()) {
composeReference("priorPrescription", element.getPriorPrescription());
}
if (element.hasDetectedIssue()) {
openArray("detectedIssue");
for (Reference e : element.getDetectedIssue())
composeReference(null, e);
closeArray();
}
;
if (element.hasEventHistory()) {
openArray("eventHistory");
for (Reference e : element.getEventHistory())
composeReference(null, e);
closeArray();
}
;
}
protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(String name,
MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationRequestMedicationRequestDispenseRequestComponentInner(element);
close();
}
}
protected void composeMedicationRequestMedicationRequestDispenseRequestComponentInner(
MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException {
composeBackbone(element);
if (element.hasInitialFill()) {
composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponent("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.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
}
protected void composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponent(String name,
MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponentInner(element);
close();
}
}
protected void composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponentInner(
MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent element) throws IOException {
composeBackbone(element);
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasDuration()) {
composeDuration("duration", element.getDuration());
}
}
protected void composeMedicationRequestMedicationRequestSubstitutionComponent(String name,
MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicationRequestMedicationRequestSubstitutionComponentInner(element);
close();
}
}
protected void composeMedicationRequestMedicationRequestSubstitutionComponentInner(
MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException {
composeBackbone(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);
composeMedicationStatementInner(element);
}
}
protected void composeMedicationStatementInner(MedicationStatement element) throws IOException {
composeDomainResourceElements(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 MedicationStatement.MedicationStatementStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new MedicationStatement.MedicationStatementStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
openArray("statusReason");
for (CodeableConcept e : element.getStatusReason())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasMedication()) {
composeType("medication", element.getMedication());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasContext()) {
composeReference("context", element.getContext());
}
if (element.hasEffective()) {
composeType("effective", element.getEffective());
}
if (element.hasDateAssertedElement()) {
composeDateTimeCore("dateAsserted", element.getDateAssertedElement(), false);
composeDateTimeExtras("dateAsserted", element.getDateAssertedElement(), false);
}
if (element.hasInformationSource()) {
composeReference("informationSource", element.getInformationSource());
}
if (element.hasDerivedFrom()) {
openArray("derivedFrom");
for (Reference e : element.getDerivedFrom())
composeReference(null, e);
closeArray();
}
;
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasDosage()) {
openArray("dosage");
for (Dosage e : element.getDosage())
composeDosage(null, e);
closeArray();
}
;
}
protected void composeMedicinalProduct(String name, MedicinalProduct element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductInner(element);
}
}
protected void composeMedicinalProductInner(MedicinalProduct element) throws IOException {
composeDomainResourceElements(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()) {
composeCoding("domain", element.getDomain());
}
if (element.hasCombinedPharmaceuticalDoseForm()) {
composeCodeableConcept("combinedPharmaceuticalDoseForm", element.getCombinedPharmaceuticalDoseForm());
}
if (element.hasLegalStatusOfSupply()) {
composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply());
}
if (element.hasAdditionalMonitoringIndicator()) {
composeCodeableConcept("additionalMonitoringIndicator", element.getAdditionalMonitoringIndicator());
}
if (element.hasSpecialMeasures()) {
openArray("specialMeasures");
for (StringType e : element.getSpecialMeasures())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSpecialMeasures())) {
openArray("_specialMeasures");
for (StringType e : element.getSpecialMeasures())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPaediatricUseIndicator()) {
composeCodeableConcept("paediatricUseIndicator", element.getPaediatricUseIndicator());
}
if (element.hasProductClassification()) {
openArray("productClassification");
for (CodeableConcept e : element.getProductClassification())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasMarketingStatus()) {
openArray("marketingStatus");
for (MarketingStatus e : element.getMarketingStatus())
composeMarketingStatus(null, e);
closeArray();
}
;
if (element.hasPharmaceuticalProduct()) {
openArray("pharmaceuticalProduct");
for (Reference e : element.getPharmaceuticalProduct())
composeReference(null, e);
closeArray();
}
;
if (element.hasPackagedMedicinalProduct()) {
openArray("packagedMedicinalProduct");
for (Reference e : element.getPackagedMedicinalProduct())
composeReference(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 (Reference e : element.getContact())
composeReference(null, e);
closeArray();
}
;
if (element.hasClinicalTrial()) {
openArray("clinicalTrial");
for (Reference e : element.getClinicalTrial())
composeReference(null, e);
closeArray();
}
;
if (element.hasName()) {
openArray("name");
for (MedicinalProduct.MedicinalProductNameComponent e : element.getName())
composeMedicinalProductMedicinalProductNameComponent(null, e);
closeArray();
}
;
if (element.hasCrossReference()) {
openArray("crossReference");
for (Identifier e : element.getCrossReference())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasManufacturingBusinessOperation()) {
openArray("manufacturingBusinessOperation");
for (MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent e : element
.getManufacturingBusinessOperation())
composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponent(null, e);
closeArray();
}
;
if (element.hasSpecialDesignation()) {
openArray("specialDesignation");
for (MedicinalProduct.MedicinalProductSpecialDesignationComponent e : element.getSpecialDesignation())
composeMedicinalProductMedicinalProductSpecialDesignationComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductMedicinalProductNameComponent(String name,
MedicinalProduct.MedicinalProductNameComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductMedicinalProductNameComponentInner(element);
close();
}
}
protected void composeMedicinalProductMedicinalProductNameComponentInner(
MedicinalProduct.MedicinalProductNameComponent element) throws IOException {
composeBackbone(element);
if (element.hasProductNameElement()) {
composeStringCore("productName", element.getProductNameElement(), false);
composeStringExtras("productName", element.getProductNameElement(), false);
}
if (element.hasNamePart()) {
openArray("namePart");
for (MedicinalProduct.MedicinalProductNameNamePartComponent e : element.getNamePart())
composeMedicinalProductMedicinalProductNameNamePartComponent(null, e);
closeArray();
}
;
if (element.hasCountryLanguage()) {
openArray("countryLanguage");
for (MedicinalProduct.MedicinalProductNameCountryLanguageComponent e : element.getCountryLanguage())
composeMedicinalProductMedicinalProductNameCountryLanguageComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductMedicinalProductNameNamePartComponent(String name,
MedicinalProduct.MedicinalProductNameNamePartComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductMedicinalProductNameNamePartComponentInner(element);
close();
}
}
protected void composeMedicinalProductMedicinalProductNameNamePartComponentInner(
MedicinalProduct.MedicinalProductNameNamePartComponent element) throws IOException {
composeBackbone(element);
if (element.hasPartElement()) {
composeStringCore("part", element.getPartElement(), false);
composeStringExtras("part", element.getPartElement(), false);
}
if (element.hasType()) {
composeCoding("type", element.getType());
}
}
protected void composeMedicinalProductMedicinalProductNameCountryLanguageComponent(String name,
MedicinalProduct.MedicinalProductNameCountryLanguageComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductMedicinalProductNameCountryLanguageComponentInner(element);
close();
}
}
protected void composeMedicinalProductMedicinalProductNameCountryLanguageComponentInner(
MedicinalProduct.MedicinalProductNameCountryLanguageComponent element) throws IOException {
composeBackbone(element);
if (element.hasCountry()) {
composeCodeableConcept("country", element.getCountry());
}
if (element.hasJurisdiction()) {
composeCodeableConcept("jurisdiction", element.getJurisdiction());
}
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
}
protected void composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponent(String name,
MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponentInner(element);
close();
}
}
protected void composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponentInner(
MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent element) throws IOException {
composeBackbone(element);
if (element.hasOperationType()) {
composeCodeableConcept("operationType", element.getOperationType());
}
if (element.hasAuthorisationReferenceNumber()) {
composeIdentifier("authorisationReferenceNumber", element.getAuthorisationReferenceNumber());
}
if (element.hasEffectiveDateElement()) {
composeDateTimeCore("effectiveDate", element.getEffectiveDateElement(), false);
composeDateTimeExtras("effectiveDate", element.getEffectiveDateElement(), false);
}
if (element.hasConfidentialityIndicator()) {
composeCodeableConcept("confidentialityIndicator", element.getConfidentialityIndicator());
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
}
;
if (element.hasRegulator()) {
composeReference("regulator", element.getRegulator());
}
}
protected void composeMedicinalProductMedicinalProductSpecialDesignationComponent(String name,
MedicinalProduct.MedicinalProductSpecialDesignationComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductMedicinalProductSpecialDesignationComponentInner(element);
close();
}
}
protected void composeMedicinalProductMedicinalProductSpecialDesignationComponentInner(
MedicinalProduct.MedicinalProductSpecialDesignationComponent element) throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasIntendedUse()) {
composeCodeableConcept("intendedUse", element.getIntendedUse());
}
if (element.hasIndication()) {
composeType("indication", element.getIndication());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasDateElement()) {
composeDateTimeCore("date", element.getDateElement(), false);
composeDateTimeExtras("date", element.getDateElement(), false);
}
if (element.hasSpecies()) {
composeCodeableConcept("species", element.getSpecies());
}
}
protected void composeMedicinalProductAuthorization(String name, MedicinalProductAuthorization element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductAuthorizationInner(element);
}
}
protected void composeMedicinalProductAuthorizationInner(MedicinalProductAuthorization element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasCountry()) {
openArray("country");
for (CodeableConcept e : element.getCountry())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
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.hasRestoreDateElement()) {
composeDateTimeCore("restoreDate", element.getRestoreDateElement(), false);
composeDateTimeExtras("restoreDate", element.getRestoreDateElement(), false);
}
if (element.hasValidityPeriod()) {
composePeriod("validityPeriod", element.getValidityPeriod());
}
if (element.hasDataExclusivityPeriod()) {
composePeriod("dataExclusivityPeriod", element.getDataExclusivityPeriod());
}
if (element.hasDateOfFirstAuthorizationElement()) {
composeDateTimeCore("dateOfFirstAuthorization", element.getDateOfFirstAuthorizationElement(), false);
composeDateTimeExtras("dateOfFirstAuthorization", element.getDateOfFirstAuthorizationElement(), false);
}
if (element.hasInternationalBirthDateElement()) {
composeDateTimeCore("internationalBirthDate", element.getInternationalBirthDateElement(), false);
composeDateTimeExtras("internationalBirthDate", element.getInternationalBirthDateElement(), false);
}
if (element.hasLegalBasis()) {
composeCodeableConcept("legalBasis", element.getLegalBasis());
}
if (element.hasJurisdictionalAuthorization()) {
openArray("jurisdictionalAuthorization");
for (MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent e : element
.getJurisdictionalAuthorization())
composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(null, e);
closeArray();
}
;
if (element.hasHolder()) {
composeReference("holder", element.getHolder());
}
if (element.hasRegulator()) {
composeReference("regulator", element.getRegulator());
}
if (element.hasProcedure()) {
composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent("procedure",
element.getProcedure());
}
}
protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(
String name,
MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentInner(
element);
close();
}
}
protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentInner(
MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasCountry()) {
composeCodeableConcept("country", element.getCountry());
}
if (element.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasLegalStatusOfSupply()) {
composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply());
}
if (element.hasValidityPeriod()) {
composePeriod("validityPeriod", element.getValidityPeriod());
}
}
protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(String name,
MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentInner(element);
close();
}
}
protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentInner(
MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent element) throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDate()) {
composeType("date", element.getDate());
}
if (element.hasApplication()) {
openArray("application");
for (MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent e : element.getApplication())
composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductContraindication(String name, MedicinalProductContraindication element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductContraindicationInner(element);
}
}
protected void composeMedicinalProductContraindicationInner(MedicinalProductContraindication element)
throws IOException {
composeDomainResourceElements(element);
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
}
;
if (element.hasDisease()) {
composeCodeableConcept("disease", element.getDisease());
}
if (element.hasDiseaseStatus()) {
composeCodeableConcept("diseaseStatus", element.getDiseaseStatus());
}
if (element.hasComorbidity()) {
openArray("comorbidity");
for (CodeableConcept e : element.getComorbidity())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasTherapeuticIndication()) {
openArray("therapeuticIndication");
for (Reference e : element.getTherapeuticIndication())
composeReference(null, e);
closeArray();
}
;
if (element.hasOtherTherapy()) {
openArray("otherTherapy");
for (MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent e : element
.getOtherTherapy())
composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent(null, e);
closeArray();
}
;
if (element.hasPopulation()) {
openArray("population");
for (Population e : element.getPopulation())
composePopulation(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent(
String name, MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentInner(element);
close();
}
}
protected void composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentInner(
MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent element)
throws IOException {
composeBackbone(element);
if (element.hasTherapyRelationshipType()) {
composeCodeableConcept("therapyRelationshipType", element.getTherapyRelationshipType());
}
if (element.hasMedication()) {
composeType("medication", element.getMedication());
}
}
protected void composeMedicinalProductIndication(String name, MedicinalProductIndication element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductIndicationInner(element);
}
}
protected void composeMedicinalProductIndicationInner(MedicinalProductIndication element) throws IOException {
composeDomainResourceElements(element);
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
}
;
if (element.hasDiseaseSymptomProcedure()) {
composeCodeableConcept("diseaseSymptomProcedure", element.getDiseaseSymptomProcedure());
}
if (element.hasDiseaseStatus()) {
composeCodeableConcept("diseaseStatus", element.getDiseaseStatus());
}
if (element.hasComorbidity()) {
openArray("comorbidity");
for (CodeableConcept e : element.getComorbidity())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasIntendedEffect()) {
composeCodeableConcept("intendedEffect", element.getIntendedEffect());
}
if (element.hasDuration()) {
composeQuantity("duration", element.getDuration());
}
if (element.hasOtherTherapy()) {
openArray("otherTherapy");
for (MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent e : element.getOtherTherapy())
composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent(null, e);
closeArray();
}
;
if (element.hasUndesirableEffect()) {
openArray("undesirableEffect");
for (Reference e : element.getUndesirableEffect())
composeReference(null, e);
closeArray();
}
;
if (element.hasPopulation()) {
openArray("population");
for (Population e : element.getPopulation())
composePopulation(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent(String name,
MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentInner(element);
close();
}
}
protected void composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentInner(
MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent element) throws IOException {
composeBackbone(element);
if (element.hasTherapyRelationshipType()) {
composeCodeableConcept("therapyRelationshipType", element.getTherapyRelationshipType());
}
if (element.hasMedication()) {
composeType("medication", element.getMedication());
}
}
protected void composeMedicinalProductIngredient(String name, MedicinalProductIngredient element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductIngredientInner(element);
}
}
protected void composeMedicinalProductIngredientInner(MedicinalProductIngredient element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
if (element.hasAllergenicIndicatorElement()) {
composeBooleanCore("allergenicIndicator", element.getAllergenicIndicatorElement(), false);
composeBooleanExtras("allergenicIndicator", element.getAllergenicIndicatorElement(), false);
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
}
;
if (element.hasSpecifiedSubstance()) {
openArray("specifiedSubstance");
for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent e : element
.getSpecifiedSubstance())
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent(null, e);
closeArray();
}
;
if (element.hasSubstance()) {
composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent("substance",
element.getSubstance());
}
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent(String name,
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentInner(element);
close();
}
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentInner(
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasGroup()) {
composeCodeableConcept("group", element.getGroup());
}
if (element.hasConfidentiality()) {
composeCodeableConcept("confidentiality", element.getConfidentiality());
}
if (element.hasStrength()) {
openArray("strength");
for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent e : element
.getStrength())
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(
String name, MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentInner(element);
close();
}
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentInner(
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent element)
throws IOException {
composeBackbone(element);
if (element.hasPresentation()) {
composeRatio("presentation", element.getPresentation());
}
if (element.hasPresentationLowLimit()) {
composeRatio("presentationLowLimit", element.getPresentationLowLimit());
}
if (element.hasConcentration()) {
composeRatio("concentration", element.getConcentration());
}
if (element.hasConcentrationLowLimit()) {
composeRatio("concentrationLowLimit", element.getConcentrationLowLimit());
}
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 (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent e : element
.getReferenceStrength())
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(
null, e);
closeArray();
}
;
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(
String name,
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentInner(
element);
close();
}
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentInner(
MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent element)
throws IOException {
composeBackbone(element);
if (element.hasSubstance()) {
composeCodeableConcept("substance", element.getSubstance());
}
if (element.hasStrength()) {
composeRatio("strength", element.getStrength());
}
if (element.hasStrengthLowLimit()) {
composeRatio("strengthLowLimit", element.getStrengthLowLimit());
}
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 composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent(String name,
MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentInner(element);
close();
}
}
protected void composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentInner(
MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent element) throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStrength()) {
openArray("strength");
for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent e : element
.getStrength())
composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductInteraction(String name, MedicinalProductInteraction element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductInteractionInner(element);
}
}
protected void composeMedicinalProductInteractionInner(MedicinalProductInteraction element) throws IOException {
composeDomainResourceElements(element);
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasInteractant()) {
openArray("interactant");
for (MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent e : element.getInteractant())
composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponent(null, e);
closeArray();
}
;
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasEffect()) {
composeCodeableConcept("effect", element.getEffect());
}
if (element.hasIncidence()) {
composeCodeableConcept("incidence", element.getIncidence());
}
if (element.hasManagement()) {
composeCodeableConcept("management", element.getManagement());
}
}
protected void composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponent(String name,
MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponentInner(element);
close();
}
}
protected void composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponentInner(
MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent element) throws IOException {
composeBackbone(element);
if (element.hasItem()) {
composeType("item", element.getItem());
}
}
protected void composeMedicinalProductManufactured(String name, MedicinalProductManufactured element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductManufacturedInner(element);
}
}
protected void composeMedicinalProductManufacturedInner(MedicinalProductManufactured element) throws IOException {
composeDomainResourceElements(element);
if (element.hasManufacturedDoseForm()) {
composeCodeableConcept("manufacturedDoseForm", element.getManufacturedDoseForm());
}
if (element.hasUnitOfPresentation()) {
composeCodeableConcept("unitOfPresentation", element.getUnitOfPresentation());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
}
;
if (element.hasIngredient()) {
openArray("ingredient");
for (Reference e : element.getIngredient())
composeReference(null, e);
closeArray();
}
;
if (element.hasPhysicalCharacteristics()) {
composeProdCharacteristic("physicalCharacteristics", element.getPhysicalCharacteristics());
}
if (element.hasOtherCharacteristics()) {
openArray("otherCharacteristics");
for (CodeableConcept e : element.getOtherCharacteristics())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductPackaged(String name, MedicinalProductPackaged element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductPackagedInner(element);
}
}
protected void composeMedicinalProductPackagedInner(MedicinalProductPackaged element) throws IOException {
composeDomainResourceElements(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.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasLegalStatusOfSupply()) {
composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply());
}
if (element.hasMarketingStatus()) {
openArray("marketingStatus");
for (MarketingStatus e : element.getMarketingStatus())
composeMarketingStatus(null, e);
closeArray();
}
;
if (element.hasMarketingAuthorization()) {
composeReference("marketingAuthorization", element.getMarketingAuthorization());
}
if (element.hasManufacturer()) {
openArray("manufacturer");
for (Reference e : element.getManufacturer())
composeReference(null, e);
closeArray();
}
;
if (element.hasBatchIdentifier()) {
openArray("batchIdentifier");
for (MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent e : element.getBatchIdentifier())
composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent(null, e);
closeArray();
}
;
if (element.hasPackageItem()) {
openArray("packageItem");
for (MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent e : element.getPackageItem())
composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent(String name,
MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentInner(element);
close();
}
}
protected void composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentInner(
MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent element) throws IOException {
composeBackbone(element);
if (element.hasOuterPackaging()) {
composeIdentifier("outerPackaging", element.getOuterPackaging());
}
if (element.hasImmediatePackaging()) {
composeIdentifier("immediatePackaging", element.getImmediatePackaging());
}
}
protected void composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(String name,
MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent element) throws IOException {
if (element != null) {
open(name);
composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentInner(element);
close();
}
}
protected void composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentInner(
MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent element) throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
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.hasDevice()) {
openArray("device");
for (Reference e : element.getDevice())
composeReference(null, e);
closeArray();
}
;
if (element.hasManufacturedItem()) {
openArray("manufacturedItem");
for (Reference e : element.getManufacturedItem())
composeReference(null, e);
closeArray();
}
;
if (element.hasPackageItem()) {
openArray("packageItem");
for (MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent e : element.getPackageItem())
composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(null, e);
closeArray();
}
;
if (element.hasPhysicalCharacteristics()) {
composeProdCharacteristic("physicalCharacteristics", element.getPhysicalCharacteristics());
}
if (element.hasOtherCharacteristics()) {
openArray("otherCharacteristics");
for (CodeableConcept e : element.getOtherCharacteristics())
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();
}
;
}
protected void composeMedicinalProductPharmaceutical(String name, MedicinalProductPharmaceutical element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductPharmaceuticalInner(element);
}
}
protected void composeMedicinalProductPharmaceuticalInner(MedicinalProductPharmaceutical element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasAdministrableDoseForm()) {
composeCodeableConcept("administrableDoseForm", element.getAdministrableDoseForm());
}
if (element.hasUnitOfPresentation()) {
composeCodeableConcept("unitOfPresentation", element.getUnitOfPresentation());
}
if (element.hasIngredient()) {
openArray("ingredient");
for (Reference e : element.getIngredient())
composeReference(null, e);
closeArray();
}
;
if (element.hasDevice()) {
openArray("device");
for (Reference e : element.getDevice())
composeReference(null, e);
closeArray();
}
;
if (element.hasCharacteristics()) {
openArray("characteristics");
for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent e : element
.getCharacteristics())
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent(null, e);
closeArray();
}
;
if (element.hasRouteOfAdministration()) {
openArray("routeOfAdministration");
for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent e : element
.getRouteOfAdministration())
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent(null, e);
closeArray();
}
;
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent(
String name, MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentInner(element);
close();
}
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentInner(
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent(
String name, MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentInner(element);
close();
}
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentInner(
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent element)
throws IOException {
composeBackbone(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 (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent e : element
.getTargetSpecies())
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(
null, e);
closeArray();
}
;
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(
String name,
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentInner(
element);
close();
}
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentInner(
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent element)
throws IOException {
composeBackbone(element);
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasWithdrawalPeriod()) {
openArray("withdrawalPeriod");
for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent e : element
.getWithdrawalPeriod())
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(
null, e);
closeArray();
}
;
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(
String name,
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element)
throws IOException {
if (element != null) {
open(name);
composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentInner(
element);
close();
}
}
protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentInner(
MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element)
throws IOException {
composeBackbone(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 composeMedicinalProductUndesirableEffect(String name, MedicinalProductUndesirableEffect element)
throws IOException {
if (element != null) {
prop("resourceType", name);
composeMedicinalProductUndesirableEffectInner(element);
}
}
protected void composeMedicinalProductUndesirableEffectInner(MedicinalProductUndesirableEffect element)
throws IOException {
composeDomainResourceElements(element);
if (element.hasSubject()) {
openArray("subject");
for (Reference e : element.getSubject())
composeReference(null, e);
closeArray();
}
;
if (element.hasSymptomConditionEffect()) {
composeCodeableConcept("symptomConditionEffect", element.getSymptomConditionEffect());
}
if (element.hasClassification()) {
composeCodeableConcept("classification", element.getClassification());
}
if (element.hasFrequencyOfOccurrence()) {
composeCodeableConcept("frequencyOfOccurrence", element.getFrequencyOfOccurrence());
}
if (element.hasPopulation()) {
openArray("population");
for (Population e : element.getPopulation())
composePopulation(null, e);
closeArray();
}
;
}
protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeMessageDefinitionInner(element);
}
}
protected void composeMessageDefinitionInner(MessageDefinition element) throws IOException {
composeDomainResourceElements(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.hasReplaces()) {
openArray("replaces");
for (CanonicalType e : element.getReplaces())
composeCanonicalCore(null, e, true);
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.hasBaseElement()) {
composeCanonicalCore("base", element.getBaseElement(), false);
composeCanonicalExtras("base", element.getBaseElement(), false);
}
if (element.hasParent()) {
openArray("parent");
for (CanonicalType e : element.getParent())
composeCanonicalCore(null, e, true);
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())
composeMessageDefinitionMessageDefinitionFocusComponent(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())
composeMessageDefinitionMessageDefinitionAllowedResponseComponent(null, e);
closeArray();
}
;
if (element.hasGraph()) {
openArray("graph");
for (CanonicalType e : element.getGraph())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getGraph())) {
openArray("_graph");
for (CanonicalType e : element.getGraph())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeMessageDefinitionMessageDefinitionFocusComponent(String name,
MessageDefinition.MessageDefinitionFocusComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageDefinitionMessageDefinitionFocusComponentInner(element);
close();
}
}
protected void composeMessageDefinitionMessageDefinitionFocusComponentInner(
MessageDefinition.MessageDefinitionFocusComponent element) throws IOException {
composeBackbone(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 composeMessageDefinitionMessageDefinitionAllowedResponseComponent(String name,
MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageDefinitionMessageDefinitionAllowedResponseComponentInner(element);
close();
}
}
protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponentInner(
MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException {
composeBackbone(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);
composeMessageHeaderInner(element);
}
}
protected void composeMessageHeaderInner(MessageHeader element) throws IOException {
composeDomainResourceElements(element);
if (element.hasEvent()) {
composeType("event", element.getEvent());
}
if (element.hasDestination()) {
openArray("destination");
for (MessageHeader.MessageDestinationComponent e : element.getDestination())
composeMessageHeaderMessageDestinationComponent(null, e);
closeArray();
}
;
if (element.hasSender()) {
composeReference("sender", element.getSender());
}
if (element.hasEnterer()) {
composeReference("enterer", element.getEnterer());
}
if (element.hasAuthor()) {
composeReference("author", element.getAuthor());
}
if (element.hasSource()) {
composeMessageHeaderMessageSourceComponent("source", element.getSource());
}
if (element.hasResponsible()) {
composeReference("responsible", element.getResponsible());
}
if (element.hasReason()) {
composeCodeableConcept("reason", element.getReason());
}
if (element.hasResponse()) {
composeMessageHeaderMessageHeaderResponseComponent("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 composeMessageHeaderMessageDestinationComponent(String name,
MessageHeader.MessageDestinationComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageHeaderMessageDestinationComponentInner(element);
close();
}
}
protected void composeMessageHeaderMessageDestinationComponentInner(MessageHeader.MessageDestinationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasTarget()) {
composeReference("target", element.getTarget());
}
if (element.hasEndpointElement()) {
composeUrlCore("endpoint", element.getEndpointElement(), false);
composeUrlExtras("endpoint", element.getEndpointElement(), false);
}
if (element.hasReceiver()) {
composeReference("receiver", element.getReceiver());
}
}
protected void composeMessageHeaderMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element)
throws IOException {
if (element != null) {
open(name);
composeMessageHeaderMessageSourceComponentInner(element);
close();
}
}
protected void composeMessageHeaderMessageSourceComponentInner(MessageHeader.MessageSourceComponent element)
throws IOException {
composeBackbone(element);
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());
}
if (element.hasEndpointElement()) {
composeUrlCore("endpoint", element.getEndpointElement(), false);
composeUrlExtras("endpoint", element.getEndpointElement(), false);
}
}
protected void composeMessageHeaderMessageHeaderResponseComponent(String name,
MessageHeader.MessageHeaderResponseComponent element) throws IOException {
if (element != null) {
open(name);
composeMessageHeaderMessageHeaderResponseComponentInner(element);
close();
}
}
protected void composeMessageHeaderMessageHeaderResponseComponentInner(
MessageHeader.MessageHeaderResponseComponent element) throws IOException {
composeBackbone(element);
if (element.hasIdentifierElement()) {
composeIdCore("identifier", element.getIdentifierElement(), false);
composeIdExtras("identifier", element.getIdentifierElement(), false);
}
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);
composeMolecularSequenceInner(element);
}
}
protected void composeMolecularSequenceInner(MolecularSequence element) throws IOException {
composeDomainResourceElements(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.hasCoordinateSystemElement()) {
composeIntegerCore("coordinateSystem", element.getCoordinateSystemElement(), false);
composeIntegerExtras("coordinateSystem", element.getCoordinateSystemElement(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasSpecimen()) {
composeReference("specimen", element.getSpecimen());
}
if (element.hasDevice()) {
composeReference("device", element.getDevice());
}
if (element.hasPerformer()) {
composeReference("performer", element.getPerformer());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasReferenceSeq()) {
composeMolecularSequenceMolecularSequenceReferenceSeqComponent("referenceSeq", element.getReferenceSeq());
}
if (element.hasVariant()) {
openArray("variant");
for (MolecularSequence.MolecularSequenceVariantComponent e : element.getVariant())
composeMolecularSequenceMolecularSequenceVariantComponent(null, e);
closeArray();
}
;
if (element.hasObservedSeqElement()) {
composeStringCore("observedSeq", element.getObservedSeqElement(), false);
composeStringExtras("observedSeq", element.getObservedSeqElement(), false);
}
if (element.hasQuality()) {
openArray("quality");
for (MolecularSequence.MolecularSequenceQualityComponent e : element.getQuality())
composeMolecularSequenceMolecularSequenceQualityComponent(null, e);
closeArray();
}
;
if (element.hasReadCoverageElement()) {
composeIntegerCore("readCoverage", element.getReadCoverageElement(), false);
composeIntegerExtras("readCoverage", element.getReadCoverageElement(), false);
}
if (element.hasRepository()) {
openArray("repository");
for (MolecularSequence.MolecularSequenceRepositoryComponent e : element.getRepository())
composeMolecularSequenceMolecularSequenceRepositoryComponent(null, e);
closeArray();
}
;
if (element.hasPointer()) {
openArray("pointer");
for (Reference e : element.getPointer())
composeReference(null, e);
closeArray();
}
;
if (element.hasStructureVariant()) {
openArray("structureVariant");
for (MolecularSequence.MolecularSequenceStructureVariantComponent e : element.getStructureVariant())
composeMolecularSequenceMolecularSequenceStructureVariantComponent(null, e);
closeArray();
}
;
}
protected void composeMolecularSequenceMolecularSequenceReferenceSeqComponent(String name,
MolecularSequence.MolecularSequenceReferenceSeqComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceReferenceSeqComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceReferenceSeqComponentInner(
MolecularSequence.MolecularSequenceReferenceSeqComponent element) throws IOException {
composeBackbone(element);
if (element.hasChromosome()) {
composeCodeableConcept("chromosome", element.getChromosome());
}
if (element.hasGenomeBuildElement()) {
composeStringCore("genomeBuild", element.getGenomeBuildElement(), false);
composeStringExtras("genomeBuild", element.getGenomeBuildElement(), false);
}
if (element.hasOrientationElement()) {
composeEnumerationCore("orientation", element.getOrientationElement(),
new MolecularSequence.OrientationTypeEnumFactory(), false);
composeEnumerationExtras("orientation", element.getOrientationElement(),
new MolecularSequence.OrientationTypeEnumFactory(), false);
}
if (element.hasReferenceSeqId()) {
composeCodeableConcept("referenceSeqId", element.getReferenceSeqId());
}
if (element.hasReferenceSeqPointer()) {
composeReference("referenceSeqPointer", element.getReferenceSeqPointer());
}
if (element.hasReferenceSeqStringElement()) {
composeStringCore("referenceSeqString", element.getReferenceSeqStringElement(), false);
composeStringExtras("referenceSeqString", element.getReferenceSeqStringElement(), false);
}
if (element.hasStrandElement()) {
composeEnumerationCore("strand", element.getStrandElement(), new MolecularSequence.StrandTypeEnumFactory(),
false);
composeEnumerationExtras("strand", element.getStrandElement(), new MolecularSequence.StrandTypeEnumFactory(),
false);
}
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);
}
}
protected void composeMolecularSequenceMolecularSequenceVariantComponent(String name,
MolecularSequence.MolecularSequenceVariantComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceVariantComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceVariantComponentInner(
MolecularSequence.MolecularSequenceVariantComponent element) throws IOException {
composeBackbone(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.hasObservedAlleleElement()) {
composeStringCore("observedAllele", element.getObservedAlleleElement(), false);
composeStringExtras("observedAllele", element.getObservedAlleleElement(), false);
}
if (element.hasReferenceAlleleElement()) {
composeStringCore("referenceAllele", element.getReferenceAlleleElement(), false);
composeStringExtras("referenceAllele", element.getReferenceAlleleElement(), false);
}
if (element.hasCigarElement()) {
composeStringCore("cigar", element.getCigarElement(), false);
composeStringExtras("cigar", element.getCigarElement(), false);
}
if (element.hasVariantPointer()) {
composeReference("variantPointer", element.getVariantPointer());
}
}
protected void composeMolecularSequenceMolecularSequenceQualityComponent(String name,
MolecularSequence.MolecularSequenceQualityComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceQualityComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceQualityComponentInner(
MolecularSequence.MolecularSequenceQualityComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new MolecularSequence.QualityTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new MolecularSequence.QualityTypeEnumFactory(), false);
}
if (element.hasStandardSequence()) {
composeCodeableConcept("standardSequence", element.getStandardSequence());
}
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.hasScore()) {
composeQuantity("score", element.getScore());
}
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasTruthTPElement()) {
composeDecimalCore("truthTP", element.getTruthTPElement(), false);
composeDecimalExtras("truthTP", element.getTruthTPElement(), false);
}
if (element.hasQueryTPElement()) {
composeDecimalCore("queryTP", element.getQueryTPElement(), false);
composeDecimalExtras("queryTP", element.getQueryTPElement(), false);
}
if (element.hasTruthFNElement()) {
composeDecimalCore("truthFN", element.getTruthFNElement(), false);
composeDecimalExtras("truthFN", element.getTruthFNElement(), false);
}
if (element.hasQueryFPElement()) {
composeDecimalCore("queryFP", element.getQueryFPElement(), false);
composeDecimalExtras("queryFP", element.getQueryFPElement(), false);
}
if (element.hasGtFPElement()) {
composeDecimalCore("gtFP", element.getGtFPElement(), false);
composeDecimalExtras("gtFP", element.getGtFPElement(), false);
}
if (element.hasPrecisionElement()) {
composeDecimalCore("precision", element.getPrecisionElement(), false);
composeDecimalExtras("precision", element.getPrecisionElement(), false);
}
if (element.hasRecallElement()) {
composeDecimalCore("recall", element.getRecallElement(), false);
composeDecimalExtras("recall", element.getRecallElement(), false);
}
if (element.hasFScoreElement()) {
composeDecimalCore("fScore", element.getFScoreElement(), false);
composeDecimalExtras("fScore", element.getFScoreElement(), false);
}
if (element.hasRoc()) {
composeMolecularSequenceMolecularSequenceQualityRocComponent("roc", element.getRoc());
}
}
protected void composeMolecularSequenceMolecularSequenceQualityRocComponent(String name,
MolecularSequence.MolecularSequenceQualityRocComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceQualityRocComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceQualityRocComponentInner(
MolecularSequence.MolecularSequenceQualityRocComponent element) throws IOException {
composeBackbone(element);
if (element.hasScore()) {
openArray("score");
for (IntegerType e : element.getScore())
composeIntegerCore(null, e, true);
closeArray();
if (anyHasExtras(element.getScore())) {
openArray("_score");
for (IntegerType e : element.getScore())
composeIntegerExtras(null, e, true);
closeArray();
}
}
;
if (element.hasNumTP()) {
openArray("numTP");
for (IntegerType e : element.getNumTP())
composeIntegerCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNumTP())) {
openArray("_numTP");
for (IntegerType e : element.getNumTP())
composeIntegerExtras(null, e, true);
closeArray();
}
}
;
if (element.hasNumFP()) {
openArray("numFP");
for (IntegerType e : element.getNumFP())
composeIntegerCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNumFP())) {
openArray("_numFP");
for (IntegerType e : element.getNumFP())
composeIntegerExtras(null, e, true);
closeArray();
}
}
;
if (element.hasNumFN()) {
openArray("numFN");
for (IntegerType e : element.getNumFN())
composeIntegerCore(null, e, true);
closeArray();
if (anyHasExtras(element.getNumFN())) {
openArray("_numFN");
for (IntegerType e : element.getNumFN())
composeIntegerExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPrecision()) {
openArray("precision");
for (DecimalType e : element.getPrecision())
composeDecimalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getPrecision())) {
openArray("_precision");
for (DecimalType e : element.getPrecision())
composeDecimalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasSensitivity()) {
openArray("sensitivity");
for (DecimalType e : element.getSensitivity())
composeDecimalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getSensitivity())) {
openArray("_sensitivity");
for (DecimalType e : element.getSensitivity())
composeDecimalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasFMeasure()) {
openArray("fMeasure");
for (DecimalType e : element.getFMeasure())
composeDecimalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getFMeasure())) {
openArray("_fMeasure");
for (DecimalType e : element.getFMeasure())
composeDecimalExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeMolecularSequenceMolecularSequenceRepositoryComponent(String name,
MolecularSequence.MolecularSequenceRepositoryComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceRepositoryComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceRepositoryComponentInner(
MolecularSequence.MolecularSequenceRepositoryComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new MolecularSequence.RepositoryTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new MolecularSequence.RepositoryTypeEnumFactory(),
false);
}
if (element.hasUrlElement()) {
composeUriCore("url", element.getUrlElement(), false);
composeUriExtras("url", element.getUrlElement(), false);
}
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasDatasetIdElement()) {
composeStringCore("datasetId", element.getDatasetIdElement(), false);
composeStringExtras("datasetId", element.getDatasetIdElement(), false);
}
if (element.hasVariantsetIdElement()) {
composeStringCore("variantsetId", element.getVariantsetIdElement(), false);
composeStringExtras("variantsetId", element.getVariantsetIdElement(), false);
}
if (element.hasReadsetIdElement()) {
composeStringCore("readsetId", element.getReadsetIdElement(), false);
composeStringExtras("readsetId", element.getReadsetIdElement(), false);
}
}
protected void composeMolecularSequenceMolecularSequenceStructureVariantComponent(String name,
MolecularSequence.MolecularSequenceStructureVariantComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceStructureVariantComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceStructureVariantComponentInner(
MolecularSequence.MolecularSequenceStructureVariantComponent element) throws IOException {
composeBackbone(element);
if (element.hasVariantType()) {
composeCodeableConcept("variantType", element.getVariantType());
}
if (element.hasExactElement()) {
composeBooleanCore("exact", element.getExactElement(), false);
composeBooleanExtras("exact", element.getExactElement(), false);
}
if (element.hasLengthElement()) {
composeIntegerCore("length", element.getLengthElement(), false);
composeIntegerExtras("length", element.getLengthElement(), false);
}
if (element.hasOuter()) {
composeMolecularSequenceMolecularSequenceStructureVariantOuterComponent("outer", element.getOuter());
}
if (element.hasInner()) {
composeMolecularSequenceMolecularSequenceStructureVariantInnerComponent("inner", element.getInner());
}
}
protected void composeMolecularSequenceMolecularSequenceStructureVariantOuterComponent(String name,
MolecularSequence.MolecularSequenceStructureVariantOuterComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceStructureVariantOuterComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceStructureVariantOuterComponentInner(
MolecularSequence.MolecularSequenceStructureVariantOuterComponent element) throws IOException {
composeBackbone(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);
}
}
protected void composeMolecularSequenceMolecularSequenceStructureVariantInnerComponent(String name,
MolecularSequence.MolecularSequenceStructureVariantInnerComponent element) throws IOException {
if (element != null) {
open(name);
composeMolecularSequenceMolecularSequenceStructureVariantInnerComponentInner(element);
close();
}
}
protected void composeMolecularSequenceMolecularSequenceStructureVariantInnerComponentInner(
MolecularSequence.MolecularSequenceStructureVariantInnerComponent element) throws IOException {
composeBackbone(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);
}
}
protected void composeNamingSystem(String name, NamingSystem element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeNamingSystemInner(element);
}
}
protected void composeNamingSystemInner(NamingSystem element) throws IOException {
composeDomainResourceElements(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), 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.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.hasUsageElement()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), false);
}
if (element.hasUniqueId()) {
openArray("uniqueId");
for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId())
composeNamingSystemNamingSystemUniqueIdComponent(null, e);
closeArray();
}
;
}
protected void composeNamingSystemNamingSystemUniqueIdComponent(String name,
NamingSystem.NamingSystemUniqueIdComponent element) throws IOException {
if (element != null) {
open(name);
composeNamingSystemNamingSystemUniqueIdComponentInner(element);
close();
}
}
protected void composeNamingSystemNamingSystemUniqueIdComponentInner(
NamingSystem.NamingSystemUniqueIdComponent element) throws IOException {
composeBackbone(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());
}
}
protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeNutritionOrderInner(element);
}
}
protected void composeNutritionOrderInner(NutritionOrder element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesUri())) {
openArray("_instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiates()) {
openArray("instantiates");
for (UriType e : element.getInstantiates())
composeUriCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiates())) {
openArray("_instantiates");
for (UriType e : element.getInstantiates())
composeUriExtras(null, e, true);
closeArray();
}
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(),
new NutritionOrder.NutritionOrderStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(),
new NutritionOrder.NutritiionOrderIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(),
new NutritionOrder.NutritiionOrderIntentEnumFactory(), false);
}
if (element.hasPatient()) {
composeReference("patient", element.getPatient());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasDateTimeElement()) {
composeDateTimeCore("dateTime", element.getDateTimeElement(), false);
composeDateTimeExtras("dateTime", element.getDateTimeElement(), false);
}
if (element.hasOrderer()) {
composeReference("orderer", element.getOrderer());
}
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.hasOralDiet()) {
composeNutritionOrderNutritionOrderOralDietComponent("oralDiet", element.getOralDiet());
}
if (element.hasSupplement()) {
openArray("supplement");
for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement())
composeNutritionOrderNutritionOrderSupplementComponent(null, e);
closeArray();
}
;
if (element.hasEnteralFormula()) {
composeNutritionOrderNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeNutritionOrderNutritionOrderOralDietComponent(String name,
NutritionOrder.NutritionOrderOralDietComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderNutritionOrderOralDietComponentInner(element);
close();
}
}
protected void composeNutritionOrderNutritionOrderOralDietComponentInner(
NutritionOrder.NutritionOrderOralDietComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
openArray("type");
for (CodeableConcept e : element.getType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasSchedule()) {
openArray("schedule");
for (Timing e : element.getSchedule())
composeTiming(null, e);
closeArray();
}
;
if (element.hasNutrient()) {
openArray("nutrient");
for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient())
composeNutritionOrderNutritionOrderOralDietNutrientComponent(null, e);
closeArray();
}
;
if (element.hasTexture()) {
openArray("texture");
for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture())
composeNutritionOrderNutritionOrderOralDietTextureComponent(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 composeNutritionOrderNutritionOrderOralDietNutrientComponent(String name,
NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderNutritionOrderOralDietNutrientComponentInner(element);
close();
}
}
protected void composeNutritionOrderNutritionOrderOralDietNutrientComponentInner(
NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException {
composeBackbone(element);
if (element.hasModifier()) {
composeCodeableConcept("modifier", element.getModifier());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(String name,
NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderNutritionOrderOralDietTextureComponentInner(element);
close();
}
}
protected void composeNutritionOrderNutritionOrderOralDietTextureComponentInner(
NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException {
composeBackbone(element);
if (element.hasModifier()) {
composeCodeableConcept("modifier", element.getModifier());
}
if (element.hasFoodType()) {
composeCodeableConcept("foodType", element.getFoodType());
}
}
protected void composeNutritionOrderNutritionOrderSupplementComponent(String name,
NutritionOrder.NutritionOrderSupplementComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderNutritionOrderSupplementComponentInner(element);
close();
}
}
protected void composeNutritionOrderNutritionOrderSupplementComponentInner(
NutritionOrder.NutritionOrderSupplementComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasProductNameElement()) {
composeStringCore("productName", element.getProductNameElement(), false);
composeStringExtras("productName", element.getProductNameElement(), false);
}
if (element.hasSchedule()) {
openArray("schedule");
for (Timing e : element.getSchedule())
composeTiming(null, e);
closeArray();
}
;
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasInstructionElement()) {
composeStringCore("instruction", element.getInstructionElement(), false);
composeStringExtras("instruction", element.getInstructionElement(), false);
}
}
protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(String name,
NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderNutritionOrderEnteralFormulaComponentInner(element);
close();
}
}
protected void composeNutritionOrderNutritionOrderEnteralFormulaComponentInner(
NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException {
composeBackbone(element);
if (element.hasBaseFormulaType()) {
composeCodeableConcept("baseFormulaType", element.getBaseFormulaType());
}
if (element.hasBaseFormulaProductNameElement()) {
composeStringCore("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false);
composeStringExtras("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false);
}
if (element.hasAdditiveType()) {
composeCodeableConcept("additiveType", element.getAdditiveType());
}
if (element.hasAdditiveProductNameElement()) {
composeStringCore("additiveProductName", element.getAdditiveProductNameElement(), false);
composeStringExtras("additiveProductName", element.getAdditiveProductNameElement(), false);
}
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())
composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(null, e);
closeArray();
}
;
if (element.hasMaxVolumeToDeliver()) {
composeQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver());
}
if (element.hasAdministrationInstructionElement()) {
composeStringCore("administrationInstruction", element.getAdministrationInstructionElement(), false);
composeStringExtras("administrationInstruction", element.getAdministrationInstructionElement(), false);
}
}
protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(String name,
NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException {
if (element != null) {
open(name);
composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentInner(element);
close();
}
}
protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentInner(
NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException {
composeBackbone(element);
if (element.hasSchedule()) {
composeTiming("schedule", element.getSchedule());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasRate()) {
composeType("rate", element.getRate());
}
}
protected void composeObservation(String name, Observation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeObservationInner(element);
}
}
protected void composeObservationInner(Observation element) throws IOException {
composeDomainResourceElements(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 Observation.ObservationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Observation.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.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())
composeObservationObservationReferenceRangeComponent(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())
composeObservationObservationComponentComponent(null, e);
closeArray();
}
;
}
protected void composeObservationObservationReferenceRangeComponent(String name,
Observation.ObservationReferenceRangeComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationObservationReferenceRangeComponentInner(element);
close();
}
}
protected void composeObservationObservationReferenceRangeComponentInner(
Observation.ObservationReferenceRangeComponent element) throws IOException {
composeBackbone(element);
if (element.hasLow()) {
composeQuantity("low", element.getLow());
}
if (element.hasHigh()) {
composeQuantity("high", element.getHigh());
}
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()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
}
protected void composeObservationObservationComponentComponent(String name,
Observation.ObservationComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationObservationComponentComponentInner(element);
close();
}
}
protected void composeObservationObservationComponentComponentInner(Observation.ObservationComponentComponent element)
throws IOException {
composeBackbone(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())
composeObservationObservationReferenceRangeComponent(null, e);
closeArray();
}
;
}
protected void composeObservationDefinition(String name, ObservationDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeObservationDefinitionInner(element);
}
}
protected void composeObservationDefinitionInner(ObservationDefinition element) throws IOException {
composeDomainResourceElements(element);
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
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.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasPreferredReportNameElement()) {
composeStringCore("preferredReportName", element.getPreferredReportNameElement(), false);
composeStringExtras("preferredReportName", element.getPreferredReportNameElement(), false);
}
if (element.hasQuantitativeDetails()) {
composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponent("quantitativeDetails",
element.getQuantitativeDetails());
}
if (element.hasQualifiedInterval()) {
openArray("qualifiedInterval");
for (ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent e : element.getQualifiedInterval())
composeObservationDefinitionObservationDefinitionQualifiedIntervalComponent(null, e);
closeArray();
}
;
if (element.hasValidCodedValueSet()) {
composeReference("validCodedValueSet", element.getValidCodedValueSet());
}
if (element.hasNormalCodedValueSet()) {
composeReference("normalCodedValueSet", element.getNormalCodedValueSet());
}
if (element.hasAbnormalCodedValueSet()) {
composeReference("abnormalCodedValueSet", element.getAbnormalCodedValueSet());
}
if (element.hasCriticalCodedValueSet()) {
composeReference("criticalCodedValueSet", element.getCriticalCodedValueSet());
}
}
protected void composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponent(String name,
ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponentInner(element);
close();
}
}
protected void composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponentInner(
ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent element) throws IOException {
composeBackbone(element);
if (element.hasCustomaryUnit()) {
composeCodeableConcept("customaryUnit", element.getCustomaryUnit());
}
if (element.hasUnit()) {
composeCodeableConcept("unit", element.getUnit());
}
if (element.hasConversionFactorElement()) {
composeDecimalCore("conversionFactor", element.getConversionFactorElement(), false);
composeDecimalExtras("conversionFactor", element.getConversionFactorElement(), false);
}
if (element.hasDecimalPrecisionElement()) {
composeIntegerCore("decimalPrecision", element.getDecimalPrecisionElement(), false);
composeIntegerExtras("decimalPrecision", element.getDecimalPrecisionElement(), false);
}
}
protected void composeObservationDefinitionObservationDefinitionQualifiedIntervalComponent(String name,
ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent element) throws IOException {
if (element != null) {
open(name);
composeObservationDefinitionObservationDefinitionQualifiedIntervalComponentInner(element);
close();
}
}
protected void composeObservationDefinitionObservationDefinitionQualifiedIntervalComponentInner(
ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent element) throws IOException {
composeBackbone(element);
if (element.hasCategoryElement()) {
composeEnumerationCore("category", element.getCategoryElement(),
new ObservationDefinition.ObservationRangeCategoryEnumFactory(), false);
composeEnumerationExtras("category", element.getCategoryElement(),
new ObservationDefinition.ObservationRangeCategoryEnumFactory(), false);
}
if (element.hasRange()) {
composeRange("range", element.getRange());
}
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);
}
}
protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeOperationDefinitionInner(element);
}
}
protected void composeOperationDefinitionInner(OperationDefinition element) throws IOException {
composeDomainResourceElements(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.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.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 (CodeType e : element.getResource())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getResource())) {
openArray("_resource");
for (CodeType e : element.getResource())
composeCodeExtras(null, e, 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())
composeOperationDefinitionOperationDefinitionParameterComponent(null, e);
closeArray();
}
;
if (element.hasOverload()) {
openArray("overload");
for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload())
composeOperationDefinitionOperationDefinitionOverloadComponent(null, e);
closeArray();
}
;
}
protected void composeOperationDefinitionOperationDefinitionParameterComponent(String name,
OperationDefinition.OperationDefinitionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionOperationDefinitionParameterComponentInner(element);
close();
}
}
protected void composeOperationDefinitionOperationDefinitionParameterComponentInner(
OperationDefinition.OperationDefinitionParameterComponent element) throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeCodeCore("name", element.getNameElement(), false);
composeCodeExtras("name", element.getNameElement(), false);
}
if (element.hasUseElement()) {
composeEnumerationCore("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory(),
false);
composeEnumerationExtras("use", element.getUseElement(),
new OperationDefinition.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()) {
composeCodeCore("type", element.getTypeElement(), false);
composeCodeExtras("type", element.getTypeElement(), false);
}
if (element.hasTargetProfile()) {
openArray("targetProfile");
for (CanonicalType e : element.getTargetProfile())
composeCanonicalCore(null, e, true);
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()) {
composeOperationDefinitionOperationDefinitionParameterBindingComponent("binding", element.getBinding());
}
if (element.hasReferencedFrom()) {
openArray("referencedFrom");
for (OperationDefinition.OperationDefinitionParameterReferencedFromComponent e : element.getReferencedFrom())
composeOperationDefinitionOperationDefinitionParameterReferencedFromComponent(null, e);
closeArray();
}
;
if (element.hasPart()) {
openArray("part");
for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart())
composeOperationDefinitionOperationDefinitionParameterComponent(null, e);
closeArray();
}
;
}
protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(String name,
OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionOperationDefinitionParameterBindingComponentInner(element);
close();
}
}
protected void composeOperationDefinitionOperationDefinitionParameterBindingComponentInner(
OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException {
composeBackbone(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 composeOperationDefinitionOperationDefinitionParameterReferencedFromComponent(String name,
OperationDefinition.OperationDefinitionParameterReferencedFromComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionOperationDefinitionParameterReferencedFromComponentInner(element);
close();
}
}
protected void composeOperationDefinitionOperationDefinitionParameterReferencedFromComponentInner(
OperationDefinition.OperationDefinitionParameterReferencedFromComponent element) throws IOException {
composeBackbone(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 composeOperationDefinitionOperationDefinitionOverloadComponent(String name,
OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationDefinitionOperationDefinitionOverloadComponentInner(element);
close();
}
}
protected void composeOperationDefinitionOperationDefinitionOverloadComponentInner(
OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException {
composeBackbone(element);
if (element.hasParameterName()) {
openArray("parameterName");
for (StringType e : element.getParameterName())
composeStringCore(null, e, true);
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);
composeOperationOutcomeInner(element);
}
}
protected void composeOperationOutcomeInner(OperationOutcome element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIssue()) {
openArray("issue");
for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue())
composeOperationOutcomeOperationOutcomeIssueComponent(null, e);
closeArray();
}
;
}
protected void composeOperationOutcomeOperationOutcomeIssueComponent(String name,
OperationOutcome.OperationOutcomeIssueComponent element) throws IOException {
if (element != null) {
open(name);
composeOperationOutcomeOperationOutcomeIssueComponentInner(element);
close();
}
}
protected void composeOperationOutcomeOperationOutcomeIssueComponentInner(
OperationOutcome.OperationOutcomeIssueComponent element) throws IOException {
composeBackbone(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()) {
openArray("location");
for (StringType e : element.getLocation())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getLocation())) {
openArray("_location");
for (StringType e : element.getLocation())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasExpression()) {
openArray("expression");
for (StringType e : element.getExpression())
composeStringCore(null, e, true);
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);
composeOrganizationInner(element);
}
}
protected void composeOrganizationInner(Organization element) throws IOException {
composeDomainResourceElements(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()) {
openArray("alias");
for (StringType e : element.getAlias())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getAlias())) {
openArray("_alias");
for (StringType e : element.getAlias())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
}
;
if (element.hasAddress()) {
openArray("address");
for (Address e : element.getAddress())
composeAddress(null, e);
closeArray();
}
;
if (element.hasPartOf()) {
composeReference("partOf", element.getPartOf());
}
if (element.hasContact()) {
openArray("contact");
for (Organization.OrganizationContactComponent e : element.getContact())
composeOrganizationOrganizationContactComponent(null, e);
closeArray();
}
;
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
}
;
}
protected void composeOrganizationOrganizationContactComponent(String name,
Organization.OrganizationContactComponent element) throws IOException {
if (element != null) {
open(name);
composeOrganizationOrganizationContactComponentInner(element);
close();
}
}
protected void composeOrganizationOrganizationContactComponentInner(Organization.OrganizationContactComponent element)
throws IOException {
composeBackbone(element);
if (element.hasPurpose()) {
composeCodeableConcept("purpose", element.getPurpose());
}
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());
}
}
protected void composeOrganizationAffiliation(String name, OrganizationAffiliation element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeOrganizationAffiliationInner(element);
}
}
protected void composeOrganizationAffiliationInner(OrganizationAffiliation element) throws IOException {
composeDomainResourceElements(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.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
}
;
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
}
;
}
protected void composePatient(String name, Patient element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePatientInner(element);
}
}
protected void composePatientInner(Patient element) throws IOException {
composeDomainResourceElements(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())
composePatientContactComponent(null, e);
closeArray();
}
;
if (element.hasCommunication()) {
openArray("communication");
for (Patient.PatientCommunicationComponent e : element.getCommunication())
composePatientPatientCommunicationComponent(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())
composePatientPatientLinkComponent(null, e);
closeArray();
}
;
}
protected void composePatientContactComponent(String name, Patient.ContactComponent element) throws IOException {
if (element != null) {
open(name);
composePatientContactComponentInner(element);
close();
}
}
protected void composePatientContactComponentInner(Patient.ContactComponent element) throws IOException {
composeBackbone(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 composePatientPatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element)
throws IOException {
if (element != null) {
open(name);
composePatientPatientCommunicationComponentInner(element);
close();
}
}
protected void composePatientPatientCommunicationComponentInner(Patient.PatientCommunicationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
}
protected void composePatientPatientLinkComponent(String name, Patient.PatientLinkComponent element)
throws IOException {
if (element != null) {
open(name);
composePatientPatientLinkComponentInner(element);
close();
}
}
protected void composePatientPatientLinkComponentInner(Patient.PatientLinkComponent element) throws IOException {
composeBackbone(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);
composePaymentNoticeInner(element);
}
}
protected void composePaymentNoticeInner(PaymentNotice element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory(),
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.hasProvider()) {
composeReference("provider", element.getProvider());
}
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);
composePaymentReconciliationInner(element);
}
}
protected void composePaymentReconciliationInner(PaymentReconciliation element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new PaymentReconciliation.PaymentReconciliationStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new PaymentReconciliation.PaymentReconciliationStatusEnumFactory(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasCreatedElement()) {
composeDateTimeCore("created", element.getCreatedElement(), false);
composeDateTimeExtras("created", element.getCreatedElement(), false);
}
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 Enumerations.RemittanceOutcomeEnumFactory(),
false);
composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(),
false);
}
if (element.hasDispositionElement()) {
composeStringCore("disposition", element.getDispositionElement(), false);
composeStringExtras("disposition", element.getDispositionElement(), false);
}
if (element.hasPaymentDateElement()) {
composeDateCore("paymentDate", element.getPaymentDateElement(), false);
composeDateExtras("paymentDate", element.getPaymentDateElement(), false);
}
if (element.hasPaymentAmount()) {
composeMoney("paymentAmount", element.getPaymentAmount());
}
if (element.hasPaymentIdentifier()) {
composeIdentifier("paymentIdentifier", element.getPaymentIdentifier());
}
if (element.hasDetail()) {
openArray("detail");
for (PaymentReconciliation.DetailsComponent e : element.getDetail())
composePaymentReconciliationDetailsComponent(null, e);
closeArray();
}
;
if (element.hasFormCode()) {
composeCodeableConcept("formCode", element.getFormCode());
}
if (element.hasProcessNote()) {
openArray("processNote");
for (PaymentReconciliation.NotesComponent e : element.getProcessNote())
composePaymentReconciliationNotesComponent(null, e);
closeArray();
}
;
}
protected void composePaymentReconciliationDetailsComponent(String name,
PaymentReconciliation.DetailsComponent element) throws IOException {
if (element != null) {
open(name);
composePaymentReconciliationDetailsComponentInner(element);
close();
}
}
protected void composePaymentReconciliationDetailsComponentInner(PaymentReconciliation.DetailsComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasPredecessor()) {
composeIdentifier("predecessor", element.getPredecessor());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRequest()) {
composeReference("request", element.getRequest());
}
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 composePaymentReconciliationNotesComponent(String name, PaymentReconciliation.NotesComponent element)
throws IOException {
if (element != null) {
open(name);
composePaymentReconciliationNotesComponentInner(element);
close();
}
}
protected void composePaymentReconciliationNotesComponentInner(PaymentReconciliation.NotesComponent element)
throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false);
}
if (element.hasTextElement()) {
composeStringCore("text", element.getTextElement(), false);
composeStringExtras("text", element.getTextElement(), false);
}
}
protected void composePerson(String name, Person element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePersonInner(element);
}
}
protected void composePersonInner(Person element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(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()) {
composeAttachment("photo", element.getPhoto());
}
if (element.hasManagingOrganization()) {
composeReference("managingOrganization", element.getManagingOrganization());
}
if (element.hasActiveElement()) {
composeBooleanCore("active", element.getActiveElement(), false);
composeBooleanExtras("active", element.getActiveElement(), false);
}
if (element.hasLink()) {
openArray("link");
for (Person.PersonLinkComponent e : element.getLink())
composePersonPersonLinkComponent(null, e);
closeArray();
}
;
}
protected void composePersonPersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException {
if (element != null) {
open(name);
composePersonPersonLinkComponentInner(element);
close();
}
}
protected void composePersonPersonLinkComponentInner(Person.PersonLinkComponent element) throws IOException {
composeBackbone(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);
composePlanDefinitionInner(element);
}
}
protected void composePlanDefinitionInner(PlanDefinition element) throws IOException {
composeDomainResourceElements(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.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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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()) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, true);
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())
composePlanDefinitionPlanDefinitionGoalComponent(null, e);
closeArray();
}
;
if (element.hasAction()) {
openArray("action");
for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction())
composePlanDefinitionPlanDefinitionActionComponent(null, e);
closeArray();
}
;
}
protected void composePlanDefinitionPlanDefinitionGoalComponent(String name,
PlanDefinition.PlanDefinitionGoalComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionGoalComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionGoalComponentInner(
PlanDefinition.PlanDefinitionGoalComponent element) throws IOException {
composeBackbone(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())
composePlanDefinitionPlanDefinitionGoalTargetComponent(null, e);
closeArray();
}
;
}
protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(String name,
PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionGoalTargetComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionGoalTargetComponentInner(
PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException {
composeBackbone(element);
if (element.hasMeasure()) {
composeCodeableConcept("measure", element.getMeasure());
}
if (element.hasDetail()) {
composeType("detail", element.getDetail());
}
if (element.hasDue()) {
composeDuration("due", element.getDue());
}
}
protected void composePlanDefinitionPlanDefinitionActionComponent(String name,
PlanDefinition.PlanDefinitionActionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionActionComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionActionComponentInner(
PlanDefinition.PlanDefinitionActionComponent element) throws IOException {
composeBackbone(element);
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()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTextEquivalentElement()) {
composeStringCore("textEquivalent", element.getTextEquivalentElement(), false);
composeStringExtras("textEquivalent", element.getTextEquivalentElement(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new PlanDefinition.RequestPriorityEnumFactory(),
false);
composeEnumerationExtras("priority", element.getPriorityElement(),
new PlanDefinition.RequestPriorityEnumFactory(), false);
}
if (element.hasCode()) {
openArray("code");
for (CodeableConcept e : element.getCode())
composeCodeableConcept(null, e);
closeArray();
}
;
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()) {
openArray("goalId");
for (IdType e : element.getGoalId())
composeIdCore(null, e, true);
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())
composePlanDefinitionPlanDefinitionActionConditionComponent(null, e);
closeArray();
}
;
if (element.hasInput()) {
openArray("input");
for (DataRequirement e : element.getInput())
composeDataRequirement(null, e);
closeArray();
}
;
if (element.hasOutput()) {
openArray("output");
for (DataRequirement e : element.getOutput())
composeDataRequirement(null, e);
closeArray();
}
;
if (element.hasRelatedAction()) {
openArray("relatedAction");
for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction())
composePlanDefinitionPlanDefinitionActionRelatedActionComponent(null, e);
closeArray();
}
;
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasParticipant()) {
openArray("participant");
for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant())
composePlanDefinitionPlanDefinitionActionParticipantComponent(null, e);
closeArray();
}
;
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGroupingBehaviorElement()) {
composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(),
new PlanDefinition.ActionGroupingBehaviorEnumFactory(), false);
composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(),
new PlanDefinition.ActionGroupingBehaviorEnumFactory(), false);
}
if (element.hasSelectionBehaviorElement()) {
composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(),
new PlanDefinition.ActionSelectionBehaviorEnumFactory(), false);
composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(),
new PlanDefinition.ActionSelectionBehaviorEnumFactory(), false);
}
if (element.hasRequiredBehaviorElement()) {
composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(),
new PlanDefinition.ActionRequiredBehaviorEnumFactory(), false);
composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(),
new PlanDefinition.ActionRequiredBehaviorEnumFactory(), false);
}
if (element.hasPrecheckBehaviorElement()) {
composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(),
new PlanDefinition.ActionPrecheckBehaviorEnumFactory(), false);
composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(),
new PlanDefinition.ActionPrecheckBehaviorEnumFactory(), false);
}
if (element.hasCardinalityBehaviorElement()) {
composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(),
new PlanDefinition.ActionCardinalityBehaviorEnumFactory(), false);
composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(),
new PlanDefinition.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())
composePlanDefinitionPlanDefinitionActionDynamicValueComponent(null, e);
closeArray();
}
;
if (element.hasAction()) {
openArray("action");
for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction())
composePlanDefinitionPlanDefinitionActionComponent(null, e);
closeArray();
}
;
}
protected void composePlanDefinitionPlanDefinitionActionConditionComponent(String name,
PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionActionConditionComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionActionConditionComponentInner(
PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException {
composeBackbone(element);
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory(),
false);
composeEnumerationExtras("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory(),
false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(String name,
PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionActionRelatedActionComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponentInner(
PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException {
composeBackbone(element);
if (element.hasActionIdElement()) {
composeIdCore("actionId", element.getActionIdElement(), false);
composeIdExtras("actionId", element.getActionIdElement(), false);
}
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(),
new PlanDefinition.ActionRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(),
new PlanDefinition.ActionRelationshipTypeEnumFactory(), false);
}
if (element.hasOffset()) {
composeType("offset", element.getOffset());
}
}
protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(String name,
PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionActionParticipantComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionActionParticipantComponentInner(
PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory(),
false);
}
if (element.hasRole()) {
composeCodeableConcept("role", element.getRole());
}
}
protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(String name,
PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException {
if (element != null) {
open(name);
composePlanDefinitionPlanDefinitionActionDynamicValueComponentInner(element);
close();
}
}
protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponentInner(
PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException {
composeBackbone(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);
composePractitionerInner(element);
}
}
protected void composePractitionerInner(Practitioner element) throws IOException {
composeDomainResourceElements(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.hasAddress()) {
openArray("address");
for (Address e : element.getAddress())
composeAddress(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.hasPhoto()) {
openArray("photo");
for (Attachment e : element.getPhoto())
composeAttachment(null, e);
closeArray();
}
;
if (element.hasQualification()) {
openArray("qualification");
for (Practitioner.PractitionerQualificationComponent e : element.getQualification())
composePractitionerPractitionerQualificationComponent(null, e);
closeArray();
}
;
if (element.hasCommunication()) {
openArray("communication");
for (CodeableConcept e : element.getCommunication())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composePractitionerPractitionerQualificationComponent(String name,
Practitioner.PractitionerQualificationComponent element) throws IOException {
if (element != null) {
open(name);
composePractitionerPractitionerQualificationComponentInner(element);
close();
}
}
protected void composePractitionerPractitionerQualificationComponentInner(
Practitioner.PractitionerQualificationComponent element) throws IOException {
composeBackbone(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 composePractitionerRole(String name, PractitionerRole element) throws IOException {
if (element != null) {
prop("resourceType", name);
composePractitionerRoleInner(element);
}
}
protected void composePractitionerRoleInner(PractitionerRole element) throws IOException {
composeDomainResourceElements(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.hasTelecom()) {
openArray("telecom");
for (ContactPoint e : element.getTelecom())
composeContactPoint(null, e);
closeArray();
}
;
if (element.hasAvailableTime()) {
openArray("availableTime");
for (PractitionerRole.PractitionerRoleAvailableTimeComponent e : element.getAvailableTime())
composePractitionerRolePractitionerRoleAvailableTimeComponent(null, e);
closeArray();
}
;
if (element.hasNotAvailable()) {
openArray("notAvailable");
for (PractitionerRole.PractitionerRoleNotAvailableComponent e : element.getNotAvailable())
composePractitionerRolePractitionerRoleNotAvailableComponent(null, e);
closeArray();
}
;
if (element.hasAvailabilityExceptionsElement()) {
composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false);
composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false);
}
if (element.hasEndpoint()) {
openArray("endpoint");
for (Reference e : element.getEndpoint())
composeReference(null, e);
closeArray();
}
;
}
protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(String name,
PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException {
if (element != null) {
open(name);
composePractitionerRolePractitionerRoleAvailableTimeComponentInner(element);
close();
}
}
protected void composePractitionerRolePractitionerRoleAvailableTimeComponentInner(
PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException {
composeBackbone(element);
if (element.hasDaysOfWeek()) {
openArray("daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationCore(null, e, new PractitionerRole.DaysOfWeekEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getDaysOfWeek())) {
openArray("_daysOfWeek");
for (Enumeration e : element.getDaysOfWeek())
composeEnumerationExtras(null, e, new PractitionerRole.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 composePractitionerRolePractitionerRoleNotAvailableComponent(String name,
PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException {
if (element != null) {
open(name);
composePractitionerRolePractitionerRoleNotAvailableComponentInner(element);
close();
}
}
protected void composePractitionerRolePractitionerRoleNotAvailableComponentInner(
PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasDuring()) {
composePeriod("during", element.getDuring());
}
}
protected void composeProcedure(String name, Procedure element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeProcedureInner(element);
}
}
protected void composeProcedureInner(Procedure element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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 Procedure.ProcedureStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory(), false);
}
if (element.hasStatusReason()) {
composeCodeableConcept("statusReason", element.getStatusReason());
}
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
if (element.hasEncounter()) {
composeReference("encounter", element.getEncounter());
}
if (element.hasPerformed()) {
composeType("performed", element.getPerformed());
}
if (element.hasRecorder()) {
composeReference("recorder", element.getRecorder());
}
if (element.hasAsserter()) {
composeReference("asserter", element.getAsserter());
}
if (element.hasPerformer()) {
openArray("performer");
for (Procedure.ProcedurePerformerComponent e : element.getPerformer())
composeProcedureProcedurePerformerComponent(null, e);
closeArray();
}
;
if (element.hasLocation()) {
composeReference("location", element.getLocation());
}
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(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 (CodeableConcept e : element.getComplication())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasComplicationDetail()) {
openArray("complicationDetail");
for (Reference e : element.getComplicationDetail())
composeReference(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())
composeProcedureProcedureFocalDeviceComponent(null, e);
closeArray();
}
;
if (element.hasUsedReference()) {
openArray("usedReference");
for (Reference e : element.getUsedReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasUsedCode()) {
openArray("usedCode");
for (CodeableConcept e : element.getUsedCode())
composeCodeableConcept(null, e);
closeArray();
}
;
}
protected void composeProcedureProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element)
throws IOException {
if (element != null) {
open(name);
composeProcedureProcedurePerformerComponentInner(element);
close();
}
}
protected void composeProcedureProcedurePerformerComponentInner(Procedure.ProcedurePerformerComponent element)
throws IOException {
composeBackbone(element);
if (element.hasFunction()) {
composeCodeableConcept("function", element.getFunction());
}
if (element.hasActor()) {
composeReference("actor", element.getActor());
}
if (element.hasOnBehalfOf()) {
composeReference("onBehalfOf", element.getOnBehalfOf());
}
}
protected void composeProcedureProcedureFocalDeviceComponent(String name,
Procedure.ProcedureFocalDeviceComponent element) throws IOException {
if (element != null) {
open(name);
composeProcedureProcedureFocalDeviceComponentInner(element);
close();
}
}
protected void composeProcedureProcedureFocalDeviceComponentInner(Procedure.ProcedureFocalDeviceComponent element)
throws IOException {
composeBackbone(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);
composeProvenanceInner(element);
}
}
protected void composeProvenanceInner(Provenance element) throws IOException {
composeDomainResourceElements(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()) {
openArray("policy");
for (UriType e : element.getPolicy())
composeUriCore(null, e, true);
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.hasReason()) {
openArray("reason");
for (CodeableConcept e : element.getReason())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasActivity()) {
composeCodeableConcept("activity", element.getActivity());
}
if (element.hasAgent()) {
openArray("agent");
for (Provenance.ProvenanceAgentComponent e : element.getAgent())
composeProvenanceProvenanceAgentComponent(null, e);
closeArray();
}
;
if (element.hasEntity()) {
openArray("entity");
for (Provenance.ProvenanceEntityComponent e : element.getEntity())
composeProvenanceProvenanceEntityComponent(null, e);
closeArray();
}
;
if (element.hasSignature()) {
openArray("signature");
for (Signature e : element.getSignature())
composeSignature(null, e);
closeArray();
}
;
}
protected void composeProvenanceProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element)
throws IOException {
if (element != null) {
open(name);
composeProvenanceProvenanceAgentComponentInner(element);
close();
}
}
protected void composeProvenanceProvenanceAgentComponentInner(Provenance.ProvenanceAgentComponent element)
throws IOException {
composeBackbone(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 composeProvenanceProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element)
throws IOException {
if (element != null) {
open(name);
composeProvenanceProvenanceEntityComponentInner(element);
close();
}
}
protected void composeProvenanceProvenanceEntityComponentInner(Provenance.ProvenanceEntityComponent element)
throws IOException {
composeBackbone(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())
composeProvenanceProvenanceAgentComponent(null, e);
closeArray();
}
;
}
protected void composeQuestionnaire(String name, Questionnaire element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeQuestionnaireInner(element);
}
}
protected void composeQuestionnaireInner(Questionnaire element) throws IOException {
composeDomainResourceElements(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.hasDerivedFrom()) {
openArray("derivedFrom");
for (CanonicalType e : element.getDerivedFrom())
composeCanonicalCore(null, e, true);
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()) {
openArray("subjectType");
for (CodeType e : element.getSubjectType())
composeCodeCore(null, e, true);
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.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())
composeQuestionnaireQuestionnaireItemComponent(null, e);
closeArray();
}
;
}
protected void composeQuestionnaireQuestionnaireItemComponent(String name,
Questionnaire.QuestionnaireItemComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireQuestionnaireItemComponentInner(element);
close();
}
}
protected void composeQuestionnaireQuestionnaireItemComponentInner(Questionnaire.QuestionnaireItemComponent element)
throws IOException {
composeBackbone(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())
composeQuestionnaireQuestionnaireItemEnableWhenComponent(null, e);
closeArray();
}
;
if (element.hasEnableBehaviorElement()) {
composeEnumerationCore("enableBehavior", element.getEnableBehaviorElement(),
new Questionnaire.EnableWhenBehaviorEnumFactory(), false);
composeEnumerationExtras("enableBehavior", element.getEnableBehaviorElement(),
new Questionnaire.EnableWhenBehaviorEnumFactory(), 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.hasAnswerValueSetElement()) {
composeCanonicalCore("answerValueSet", element.getAnswerValueSetElement(), false);
composeCanonicalExtras("answerValueSet", element.getAnswerValueSetElement(), false);
}
if (element.hasAnswerOption()) {
openArray("answerOption");
for (Questionnaire.QuestionnaireItemAnswerOptionComponent e : element.getAnswerOption())
composeQuestionnaireQuestionnaireItemAnswerOptionComponent(null, e);
closeArray();
}
;
if (element.hasInitial()) {
openArray("initial");
for (Questionnaire.QuestionnaireItemInitialComponent e : element.getInitial())
composeQuestionnaireQuestionnaireItemInitialComponent(null, e);
closeArray();
}
;
if (element.hasItem()) {
openArray("item");
for (Questionnaire.QuestionnaireItemComponent e : element.getItem())
composeQuestionnaireQuestionnaireItemComponent(null, e);
closeArray();
}
;
}
protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(String name,
Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireQuestionnaireItemEnableWhenComponentInner(element);
close();
}
}
protected void composeQuestionnaireQuestionnaireItemEnableWhenComponentInner(
Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException {
composeBackbone(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 composeQuestionnaireQuestionnaireItemAnswerOptionComponent(String name,
Questionnaire.QuestionnaireItemAnswerOptionComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireQuestionnaireItemAnswerOptionComponentInner(element);
close();
}
}
protected void composeQuestionnaireQuestionnaireItemAnswerOptionComponentInner(
Questionnaire.QuestionnaireItemAnswerOptionComponent element) throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasInitialSelectedElement()) {
composeBooleanCore("initialSelected", element.getInitialSelectedElement(), false);
composeBooleanExtras("initialSelected", element.getInitialSelectedElement(), false);
}
}
protected void composeQuestionnaireQuestionnaireItemInitialComponent(String name,
Questionnaire.QuestionnaireItemInitialComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireQuestionnaireItemInitialComponentInner(element);
close();
}
}
protected void composeQuestionnaireQuestionnaireItemInitialComponentInner(
Questionnaire.QuestionnaireItemInitialComponent element) throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeQuestionnaireResponseInner(element);
}
}
protected void composeQuestionnaireResponseInner(QuestionnaireResponse element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
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())
composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e);
closeArray();
}
;
}
protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(String name,
QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireResponseQuestionnaireResponseItemComponentInner(element);
close();
}
}
protected void composeQuestionnaireResponseQuestionnaireResponseItemComponentInner(
QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException {
composeBackbone(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())
composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(null, e);
closeArray();
}
;
if (element.hasItem()) {
openArray("item");
for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem())
composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e);
closeArray();
}
;
}
protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(String name,
QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException {
if (element != null) {
open(name);
composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentInner(element);
close();
}
}
protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentInner(
QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
if (element.hasItem()) {
openArray("item");
for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem())
composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e);
closeArray();
}
;
}
protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRelatedPersonInner(element);
}
}
protected void composeRelatedPersonInner(RelatedPerson element) throws IOException {
composeDomainResourceElements(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())
composeRelatedPersonRelatedPersonCommunicationComponent(null, e);
closeArray();
}
;
}
protected void composeRelatedPersonRelatedPersonCommunicationComponent(String name,
RelatedPerson.RelatedPersonCommunicationComponent element) throws IOException {
if (element != null) {
open(name);
composeRelatedPersonRelatedPersonCommunicationComponentInner(element);
close();
}
}
protected void composeRelatedPersonRelatedPersonCommunicationComponentInner(
RelatedPerson.RelatedPersonCommunicationComponent element) throws IOException {
composeBackbone(element);
if (element.hasLanguage()) {
composeCodeableConcept("language", element.getLanguage());
}
if (element.hasPreferredElement()) {
composeBooleanCore("preferred", element.getPreferredElement(), false);
composeBooleanExtras("preferred", element.getPreferredElement(), false);
}
}
protected void composeRequestGroup(String name, RequestGroup element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRequestGroupInner(element);
}
}
protected void composeRequestGroupInner(RequestGroup element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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 RequestGroup.RequestStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory(),
false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory(), false);
composeEnumerationExtras("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory(),
false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory(),
false);
composeEnumerationExtras("priority", element.getPriorityElement(), new RequestGroup.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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasAction()) {
openArray("action");
for (RequestGroup.RequestGroupActionComponent e : element.getAction())
composeRequestGroupRequestGroupActionComponent(null, e);
closeArray();
}
;
}
protected void composeRequestGroupRequestGroupActionComponent(String name,
RequestGroup.RequestGroupActionComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestGroupRequestGroupActionComponentInner(element);
close();
}
}
protected void composeRequestGroupRequestGroupActionComponentInner(RequestGroup.RequestGroupActionComponent element)
throws IOException {
composeBackbone(element);
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()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasTextEquivalentElement()) {
composeStringCore("textEquivalent", element.getTextEquivalentElement(), false);
composeStringExtras("textEquivalent", element.getTextEquivalentElement(), false);
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory(),
false);
composeEnumerationExtras("priority", element.getPriorityElement(), new RequestGroup.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.hasCondition()) {
openArray("condition");
for (RequestGroup.RequestGroupActionConditionComponent e : element.getCondition())
composeRequestGroupRequestGroupActionConditionComponent(null, e);
closeArray();
}
;
if (element.hasRelatedAction()) {
openArray("relatedAction");
for (RequestGroup.RequestGroupActionRelatedActionComponent e : element.getRelatedAction())
composeRequestGroupRequestGroupActionRelatedActionComponent(null, e);
closeArray();
}
;
if (element.hasTiming()) {
composeType("timing", element.getTiming());
}
if (element.hasParticipant()) {
openArray("participant");
for (Reference e : element.getParticipant())
composeReference(null, e);
closeArray();
}
;
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasGroupingBehaviorElement()) {
composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(),
new RequestGroup.ActionGroupingBehaviorEnumFactory(), false);
composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(),
new RequestGroup.ActionGroupingBehaviorEnumFactory(), false);
}
if (element.hasSelectionBehaviorElement()) {
composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(),
new RequestGroup.ActionSelectionBehaviorEnumFactory(), false);
composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(),
new RequestGroup.ActionSelectionBehaviorEnumFactory(), false);
}
if (element.hasRequiredBehaviorElement()) {
composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(),
new RequestGroup.ActionRequiredBehaviorEnumFactory(), false);
composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(),
new RequestGroup.ActionRequiredBehaviorEnumFactory(), false);
}
if (element.hasPrecheckBehaviorElement()) {
composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(),
new RequestGroup.ActionPrecheckBehaviorEnumFactory(), false);
composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(),
new RequestGroup.ActionPrecheckBehaviorEnumFactory(), false);
}
if (element.hasCardinalityBehaviorElement()) {
composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(),
new RequestGroup.ActionCardinalityBehaviorEnumFactory(), false);
composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(),
new RequestGroup.ActionCardinalityBehaviorEnumFactory(), false);
}
if (element.hasResource()) {
composeReference("resource", element.getResource());
}
if (element.hasAction()) {
openArray("action");
for (RequestGroup.RequestGroupActionComponent e : element.getAction())
composeRequestGroupRequestGroupActionComponent(null, e);
closeArray();
}
;
}
protected void composeRequestGroupRequestGroupActionConditionComponent(String name,
RequestGroup.RequestGroupActionConditionComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestGroupRequestGroupActionConditionComponentInner(element);
close();
}
}
protected void composeRequestGroupRequestGroupActionConditionComponentInner(
RequestGroup.RequestGroupActionConditionComponent element) throws IOException {
composeBackbone(element);
if (element.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory(),
false);
composeEnumerationExtras("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory(),
false);
}
if (element.hasExpression()) {
composeExpression("expression", element.getExpression());
}
}
protected void composeRequestGroupRequestGroupActionRelatedActionComponent(String name,
RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException {
if (element != null) {
open(name);
composeRequestGroupRequestGroupActionRelatedActionComponentInner(element);
close();
}
}
protected void composeRequestGroupRequestGroupActionRelatedActionComponentInner(
RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException {
composeBackbone(element);
if (element.hasActionIdElement()) {
composeIdCore("actionId", element.getActionIdElement(), false);
composeIdExtras("actionId", element.getActionIdElement(), false);
}
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(),
new RequestGroup.ActionRelationshipTypeEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(),
new RequestGroup.ActionRelationshipTypeEnumFactory(), false);
}
if (element.hasOffset()) {
composeType("offset", element.getOffset());
}
}
protected void composeResearchDefinition(String name, ResearchDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeResearchDefinitionInner(element);
}
}
protected void composeResearchDefinitionInner(ResearchDefinition element) throws IOException {
composeDomainResourceElements(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.hasShortTitleElement()) {
composeStringCore("shortTitle", element.getShortTitleElement(), false);
composeStringExtras("shortTitle", element.getShortTitleElement(), 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.hasComment()) {
openArray("comment");
for (StringType e : element.getComment())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getComment())) {
openArray("_comment");
for (StringType e : element.getComment())
composeStringExtras(null, e, true);
closeArray();
}
}
;
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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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()) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasPopulation()) {
composeReference("population", element.getPopulation());
}
if (element.hasExposure()) {
composeReference("exposure", element.getExposure());
}
if (element.hasExposureAlternative()) {
composeReference("exposureAlternative", element.getExposureAlternative());
}
if (element.hasOutcome()) {
composeReference("outcome", element.getOutcome());
}
}
protected void composeResearchElementDefinition(String name, ResearchElementDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeResearchElementDefinitionInner(element);
}
}
protected void composeResearchElementDefinitionInner(ResearchElementDefinition element) throws IOException {
composeDomainResourceElements(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.hasShortTitleElement()) {
composeStringCore("shortTitle", element.getShortTitleElement(), false);
composeStringExtras("shortTitle", element.getShortTitleElement(), 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.hasComment()) {
openArray("comment");
for (StringType e : element.getComment())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getComment())) {
openArray("_comment");
for (StringType e : element.getComment())
composeStringExtras(null, e, true);
closeArray();
}
}
;
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()) {
composeStringCore("usage", element.getUsageElement(), false);
composeStringExtras("usage", element.getUsageElement(), 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.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()) {
openArray("library");
for (CanonicalType e : element.getLibrary())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getLibrary())) {
openArray("_library");
for (CanonicalType e : element.getLibrary())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(),
new ResearchElementDefinition.ResearchElementTypeEnumFactory(), false);
composeEnumerationExtras("type", element.getTypeElement(),
new ResearchElementDefinition.ResearchElementTypeEnumFactory(), false);
}
if (element.hasVariableTypeElement()) {
composeEnumerationCore("variableType", element.getVariableTypeElement(),
new ResearchElementDefinition.VariableTypeEnumFactory(), false);
composeEnumerationExtras("variableType", element.getVariableTypeElement(),
new ResearchElementDefinition.VariableTypeEnumFactory(), false);
}
if (element.hasCharacteristic()) {
openArray("characteristic");
for (ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent e : element.getCharacteristic())
composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponent(null, e);
closeArray();
}
;
}
protected void composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponent(String name,
ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponentInner(element);
close();
}
}
protected void composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponentInner(
ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent element) throws IOException {
composeBackbone(element);
if (element.hasDefinition()) {
composeType("definition", element.getDefinition());
}
if (element.hasUsageContext()) {
openArray("usageContext");
for (UsageContext e : element.getUsageContext())
composeUsageContext(null, e);
closeArray();
}
;
if (element.hasExcludeElement()) {
composeBooleanCore("exclude", element.getExcludeElement(), false);
composeBooleanExtras("exclude", element.getExcludeElement(), false);
}
if (element.hasUnitOfMeasure()) {
composeCodeableConcept("unitOfMeasure", element.getUnitOfMeasure());
}
if (element.hasStudyEffectiveDescriptionElement()) {
composeStringCore("studyEffectiveDescription", element.getStudyEffectiveDescriptionElement(), false);
composeStringExtras("studyEffectiveDescription", element.getStudyEffectiveDescriptionElement(), false);
}
if (element.hasStudyEffective()) {
composeType("studyEffective", element.getStudyEffective());
}
if (element.hasStudyEffectiveTimeFromStart()) {
composeDuration("studyEffectiveTimeFromStart", element.getStudyEffectiveTimeFromStart());
}
if (element.hasStudyEffectiveGroupMeasureElement()) {
composeEnumerationCore("studyEffectiveGroupMeasure", element.getStudyEffectiveGroupMeasureElement(),
new ResearchElementDefinition.GroupMeasureEnumFactory(), false);
composeEnumerationExtras("studyEffectiveGroupMeasure", element.getStudyEffectiveGroupMeasureElement(),
new ResearchElementDefinition.GroupMeasureEnumFactory(), false);
}
if (element.hasParticipantEffectiveDescriptionElement()) {
composeStringCore("participantEffectiveDescription", element.getParticipantEffectiveDescriptionElement(), false);
composeStringExtras("participantEffectiveDescription", element.getParticipantEffectiveDescriptionElement(),
false);
}
if (element.hasParticipantEffective()) {
composeType("participantEffective", element.getParticipantEffective());
}
if (element.hasParticipantEffectiveTimeFromStart()) {
composeDuration("participantEffectiveTimeFromStart", element.getParticipantEffectiveTimeFromStart());
}
if (element.hasParticipantEffectiveGroupMeasureElement()) {
composeEnumerationCore("participantEffectiveGroupMeasure", element.getParticipantEffectiveGroupMeasureElement(),
new ResearchElementDefinition.GroupMeasureEnumFactory(), false);
composeEnumerationExtras("participantEffectiveGroupMeasure", element.getParticipantEffectiveGroupMeasureElement(),
new ResearchElementDefinition.GroupMeasureEnumFactory(), false);
}
}
protected void composeResearchStudy(String name, ResearchStudy element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeResearchStudyInner(element);
}
}
protected void composeResearchStudyInner(ResearchStudy element) throws IOException {
composeDomainResourceElements(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.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.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory(),
false);
}
if (element.hasPrimaryPurposeType()) {
composeCodeableConcept("primaryPurposeType", element.getPrimaryPurposeType());
}
if (element.hasPhase()) {
composeCodeableConcept("phase", element.getPhase());
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasFocus()) {
openArray("focus");
for (CodeableConcept e : element.getFocus())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasCondition()) {
openArray("condition");
for (CodeableConcept e : element.getCondition())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasContact()) {
openArray("contact");
for (ContactDetail e : element.getContact())
composeContactDetail(null, e);
closeArray();
}
;
if (element.hasRelatedArtifact()) {
openArray("relatedArtifact");
for (RelatedArtifact e : element.getRelatedArtifact())
composeRelatedArtifact(null, e);
closeArray();
}
;
if (element.hasKeyword()) {
openArray("keyword");
for (CodeableConcept e : element.getKeyword())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasLocation()) {
openArray("location");
for (CodeableConcept e : element.getLocation())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeMarkdownCore("description", element.getDescriptionElement(), false);
composeMarkdownExtras("description", element.getDescriptionElement(), false);
}
if (element.hasEnrollment()) {
openArray("enrollment");
for (Reference e : element.getEnrollment())
composeReference(null, e);
closeArray();
}
;
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasSponsor()) {
composeReference("sponsor", element.getSponsor());
}
if (element.hasPrincipalInvestigator()) {
composeReference("principalInvestigator", element.getPrincipalInvestigator());
}
if (element.hasSite()) {
openArray("site");
for (Reference e : element.getSite())
composeReference(null, e);
closeArray();
}
;
if (element.hasReasonStopped()) {
composeCodeableConcept("reasonStopped", element.getReasonStopped());
}
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasArm()) {
openArray("arm");
for (ResearchStudy.ResearchStudyArmComponent e : element.getArm())
composeResearchStudyResearchStudyArmComponent(null, e);
closeArray();
}
;
if (element.hasObjective()) {
openArray("objective");
for (ResearchStudy.ResearchStudyObjectiveComponent e : element.getObjective())
composeResearchStudyResearchStudyObjectiveComponent(null, e);
closeArray();
}
;
}
protected void composeResearchStudyResearchStudyArmComponent(String name,
ResearchStudy.ResearchStudyArmComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyResearchStudyArmComponentInner(element);
close();
}
}
protected void composeResearchStudyResearchStudyArmComponentInner(ResearchStudy.ResearchStudyArmComponent element)
throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
}
protected void composeResearchStudyResearchStudyObjectiveComponent(String name,
ResearchStudy.ResearchStudyObjectiveComponent element) throws IOException {
if (element != null) {
open(name);
composeResearchStudyResearchStudyObjectiveComponentInner(element);
close();
}
}
protected void composeResearchStudyResearchStudyObjectiveComponentInner(
ResearchStudy.ResearchStudyObjectiveComponent element) throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
}
protected void composeResearchSubject(String name, ResearchSubject element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeResearchSubjectInner(element);
}
}
protected void composeResearchSubjectInner(ResearchSubject element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(),
new ResearchSubject.ResearchSubjectStatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(),
new ResearchSubject.ResearchSubjectStatusEnumFactory(), false);
}
if (element.hasPeriod()) {
composePeriod("period", element.getPeriod());
}
if (element.hasStudy()) {
composeReference("study", element.getStudy());
}
if (element.hasIndividual()) {
composeReference("individual", element.getIndividual());
}
if (element.hasAssignedArmElement()) {
composeStringCore("assignedArm", element.getAssignedArmElement(), false);
composeStringExtras("assignedArm", element.getAssignedArmElement(), false);
}
if (element.hasActualArmElement()) {
composeStringCore("actualArm", element.getActualArmElement(), false);
composeStringExtras("actualArm", element.getActualArmElement(), false);
}
if (element.hasConsent()) {
composeReference("consent", element.getConsent());
}
}
protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRiskAssessmentInner(element);
}
}
protected void composeRiskAssessmentInner(RiskAssessment element) throws IOException {
composeDomainResourceElements(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 RiskAssessment.RiskAssessmentStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(),
new RiskAssessment.RiskAssessmentStatusEnumFactory(), 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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(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())
composeRiskAssessmentRiskAssessmentPredictionComponent(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 composeRiskAssessmentRiskAssessmentPredictionComponent(String name,
RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskAssessmentRiskAssessmentPredictionComponentInner(element);
close();
}
}
protected void composeRiskAssessmentRiskAssessmentPredictionComponentInner(
RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException {
composeBackbone(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 composeRiskEvidenceSynthesis(String name, RiskEvidenceSynthesis element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeRiskEvidenceSynthesisInner(element);
}
}
protected void composeRiskEvidenceSynthesisInner(RiskEvidenceSynthesis element) throws IOException {
composeDomainResourceElements(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.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(),
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.hasJurisdiction()) {
openArray("jurisdiction");
for (CodeableConcept e : element.getJurisdiction())
composeCodeableConcept(null, e);
closeArray();
}
;
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.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.hasSynthesisType()) {
composeCodeableConcept("synthesisType", element.getSynthesisType());
}
if (element.hasStudyType()) {
composeCodeableConcept("studyType", element.getStudyType());
}
if (element.hasPopulation()) {
composeReference("population", element.getPopulation());
}
if (element.hasExposure()) {
composeReference("exposure", element.getExposure());
}
if (element.hasOutcome()) {
composeReference("outcome", element.getOutcome());
}
if (element.hasSampleSize()) {
composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent("sampleSize", element.getSampleSize());
}
if (element.hasRiskEstimate()) {
composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent("riskEstimate", element.getRiskEstimate());
}
if (element.hasCertainty()) {
openArray("certainty");
for (RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent e : element.getCertainty())
composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent(null, e);
closeArray();
}
;
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent(String name,
RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentInner(element);
close();
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentInner(
RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasNumberOfStudiesElement()) {
composeIntegerCore("numberOfStudies", element.getNumberOfStudiesElement(), false);
composeIntegerExtras("numberOfStudies", element.getNumberOfStudiesElement(), false);
}
if (element.hasNumberOfParticipantsElement()) {
composeIntegerCore("numberOfParticipants", element.getNumberOfParticipantsElement(), false);
composeIntegerExtras("numberOfParticipants", element.getNumberOfParticipantsElement(), false);
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent(String name,
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentInner(element);
close();
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentInner(
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent element) throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValueElement()) {
composeDecimalCore("value", element.getValueElement(), false);
composeDecimalExtras("value", element.getValueElement(), false);
}
if (element.hasUnitOfMeasure()) {
composeCodeableConcept("unitOfMeasure", element.getUnitOfMeasure());
}
if (element.hasDenominatorCountElement()) {
composeIntegerCore("denominatorCount", element.getDenominatorCountElement(), false);
composeIntegerExtras("denominatorCount", element.getDenominatorCountElement(), false);
}
if (element.hasNumeratorCountElement()) {
composeIntegerCore("numeratorCount", element.getNumeratorCountElement(), false);
composeIntegerExtras("numeratorCount", element.getNumeratorCountElement(), false);
}
if (element.hasPrecisionEstimate()) {
openArray("precisionEstimate");
for (RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent e : element
.getPrecisionEstimate())
composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(null, e);
closeArray();
}
;
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(String name,
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentInner(element);
close();
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentInner(
RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasLevelElement()) {
composeDecimalCore("level", element.getLevelElement(), false);
composeDecimalExtras("level", element.getLevelElement(), false);
}
if (element.hasFromElement()) {
composeDecimalCore("from", element.getFromElement(), false);
composeDecimalExtras("from", element.getFromElement(), false);
}
if (element.hasToElement()) {
composeDecimalCore("to", element.getToElement(), false);
composeDecimalExtras("to", element.getToElement(), false);
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent(String name,
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentInner(element);
close();
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentInner(
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent element) throws IOException {
composeBackbone(element);
if (element.hasRating()) {
openArray("rating");
for (CodeableConcept e : element.getRating())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasCertaintySubcomponent()) {
openArray("certaintySubcomponent");
for (RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent e : element
.getCertaintySubcomponent())
composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(null, e);
closeArray();
}
;
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(String name,
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent element) throws IOException {
if (element != null) {
open(name);
composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentInner(element);
close();
}
}
protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentInner(
RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRating()) {
openArray("rating");
for (CodeableConcept e : element.getRating())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
}
protected void composeSchedule(String name, Schedule element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeScheduleInner(element);
}
}
protected void composeScheduleInner(Schedule element) throws IOException {
composeDomainResourceElements(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 (CodeableConcept e : element.getServiceType())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasSpecialty()) {
openArray("specialty");
for (CodeableConcept e : element.getSpecialty())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasActor()) {
openArray("actor");
for (Reference e : element.getActor())
composeReference(null, e);
closeArray();
}
;
if (element.hasPlanningHorizon()) {
composePeriod("planningHorizon", element.getPlanningHorizon());
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
}
protected void composeSearchParameter(String name, SearchParameter element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSearchParameterInner(element);
}
}
protected void composeSearchParameterInner(SearchParameter element) throws IOException {
composeDomainResourceElements(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.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), 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.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasBase()) {
openArray("base");
for (CodeType e : element.getBase())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getBase())) {
openArray("_base");
for (CodeType e : element.getBase())
composeCodeExtras(null, e, 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.hasXpathElement()) {
composeStringCore("xpath", element.getXpathElement(), false);
composeStringExtras("xpath", element.getXpathElement(), false);
}
if (element.hasXpathUsageElement()) {
composeEnumerationCore("xpathUsage", element.getXpathUsageElement(),
new SearchParameter.XPathUsageTypeEnumFactory(), false);
composeEnumerationExtras("xpathUsage", element.getXpathUsageElement(),
new SearchParameter.XPathUsageTypeEnumFactory(), false);
}
if (element.hasTarget()) {
openArray("target");
for (CodeType e : element.getTarget())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getTarget())) {
openArray("_target");
for (CodeType e : element.getTarget())
composeCodeExtras(null, e, 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 SearchParameter.SearchComparatorEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getComparator())) {
openArray("_comparator");
for (Enumeration e : element.getComparator())
composeEnumerationExtras(null, e, new SearchParameter.SearchComparatorEnumFactory(), true);
closeArray();
}
}
;
if (element.hasModifier()) {
openArray("modifier");
for (Enumeration e : element.getModifier())
composeEnumerationCore(null, e, new SearchParameter.SearchModifierCodeEnumFactory(), true);
closeArray();
if (anyHasExtras(element.getModifier())) {
openArray("_modifier");
for (Enumeration e : element.getModifier())
composeEnumerationExtras(null, e, new SearchParameter.SearchModifierCodeEnumFactory(), true);
closeArray();
}
}
;
if (element.hasChain()) {
openArray("chain");
for (StringType e : element.getChain())
composeStringCore(null, e, true);
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())
composeSearchParameterSearchParameterComponentComponent(null, e);
closeArray();
}
;
}
protected void composeSearchParameterSearchParameterComponentComponent(String name,
SearchParameter.SearchParameterComponentComponent element) throws IOException {
if (element != null) {
open(name);
composeSearchParameterSearchParameterComponentComponentInner(element);
close();
}
}
protected void composeSearchParameterSearchParameterComponentComponentInner(
SearchParameter.SearchParameterComponentComponent element) throws IOException {
composeBackbone(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);
composeServiceRequestInner(element);
}
}
protected void composeServiceRequestInner(ServiceRequest element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasInstantiatesCanonical()) {
openArray("instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getInstantiatesCanonical())) {
openArray("_instantiatesCanonical");
for (CanonicalType e : element.getInstantiatesCanonical())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasInstantiatesUri()) {
openArray("instantiatesUri");
for (UriType e : element.getInstantiatesUri())
composeUriCore(null, e, true);
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 ServiceRequest.ServiceRequestStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(),
new ServiceRequest.ServiceRequestStatusEnumFactory(), false);
}
if (element.hasIntentElement()) {
composeEnumerationCore("intent", element.getIntentElement(), new ServiceRequest.ServiceRequestIntentEnumFactory(),
false);
composeEnumerationExtras("intent", element.getIntentElement(),
new ServiceRequest.ServiceRequestIntentEnumFactory(), false);
}
if (element.hasCategory()) {
openArray("category");
for (CodeableConcept e : element.getCategory())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(),
new ServiceRequest.ServiceRequestPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(),
new ServiceRequest.ServiceRequestPriorityEnumFactory(), false);
}
if (element.hasDoNotPerformElement()) {
composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false);
composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false);
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasOrderDetail()) {
openArray("orderDetail");
for (CodeableConcept e : element.getOrderDetail())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasQuantity()) {
composeType("quantity", element.getQuantity());
}
if (element.hasSubject()) {
composeReference("subject", element.getSubject());
}
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.hasLocationCode()) {
openArray("locationCode");
for (CodeableConcept e : element.getLocationCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasLocationReference()) {
openArray("locationReference");
for (Reference e : element.getLocationReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
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.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.hasNote()) {
openArray("note");
for (Annotation e : element.getNote())
composeAnnotation(null, e);
closeArray();
}
;
if (element.hasPatientInstructionElement()) {
composeStringCore("patientInstruction", element.getPatientInstructionElement(), false);
composeStringExtras("patientInstruction", element.getPatientInstructionElement(), false);
}
if (element.hasRelevantHistory()) {
openArray("relevantHistory");
for (Reference e : element.getRelevantHistory())
composeReference(null, e);
closeArray();
}
;
}
protected void composeSlot(String name, Slot element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSlotInner(element);
}
}
protected void composeSlotInner(Slot element) throws IOException {
composeDomainResourceElements(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 (CodeableConcept e : element.getServiceType())
composeCodeableConcept(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.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);
composeSpecimenInner(element);
}
}
protected void composeSpecimenInner(Specimen element) throws IOException {
composeDomainResourceElements(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.hasCollection()) {
composeSpecimenSpecimenCollectionComponent("collection", element.getCollection());
}
if (element.hasProcessing()) {
openArray("processing");
for (Specimen.SpecimenProcessingComponent e : element.getProcessing())
composeSpecimenSpecimenProcessingComponent(null, e);
closeArray();
}
;
if (element.hasContainer()) {
openArray("container");
for (Specimen.SpecimenContainerComponent e : element.getContainer())
composeSpecimenSpecimenContainerComponent(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 composeSpecimenSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element)
throws IOException {
if (element != null) {
open(name);
composeSpecimenSpecimenCollectionComponentInner(element);
close();
}
}
protected void composeSpecimenSpecimenCollectionComponentInner(Specimen.SpecimenCollectionComponent element)
throws IOException {
composeBackbone(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.hasBodySite()) {
composeCodeableConcept("bodySite", element.getBodySite());
}
if (element.hasFastingStatus()) {
composeType("fastingStatus", element.getFastingStatus());
}
}
protected void composeSpecimenSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element)
throws IOException {
if (element != null) {
open(name);
composeSpecimenSpecimenProcessingComponentInner(element);
close();
}
}
protected void composeSpecimenSpecimenProcessingComponentInner(Specimen.SpecimenProcessingComponent element)
throws IOException {
composeBackbone(element);
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasProcedure()) {
composeCodeableConcept("procedure", element.getProcedure());
}
if (element.hasAdditive()) {
openArray("additive");
for (Reference e : element.getAdditive())
composeReference(null, e);
closeArray();
}
;
if (element.hasTime()) {
composeType("time", element.getTime());
}
}
protected void composeSpecimenSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element)
throws IOException {
if (element != null) {
open(name);
composeSpecimenSpecimenContainerComponentInner(element);
close();
}
}
protected void composeSpecimenSpecimenContainerComponentInner(Specimen.SpecimenContainerComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasCapacity()) {
composeQuantity("capacity", element.getCapacity());
}
if (element.hasSpecimenQuantity()) {
composeQuantity("specimenQuantity", element.getSpecimenQuantity());
}
if (element.hasAdditive()) {
composeType("additive", element.getAdditive());
}
}
protected void composeSpecimenDefinition(String name, SpecimenDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSpecimenDefinitionInner(element);
}
}
protected void composeSpecimenDefinitionInner(SpecimenDefinition element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
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())
composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponent(null, e);
closeArray();
}
;
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponent(String name,
SpecimenDefinition.SpecimenDefinitionTypeTestedComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponentInner(element);
close();
}
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponentInner(
SpecimenDefinition.SpecimenDefinitionTypeTestedComponent element) throws IOException {
composeBackbone(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()) {
composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent("container", element.getContainer());
}
if (element.hasRequirementElement()) {
composeStringCore("requirement", element.getRequirementElement(), false);
composeStringExtras("requirement", element.getRequirementElement(), false);
}
if (element.hasRetentionTime()) {
composeDuration("retentionTime", element.getRetentionTime());
}
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())
composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent(null, e);
closeArray();
}
;
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent(String name,
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentInner(element);
close();
}
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentInner(
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent element) throws IOException {
composeBackbone(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()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("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())
composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent(null, e);
closeArray();
}
;
if (element.hasPreparationElement()) {
composeStringCore("preparation", element.getPreparationElement(), false);
composeStringExtras("preparation", element.getPreparationElement(), false);
}
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent(String name,
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentInner(element);
close();
}
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentInner(
SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent element) throws IOException {
composeBackbone(element);
if (element.hasAdditive()) {
composeType("additive", element.getAdditive());
}
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent(String name,
SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent element) throws IOException {
if (element != null) {
open(name);
composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentInner(element);
close();
}
}
protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentInner(
SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent element) throws IOException {
composeBackbone(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()) {
composeStringCore("instruction", element.getInstructionElement(), false);
composeStringExtras("instruction", element.getInstructionElement(), false);
}
}
protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeStructureDefinitionInner(element);
}
}
protected void composeStructureDefinitionInner(StructureDefinition element) throws IOException {
composeDomainResourceElements(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.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.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())
composeStructureDefinitionStructureDefinitionMappingComponent(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())
composeStructureDefinitionStructureDefinitionContextComponent(null, e);
closeArray();
}
;
if (element.hasContextInvariant()) {
openArray("contextInvariant");
for (StringType e : element.getContextInvariant())
composeStringCore(null, e, true);
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()) {
composeStructureDefinitionStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot());
}
if (element.hasDifferential()) {
composeStructureDefinitionStructureDefinitionDifferentialComponent("differential", element.getDifferential());
}
}
protected void composeStructureDefinitionStructureDefinitionMappingComponent(String name,
StructureDefinition.StructureDefinitionMappingComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionStructureDefinitionMappingComponentInner(element);
close();
}
}
protected void composeStructureDefinitionStructureDefinitionMappingComponentInner(
StructureDefinition.StructureDefinitionMappingComponent element) throws IOException {
composeBackbone(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 composeStructureDefinitionStructureDefinitionContextComponent(String name,
StructureDefinition.StructureDefinitionContextComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionStructureDefinitionContextComponentInner(element);
close();
}
}
protected void composeStructureDefinitionStructureDefinitionContextComponentInner(
StructureDefinition.StructureDefinitionContextComponent element) throws IOException {
composeBackbone(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 composeStructureDefinitionStructureDefinitionSnapshotComponent(String name,
StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionStructureDefinitionSnapshotComponentInner(element);
close();
}
}
protected void composeStructureDefinitionStructureDefinitionSnapshotComponentInner(
StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException {
composeBackbone(element);
if (element.hasElement()) {
openArray("element");
for (ElementDefinition e : element.getElement())
composeElementDefinition(null, e);
closeArray();
}
;
}
protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(String name,
StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureDefinitionStructureDefinitionDifferentialComponentInner(element);
close();
}
}
protected void composeStructureDefinitionStructureDefinitionDifferentialComponentInner(
StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException {
composeBackbone(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);
composeStructureMapInner(element);
}
}
protected void composeStructureMapInner(StructureMap element) throws IOException {
composeDomainResourceElements(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.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.hasStructure()) {
openArray("structure");
for (StructureMap.StructureMapStructureComponent e : element.getStructure())
composeStructureMapStructureMapStructureComponent(null, e);
closeArray();
}
;
if (element.hasImport()) {
openArray("import");
for (CanonicalType e : element.getImport())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getImport())) {
openArray("_import");
for (CanonicalType e : element.getImport())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
if (element.hasGroup()) {
openArray("group");
for (StructureMap.StructureMapGroupComponent e : element.getGroup())
composeStructureMapStructureMapGroupComponent(null, e);
closeArray();
}
;
}
protected void composeStructureMapStructureMapStructureComponent(String name,
StructureMap.StructureMapStructureComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapStructureComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapStructureComponentInner(
StructureMap.StructureMapStructureComponent element) throws IOException {
composeBackbone(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 composeStructureMapStructureMapGroupComponent(String name,
StructureMap.StructureMapGroupComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupComponentInner(StructureMap.StructureMapGroupComponent element)
throws IOException {
composeBackbone(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())
composeStructureMapStructureMapGroupInputComponent(null, e);
closeArray();
}
;
if (element.hasRule()) {
openArray("rule");
for (StructureMap.StructureMapGroupRuleComponent e : element.getRule())
composeStructureMapStructureMapGroupRuleComponent(null, e);
closeArray();
}
;
}
protected void composeStructureMapStructureMapGroupInputComponent(String name,
StructureMap.StructureMapGroupInputComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupInputComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupInputComponentInner(
StructureMap.StructureMapGroupInputComponent element) throws IOException {
composeBackbone(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 composeStructureMapStructureMapGroupRuleComponent(String name,
StructureMap.StructureMapGroupRuleComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupRuleComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupRuleComponentInner(
StructureMap.StructureMapGroupRuleComponent element) throws IOException {
composeBackbone(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())
composeStructureMapStructureMapGroupRuleSourceComponent(null, e);
closeArray();
}
;
if (element.hasTarget()) {
openArray("target");
for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget())
composeStructureMapStructureMapGroupRuleTargetComponent(null, e);
closeArray();
}
;
if (element.hasRule()) {
openArray("rule");
for (StructureMap.StructureMapGroupRuleComponent e : element.getRule())
composeStructureMapStructureMapGroupRuleComponent(null, e);
closeArray();
}
;
if (element.hasDependent()) {
openArray("dependent");
for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent())
composeStructureMapStructureMapGroupRuleDependentComponent(null, e);
closeArray();
}
;
if (element.hasDocumentationElement()) {
composeStringCore("documentation", element.getDocumentationElement(), false);
composeStringExtras("documentation", element.getDocumentationElement(), false);
}
}
protected void composeStructureMapStructureMapGroupRuleSourceComponent(String name,
StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupRuleSourceComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupRuleSourceComponentInner(
StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException {
composeBackbone(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.hasDefaultValue()) {
composeType("defaultValue", element.getDefaultValue());
}
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 composeStructureMapStructureMapGroupRuleTargetComponent(String name,
StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupRuleTargetComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupRuleTargetComponentInner(
StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException {
composeBackbone(element);
if (element.hasContextElement()) {
composeIdCore("context", element.getContextElement(), false);
composeIdExtras("context", element.getContextElement(), false);
}
if (element.hasContextTypeElement()) {
composeEnumerationCore("contextType", element.getContextTypeElement(),
new StructureMap.StructureMapContextTypeEnumFactory(), false);
composeEnumerationExtras("contextType", element.getContextTypeElement(),
new StructureMap.StructureMapContextTypeEnumFactory(), 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())
composeStructureMapStructureMapGroupRuleTargetParameterComponent(null, e);
closeArray();
}
;
}
protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(String name,
StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupRuleTargetParameterComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupRuleTargetParameterComponentInner(
StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException {
composeBackbone(element);
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeStructureMapStructureMapGroupRuleDependentComponent(String name,
StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException {
if (element != null) {
open(name);
composeStructureMapStructureMapGroupRuleDependentComponentInner(element);
close();
}
}
protected void composeStructureMapStructureMapGroupRuleDependentComponentInner(
StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeIdCore("name", element.getNameElement(), false);
composeIdExtras("name", element.getNameElement(), false);
}
if (element.hasVariable()) {
openArray("variable");
for (StringType e : element.getVariable())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getVariable())) {
openArray("_variable");
for (StringType e : element.getVariable())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeSubscription(String name, Subscription element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubscriptionInner(element);
}
}
protected void composeSubscriptionInner(Subscription element) throws IOException {
composeDomainResourceElements(element);
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory(),
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.hasReasonElement()) {
composeStringCore("reason", element.getReasonElement(), false);
composeStringExtras("reason", element.getReasonElement(), false);
}
if (element.hasCriteriaElement()) {
composeStringCore("criteria", element.getCriteriaElement(), false);
composeStringExtras("criteria", element.getCriteriaElement(), false);
}
if (element.hasErrorElement()) {
composeStringCore("error", element.getErrorElement(), false);
composeStringExtras("error", element.getErrorElement(), false);
}
if (element.hasChannel()) {
composeSubscriptionSubscriptionChannelComponent("channel", element.getChannel());
}
}
protected void composeSubscriptionSubscriptionChannelComponent(String name,
Subscription.SubscriptionChannelComponent element) throws IOException {
if (element != null) {
open(name);
composeSubscriptionSubscriptionChannelComponentInner(element);
close();
}
}
protected void composeSubscriptionSubscriptionChannelComponentInner(Subscription.SubscriptionChannelComponent element)
throws IOException {
composeBackbone(element);
if (element.hasTypeElement()) {
composeEnumerationCore("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory(),
false);
composeEnumerationExtras("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory(),
false);
}
if (element.hasEndpointElement()) {
composeUrlCore("endpoint", element.getEndpointElement(), false);
composeUrlExtras("endpoint", element.getEndpointElement(), false);
}
if (element.hasPayloadElement()) {
composeCodeCore("payload", element.getPayloadElement(), false);
composeCodeExtras("payload", element.getPayloadElement(), false);
}
if (element.hasHeader()) {
openArray("header");
for (StringType e : element.getHeader())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getHeader())) {
openArray("_header");
for (StringType e : element.getHeader())
composeStringExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeSubstance(String name, Substance element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceInner(element);
}
}
protected void composeSubstanceInner(Substance element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
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()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasInstance()) {
openArray("instance");
for (Substance.SubstanceInstanceComponent e : element.getInstance())
composeSubstanceSubstanceInstanceComponent(null, e);
closeArray();
}
;
if (element.hasIngredient()) {
openArray("ingredient");
for (Substance.SubstanceIngredientComponent e : element.getIngredient())
composeSubstanceSubstanceIngredientComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceSubstanceInstanceComponent(String name, Substance.SubstanceInstanceComponent element)
throws IOException {
if (element != null) {
open(name);
composeSubstanceSubstanceInstanceComponentInner(element);
close();
}
}
protected void composeSubstanceSubstanceInstanceComponentInner(Substance.SubstanceInstanceComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasExpiryElement()) {
composeDateTimeCore("expiry", element.getExpiryElement(), false);
composeDateTimeExtras("expiry", element.getExpiryElement(), false);
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
}
protected void composeSubstanceSubstanceIngredientComponent(String name,
Substance.SubstanceIngredientComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSubstanceIngredientComponentInner(element);
close();
}
}
protected void composeSubstanceSubstanceIngredientComponentInner(Substance.SubstanceIngredientComponent element)
throws IOException {
composeBackbone(element);
if (element.hasQuantity()) {
composeRatio("quantity", element.getQuantity());
}
if (element.hasSubstance()) {
composeType("substance", element.getSubstance());
}
}
protected void composeSubstanceNucleicAcid(String name, SubstanceNucleicAcid element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceNucleicAcidInner(element);
}
}
protected void composeSubstanceNucleicAcidInner(SubstanceNucleicAcid element) throws IOException {
composeDomainResourceElements(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())
composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent(String name,
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentInner(element);
close();
}
}
protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentInner(
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent element) throws IOException {
composeBackbone(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())
composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent(null, e);
closeArray();
}
;
if (element.hasSugar()) {
openArray("sugar");
for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent e : element.getSugar())
composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent(String name,
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentInner(element);
close();
}
}
protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentInner(
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent element) throws IOException {
composeBackbone(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 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent(String name,
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentInner(element);
close();
}
}
protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentInner(
SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent element) throws IOException {
composeBackbone(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);
composeSubstancePolymerInner(element);
}
}
protected void composeSubstancePolymerInner(SubstancePolymer element) throws IOException {
composeDomainResourceElements(element);
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.hasModification()) {
openArray("modification");
for (StringType e : element.getModification())
composeStringCore(null, e, true);
closeArray();
if (anyHasExtras(element.getModification())) {
openArray("_modification");
for (StringType e : element.getModification())
composeStringExtras(null, e, true);
closeArray();
}
}
;
if (element.hasMonomerSet()) {
openArray("monomerSet");
for (SubstancePolymer.SubstancePolymerMonomerSetComponent e : element.getMonomerSet())
composeSubstancePolymerSubstancePolymerMonomerSetComponent(null, e);
closeArray();
}
;
if (element.hasRepeat()) {
openArray("repeat");
for (SubstancePolymer.SubstancePolymerRepeatComponent e : element.getRepeat())
composeSubstancePolymerSubstancePolymerRepeatComponent(null, e);
closeArray();
}
;
}
protected void composeSubstancePolymerSubstancePolymerMonomerSetComponent(String name,
SubstancePolymer.SubstancePolymerMonomerSetComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerSubstancePolymerMonomerSetComponentInner(element);
close();
}
}
protected void composeSubstancePolymerSubstancePolymerMonomerSetComponentInner(
SubstancePolymer.SubstancePolymerMonomerSetComponent element) throws IOException {
composeBackbone(element);
if (element.hasRatioType()) {
composeCodeableConcept("ratioType", element.getRatioType());
}
if (element.hasStartingMaterial()) {
openArray("startingMaterial");
for (SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent e : element.getStartingMaterial())
composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent(null, e);
closeArray();
}
;
}
protected void composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent(String name,
SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentInner(element);
close();
}
}
protected void composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentInner(
SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent element) throws IOException {
composeBackbone(element);
if (element.hasMaterial()) {
composeCodeableConcept("material", element.getMaterial());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasIsDefiningElement()) {
composeBooleanCore("isDefining", element.getIsDefiningElement(), false);
composeBooleanExtras("isDefining", element.getIsDefiningElement(), false);
}
if (element.hasAmount()) {
composeSubstanceAmount("amount", element.getAmount());
}
}
protected void composeSubstancePolymerSubstancePolymerRepeatComponent(String name,
SubstancePolymer.SubstancePolymerRepeatComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerSubstancePolymerRepeatComponentInner(element);
close();
}
}
protected void composeSubstancePolymerSubstancePolymerRepeatComponentInner(
SubstancePolymer.SubstancePolymerRepeatComponent element) throws IOException {
composeBackbone(element);
if (element.hasNumberOfUnitsElement()) {
composeIntegerCore("numberOfUnits", element.getNumberOfUnitsElement(), false);
composeIntegerExtras("numberOfUnits", element.getNumberOfUnitsElement(), false);
}
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())
composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent(null, e);
closeArray();
}
;
}
protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent(String name,
SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentInner(element);
close();
}
}
protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentInner(
SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent element) throws IOException {
composeBackbone(element);
if (element.hasOrientationOfPolymerisation()) {
composeCodeableConcept("orientationOfPolymerisation", element.getOrientationOfPolymerisation());
}
if (element.hasRepeatUnitElement()) {
composeStringCore("repeatUnit", element.getRepeatUnitElement(), false);
composeStringExtras("repeatUnit", element.getRepeatUnitElement(), false);
}
if (element.hasAmount()) {
composeSubstanceAmount("amount", element.getAmount());
}
if (element.hasDegreeOfPolymerisation()) {
openArray("degreeOfPolymerisation");
for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent e : element
.getDegreeOfPolymerisation())
composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(null, e);
closeArray();
}
;
if (element.hasStructuralRepresentation()) {
openArray("structuralRepresentation");
for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent e : element
.getStructuralRepresentation())
composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(null, e);
closeArray();
}
;
}
protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(String name,
SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentInner(element);
close();
}
}
protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentInner(
SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent element) throws IOException {
composeBackbone(element);
if (element.hasDegree()) {
composeCodeableConcept("degree", element.getDegree());
}
if (element.hasAmount()) {
composeSubstanceAmount("amount", element.getAmount());
}
}
protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(String name,
SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentInner(element);
close();
}
}
protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentInner(
SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRepresentationElement()) {
composeStringCore("representation", element.getRepresentationElement(), false);
composeStringExtras("representation", element.getRepresentationElement(), false);
}
if (element.hasAttachment()) {
composeAttachment("attachment", element.getAttachment());
}
}
protected void composeSubstanceProtein(String name, SubstanceProtein element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceProteinInner(element);
}
}
protected void composeSubstanceProteinInner(SubstanceProtein element) throws IOException {
composeDomainResourceElements(element);
if (element.hasSequenceType()) {
composeCodeableConcept("sequenceType", element.getSequenceType());
}
if (element.hasNumberOfSubunitsElement()) {
composeIntegerCore("numberOfSubunits", element.getNumberOfSubunitsElement(), false);
composeIntegerExtras("numberOfSubunits", element.getNumberOfSubunitsElement(), false);
}
if (element.hasDisulfideLinkage()) {
openArray("disulfideLinkage");
for (StringType e : element.getDisulfideLinkage())
composeStringCore(null, e, true);
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())
composeSubstanceProteinSubstanceProteinSubunitComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceProteinSubstanceProteinSubunitComponent(String name,
SubstanceProtein.SubstanceProteinSubunitComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceProteinSubstanceProteinSubunitComponentInner(element);
close();
}
}
protected void composeSubstanceProteinSubstanceProteinSubunitComponentInner(
SubstanceProtein.SubstanceProteinSubunitComponent element) throws IOException {
composeBackbone(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);
composeSubstanceReferenceInformationInner(element);
}
}
protected void composeSubstanceReferenceInformationInner(SubstanceReferenceInformation element) throws IOException {
composeDomainResourceElements(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())
composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent(null, e);
closeArray();
}
;
if (element.hasGeneElement()) {
openArray("geneElement");
for (SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent e : element.getGeneElement())
composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent(null, e);
closeArray();
}
;
if (element.hasClassification()) {
openArray("classification");
for (SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent e : element
.getClassification())
composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent(null, e);
closeArray();
}
;
if (element.hasTarget()) {
openArray("target");
for (SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent e : element.getTarget())
composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent(String name,
SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentInner(element);
close();
}
}
protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentInner(
SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent element) throws IOException {
composeBackbone(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 composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent(String name,
SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentInner(element);
close();
}
}
protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentInner(
SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent element) throws IOException {
composeBackbone(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 composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent(String name,
SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentInner(element);
close();
}
}
protected void composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentInner(
SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent element) throws IOException {
composeBackbone(element);
if (element.hasDomain()) {
composeCodeableConcept("domain", element.getDomain());
}
if (element.hasClassification()) {
composeCodeableConcept("classification", element.getClassification());
}
if (element.hasSubtype()) {
openArray("subtype");
for (CodeableConcept e : element.getSubtype())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
}
;
}
protected void composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent(String name,
SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentInner(element);
close();
}
}
protected void composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentInner(
SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent element) throws IOException {
composeBackbone(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);
composeSubstanceSourceMaterialInner(element);
}
}
protected void composeSubstanceSourceMaterialInner(SubstanceSourceMaterial element) throws IOException {
composeDomainResourceElements(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()) {
openArray("parentSubstanceName");
for (StringType e : element.getParentSubstanceName())
composeStringCore(null, e, true);
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()) {
openArray("geographicalLocation");
for (StringType e : element.getGeographicalLocation())
composeStringCore(null, e, true);
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())
composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent(null, e);
closeArray();
}
;
if (element.hasOrganism()) {
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent("organism", element.getOrganism());
}
if (element.hasPartDescription()) {
openArray("partDescription");
for (SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent e : element.getPartDescription())
composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent(String name,
SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentInner(element);
close();
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentInner(
SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent element) throws IOException {
composeBackbone(element);
if (element.hasFractionElement()) {
composeStringCore("fraction", element.getFractionElement(), false);
composeStringExtras("fraction", element.getFractionElement(), false);
}
if (element.hasMaterialType()) {
composeCodeableConcept("materialType", element.getMaterialType());
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent(String name,
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentInner(element);
close();
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentInner(
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent element) throws IOException {
composeBackbone(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())
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent(null, e);
closeArray();
}
;
if (element.hasHybrid()) {
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent("hybrid", element.getHybrid());
}
if (element.hasOrganismGeneral()) {
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent("organismGeneral",
element.getOrganismGeneral());
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent(String name,
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentInner(element);
close();
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentInner(
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent element) throws IOException {
composeBackbone(element);
if (element.hasAuthorType()) {
composeCodeableConcept("authorType", element.getAuthorType());
}
if (element.hasAuthorDescriptionElement()) {
composeStringCore("authorDescription", element.getAuthorDescriptionElement(), false);
composeStringExtras("authorDescription", element.getAuthorDescriptionElement(), false);
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent(String name,
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentInner(element);
close();
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentInner(
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent element) throws IOException {
composeBackbone(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 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent(String name,
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentInner(element);
close();
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentInner(
SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent element) throws IOException {
composeBackbone(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 composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent(String name,
SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentInner(element);
close();
}
}
protected void composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentInner(
SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent element) throws IOException {
composeBackbone(element);
if (element.hasPart()) {
composeCodeableConcept("part", element.getPart());
}
if (element.hasPartLocation()) {
composeCodeableConcept("partLocation", element.getPartLocation());
}
}
protected void composeSubstanceSpecification(String name, SubstanceSpecification element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSubstanceSpecificationInner(element);
}
}
protected void composeSubstanceSpecificationInner(SubstanceSpecification element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasStatus()) {
composeCodeableConcept("status", element.getStatus());
}
if (element.hasDomain()) {
composeCodeableConcept("domain", element.getDomain());
}
if (element.hasDescriptionElement()) {
composeStringCore("description", element.getDescriptionElement(), false);
composeStringExtras("description", element.getDescriptionElement(), false);
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
}
;
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasMoiety()) {
openArray("moiety");
for (SubstanceSpecification.SubstanceSpecificationMoietyComponent e : element.getMoiety())
composeSubstanceSpecificationSubstanceSpecificationMoietyComponent(null, e);
closeArray();
}
;
if (element.hasProperty()) {
openArray("property");
for (SubstanceSpecification.SubstanceSpecificationPropertyComponent e : element.getProperty())
composeSubstanceSpecificationSubstanceSpecificationPropertyComponent(null, e);
closeArray();
}
;
if (element.hasReferenceInformation()) {
composeReference("referenceInformation", element.getReferenceInformation());
}
if (element.hasStructure()) {
composeSubstanceSpecificationSubstanceSpecificationStructureComponent("structure", element.getStructure());
}
if (element.hasCode()) {
openArray("code");
for (SubstanceSpecification.SubstanceSpecificationCodeComponent e : element.getCode())
composeSubstanceSpecificationSubstanceSpecificationCodeComponent(null, e);
closeArray();
}
;
if (element.hasName()) {
openArray("name");
for (SubstanceSpecification.SubstanceSpecificationNameComponent e : element.getName())
composeSubstanceSpecificationSubstanceSpecificationNameComponent(null, e);
closeArray();
}
;
if (element.hasMolecularWeight()) {
openArray("molecularWeight");
for (SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent e : element
.getMolecularWeight())
composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(null, e);
closeArray();
}
;
if (element.hasRelationship()) {
openArray("relationship");
for (SubstanceSpecification.SubstanceSpecificationRelationshipComponent e : element.getRelationship())
composeSubstanceSpecificationSubstanceSpecificationRelationshipComponent(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()) {
composeReference("sourceMaterial", element.getSourceMaterial());
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationMoietyComponent(String name,
SubstanceSpecification.SubstanceSpecificationMoietyComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationMoietyComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationMoietyComponentInner(
SubstanceSpecification.SubstanceSpecificationMoietyComponent element) throws IOException {
composeBackbone(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());
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationPropertyComponent(String name,
SubstanceSpecification.SubstanceSpecificationPropertyComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationPropertyComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationPropertyComponentInner(
SubstanceSpecification.SubstanceSpecificationPropertyComponent element) throws IOException {
composeBackbone(element);
if (element.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasCode()) {
composeCodeableConcept("code", element.getCode());
}
if (element.hasParametersElement()) {
composeStringCore("parameters", element.getParametersElement(), false);
composeStringExtras("parameters", element.getParametersElement(), false);
}
if (element.hasDefiningSubstance()) {
composeType("definingSubstance", element.getDefiningSubstance());
}
if (element.hasAmount()) {
composeType("amount", element.getAmount());
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureComponent(String name,
SubstanceSpecification.SubstanceSpecificationStructureComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationStructureComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureComponentInner(
SubstanceSpecification.SubstanceSpecificationStructureComponent element) throws IOException {
composeBackbone(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.hasIsotope()) {
openArray("isotope");
for (SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent e : element.getIsotope())
composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent(null, e);
closeArray();
}
;
if (element.hasMolecularWeight()) {
composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent("molecularWeight",
element.getMolecularWeight());
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
}
;
if (element.hasRepresentation()) {
openArray("representation");
for (SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent e : element
.getRepresentation())
composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent(null, e);
closeArray();
}
;
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent(String name,
SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentInner(
SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent element) throws IOException {
composeBackbone(element);
if (element.hasIdentifier()) {
composeIdentifier("identifier", element.getIdentifier());
}
if (element.hasName()) {
composeCodeableConcept("name", element.getName());
}
if (element.hasSubstitution()) {
composeCodeableConcept("substitution", element.getSubstitution());
}
if (element.hasHalfLife()) {
composeQuantity("halfLife", element.getHalfLife());
}
if (element.hasMolecularWeight()) {
composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent("molecularWeight",
element.getMolecularWeight());
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(
String name, SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent element)
throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentInner(
SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent element)
throws IOException {
composeBackbone(element);
if (element.hasMethod()) {
composeCodeableConcept("method", element.getMethod());
}
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasAmount()) {
composeQuantity("amount", element.getAmount());
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent(String name,
SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentInner(
SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasRepresentationElement()) {
composeStringCore("representation", element.getRepresentationElement(), false);
composeStringExtras("representation", element.getRepresentationElement(), false);
}
if (element.hasAttachment()) {
composeAttachment("attachment", element.getAttachment());
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationCodeComponent(String name,
SubstanceSpecification.SubstanceSpecificationCodeComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationCodeComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationCodeComponentInner(
SubstanceSpecification.SubstanceSpecificationCodeComponent element) throws IOException {
composeBackbone(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.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);
composeStringExtras("comment", element.getCommentElement(), false);
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
}
;
}
protected void composeSubstanceSpecificationSubstanceSpecificationNameComponent(String name,
SubstanceSpecification.SubstanceSpecificationNameComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationNameComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationNameComponentInner(
SubstanceSpecification.SubstanceSpecificationNameComponent element) throws IOException {
composeBackbone(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 (SubstanceSpecification.SubstanceSpecificationNameComponent e : element.getSynonym())
composeSubstanceSpecificationSubstanceSpecificationNameComponent(null, e);
closeArray();
}
;
if (element.hasTranslation()) {
openArray("translation");
for (SubstanceSpecification.SubstanceSpecificationNameComponent e : element.getTranslation())
composeSubstanceSpecificationSubstanceSpecificationNameComponent(null, e);
closeArray();
}
;
if (element.hasOfficial()) {
openArray("official");
for (SubstanceSpecification.SubstanceSpecificationNameOfficialComponent e : element.getOfficial())
composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponent(null, e);
closeArray();
}
;
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
}
;
}
protected void composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponent(String name,
SubstanceSpecification.SubstanceSpecificationNameOfficialComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponentInner(
SubstanceSpecification.SubstanceSpecificationNameOfficialComponent element) throws IOException {
composeBackbone(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 composeSubstanceSpecificationSubstanceSpecificationRelationshipComponent(String name,
SubstanceSpecification.SubstanceSpecificationRelationshipComponent element) throws IOException {
if (element != null) {
open(name);
composeSubstanceSpecificationSubstanceSpecificationRelationshipComponentInner(element);
close();
}
}
protected void composeSubstanceSpecificationSubstanceSpecificationRelationshipComponentInner(
SubstanceSpecification.SubstanceSpecificationRelationshipComponent element) throws IOException {
composeBackbone(element);
if (element.hasSubstance()) {
composeType("substance", element.getSubstance());
}
if (element.hasRelationship()) {
composeCodeableConcept("relationship", element.getRelationship());
}
if (element.hasIsDefiningElement()) {
composeBooleanCore("isDefining", element.getIsDefiningElement(), false);
composeBooleanExtras("isDefining", element.getIsDefiningElement(), false);
}
if (element.hasAmount()) {
composeType("amount", element.getAmount());
}
if (element.hasAmountRatioLowLimit()) {
composeRatio("amountRatioLowLimit", element.getAmountRatioLowLimit());
}
if (element.hasAmountType()) {
composeCodeableConcept("amountType", element.getAmountType());
}
if (element.hasSource()) {
openArray("source");
for (Reference e : element.getSource())
composeReference(null, e);
closeArray();
}
;
}
protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeSupplyDeliveryInner(element);
}
}
protected void composeSupplyDeliveryInner(SupplyDelivery element) throws IOException {
composeDomainResourceElements(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()) {
composeSupplyDeliverySupplyDeliverySuppliedItemComponent("suppliedItem", element.getSuppliedItem());
}
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 composeSupplyDeliverySupplyDeliverySuppliedItemComponent(String name,
SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException {
if (element != null) {
open(name);
composeSupplyDeliverySupplyDeliverySuppliedItemComponentInner(element);
close();
}
}
protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponentInner(
SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException {
composeBackbone(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);
composeSupplyRequestInner(element);
}
}
protected void composeSupplyRequestInner(SupplyRequest element) throws IOException {
composeDomainResourceElements(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.hasCategory()) {
composeCodeableConcept("category", element.getCategory());
}
if (element.hasPriorityElement()) {
composeEnumerationCore("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory(),
false);
composeEnumerationExtras("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory(),
false);
}
if (element.hasItem()) {
composeType("item", element.getItem());
}
if (element.hasQuantity()) {
composeQuantity("quantity", element.getQuantity());
}
if (element.hasParameter()) {
openArray("parameter");
for (SupplyRequest.SupplyRequestParameterComponent e : element.getParameter())
composeSupplyRequestSupplyRequestParameterComponent(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.hasReasonCode()) {
openArray("reasonCode");
for (CodeableConcept e : element.getReasonCode())
composeCodeableConcept(null, e);
closeArray();
}
;
if (element.hasReasonReference()) {
openArray("reasonReference");
for (Reference e : element.getReasonReference())
composeReference(null, e);
closeArray();
}
;
if (element.hasDeliverFrom()) {
composeReference("deliverFrom", element.getDeliverFrom());
}
if (element.hasDeliverTo()) {
composeReference("deliverTo", element.getDeliverTo());
}
}
protected void composeSupplyRequestSupplyRequestParameterComponent(String name,
SupplyRequest.SupplyRequestParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeSupplyRequestSupplyRequestParameterComponentInner(element);
close();
}
}
protected void composeSupplyRequestSupplyRequestParameterComponentInner(
SupplyRequest.SupplyRequestParameterComponent element) throws IOException {
composeBackbone(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);
composeTaskInner(element);
}
}
protected void composeTaskInner(Task element) throws IOException {
composeDomainResourceElements(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()) {
composeCodeableConcept("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 Task.TaskPriorityEnumFactory(), false);
composeEnumerationExtras("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory(), 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.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.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.hasReasonCode()) {
composeCodeableConcept("reasonCode", element.getReasonCode());
}
if (element.hasReasonReference()) {
composeReference("reasonReference", element.getReasonReference());
}
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()) {
composeTaskTaskRestrictionComponent("restriction", element.getRestriction());
}
if (element.hasInput()) {
openArray("input");
for (Task.ParameterComponent e : element.getInput())
composeTaskParameterComponent(null, e);
closeArray();
}
;
if (element.hasOutput()) {
openArray("output");
for (Task.TaskOutputComponent e : element.getOutput())
composeTaskTaskOutputComponent(null, e);
closeArray();
}
;
}
protected void composeTaskTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTaskTaskRestrictionComponentInner(element);
close();
}
}
protected void composeTaskTaskRestrictionComponentInner(Task.TaskRestrictionComponent element) throws IOException {
composeBackbone(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 composeTaskParameterComponent(String name, Task.ParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeTaskParameterComponentInner(element);
close();
}
}
protected void composeTaskParameterComponentInner(Task.ParameterComponent element) throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCodeableConcept("type", element.getType());
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeTaskTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException {
if (element != null) {
open(name);
composeTaskTaskOutputComponentInner(element);
close();
}
}
protected void composeTaskTaskOutputComponentInner(Task.TaskOutputComponent element) throws IOException {
composeBackbone(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);
composeTerminologyCapabilitiesInner(element);
}
}
protected void composeTerminologyCapabilitiesInner(TerminologyCapabilities element) throws IOException {
composeDomainResourceElements(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.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.hasKindElement()) {
composeEnumerationCore("kind", element.getKindElement(),
new TerminologyCapabilities.CapabilityStatementKindEnumFactory(), false);
composeEnumerationExtras("kind", element.getKindElement(),
new TerminologyCapabilities.CapabilityStatementKindEnumFactory(), false);
}
if (element.hasSoftware()) {
composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent("software", element.getSoftware());
}
if (element.hasImplementation()) {
composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent("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())
composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(null, e);
closeArray();
}
;
if (element.hasExpansion()) {
composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent("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()) {
composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent("validateCode",
element.getValidateCode());
}
if (element.hasTranslation()) {
composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent("translation",
element.getTranslation());
}
if (element.hasClosure()) {
composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent("closure", element.getClosure());
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent element) throws IOException {
composeBackbone(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 composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent element) throws IOException {
composeBackbone(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 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent element) throws IOException {
composeBackbone(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())
composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent(null, e);
closeArray();
}
;
if (element.hasSubsumptionElement()) {
composeBooleanCore("subsumption", element.getSubsumptionElement(), false);
composeBooleanExtras("subsumption", element.getSubsumptionElement(), false);
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent element) throws IOException {
composeBackbone(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 (CodeType e : element.getLanguage())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getLanguage())) {
openArray("_language");
for (CodeType e : element.getLanguage())
composeCodeExtras(null, e, true);
closeArray();
}
}
;
if (element.hasFilter()) {
openArray("filter");
for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent e : element.getFilter())
composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(null, e);
closeArray();
}
;
if (element.hasProperty()) {
openArray("property");
for (CodeType e : element.getProperty())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getProperty())) {
openArray("_property");
for (CodeType e : element.getProperty())
composeCodeExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element) throws IOException {
composeBackbone(element);
if (element.hasCodeElement()) {
composeCodeCore("code", element.getCodeElement(), false);
composeCodeExtras("code", element.getCodeElement(), false);
}
if (element.hasOp()) {
openArray("op");
for (CodeType e : element.getOp())
composeCodeCore(null, e, true);
closeArray();
if (anyHasExtras(element.getOp())) {
openArray("_op");
for (CodeType e : element.getOp())
composeCodeExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element) throws IOException {
composeBackbone(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())
composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(null, e);
closeArray();
}
;
if (element.hasTextFilterElement()) {
composeMarkdownCore("textFilter", element.getTextFilterElement(), false);
composeMarkdownExtras("textFilter", element.getTextFilterElement(), false);
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent element) throws IOException {
composeBackbone(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 composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent element) throws IOException {
composeBackbone(element);
if (element.hasTranslationsElement()) {
composeBooleanCore("translations", element.getTranslationsElement(), false);
composeBooleanExtras("translations", element.getTranslationsElement(), false);
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent element) throws IOException {
composeBackbone(element);
if (element.hasNeedsMapElement()) {
composeBooleanCore("needsMap", element.getNeedsMapElement(), false);
composeBooleanExtras("needsMap", element.getNeedsMapElement(), false);
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(String name,
TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element) throws IOException {
if (element != null) {
open(name);
composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentInner(element);
close();
}
}
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentInner(
TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element) throws IOException {
composeBackbone(element);
if (element.hasTranslationElement()) {
composeBooleanCore("translation", element.getTranslationElement(), false);
composeBooleanExtras("translation", element.getTranslationElement(), false);
}
}
protected void composeTestReport(String name, TestReport element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTestReportInner(element);
}
}
protected void composeTestReportInner(TestReport element) throws IOException {
composeDomainResourceElements(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.hasTestScript()) {
composeReference("testScript", element.getTestScript());
}
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())
composeTestReportTestReportParticipantComponent(null, e);
closeArray();
}
;
if (element.hasSetup()) {
composeTestReportTestReportSetupComponent("setup", element.getSetup());
}
if (element.hasTest()) {
openArray("test");
for (TestReport.TestReportTestComponent e : element.getTest())
composeTestReportTestReportTestComponent(null, e);
closeArray();
}
;
if (element.hasTeardown()) {
composeTestReportTestReportTeardownComponent("teardown", element.getTeardown());
}
}
protected void composeTestReportTestReportParticipantComponent(String name,
TestReport.TestReportParticipantComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportTestReportParticipantComponentInner(element);
close();
}
}
protected void composeTestReportTestReportParticipantComponentInner(TestReport.TestReportParticipantComponent element)
throws IOException {
composeBackbone(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 composeTestReportTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestReportTestReportSetupComponentInner(element);
close();
}
}
protected void composeTestReportTestReportSetupComponentInner(TestReport.TestReportSetupComponent element)
throws IOException {
composeBackbone(element);
if (element.hasAction()) {
openArray("action");
for (TestReport.SetupActionComponent e : element.getAction())
composeTestReportSetupActionComponent(null, e);
closeArray();
}
;
}
protected void composeTestReportSetupActionComponent(String name, TestReport.SetupActionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestReportSetupActionComponentInner(element);
close();
}
}
protected void composeTestReportSetupActionComponentInner(TestReport.SetupActionComponent element)
throws IOException {
composeBackbone(element);
if (element.hasOperation()) {
composeTestReportSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeTestReportSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeTestReportSetupActionOperationComponent(String name,
TestReport.SetupActionOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportSetupActionOperationComponentInner(element);
close();
}
}
protected void composeTestReportSetupActionOperationComponentInner(TestReport.SetupActionOperationComponent element)
throws IOException {
composeBackbone(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 composeTestReportSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestReportSetupActionAssertComponentInner(element);
close();
}
}
protected void composeTestReportSetupActionAssertComponentInner(TestReport.SetupActionAssertComponent element)
throws IOException {
composeBackbone(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);
}
}
protected void composeTestReportTestReportTestComponent(String name, TestReport.TestReportTestComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestReportTestReportTestComponentInner(element);
close();
}
}
protected void composeTestReportTestReportTestComponentInner(TestReport.TestReportTestComponent element)
throws IOException {
composeBackbone(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())
composeTestReportTestActionComponent(null, e);
closeArray();
}
;
}
protected void composeTestReportTestActionComponent(String name, TestReport.TestActionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestReportTestActionComponentInner(element);
close();
}
}
protected void composeTestReportTestActionComponentInner(TestReport.TestActionComponent element) throws IOException {
composeBackbone(element);
if (element.hasOperation()) {
composeTestReportSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeTestReportSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeTestReportTestReportTeardownComponent(String name,
TestReport.TestReportTeardownComponent element) throws IOException {
if (element != null) {
open(name);
composeTestReportTestReportTeardownComponentInner(element);
close();
}
}
protected void composeTestReportTestReportTeardownComponentInner(TestReport.TestReportTeardownComponent element)
throws IOException {
composeBackbone(element);
if (element.hasAction()) {
openArray("action");
for (TestReport.TeardownActionComponent e : element.getAction())
composeTestReportTeardownActionComponent(null, e);
closeArray();
}
;
}
protected void composeTestReportTeardownActionComponent(String name, TestReport.TeardownActionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestReportTeardownActionComponentInner(element);
close();
}
}
protected void composeTestReportTeardownActionComponentInner(TestReport.TeardownActionComponent element)
throws IOException {
composeBackbone(element);
if (element.hasOperation()) {
composeTestReportSetupActionOperationComponent("operation", element.getOperation());
}
}
protected void composeTestScript(String name, TestScript element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeTestScriptInner(element);
}
}
protected void composeTestScriptInner(TestScript element) throws IOException {
composeDomainResourceElements(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.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.hasOrigin()) {
openArray("origin");
for (TestScript.TestScriptOriginComponent e : element.getOrigin())
composeTestScriptTestScriptOriginComponent(null, e);
closeArray();
}
;
if (element.hasDestination()) {
openArray("destination");
for (TestScript.TestScriptDestinationComponent e : element.getDestination())
composeTestScriptTestScriptDestinationComponent(null, e);
closeArray();
}
;
if (element.hasMetadata()) {
composeTestScriptTestScriptMetadataComponent("metadata", element.getMetadata());
}
if (element.hasFixture()) {
openArray("fixture");
for (TestScript.TestScriptFixtureComponent e : element.getFixture())
composeTestScriptTestScriptFixtureComponent(null, e);
closeArray();
}
;
if (element.hasProfile()) {
openArray("profile");
for (Reference e : element.getProfile())
composeReference(null, e);
closeArray();
}
;
if (element.hasVariable()) {
openArray("variable");
for (TestScript.TestScriptVariableComponent e : element.getVariable())
composeTestScriptTestScriptVariableComponent(null, e);
closeArray();
}
;
if (element.hasSetup()) {
composeTestScriptTestScriptSetupComponent("setup", element.getSetup());
}
if (element.hasTest()) {
openArray("test");
for (TestScript.TestScriptTestComponent e : element.getTest())
composeTestScriptTestScriptTestComponent(null, e);
closeArray();
}
;
if (element.hasTeardown()) {
composeTestScriptTestScriptTeardownComponent("teardown", element.getTeardown());
}
}
protected void composeTestScriptTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptOriginComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptOriginComponentInner(TestScript.TestScriptOriginComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIndexElement()) {
composeIntegerCore("index", element.getIndexElement(), false);
composeIntegerExtras("index", element.getIndexElement(), false);
}
if (element.hasProfile()) {
composeCoding("profile", element.getProfile());
}
}
protected void composeTestScriptTestScriptDestinationComponent(String name,
TestScript.TestScriptDestinationComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptDestinationComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptDestinationComponentInner(TestScript.TestScriptDestinationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIndexElement()) {
composeIntegerCore("index", element.getIndexElement(), false);
composeIntegerExtras("index", element.getIndexElement(), false);
}
if (element.hasProfile()) {
composeCoding("profile", element.getProfile());
}
}
protected void composeTestScriptTestScriptMetadataComponent(String name,
TestScript.TestScriptMetadataComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptMetadataComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptMetadataComponentInner(TestScript.TestScriptMetadataComponent element)
throws IOException {
composeBackbone(element);
if (element.hasLink()) {
openArray("link");
for (TestScript.TestScriptMetadataLinkComponent e : element.getLink())
composeTestScriptTestScriptMetadataLinkComponent(null, e);
closeArray();
}
;
if (element.hasCapability()) {
openArray("capability");
for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability())
composeTestScriptTestScriptMetadataCapabilityComponent(null, e);
closeArray();
}
;
}
protected void composeTestScriptTestScriptMetadataLinkComponent(String name,
TestScript.TestScriptMetadataLinkComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptMetadataLinkComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptMetadataLinkComponentInner(
TestScript.TestScriptMetadataLinkComponent element) throws IOException {
composeBackbone(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 composeTestScriptTestScriptMetadataCapabilityComponent(String name,
TestScript.TestScriptMetadataCapabilityComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptMetadataCapabilityComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptMetadataCapabilityComponentInner(
TestScript.TestScriptMetadataCapabilityComponent element) throws IOException {
composeBackbone(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()) {
openArray("origin");
for (IntegerType e : element.getOrigin())
composeIntegerCore(null, e, true);
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()) {
openArray("link");
for (UriType e : element.getLink())
composeUriCore(null, e, true);
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 composeTestScriptTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptFixtureComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptFixtureComponentInner(TestScript.TestScriptFixtureComponent element)
throws IOException {
composeBackbone(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 composeTestScriptTestScriptVariableComponent(String name,
TestScript.TestScriptVariableComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptVariableComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptVariableComponentInner(TestScript.TestScriptVariableComponent element)
throws IOException {
composeBackbone(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 composeTestScriptTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptSetupComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptSetupComponentInner(TestScript.TestScriptSetupComponent element)
throws IOException {
composeBackbone(element);
if (element.hasAction()) {
openArray("action");
for (TestScript.SetupActionComponent e : element.getAction())
composeTestScriptSetupActionComponent(null, e);
closeArray();
}
;
}
protected void composeTestScriptSetupActionComponent(String name, TestScript.SetupActionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptSetupActionComponentInner(element);
close();
}
}
protected void composeTestScriptSetupActionComponentInner(TestScript.SetupActionComponent element)
throws IOException {
composeBackbone(element);
if (element.hasOperation()) {
composeTestScriptSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeTestScriptSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeTestScriptSetupActionOperationComponent(String name,
TestScript.SetupActionOperationComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptSetupActionOperationComponentInner(element);
close();
}
}
protected void composeTestScriptSetupActionOperationComponentInner(TestScript.SetupActionOperationComponent element)
throws IOException {
composeBackbone(element);
if (element.hasType()) {
composeCoding("type", element.getType());
}
if (element.hasResourceElement()) {
composeCodeCore("resource", element.getResourceElement(), false);
composeCodeExtras("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())
composeTestScriptSetupActionOperationRequestHeaderComponent(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 composeTestScriptSetupActionOperationRequestHeaderComponent(String name,
TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptSetupActionOperationRequestHeaderComponentInner(element);
close();
}
}
protected void composeTestScriptSetupActionOperationRequestHeaderComponentInner(
TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException {
composeBackbone(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 composeTestScriptSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptSetupActionAssertComponentInner(element);
close();
}
}
protected void composeTestScriptSetupActionAssertComponentInner(TestScript.SetupActionAssertComponent element)
throws IOException {
composeBackbone(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.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()) {
composeCodeCore("resource", element.getResourceElement(), false);
composeCodeExtras("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.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);
}
}
protected void composeTestScriptTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptTestComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptTestComponentInner(TestScript.TestScriptTestComponent element)
throws IOException {
composeBackbone(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())
composeTestScriptTestActionComponent(null, e);
closeArray();
}
;
}
protected void composeTestScriptTestActionComponent(String name, TestScript.TestActionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptTestActionComponentInner(element);
close();
}
}
protected void composeTestScriptTestActionComponentInner(TestScript.TestActionComponent element) throws IOException {
composeBackbone(element);
if (element.hasOperation()) {
composeTestScriptSetupActionOperationComponent("operation", element.getOperation());
}
if (element.hasAssert()) {
composeTestScriptSetupActionAssertComponent("assert", element.getAssert());
}
}
protected void composeTestScriptTestScriptTeardownComponent(String name,
TestScript.TestScriptTeardownComponent element) throws IOException {
if (element != null) {
open(name);
composeTestScriptTestScriptTeardownComponentInner(element);
close();
}
}
protected void composeTestScriptTestScriptTeardownComponentInner(TestScript.TestScriptTeardownComponent element)
throws IOException {
composeBackbone(element);
if (element.hasAction()) {
openArray("action");
for (TestScript.TeardownActionComponent e : element.getAction())
composeTestScriptTeardownActionComponent(null, e);
closeArray();
}
;
}
protected void composeTestScriptTeardownActionComponent(String name, TestScript.TeardownActionComponent element)
throws IOException {
if (element != null) {
open(name);
composeTestScriptTeardownActionComponentInner(element);
close();
}
}
protected void composeTestScriptTeardownActionComponentInner(TestScript.TeardownActionComponent element)
throws IOException {
composeBackbone(element);
if (element.hasOperation()) {
composeTestScriptSetupActionOperationComponent("operation", element.getOperation());
}
}
protected void composeValueSet(String name, ValueSet element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeValueSetInner(element);
}
}
protected void composeValueSetInner(ValueSet element) throws IOException {
composeDomainResourceElements(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.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.hasCompose()) {
composeValueSetValueSetComposeComponent("compose", element.getCompose());
}
if (element.hasExpansion()) {
composeValueSetValueSetExpansionComponent("expansion", element.getExpansion());
}
}
protected void composeValueSetValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element)
throws IOException {
if (element != null) {
open(name);
composeValueSetValueSetComposeComponentInner(element);
close();
}
}
protected void composeValueSetValueSetComposeComponentInner(ValueSet.ValueSetComposeComponent element)
throws IOException {
composeBackbone(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())
composeValueSetConceptSetComponent(null, e);
closeArray();
}
;
if (element.hasExclude()) {
openArray("exclude");
for (ValueSet.ConceptSetComponent e : element.getExclude())
composeValueSetConceptSetComponent(null, e);
closeArray();
}
;
}
protected void composeValueSetConceptSetComponent(String name, ValueSet.ConceptSetComponent element)
throws IOException {
if (element != null) {
open(name);
composeValueSetConceptSetComponentInner(element);
close();
}
}
protected void composeValueSetConceptSetComponentInner(ValueSet.ConceptSetComponent element) throws IOException {
composeBackbone(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())
composeValueSetConceptReferenceComponent(null, e);
closeArray();
}
;
if (element.hasFilter()) {
openArray("filter");
for (ValueSet.ConceptSetFilterComponent e : element.getFilter())
composeValueSetConceptSetFilterComponent(null, e);
closeArray();
}
;
if (element.hasValueSet()) {
openArray("valueSet");
for (CanonicalType e : element.getValueSet())
composeCanonicalCore(null, e, true);
closeArray();
if (anyHasExtras(element.getValueSet())) {
openArray("_valueSet");
for (CanonicalType e : element.getValueSet())
composeCanonicalExtras(null, e, true);
closeArray();
}
}
;
}
protected void composeValueSetConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element)
throws IOException {
if (element != null) {
open(name);
composeValueSetConceptReferenceComponentInner(element);
close();
}
}
protected void composeValueSetConceptReferenceComponentInner(ValueSet.ConceptReferenceComponent element)
throws IOException {
composeBackbone(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())
composeValueSetConceptReferenceDesignationComponent(null, e);
closeArray();
}
;
}
protected void composeValueSetConceptReferenceDesignationComponent(String name,
ValueSet.ConceptReferenceDesignationComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetConceptReferenceDesignationComponentInner(element);
close();
}
}
protected void composeValueSetConceptReferenceDesignationComponentInner(
ValueSet.ConceptReferenceDesignationComponent element) throws IOException {
composeBackbone(element);
if (element.hasLanguageElement()) {
composeCodeCore("language", element.getLanguageElement(), false);
composeCodeExtras("language", element.getLanguageElement(), false);
}
if (element.hasUse()) {
composeCoding("use", element.getUse());
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeValueSetConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element)
throws IOException {
if (element != null) {
open(name);
composeValueSetConceptSetFilterComponentInner(element);
close();
}
}
protected void composeValueSetConceptSetFilterComponentInner(ValueSet.ConceptSetFilterComponent element)
throws IOException {
composeBackbone(element);
if (element.hasPropertyElement()) {
composeCodeCore("property", element.getPropertyElement(), false);
composeCodeExtras("property", element.getPropertyElement(), false);
}
if (element.hasOpElement()) {
composeEnumerationCore("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory(), false);
composeEnumerationExtras("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory(), false);
}
if (element.hasValueElement()) {
composeStringCore("value", element.getValueElement(), false);
composeStringExtras("value", element.getValueElement(), false);
}
}
protected void composeValueSetValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element)
throws IOException {
if (element != null) {
open(name);
composeValueSetValueSetExpansionComponentInner(element);
close();
}
}
protected void composeValueSetValueSetExpansionComponentInner(ValueSet.ValueSetExpansionComponent element)
throws IOException {
composeBackbone(element);
if (element.hasIdentifierElement()) {
composeUriCore("identifier", element.getIdentifierElement(), false);
composeUriExtras("identifier", element.getIdentifierElement(), 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())
composeValueSetValueSetExpansionParameterComponent(null, e);
closeArray();
}
;
if (element.hasContains()) {
openArray("contains");
for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains())
composeValueSetValueSetExpansionContainsComponent(null, e);
closeArray();
}
;
}
protected void composeValueSetValueSetExpansionParameterComponent(String name,
ValueSet.ValueSetExpansionParameterComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetValueSetExpansionParameterComponentInner(element);
close();
}
}
protected void composeValueSetValueSetExpansionParameterComponentInner(
ValueSet.ValueSetExpansionParameterComponent element) throws IOException {
composeBackbone(element);
if (element.hasNameElement()) {
composeStringCore("name", element.getNameElement(), false);
composeStringExtras("name", element.getNameElement(), false);
}
if (element.hasValue()) {
composeType("value", element.getValue());
}
}
protected void composeValueSetValueSetExpansionContainsComponent(String name,
ValueSet.ValueSetExpansionContainsComponent element) throws IOException {
if (element != null) {
open(name);
composeValueSetValueSetExpansionContainsComponentInner(element);
close();
}
}
protected void composeValueSetValueSetExpansionContainsComponentInner(
ValueSet.ValueSetExpansionContainsComponent element) throws IOException {
composeBackbone(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())
composeValueSetConceptReferenceDesignationComponent(null, e);
closeArray();
}
;
if (element.hasContains()) {
openArray("contains");
for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains())
composeValueSetValueSetExpansionContainsComponent(null, e);
closeArray();
}
;
}
protected void composeVerificationResult(String name, VerificationResult element) throws IOException {
if (element != null) {
prop("resourceType", name);
composeVerificationResultInner(element);
}
}
protected void composeVerificationResultInner(VerificationResult element) throws IOException {
composeDomainResourceElements(element);
if (element.hasTarget()) {
openArray("target");
for (Reference e : element.getTarget())
composeReference(null, e);
closeArray();
}
;
if (element.hasTargetLocation()) {
openArray("targetLocation");
for (StringType e : element.getTargetLocation())
composeStringCore(null, e, true);
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.StatusEnumFactory(), false);
composeEnumerationExtras("status", element.getStatusElement(), new VerificationResult.StatusEnumFactory(), 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())
composeVerificationResultVerificationResultPrimarySourceComponent(null, e);
closeArray();
}
;
if (element.hasAttestation()) {
composeVerificationResultVerificationResultAttestationComponent("attestation", element.getAttestation());
}
if (element.hasValidator()) {
openArray("validator");
for (VerificationResult.VerificationResultValidatorComponent e : element.getValidator())
composeVerificationResultVerificationResultValidatorComponent(null, e);
closeArray();
}
;
}
protected void composeVerificationResultVerificationResultPrimarySourceComponent(String name,
VerificationResult.VerificationResultPrimarySourceComponent element) throws IOException {
if (element != null) {
open(name);
composeVerificationResultVerificationResultPrimarySourceComponentInner(element);
close();
}
}
protected void composeVerificationResultVerificationResultPrimarySourceComponentInner(
VerificationResult.VerificationResultPrimarySourceComponent element) throws IOException {
composeBackbone(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 composeVerificationResultVerificationResultAttestationComponent(String name,
VerificationResult.VerificationResultAttestationComponent element) throws IOException {
if (element != null) {
open(name);
composeVerificationResultVerificationResultAttestationComponentInner(element);
close();
}
}
protected void composeVerificationResultVerificationResultAttestationComponentInner(
VerificationResult.VerificationResultAttestationComponent element) throws IOException {
composeBackbone(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 composeVerificationResultVerificationResultValidatorComponent(String name,
VerificationResult.VerificationResultValidatorComponent element) throws IOException {
if (element != null) {
open(name);
composeVerificationResultVerificationResultValidatorComponentInner(element);
close();
}
}
protected void composeVerificationResultVerificationResultValidatorComponentInner(
VerificationResult.VerificationResultValidatorComponent element) throws IOException {
composeBackbone(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);
composeVisionPrescriptionInner(element);
}
}
protected void composeVisionPrescriptionInner(VisionPrescription element) throws IOException {
composeDomainResourceElements(element);
if (element.hasIdentifier()) {
openArray("identifier");
for (Identifier e : element.getIdentifier())
composeIdentifier(null, e);
closeArray();
}
;
if (element.hasStatusElement()) {
composeEnumerationCore("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory(),
false);
composeEnumerationExtras("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory(),
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())
composeVisionPrescriptionVisionPrescriptionLensSpecificationComponent(null, e);
closeArray();
}
;
}
protected void composeVisionPrescriptionVisionPrescriptionLensSpecificationComponent(String name,
VisionPrescription.VisionPrescriptionLensSpecificationComponent element) throws IOException {
if (element != null) {
open(name);
composeVisionPrescriptionVisionPrescriptionLensSpecificationComponentInner(element);
close();
}
}
protected void composeVisionPrescriptionVisionPrescriptionLensSpecificationComponentInner(
VisionPrescription.VisionPrescriptionLensSpecificationComponent element) throws IOException {
composeBackbone(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())
composeVisionPrescriptionPrismComponent(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 composeVisionPrescriptionPrismComponent(String name, VisionPrescription.PrismComponent element)
throws IOException {
if (element != null) {
open(name);
composeVisionPrescriptionPrismComponentInner(element);
close();
}
}
protected void composeVisionPrescriptionPrismComponentInner(VisionPrescription.PrismComponent element)
throws IOException {
composeBackbone(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 instanceof Parameters)
composeParameters("Parameters", (Parameters) resource);
else if (resource instanceof Account)
composeAccount("Account", (Account) resource);
else if (resource instanceof ActivityDefinition)
composeActivityDefinition("ActivityDefinition", (ActivityDefinition) 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 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 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 CatalogEntry)
composeCatalogEntry("CatalogEntry", (CatalogEntry) resource);
else if (resource instanceof ChargeItem)
composeChargeItem("ChargeItem", (ChargeItem) resource);
else if (resource instanceof ChargeItemDefinition)
composeChargeItemDefinition("ChargeItemDefinition", (ChargeItemDefinition) 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 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 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 DeviceDefinition)
composeDeviceDefinition("DeviceDefinition", (DeviceDefinition) resource);
else if (resource instanceof DeviceMetric)
composeDeviceMetric("DeviceMetric", (DeviceMetric) resource);
else if (resource instanceof DeviceRequest)
composeDeviceRequest("DeviceRequest", (DeviceRequest) resource);
else if (resource instanceof DeviceUseStatement)
composeDeviceUseStatement("DeviceUseStatement", (DeviceUseStatement) resource);
else if (resource instanceof DiagnosticReport)
composeDiagnosticReport("DiagnosticReport", (DiagnosticReport) resource);
else if (resource instanceof DocumentManifest)
composeDocumentManifest("DocumentManifest", (DocumentManifest) resource);
else if (resource instanceof DocumentReference)
composeDocumentReference("DocumentReference", (DocumentReference) resource);
else if (resource instanceof EffectEvidenceSynthesis)
composeEffectEvidenceSynthesis("EffectEvidenceSynthesis", (EffectEvidenceSynthesis) resource);
else if (resource instanceof Encounter)
composeEncounter("Encounter", (Encounter) 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 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 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 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 InsurancePlan)
composeInsurancePlan("InsurancePlan", (InsurancePlan) 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 Measure)
composeMeasure("Measure", (Measure) resource);
else if (resource instanceof MeasureReport)
composeMeasureReport("MeasureReport", (MeasureReport) resource);
else if (resource instanceof Media)
composeMedia("Media", (Media) 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 MedicinalProduct)
composeMedicinalProduct("MedicinalProduct", (MedicinalProduct) resource);
else if (resource instanceof MedicinalProductAuthorization)
composeMedicinalProductAuthorization("MedicinalProductAuthorization", (MedicinalProductAuthorization) resource);
else if (resource instanceof MedicinalProductContraindication)
composeMedicinalProductContraindication("MedicinalProductContraindication",
(MedicinalProductContraindication) resource);
else if (resource instanceof MedicinalProductIndication)
composeMedicinalProductIndication("MedicinalProductIndication", (MedicinalProductIndication) resource);
else if (resource instanceof MedicinalProductIngredient)
composeMedicinalProductIngredient("MedicinalProductIngredient", (MedicinalProductIngredient) resource);
else if (resource instanceof MedicinalProductInteraction)
composeMedicinalProductInteraction("MedicinalProductInteraction", (MedicinalProductInteraction) resource);
else if (resource instanceof MedicinalProductManufactured)
composeMedicinalProductManufactured("MedicinalProductManufactured", (MedicinalProductManufactured) resource);
else if (resource instanceof MedicinalProductPackaged)
composeMedicinalProductPackaged("MedicinalProductPackaged", (MedicinalProductPackaged) resource);
else if (resource instanceof MedicinalProductPharmaceutical)
composeMedicinalProductPharmaceutical("MedicinalProductPharmaceutical",
(MedicinalProductPharmaceutical) resource);
else if (resource instanceof MedicinalProductUndesirableEffect)
composeMedicinalProductUndesirableEffect("MedicinalProductUndesirableEffect",
(MedicinalProductUndesirableEffect) 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 NutritionOrder)
composeNutritionOrder("NutritionOrder", (NutritionOrder) 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 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 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 RelatedPerson)
composeRelatedPerson("RelatedPerson", (RelatedPerson) resource);
else if (resource instanceof RequestGroup)
composeRequestGroup("RequestGroup", (RequestGroup) resource);
else if (resource instanceof ResearchDefinition)
composeResearchDefinition("ResearchDefinition", (ResearchDefinition) resource);
else if (resource instanceof ResearchElementDefinition)
composeResearchElementDefinition("ResearchElementDefinition", (ResearchElementDefinition) 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 RiskEvidenceSynthesis)
composeRiskEvidenceSynthesis("RiskEvidenceSynthesis", (RiskEvidenceSynthesis) 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 Substance)
composeSubstance("Substance", (Substance) 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 SubstanceSpecification)
composeSubstanceSpecification("SubstanceSpecification", (SubstanceSpecification) 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 TestReport)
composeTestReport("TestReport", (TestReport) resource);
else if (resource instanceof TestScript)
composeTestScript("TestScript", (TestScript) 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 (resource instanceof Binary)
composeBinary("Binary", (Binary) resource);
else
throw new Error("Unhandled resource type " + resource.getClass().getName());
}
protected void composeNamedReference(String name, Resource resource) throws IOException {
if (resource instanceof Parameters)
composeParameters(name, (Parameters) resource);
else if (resource instanceof Account)
composeAccount(name, (Account) resource);
else if (resource instanceof ActivityDefinition)
composeActivityDefinition(name, (ActivityDefinition) 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 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 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 CatalogEntry)
composeCatalogEntry(name, (CatalogEntry) resource);
else if (resource instanceof ChargeItem)
composeChargeItem(name, (ChargeItem) resource);
else if (resource instanceof ChargeItemDefinition)
composeChargeItemDefinition(name, (ChargeItemDefinition) 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 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 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 DeviceDefinition)
composeDeviceDefinition(name, (DeviceDefinition) resource);
else if (resource instanceof DeviceMetric)
composeDeviceMetric(name, (DeviceMetric) resource);
else if (resource instanceof DeviceRequest)
composeDeviceRequest(name, (DeviceRequest) resource);
else if (resource instanceof DeviceUseStatement)
composeDeviceUseStatement(name, (DeviceUseStatement) resource);
else if (resource instanceof DiagnosticReport)
composeDiagnosticReport(name, (DiagnosticReport) resource);
else if (resource instanceof DocumentManifest)
composeDocumentManifest(name, (DocumentManifest) resource);
else if (resource instanceof DocumentReference)
composeDocumentReference(name, (DocumentReference) resource);
else if (resource instanceof EffectEvidenceSynthesis)
composeEffectEvidenceSynthesis(name, (EffectEvidenceSynthesis) resource);
else if (resource instanceof Encounter)
composeEncounter(name, (Encounter) 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 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 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 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 InsurancePlan)
composeInsurancePlan(name, (InsurancePlan) 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 Measure)
composeMeasure(name, (Measure) resource);
else if (resource instanceof MeasureReport)
composeMeasureReport(name, (MeasureReport) resource);
else if (resource instanceof Media)
composeMedia(name, (Media) 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 MedicinalProduct)
composeMedicinalProduct(name, (MedicinalProduct) resource);
else if (resource instanceof MedicinalProductAuthorization)
composeMedicinalProductAuthorization(name, (MedicinalProductAuthorization) resource);
else if (resource instanceof MedicinalProductContraindication)
composeMedicinalProductContraindication(name, (MedicinalProductContraindication) resource);
else if (resource instanceof MedicinalProductIndication)
composeMedicinalProductIndication(name, (MedicinalProductIndication) resource);
else if (resource instanceof MedicinalProductIngredient)
composeMedicinalProductIngredient(name, (MedicinalProductIngredient) resource);
else if (resource instanceof MedicinalProductInteraction)
composeMedicinalProductInteraction(name, (MedicinalProductInteraction) resource);
else if (resource instanceof MedicinalProductManufactured)
composeMedicinalProductManufactured(name, (MedicinalProductManufactured) resource);
else if (resource instanceof MedicinalProductPackaged)
composeMedicinalProductPackaged(name, (MedicinalProductPackaged) resource);
else if (resource instanceof MedicinalProductPharmaceutical)
composeMedicinalProductPharmaceutical(name, (MedicinalProductPharmaceutical) resource);
else if (resource instanceof MedicinalProductUndesirableEffect)
composeMedicinalProductUndesirableEffect(name, (MedicinalProductUndesirableEffect) 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 NutritionOrder)
composeNutritionOrder(name, (NutritionOrder) 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 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 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 RelatedPerson)
composeRelatedPerson(name, (RelatedPerson) resource);
else if (resource instanceof RequestGroup)
composeRequestGroup(name, (RequestGroup) resource);
else if (resource instanceof ResearchDefinition)
composeResearchDefinition(name, (ResearchDefinition) resource);
else if (resource instanceof ResearchElementDefinition)
composeResearchElementDefinition(name, (ResearchElementDefinition) 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 RiskEvidenceSynthesis)
composeRiskEvidenceSynthesis(name, (RiskEvidenceSynthesis) 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 Substance)
composeSubstance(name, (Substance) 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 SubstanceSpecification)
composeSubstanceSpecification(name, (SubstanceSpecification) 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 TestReport)
composeTestReport(name, (TestReport) resource);
else if (resource instanceof TestScript)
composeTestScript(name, (TestScript) 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 (resource instanceof Binary)
composeBinary(name, (Binary) resource);
else
throw new Error("Unhandled resource type " + resource.getClass().getName());
}
protected void composeType(String prefix, Type type) throws IOException {
if (type == null)
;
else if (type instanceof Extension)
composeExtension(prefix + "Extension", (Extension) type);
else if (type instanceof Narrative)
composeNarrative(prefix + "Narrative", (Narrative) type);
else if (type instanceof Count)
composeCount(prefix + "Count", (Count) type);
else if (type instanceof Dosage)
composeDosage(prefix + "Dosage", (Dosage) type);
else if (type instanceof MarketingStatus)
composeMarketingStatus(prefix + "MarketingStatus", (MarketingStatus) type);
else if (type instanceof SubstanceAmount)
composeSubstanceAmount(prefix + "SubstanceAmount", (SubstanceAmount) type);
else if (type instanceof Population)
composePopulation(prefix + "Population", (Population) type);
else if (type instanceof Distance)
composeDistance(prefix + "Distance", (Distance) type);
else if (type instanceof Age)
composeAge(prefix + "Age", (Age) type);
else if (type instanceof Duration)
composeDuration(prefix + "Duration", (Duration) type);
else if (type instanceof ProductShelfLife)
composeProductShelfLife(prefix + "ProductShelfLife", (ProductShelfLife) type);
else if (type instanceof Timing)
composeTiming(prefix + "Timing", (Timing) type);
else if (type instanceof ProdCharacteristic)
composeProdCharacteristic(prefix + "ProdCharacteristic", (ProdCharacteristic) type);
else if (type instanceof Meta)
composeMeta(prefix + "Meta", (Meta) type);
else if (type instanceof Address)
composeAddress(prefix + "Address", (Address) type);
else if (type instanceof Contributor)
composeContributor(prefix + "Contributor", (Contributor) type);
else if (type instanceof Attachment)
composeAttachment(prefix + "Attachment", (Attachment) type);
else if (type instanceof DataRequirement)
composeDataRequirement(prefix + "DataRequirement", (DataRequirement) type);
else if (type instanceof Money)
composeMoney(prefix + "Money", (Money) type);
else if (type instanceof HumanName)
composeHumanName(prefix + "HumanName", (HumanName) type);
else if (type instanceof ContactPoint)
composeContactPoint(prefix + "ContactPoint", (ContactPoint) type);
else if (type instanceof Identifier)
composeIdentifier(prefix + "Identifier", (Identifier) type);
else if (type instanceof Coding)
composeCoding(prefix + "Coding", (Coding) type);
else if (type instanceof SampledData)
composeSampledData(prefix + "SampledData", (SampledData) type);
else if (type instanceof Ratio)
composeRatio(prefix + "Ratio", (Ratio) type);
else if (type instanceof Reference)
composeReference(prefix + "Reference", (Reference) type);
else if (type instanceof TriggerDefinition)
composeTriggerDefinition(prefix + "TriggerDefinition", (TriggerDefinition) type);
else if (type instanceof Quantity)
composeQuantity(prefix + "Quantity", (Quantity) type);
else if (type instanceof Period)
composePeriod(prefix + "Period", (Period) type);
else if (type instanceof Range)
composeRange(prefix + "Range", (Range) type);
else if (type instanceof RelatedArtifact)
composeRelatedArtifact(prefix + "RelatedArtifact", (RelatedArtifact) type);
else if (type instanceof Annotation)
composeAnnotation(prefix + "Annotation", (Annotation) type);
else if (type instanceof ContactDetail)
composeContactDetail(prefix + "ContactDetail", (ContactDetail) type);
else if (type instanceof UsageContext)
composeUsageContext(prefix + "UsageContext", (UsageContext) type);
else if (type instanceof Expression)
composeExpression(prefix + "Expression", (Expression) type);
else if (type instanceof Signature)
composeSignature(prefix + "Signature", (Signature) type);
else if (type instanceof CodeableConcept)
composeCodeableConcept(prefix + "CodeableConcept", (CodeableConcept) type);
else if (type instanceof ParameterDefinition)
composeParameterDefinition(prefix + "ParameterDefinition", (ParameterDefinition) 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 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(Type type) throws IOException {
if (type == null)
;
else if (type instanceof Extension)
composeExtensionInner((Extension) type);
else if (type instanceof Narrative)
composeNarrativeInner((Narrative) type);
else if (type instanceof Count)
composeCountInner((Count) type);
else if (type instanceof Dosage)
composeDosageInner((Dosage) type);
else if (type instanceof MarketingStatus)
composeMarketingStatusInner((MarketingStatus) type);
else if (type instanceof SubstanceAmount)
composeSubstanceAmountInner((SubstanceAmount) type);
else if (type instanceof Population)
composePopulationInner((Population) type);
else if (type instanceof Distance)
composeDistanceInner((Distance) type);
else if (type instanceof Age)
composeAgeInner((Age) type);
else if (type instanceof Duration)
composeDurationInner((Duration) type);
else if (type instanceof ProductShelfLife)
composeProductShelfLifeInner((ProductShelfLife) type);
else if (type instanceof Timing)
composeTimingInner((Timing) type);
else if (type instanceof ProdCharacteristic)
composeProdCharacteristicInner((ProdCharacteristic) type);
else if (type instanceof Meta)
composeMetaInner((Meta) type);
else if (type instanceof Address)
composeAddressInner((Address) type);
else if (type instanceof Contributor)
composeContributorInner((Contributor) type);
else if (type instanceof Attachment)
composeAttachmentInner((Attachment) type);
else if (type instanceof DataRequirement)
composeDataRequirementInner((DataRequirement) type);
else if (type instanceof Money)
composeMoneyInner((Money) type);
else if (type instanceof HumanName)
composeHumanNameInner((HumanName) type);
else if (type instanceof ContactPoint)
composeContactPointInner((ContactPoint) type);
else if (type instanceof Identifier)
composeIdentifierInner((Identifier) type);
else if (type instanceof Coding)
composeCodingInner((Coding) type);
else if (type instanceof SampledData)
composeSampledDataInner((SampledData) type);
else if (type instanceof Ratio)
composeRatioInner((Ratio) type);
else if (type instanceof Reference)
composeReferenceInner((Reference) type);
else if (type instanceof TriggerDefinition)
composeTriggerDefinitionInner((TriggerDefinition) type);
else if (type instanceof Quantity)
composeQuantityInner((Quantity) type);
else if (type instanceof Period)
composePeriodInner((Period) type);
else if (type instanceof Range)
composeRangeInner((Range) type);
else if (type instanceof RelatedArtifact)
composeRelatedArtifactInner((RelatedArtifact) type);
else if (type instanceof Annotation)
composeAnnotationInner((Annotation) type);
else if (type instanceof ContactDetail)
composeContactDetailInner((ContactDetail) type);
else if (type instanceof UsageContext)
composeUsageContextInner((UsageContext) type);
else if (type instanceof Expression)
composeExpressionInner((Expression) type);
else if (type instanceof Signature)
composeSignatureInner((Signature) type);
else if (type instanceof CodeableConcept)
composeCodeableConceptInner((CodeableConcept) type);
else if (type instanceof ParameterDefinition)
composeParameterDefinitionInner((ParameterDefinition) type);
else
throw new Error("Unhandled type: " + type.fhirType());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy