Java Code Examples for org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem#FAX
The following examples show how to use
org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem#FAX .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResourceUtilities.java From org.hl7.fhir.core with Apache License 2.0 | 5 votes |
public static void renderContactPoint(StringBuilder b, ContactPoint cp) { if (cp != null && !cp.isEmpty()) { if (cp.getSystem() == ContactPointSystem.EMAIL) b.append("<a href=\"mailto:"+cp.getValue()+"\">"+cp.getValue()+"</a>"); else if (cp.getSystem() == ContactPointSystem.FAX) b.append("Fax: "+cp.getValue()); else if (cp.getSystem() == ContactPointSystem.OTHER) b.append("<a href=\""+cp.getValue()+"\">"+cp.getValue()+"</a>"); else b.append(cp.getValue()); } }
Example 2
Source File: NarrativeGenerator.java From org.hl7.fhir.core with Apache License 2.0 | 5 votes |
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()); } }