Search in sources :

Example 31 with ConceptDefinitionDesignationComponent

use of org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent in project org.hl7.fhir.core by hapifhir.

the class NarrativeGenerator method addLanguageRow.

private void addLanguageRow(ConceptDefinitionComponent c, XhtmlNode t, List<String> langs) {
    XhtmlNode tr = t.tr();
    tr.td().addText(c.getCode());
    for (String lang : langs) {
        ConceptDefinitionDesignationComponent d = null;
        for (ConceptDefinitionDesignationComponent designation : c.getDesignation()) {
            if (designation.hasLanguage()) {
                if (lang.equals(designation.getLanguage()))
                    d = designation;
            }
        }
        tr.td().addText(d == null ? "" : d.getValue());
    }
}
Also used : XhtmlNode(org.hl7.fhir.utilities.xhtml.XhtmlNode)

Example 32 with ConceptDefinitionDesignationComponent

use of org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent in project org.hl7.fhir.core by hapifhir.

the class NarrativeGenerator method addLanguageRow.

private void addLanguageRow(ConceptDefinitionComponent c, XhtmlNode t, List<String> langs) {
    XhtmlNode tr = t.addTag("tr");
    tr.addTag("td").addText(c.getCode());
    for (String lang : langs) {
        ConceptDefinitionDesignationComponent d = null;
        for (ConceptDefinitionDesignationComponent designation : c.getDesignation()) {
            if (lang.equals(designation.getLanguage()))
                d = designation;
        }
        tr.addTag("td").addText(d == null ? "" : d.getValue());
    }
}
Also used : ConceptDefinitionDesignationComponent(org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent) XhtmlNode(org.hl7.fhir.utilities.xhtml.XhtmlNode)

Aggregations

ConceptDefinitionDesignationComponent (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent)11 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)10 ConceptDefinitionComponent (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent)7 CommaSeparatedStringBuilder (org.hl7.fhir.utilities.CommaSeparatedStringBuilder)7 ArrayList (java.util.ArrayList)6 ConceptDefinitionDesignationComponent (org.hl7.fhir.r4b.model.CodeSystem.ConceptDefinitionDesignationComponent)6 ConceptDefinitionDesignationComponent (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent)4 ConceptDefinitionDesignationComponent (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent)4 CodeSystem (org.hl7.fhir.r5.model.CodeSystem)4 ConceptReferenceDesignationComponent (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent)4 ConceptReferenceDesignationComponent (org.hl7.fhir.r4b.model.ValueSet.ConceptReferenceDesignationComponent)3 ConceptDefinitionDesignationComponent (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent)2 ConceptDefinitionDesignationComponent (org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent)2 ConceptReferenceDesignationComponent (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent)2 ConceptDefinitionComponent (org.hl7.fhir.r4b.model.CodeSystem.ConceptDefinitionComponent)2 Extension (org.hl7.fhir.r5.model.Extension)2 ConceptDefinitionComponent (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent)1 ConceptDefinitionComponent (org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent)1 ConceptDefinitionComponent (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent)1 Coding (org.hl7.fhir.dstu3.model.Coding)1