Not able to create Visit attribute using Rest Api

I am having an issue creating visit attribute using the Rest API

visit_attribute_type has datatype as varchar.

@wyclif @darius @dkayiwa

@kundansinha are you posting a resource for the first time ?If yes then i’d encourage you to use /ws/rest/v1/visit instead of /ws/rest/v1/visit/{uuid} …

When you post with uuid appended on request ,you’re trying to edit … Did you chance to look at

Sorry, but I think ‘/ws/rest/v1/visit’ is used to post visit. I am trying to post visit attribute.

And this is the way i used to post provider attribute and person attribute and also encounter attribute.

Can you paste the error log or stack trace at?

This is a bug in the rest webservices module. Can you create a ticket for it and share the ticket link here? I will immediately make a commit because it is an easy fix.

Thanks @dkayiwa! I have created an issue for the same.

  1. RESTWS-731

In the meantime, to work around it, put a maxOccurs value for the visit attribute type. Then all should be well.

I got the resource url from your diagram.Did i see it well ?

Sure. I will try

I think you missed the part attribute after visit uuid => ‘visit+/uuid+/attribute’

Alright ,good you’ve been unblocked

Can anyone tell me how to reproduce this bug as the UI has changed.

Thanks :smile:

CC: @dkayiwa @kundansinha @tendomart

The recommended way would be to reproduce in a unit test:

1 Like