use of org.hl7.fhir.dstu2016may.model.Enumeration in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeEnum.
private void composeEnum(Complex parent, String parentType, String name, Enumeration<? extends Enum> value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:" + parentType + "." + name);
t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
composeElement(t, parentType, name, value, index);
decorateCode(t, value);
}
use of org.hl7.fhir.dstu2016may.model.Enumeration in project org.hl7.fhir.core by hapifhir.
the class ImplementationGuide30_50 method convertImplementationGuide.
public static org.hl7.fhir.dstu3.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.r5.model.ImplementationGuide src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
if (src.hasVersion())
tgt.setVersionElement(String30_50.convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasStatus())
tgt.setStatusElement(Enumerations30_50.convertPublicationStatus(src.getStatusElement()));
if (src.hasExperimental())
tgt.setExperimentalElement(Boolean30_50.convertBoolean(src.getExperimentalElement()));
if (src.hasDate())
tgt.setDateElement(DateTime30_50.convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(String30_50.convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(ContactDetail30_50.convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(UsageContext30_50.convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
if (src.hasFhirVersion())
for (Enumeration<org.hl7.fhir.r5.model.Enumerations.FHIRVersion> v : src.getFhirVersion()) {
tgt.setFhirVersion(v.asStringValue());
break;
}
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent t : src.getDependsOn()) tgt.addDependency(convertImplementationGuideDependencyComponent(t));
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent t : src.getDefinition().getGrouping()) tgt.addPackage(convertImplementationGuidePackageComponent(t));
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent t : src.getDefinition().getResource()) {
findPackage(tgt.getPackage(), t.getGroupingId()).addResource(convertImplementationGuidePackageResourceComponent(t));
}
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal()) tgt.addGlobal(convertImplementationGuideGlobalComponent(t));
if (src.getDefinition().hasPage())
tgt.setPage(convertImplementationGuidePageComponent(src.getDefinition().getPage()));
return tgt;
}
use of org.hl7.fhir.dstu2016may.model.Enumeration in project org.hl7.fhir.core by hapifhir.
the class FamilyMemberHistory method setProperty.
@Override
public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier"))
this.getIdentifier().add(castToIdentifier(value));
else if (name.equals("patient"))
// Reference
this.patient = castToReference(value);
else if (name.equals("date"))
// DateTimeType
this.date = castToDateTime(value);
else if (name.equals("status"))
// Enumeration<FamilyHistoryStatus>
this.status = new FamilyHistoryStatusEnumFactory().fromType(value);
else if (name.equals("name"))
// StringType
this.name = castToString(value);
else if (name.equals("relationship"))
// CodeableConcept
this.relationship = castToCodeableConcept(value);
else if (name.equals("gender"))
// Enumeration<AdministrativeGender>
this.gender = new AdministrativeGenderEnumFactory().fromType(value);
else if (name.equals("born[x]"))
// Type
this.born = (Type) value;
else if (name.equals("age[x]"))
// Type
this.age = (Type) value;
else if (name.equals("deceased[x]"))
// Type
this.deceased = (Type) value;
else if (name.equals("note"))
// Annotation
this.note = castToAnnotation(value);
else if (name.equals("condition"))
this.getCondition().add((FamilyMemberHistoryConditionComponent) value);
else
super.setProperty(name, value);
}
use of org.hl7.fhir.dstu2016may.model.Enumeration in project org.hl7.fhir.core by hapifhir.
the class ClaimResponse method setProperty.
@Override
public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier"))
this.getIdentifier().add(castToIdentifier(value));
else if (name.equals("request[x]"))
// Type
this.request = (Type) value;
else if (name.equals("ruleset"))
// Coding
this.ruleset = castToCoding(value);
else if (name.equals("originalRuleset"))
// Coding
this.originalRuleset = castToCoding(value);
else if (name.equals("created"))
// DateTimeType
this.created = castToDateTime(value);
else if (name.equals("organization[x]"))
// Type
this.organization = (Type) value;
else if (name.equals("requestProvider[x]"))
// Type
this.requestProvider = (Type) value;
else if (name.equals("requestOrganization[x]"))
// Type
this.requestOrganization = (Type) value;
else if (name.equals("outcome"))
// Enumeration<RemittanceOutcome>
this.outcome = new RemittanceOutcomeEnumFactory().fromType(value);
else if (name.equals("disposition"))
// StringType
this.disposition = castToString(value);
else if (name.equals("payeeType"))
// Coding
this.payeeType = castToCoding(value);
else if (name.equals("item"))
this.getItem().add((ItemsComponent) value);
else if (name.equals("addItem"))
this.getAddItem().add((AddedItemComponent) value);
else if (name.equals("error"))
this.getError().add((ErrorsComponent) value);
else if (name.equals("totalCost"))
// Money
this.totalCost = castToMoney(value);
else if (name.equals("unallocDeductable"))
// Money
this.unallocDeductable = castToMoney(value);
else if (name.equals("totalBenefit"))
// Money
this.totalBenefit = castToMoney(value);
else if (name.equals("paymentAdjustment"))
// Money
this.paymentAdjustment = castToMoney(value);
else if (name.equals("paymentAdjustmentReason"))
// Coding
this.paymentAdjustmentReason = castToCoding(value);
else if (name.equals("paymentDate"))
// DateType
this.paymentDate = castToDate(value);
else if (name.equals("paymentAmount"))
// Money
this.paymentAmount = castToMoney(value);
else if (name.equals("paymentRef"))
// Identifier
this.paymentRef = castToIdentifier(value);
else if (name.equals("reserved"))
// Coding
this.reserved = castToCoding(value);
else if (name.equals("form"))
// Coding
this.form = castToCoding(value);
else if (name.equals("note"))
this.getNote().add((NotesComponent) value);
else if (name.equals("coverage"))
this.getCoverage().add((CoverageComponent) value);
else
super.setProperty(name, value);
}
use of org.hl7.fhir.dstu2016may.model.Enumeration in project org.hl7.fhir.core by hapifhir.
the class CodeSystem method setProperty.
@Override
public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url"))
// UriType
this.url = castToUri(value);
else if (name.equals("identifier"))
// Identifier
this.identifier = castToIdentifier(value);
else if (name.equals("version"))
// StringType
this.version = castToString(value);
else if (name.equals("name"))
// StringType
this.name = castToString(value);
else if (name.equals("status"))
// Enumeration<ConformanceResourceStatus>
this.status = new ConformanceResourceStatusEnumFactory().fromType(value);
else if (name.equals("experimental"))
// BooleanType
this.experimental = castToBoolean(value);
else if (name.equals("publisher"))
// StringType
this.publisher = castToString(value);
else if (name.equals("contact"))
this.getContact().add((CodeSystemContactComponent) value);
else if (name.equals("date"))
// DateTimeType
this.date = castToDateTime(value);
else if (name.equals("description"))
// StringType
this.description = castToString(value);
else if (name.equals("useContext"))
this.getUseContext().add(castToCodeableConcept(value));
else if (name.equals("requirements"))
// StringType
this.requirements = castToString(value);
else if (name.equals("copyright"))
// StringType
this.copyright = castToString(value);
else if (name.equals("caseSensitive"))
// BooleanType
this.caseSensitive = castToBoolean(value);
else if (name.equals("valueSet"))
// UriType
this.valueSet = castToUri(value);
else if (name.equals("compositional"))
// BooleanType
this.compositional = castToBoolean(value);
else if (name.equals("versionNeeded"))
// BooleanType
this.versionNeeded = castToBoolean(value);
else if (name.equals("content"))
// Enumeration<CodeSystemContentMode>
this.content = new CodeSystemContentModeEnumFactory().fromType(value);
else if (name.equals("count"))
// UnsignedIntType
this.count = castToUnsignedInt(value);
else if (name.equals("filter"))
this.getFilter().add((CodeSystemFilterComponent) value);
else if (name.equals("property"))
this.getProperty().add((CodeSystemPropertyComponent) value);
else if (name.equals("concept"))
this.getConcept().add((ConceptDefinitionComponent) value);
else
super.setProperty(name, value);
}
Aggregations