/**
  * Auto generated method comment
  *
  * @param p
  * @param attributeTypeId
  * @return
  */
 public static String personAttribute(Person p, Integer attributeTypeId) {
   try {
     PersonAttribute pa = null;
     if (p != null) pa = p.getAttribute(attributeTypeId);
     if (pa != null) {
       return Context.getConceptService()
           .getConcept(Integer.parseInt(pa.getValue()))
           .getName()
           .getName();
     } else return "-";
   } catch (Exception e) {
     log.error(">>>>>>>>>>>>>>>>>>>VCT>>Module>>Tag>>>> An error occured : " + e.getMessage());
     e.printStackTrace();
     return "-";
   }
 }
Пример #2
0
 /** Gets the value of an attribute on a person. */
 public static String getPersonAttributeValue(Person person, PersonAttributeType attrType) {
   PersonAttribute attribute = person.getAttribute(attrType);
   return attribute != null ? attribute.getValue() : null;
 }