naveed1228
(Naveed khan)
March 22, 2019, 10:14am
#1
I have created an attribute with name providerterm and select its Data type as LONG FREE TEXT.Now when I try to post its from Angular I got the following error.Can some one help me on this issue.
Please see the server error on post at pastebin.
https://pastebin.com/Wxu5CpQ8
dkayiwa
(Daniel Kayiwa)
March 22, 2019, 11:29am
#2
Does it work fine if you just use the data type Free Text?
naveed1228
(Naveed khan)
March 22, 2019, 11:44am
#3
Yes,it work well when I choose data type as Free Text.I need Data type as Long Free Text.
dkayiwa
(Daniel Kayiwa)
March 22, 2019, 12:04pm
#4
Can you share the details of the post that you are making and the url that you are posting to?
naveed1228
(Naveed khan)
March 22, 2019, 1:18pm
#6
We are making the following json object and posting to:
/openmrs/ws/v1/location/providerUUID/attributeUUID
let providerAttr =JSON.stringify({
uuid: provider.uuid,
display: provider.person.display
});
let attrPayload = {
attributeType: "cf385061-18c4-448e-a0dc-a0153688dd1b",
value: providerAttr
};
attrPayload is payload for above url.
dkayiwa
(Daniel Kayiwa)
March 22, 2019, 1:32pm
#7
Are you trying to create a new location?
naveed1228
(Naveed khan)
March 22, 2019, 1:57pm
#8
“Use case is to assign a location/clinic to a provider”
No I’m trying to assigning location to a provider.
dkayiwa
(Daniel Kayiwa)
March 25, 2019, 12:53pm
#9
Shouldn’t you then be using the provider resource?
naveed1228
(Naveed khan)
March 29, 2019, 6:23am
#10
Sorry for the late reply.Do you mean I need to create attribute on provider resource?
dkayiwa
(Daniel Kayiwa)
March 29, 2019, 9:06am
#11
Yes that is what am suggesting.
naveed1228
(Naveed khan)
April 2, 2019, 6:03am
#12
I decided to use free-text instead of long free text.I’m facing this issue.Would you please take a look at this why I’m getting error.
https://pastebin.com/YzUhKVKA
dkayiwa
(Daniel Kayiwa)
April 2, 2019, 9:06am
#13
You are making the REST call without authentication.