/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties() */ @Override public DelegatingResourceDescription getUpdatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("person"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties() */ @Override public DelegatingResourceDescription getUpdatableProperties() { // you aren't allowed to edit the name of an existing privilege, since that is its PK. DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("description"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("source"); description.addRequiredProperty("sourceCode"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addRequiredProperty("description"); return description; }
@Override public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription d = new DelegatingResourceDescription(); d.addProperty("startDate"); d.addProperty("endDate"); return d; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addProperty("description"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addProperty("description"); description.addProperty("isHidden"); return description; }
@Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("value"); return description; }
@Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("provider"); description.addProperty("encounter"); description.addProperty("encounterRole"); return description; }
@Override public DelegatingResourceDescription getUpdatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("encounterRole"); description.addProperty("voided"); description.addProperty("voidReason"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("ingredient"); description.addProperty("strength"); description.addProperty("units"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addRequiredProperty("description"); description.addRequiredProperty("memberIds"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addRequiredProperty("locale"); description.addProperty("localePreferred"); description.addProperty("conceptNameType"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addProperty("description"); description.addProperty("retired"); description.addProperty("retireReason"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("allergen"); description.addProperty("severity"); description.addProperty("comment"); description.addProperty("reactions"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("identifier"); description.addRequiredProperty("identifierType"); description.addProperty("location"); description.addProperty("preferred"); return description; }
@RepHandler(RefRepresentation.class) public SimpleObject convertToRef(FormResource delegate) throws ConversionException { DelegatingResourceDescription rep = new DelegatingResourceDescription(); rep.addProperty("uuid"); rep.addProperty("display"); addValueLink(rep, delegate); rep.addSelfLink(); return convertDelegateToRepresentation(delegate, rep); }
@Override public DelegatingResourceDescription getUpdatableProperties() { DelegatingResourceDescription d = new DelegatingResourceDescription(); d.addRequiredProperty("dateEnrolled"); d.addProperty("states"); d.addProperty("outcome"); d.addProperty("location"); d.addProperty("voided"); d.addProperty("dateCompleted"); return d; }
@RepHandler(RefRepresentation.class) public SimpleObject asRef(Concept delegate) throws ConversionException { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("uuid"); description.addProperty("display", "displayString", Representation.DEFAULT); if (delegate.isRetired()) { description.addProperty("retired"); } description.addSelfLink(); return convertDelegateToRepresentation(delegate, description); }
@RepHandler(DefaultRepresentation.class) public SimpleObject asDefaultRep(T delegate) throws Exception { DelegatingResourceDescription rep = new DelegatingResourceDescription(); rep.addProperty("uuid"); rep.addProperty("display"); rep.addProperty("name"); rep.addProperty("description"); rep.addProperty("retired"); rep.addSelfLink(); rep.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL); return convertDelegateToRepresentation(delegate, rep); }