/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation) */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { if (rep instanceof DefaultRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("modifier"); description.addProperty("sortWeight"); description.addProperty("problem", Representation.REF); return description; } else if (rep instanceof FullRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("modifier"); description.addProperty("sortWeight"); description.addProperty("problem", Representation.DEFAULT); return description; } return null; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation) */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { if (rep instanceof DefaultRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("allergyType"); description.addProperty("reaction", Representation.REF); description.addProperty("severity"); description.addProperty("allergen", Representation.REF); return description; } else if (rep instanceof FullRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("allergyType"); description.addProperty("reaction", Representation.DEFAULT); description.addProperty("severity"); description.addProperty("allergen", Representation.DEFAULT); return description; } return null; }