use of org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent 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);
}
use of org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent in project org.hl7.fhir.core by hapifhir.
the class CodeSystemSpreadsheetGenerator method addFilters.
private void addFilters(List<CodeSystemFilterComponent> filters) {
Sheet sheet = makeSheet("Filters");
addHeaders(sheet, "Code", "Description", "Operators", "Value");
for (CodeSystemFilterComponent f : filters) {
CommaSeparatedStringBuilder cs = new CommaSeparatedStringBuilder();
for (Enumeration<FilterOperator> op : f.getOperator()) {
cs.append(op.asStringValue());
}
addRow(sheet, f.getCode(), f.getDescription(), cs.toString(), f.getValue());
}
}
use of org.hl7.fhir.r5.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.r4b.model.Enumerations.FilterOperator> t : f.getOperator()) td.tx(t.asStringValue() + " ");
tr.td().tx(f.getValue());
}
}
}
use of org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent in project org.hl7.fhir.core by hapifhir.
the class CodeSystemSpreadsheetGenerator method addFilters.
private void addFilters(List<CodeSystemFilterComponent> filters) {
Sheet sheet = makeSheet("Filters");
addHeaders(sheet, "Code", "Description", "Operators", "Value");
for (CodeSystemFilterComponent f : filters) {
CommaSeparatedStringBuilder cs = new CommaSeparatedStringBuilder();
for (Enumeration<FilterOperator> op : f.getOperator()) {
cs.append(op.asStringValue());
}
addRow(sheet, f.getCode(), f.getDescription(), cs.toString(), f.getValue());
}
}
use of org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent in project org.hl7.fhir.core by hapifhir.
the class NarrativeGenerator method generateFilters.
private void generateFilters(XhtmlNode x, CodeSystem cs) {
if (cs.hasFilter()) {
x.para().b().tx("Filters");
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx("Code");
tr.td().b().tx("Description");
tr.td().b().tx("operator");
tr.td().b().tx("Value");
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.dstu3.model.CodeSystem.FilterOperator> t : f.getOperator()) td.tx(t.asStringValue() + " ");
tr.td().tx(f.getValue());
}
}
}
Aggregations