@Override public Model getUPDATEModel(Representation rep) { return getCREATEModel(rep); }
@Override public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription description = super.getUpdatableProperties(); description.addProperty("encounterProviders"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = super.getCreatableProperties(); description.addProperty("visit"); description.addProperty("encounterProviders"); return description; }
/** * @see DelegatingCrudResource#getRepresentationDescription(Representation) */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { if (rep instanceof DefaultRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("visit", Representation.REF); description.removeProperty("provider"); description.addProperty("encounterProviders", Representation.REF); return description; } else if (rep instanceof FullRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("visit", Representation.DEFAULT); description.removeProperty("provider"); description.addProperty("encounterProviders", Representation.DEFAULT); return description; } return null; }
if (encounterUuid != null) { Encounter enc = ((EncounterResource1_8) Context.getService(RestService.class).getResourceBySupportedClass( Encounter.class)).getByUniqueId(encounterUuid); if (enc == null) return new EmptySearchResult();