Package org.openmrs

Examples of org.openmrs.RelationshipType


        if(i > 0)
        {
          sb.append("<br />");
        }
       
        RelationshipType rt = relationshipsToCreate.get(i);
        String side = roleInRelationship.get(i);
        sb.append("<tr><td>" +" " );
        String rl;
        StringBuilder val = new StringBuilder();
        if(side.equals("A"))
        {
          rl=rt.getbIsToA();
        }
        else
        {
          rl=rt.getaIsToB();
        }
        sb.append(rl);
        sb.append(": ");
        sb.append("</td>");
        sb.append("<td>" + " ");
        boolean addComma = false;
       
        for(Relationship r: existingRelationships)
        {
          if(r.getRelationshipType().getId().equals(rt.getId()))
          {
            if(side.equals("A"))
              {
                if(r.getPersonA().equals(context.getExistingPatient()))
                {
View Full Code Here


        if (relationshipsToBeCreated != null) {
            String[] relationships = relationshipsToBeCreated.split(",");

            for (String rel : relationships) {
                RelationshipType r = Context.getPersonService().getRelationshipTypeByUuid(rel);
                if (r == null) {
                    try {
                        r = Context.getPersonService().getRelationshipType(Integer.valueOf(rel));
                    } catch (Exception ex) {
                    }
View Full Code Here

        if (relatedPerson != null) {
            List<Relationship> existingRelationships = Context.getPersonService().getRelationshipsByPerson(session.getSubmissionActions().getCurrentPerson());
            //want to check to see if relationship already exists
            for (int i = 0; i < relationshipsToCreate.size(); i++) {
                RelationshipType r = relationshipsToCreate.get(i);
                String side = roleInRelationship.get(i);
                boolean replace = replaceExisting.get(i);
                if (r != null) {
                    //firstCheckToSeeIfWeNeedToCreate
                    boolean create = true;

                    for (Relationship er : existingRelationships) {

                        if (er.getRelationshipType().getId().equals(r.getId())) {
                            //now check the person is correct
                            if (side.equals("A")) {
                                //Relationship already exists
                                if (er.getPersonB().equals(relatedPerson)) {
                                    create = false;
View Full Code Here

                    continue;
                  }
                }
                //RelationshipType from the relationship tag, in case of lookup by name (which may or may not be implemented yet...)
                if (RelationshipType.class.equals(attributeDescriptor.getClazz())) {
                  RelationshipType relationshipType = Context.getPersonService().getRelationshipTypeByName(id);
                  if (relationshipType != null) {
                    dependencies.add(relationshipType);
                    continue;
                  }
                }
View Full Code Here

TOP

Related Classes of org.openmrs.RelationshipType

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.