Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation)
- */
- @Override
- public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
- if (rep instanceof DefaultRepresentation) {
- DelegatingResourceDescription description = new DelegatingResourceDescription();
- description.addProperty("uuid");
- description.addProperty("display");
- description.addProperty("identifiers", Representation.REF);
- description.addProperty("person", Representation.DEFAULT);
- description.addProperty("voided");
- description.addSelfLink();
- description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
- Concept concept = Context.getConceptService().getTrueConcept();
- concept.getConceptId();
- return description;
- } else if (rep instanceof FullRepresentation) {
- DelegatingResourceDescription description = new DelegatingResourceDescription();
- description.addProperty("uuid");
- description.addProperty("display");
- description.addProperty("identifiers", Representation.DEFAULT);
- description.addProperty("person", Representation.FULL);
- description.addProperty("voided");
- description.addProperty("auditInfo");
- description.addSelfLink();
- Concept concept = Context.getConceptService().getTrueConcept();
- concept.getName();
- return description;
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement