Package org.openmrs

Examples of org.openmrs.Person.addAttribute()


        Context.getAuthenticatedUser().getPerson().getUuid()).getAttribute("Health Center").getValue());
    Location location = Context.getLocationService().getLocation(userLocation);
    PersonAttribute locationAttribute = new PersonAttribute();
    locationAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Health Center"));
    locationAttribute.setValue(location.getId().toString());
    person.addAttribute(locationAttribute);
    if (post.get("attributes") != null) {
      addAttributes(person, post);
    }
    if (post.get("addresses") != null) {
      addAddresses(person, post);
View Full Code Here


                                  "Location uuid not found") {};
    }
    PersonAttribute locationAttribute = new PersonAttribute();
    locationAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Health Center"));
    locationAttribute.setValue(location.getId().toString());
    person.addAttribute(locationAttribute);
    if (post.get("email") != null) {
      PersonAttribute emailAttribute = new PersonAttribute();
      emailAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Email"));
      emailAttribute.setValue(post.get("email").toString());
      person.addAttribute(emailAttribute);
View Full Code Here

    person.addAttribute(locationAttribute);
    if (post.get("email") != null) {
      PersonAttribute emailAttribute = new PersonAttribute();
      emailAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Email"));
      emailAttribute.setValue(post.get("email").toString());
      person.addAttribute(emailAttribute);
    }
    if (post.get("phone") != null) {
      PersonAttribute phoneAttribute = new PersonAttribute();
      phoneAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Primary Contact"));
      phoneAttribute.setValue(post.get("phone").toString());
View Full Code Here

    }
    if (post.get("phone") != null) {
      PersonAttribute phoneAttribute = new PersonAttribute();
      phoneAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Primary Contact"));
      phoneAttribute.setValue(post.get("phone").toString());
      person.addAttribute(phoneAttribute);
    }
    if (post.get("donateOrgans") != null) {
      PersonAttribute donateOrgansAttribute = new PersonAttribute();
      donateOrgansAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Donate Organs"));
      donateOrgansAttribute.setValue(post.get("donateOrgans").toString());
View Full Code Here

    }
    if (post.get("donateOrgans") != null) {
      PersonAttribute donateOrgansAttribute = new PersonAttribute();
      donateOrgansAttribute.setAttributeType(Context.getPersonService().getPersonAttributeTypeByName("Donate Organs"));
      donateOrgansAttribute.setValue(post.get("donateOrgans").toString());
      person.addAttribute(donateOrgansAttribute);
    }
    String type = post.get("type").toString();
    if (type.equals(TYPE[0])) {
      person = savePatient(person, post, location);
    } else if (type.equals(TYPE[1])) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.