本文整理汇总了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.tx方法的典型用法代码示例。如果您正苦于以下问题:Java XhtmlNode.tx方法的具体用法?Java XhtmlNode.tx怎么用?Java XhtmlNode.tx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hl7.fhir.utilities.xhtml.XhtmlNode
的用法示例。
在下文中一共展示了XhtmlNode.tx方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateResourceSummary
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void generateResourceSummary(XhtmlNode x, ResourceWrapper res, boolean textAlready, boolean showCodeDetails) throws FHIRException, UnsupportedEncodingException, IOException {
if (!textAlready) {
XhtmlNode div = res.getNarrative();
if (div != null) {
if (div.allChildrenAreText())
x.getChildNodes().addAll(div.getChildNodes());
if (div.getChildNodes().size() == 1 && div.getChildNodes().get(0).allChildrenAreText())
x.getChildNodes().addAll(div.getChildNodes().get(0).getChildNodes());
}
x.tx("Generated Summary: ");
}
String path = res.getName();
StructureDefinition profile = context.fetchResource(StructureDefinition.class, path);
if (profile == null)
x.tx("unknown resource " +path);
else {
boolean firstElement = true;
boolean last = false;
for (PropertyWrapper p : res.children()) {
ElementDefinition child = getElementDefinition(profile.getSnapshot().getElement(), path+"."+p.getName(), p);
if (p.getValues().size() > 0 && p.getValues().get(0) != null && child != null && isPrimitive(child) && includeInSummary(child)) {
if (firstElement)
firstElement = false;
else if (last)
x.tx("; ");
boolean first = true;
last = false;
for (BaseWrapper v : p.getValues()) {
if (first)
first = false;
else if (last)
x.tx(", ");
last = displayLeaf(res, v, child, x, p.getName(), showCodeDetails) || last;
}
}
}
}
}
示例2: renderQuantity
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderQuantity(Quantity q, XhtmlNode x, boolean showCodeDetails) {
if (q.hasComparator())
x.addText(q.getComparator().toCode());
x.addText(q.getValue().toString());
if (q.hasUnit())
x.tx(" "+q.getUnit());
else if (q.hasCode())
x.tx(" "+q.getCode());
if (showCodeDetails && q.hasCode()) {
x.span("background: LightGoldenRodYellow", null).tx(" (Details: "+describeSystem(q.getSystem())+" code "+q.getCode()+" = '"+lookupCode(q.getSystem(), q.getCode())+"')");
}
}
示例3: renderRange
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderRange(Range q, XhtmlNode x) {
if (q.hasLow())
x.addText(q.getLow().getValue().toString());
else
x.tx("?");
x.tx("-");
if (q.hasHigh())
x.addText(q.getHigh().getValue().toString());
else
x.tx("?");
if (q.getLow().hasUnit())
x.tx(" "+q.getLow().getUnit());
}
示例4: addTelecom
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addTelecom(XhtmlNode p, ContactPoint c) {
if (c.getSystem() == ContactPointSystem.PHONE) {
p.tx("Phone: "+c.getValue());
} else if (c.getSystem() == ContactPointSystem.FAX) {
p.tx("Fax: "+c.getValue());
} else if (c.getSystem() == ContactPointSystem.EMAIL) {
p.ah( "mailto:"+c.getValue()).addText(c.getValue());
} else if (c.getSystem() == ContactPointSystem.URL) {
if (c.getValue().length() > 30)
p.ah(c.getValue()).addText(c.getValue().substring(0, 30)+"...");
else
p.ah(c.getValue()).addText(c.getValue());
}
}
示例5: populateSubjectSummary
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void populateSubjectSummary(XhtmlNode container, BaseWrapper subject) {
ResourceWrapper r = fetchResource(subject);
if (r == null)
container.tx("Unable to get Patient Details");
else if (r.getName().equals("Patient"))
generatePatientSummary(container, r);
else
container.tx("Not done yet");
}
示例6: generateComposition
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private boolean generateComposition(ResourceContext rcontext, XhtmlNode x, ValueSet vs, boolean header, List<UsedConceptMap> maps) throws FHIRException, IOException {
boolean hasExtensions = false;
List<String> langs = new ArrayList<String>();
if (header) {
XhtmlNode h = x.h2();
h.addText(vs.getName());
addMarkdown(x, vs.getDescription());
if (vs.hasCopyrightElement())
generateCopyright(x, vs);
}
XhtmlNode p = x.para();
p.tx("This value set includes codes from the following code systems:");
XhtmlNode ul = x.ul();
XhtmlNode li;
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
hasExtensions = genInclude(rcontext, ul, inc, "Include", langs, maps) || hasExtensions;
}
for (ConceptSetComponent exc : vs.getCompose().getExclude()) {
hasExtensions = genInclude(rcontext, ul, exc, "Exclude", langs, maps) || hasExtensions;
}
// now, build observed languages
if (langs.size() > 0) {
Collections.sort(langs);
x.para().b().tx("Additional Language Displays");
XhtmlNode t = x.table( "codes");
XhtmlNode tr = t.tr();
tr.td().b().tx("Code");
for (String lang : langs)
tr.td().b().addText(describeLang(lang));
for (ConceptSetComponent c : vs.getCompose().getInclude()) {
for (ConceptReferenceComponent cc : c.getConcept()) {
addLanguageRow(cc, t, langs);
}
}
}
return hasExtensions;
}
示例7: addObservationToTable
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addObservationToTable(XhtmlNode tr, ResourceWrapper obs, int i) {
// TODO Auto-generated method stub
// code (+bodysite)
XhtmlNode td = tr.td();
PropertyWrapper pw = getProperty(obs, "result");
if (valued(pw)) {
displayCodeableConcept(td, pw.value());
}
pw = getProperty(obs, "bodySite");
if (valued(pw)) {
td.tx(" (");
displayCodeableConcept(td, pw.value());
td.tx(")");
}
// value / dataAbsentReason (in red)
td = tr.td();
pw = getProperty(obs, "value[x]");
if (valued(pw)) {
if (pw.getTypeCode().equals("CodeableConcept"))
displayCodeableConcept(td, pw.value());
else if (pw.getTypeCode().equals("string"))
displayText(td, pw.value());
else
td.addText(pw.getTypeCode()+" not rendered yet");
}
// units
td = tr.td();
td.tx("to do");
// reference range
td = tr.td();
td.tx("to do");
// flags (status other than F, interpretation, )
td = tr.td();
td.tx("to do");
// issued if different to DR
td = tr.td();
td.tx("to do");
}
示例8: displayReference
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void displayReference(XhtmlNode c, BaseWrapper v) {
c.tx("to do");
}
示例9: displayDate
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void displayDate(XhtmlNode c, BaseWrapper baseWrapper) {
c.tx("to do");
}
示例10: displayCodeableConcept
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void displayCodeableConcept(XhtmlNode c, BaseWrapper property) {
c.tx("to do");
}
示例11: displayReferenceId
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void displayReferenceId(XhtmlNode c, BaseWrapper v) {
c.tx("to do");
}
示例12: generatePatientSummary
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void generatePatientSummary(XhtmlNode c, ResourceWrapper r) {
c.tx("to do");
}