Advertisement
Guest User

Untitled

a guest
May 13th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. /**
  2. * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation)
  3. */
  4. @Override
  5. public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
  6. if (rep instanceof DefaultRepresentation) {
  7. DelegatingResourceDescription description = new DelegatingResourceDescription();
  8. description.addProperty("uuid");
  9. description.addProperty("display");
  10. description.addProperty("identifiers", Representation.REF);
  11. description.addProperty("person", Representation.DEFAULT);
  12. description.addProperty("voided");
  13. description.addSelfLink();
  14. description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
  15.  
  16. Concept concept = Context.getConceptService().getTrueConcept();
  17. concept.getConceptId();
  18.  
  19. return description;
  20. } else if (rep instanceof FullRepresentation) {
  21. DelegatingResourceDescription description = new DelegatingResourceDescription();
  22. description.addProperty("uuid");
  23. description.addProperty("display");
  24. description.addProperty("identifiers", Representation.DEFAULT);
  25. description.addProperty("person", Representation.FULL);
  26. description.addProperty("voided");
  27. description.addProperty("auditInfo");
  28. description.addSelfLink();
  29.  
  30. Concept concept = Context.getConceptService().getTrueConcept();
  31. concept.getName();
  32.  
  33. return description;
  34. }
  35. return null;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement