Package org.openmrs

Examples of org.openmrs.ConceptWord


   
    // return in JSON object list format
    //[ { "id": "Dromas ardeola", "label": "Crab-Plover", "value":"Crab-Plover" },
    out.print("[");
    for (Iterator<ConceptWord> i = words.iterator(); i.hasNext();) {
      ConceptWord w = i.next();
      String ds = w.getConcept().getDisplayString();
      out.print("{ \"value\":\"");
      if (w.getConceptName().isPreferred()
          || w.getConceptName().getName().equalsIgnoreCase(ds)) {
        out.print(WebUtil.escapeQuotes(w.getConceptName().getName()));
      } else {
        out.print(WebUtil.escapeQuotes(w.getConcept().getDisplayString()));
      }
      out.print("\",\"id\"");
      out.print(":\"" + w.getConcept().getId());
      out.print("\"}");
      if (i.hasNext())
        out.print(",");
    }
    out.print("]");
View Full Code Here

TOP

Related Classes of org.openmrs.ConceptWord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.