use of org.hl7.fhir.r4b.model.CodeSystem.CodeSystemFilterComponent in project org.hl7.fhir.core by hapifhir.
the class CodeSystem method setProperty.
@Override
public Base 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("title")) {
// StringType
this.title = castToString(value);
} else if (name.equals("status")) {
value = new PublicationStatusEnumFactory().fromType(castToCode(value));
// Enumeration<PublicationStatus>
this.status = (Enumeration) value;
} else if (name.equals("experimental")) {
// BooleanType
this.experimental = castToBoolean(value);
} else if (name.equals("date")) {
// DateTimeType
this.date = castToDateTime(value);
} else if (name.equals("publisher")) {
// StringType
this.publisher = castToString(value);
} else if (name.equals("contact")) {
this.getContact().add(castToContactDetail(value));
} else if (name.equals("description")) {
// MarkdownType
this.description = castToMarkdown(value);
} else if (name.equals("useContext")) {
this.getUseContext().add(castToUsageContext(value));
} else if (name.equals("jurisdiction")) {
this.getJurisdiction().add(castToCodeableConcept(value));
} else if (name.equals("purpose")) {
// MarkdownType
this.purpose = castToMarkdown(value);
} else if (name.equals("copyright")) {
// MarkdownType
this.copyright = castToMarkdown(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("hierarchyMeaning")) {
value = new CodeSystemHierarchyMeaningEnumFactory().fromType(castToCode(value));
// Enumeration<CodeSystemHierarchyMeaning>
this.hierarchyMeaning = (Enumeration) 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")) {
value = new CodeSystemContentModeEnumFactory().fromType(castToCode(value));
// Enumeration<CodeSystemContentMode>
this.content = (Enumeration) 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((PropertyComponent) value);
} else if (name.equals("concept")) {
this.getConcept().add((ConceptDefinitionComponent) value);
} else
return super.setProperty(name, value);
return value;
}
use of org.hl7.fhir.r4b.model.CodeSystem.CodeSystemFilterComponent in project org.hl7.fhir.core by hapifhir.
the class CodeSystemRenderer method generateFilters.
private void generateFilters(XhtmlNode x, CodeSystem cs) {
if (cs.hasFilter()) {
x.para().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Filters", getContext().getLang()));
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Code", getContext().getLang()));
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Description", getContext().getLang()));
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "operator", getContext().getLang()));
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Value", getContext().getLang()));
for (CodeSystemFilterComponent f : cs.getFilter()) {
tr = tbl.tr();
tr.td().tx(f.getCode());
tr.td().tx(f.getDescription());
XhtmlNode td = tr.td();
for (Enumeration<org.hl7.fhir.r5.model.Enumerations.FilterOperator> t : f.getOperator()) td.tx(t.asStringValue() + " ");
tr.td().tx(f.getValue());
}
}
}
use of org.hl7.fhir.r4b.model.CodeSystem.CodeSystemFilterComponent in project org.hl7.fhir.core by hapifhir.
the class NarrativeGenerator method generateFilters.
private void generateFilters(XhtmlNode x, CodeSystem cs, String lang) {
if (cs.hasFilter()) {
x.para().b().tx(context.translator().translate("xhtml-gen-cs", "Filters", lang));
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Code", lang));
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Description", lang));
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "operator", lang));
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Value", lang));
for (CodeSystemFilterComponent f : cs.getFilter()) {
tr = tbl.tr();
tr.td().tx(f.getCode());
tr.td().tx(f.getDescription());
XhtmlNode td = tr.td();
for (Enumeration<org.hl7.fhir.r4.model.CodeSystem.FilterOperator> t : f.getOperator()) td.tx(t.asStringValue() + " ");
tr.td().tx(f.getValue());
}
}
}
Aggregations