Package org.openmrs

Examples of org.openmrs.ProviderAttribute


      //Provider service does not allow us to get the provider attribute by name currently, so have to get all....
      Iterator<ProviderAttributeType> iter = Context.getProviderService().getAllProviderAttributeTypes().iterator();
      while (iter.hasNext()) {
        ProviderAttributeType pAttribType = iter.next();
        if (pAttribType.getName().equals("isOutpatientDoctor")) {
          ProviderAttribute pAttrib = new ProviderAttribute();
          pAttrib.setValue(true);
          pAttrib.setAttributeType(pAttribType);
          provider.addAttribute(pAttrib);
          break;
        }
      }
    }
View Full Code Here


        obj.add("providerUuid", provider.getUuid());
        ArrayList attributesObj = new ArrayList();
        Iterator<ProviderAttribute> attributesIterator = provider.getActiveAttributes().iterator();
        while (attributesIterator.hasNext()) {
          SimpleObject attributeObj = new SimpleObject();
          ProviderAttribute pAttribute = attributesIterator.next();
          attributeObj.add("attributeType", pAttribute.getAttributeType().getName());
          attributeObj.add("value", pAttribute.getValue());
          attributesObj.add(attributeObj);
        }
        obj.add("providerAttributes", attributesObj);
      }
      obj.add("display", p.getPersonName().getFullName());
View Full Code Here

TOP

Related Classes of org.openmrs.ProviderAttribute

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.