* @see DelegatingCrudResource#getRepresentationDescription(Representation)
*/
@Override
public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
if (rep instanceof DefaultRepresentation) {
DelegatingResourceDescription description = new DelegatingResourceDescription();
description.addProperty("uuid");
description.addProperty("display", findMethod("getDisplayString"));
description.addProperty("name");
description.addProperty("description");
description.addProperty("patient", Representation.REF);
description.addProperty("seen");
description.addProperty("alertType");
description.addProperty("time");
description.addProperty("defaultTask");
description.addProperty("providerSent", Representation.REF);
description.addProperty("providerRecipient", Representation.REF);
//cannot add 'voided' property as a bug exists in OpenMRS: tickets.openmrs.org/browse/TRUNK-2205
//description.addProperty("voided");
description.addSelfLink();
description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
return description;
} else if (rep instanceof FullRepresentation) {
DelegatingResourceDescription description = new DelegatingResourceDescription();
description.addProperty("uuid");
description.addProperty("display", findMethod("getDisplayString"));
description.addProperty("name");
description.addProperty("description");
description.addProperty("patient");
description.addProperty("seen");
description.addProperty("alertType");
description.addProperty("time");
description.addProperty("defaultTask");
description.addProperty("providerSent");
description.addProperty("providerRecipient");
//cannot add 'voided' property as a bug exists in OpenMRS: tickets.openmrs.org/browse/TRUNK-2205
//description.addProperty("voided");
description.addProperty("auditInfo", findMethod("getAuditInfo"));
description.addSelfLink();
return description;
}
return null;
}