Error While Marking Patient Deceased

@rishabh997 i see from the logs the converter is failing to convert the string Eating BANANA Maaaannnn throwing a ConversionException, the rest api person resource doesn’t seem to support this which goes back to what i had earlier on proposed that this needs a card to implement it first in the rest module then we can leverage the new functionality in your use case.

By the way does it work when you use a concept mapping,something like this “causeOfDeathNonCoded”: “concept name/concept uuid”?

@ibacher @dkayiwa whats your take on this ?

I didnt tried using concepts, since there are no concepts of causeOfDeath in demo server. I tried adding one following the instructions on but failed to create one

@rishabh997 why dont you try creating the concept and try using it,as the second option

I created a Concept EATING BANANA and added it to Global Properties but still, there are no options to mark the patient deceased here. Can you please look into it, or create a concept so I can see it as an example.

@rishabh997 See here and here for how to setup these concepts. Basically, causeOfDeath points to a question and the answers to that question are the valid causeOfDeath codes.

@rishabh997 can these links help out

Mark Patient as Dead

Thanks a lot, @ibacher. @gcliff, I already went through all the talks thread having causeOfDeath keyword in them but couldn’t find any help. :frowning: So, basically right now, I need to fetch the related concepts in Android and use them to mark them detonated.

I will use the causeOfDeath(coded) and show an error toast until this is implemented. But we really need the person resource API to be able to process causeOfDeathNonCoded as it will be handy when there are no concepts stored in reference application. cc: @dkayiwa, what’s your say on this. Thanks

1 Like

Are you talking about a REST api for simply marking a patient as dead?

yes, but by using causeOfDeathNonCoded. I got some errors while marking patient dead when I was sending boolean value dead and cause of death causeOfDeathNonCoded

Which openmrs platform version are you running?

I was using for rest api services

This looks like the ticket the ticket that added this feature:

Are you able to reproduce this problem here?

If yet, can you share the exact url that you are posting to and the data that you are posting?

on qa-refapp, the coded cause of death worked absolutely fine, but when I am sending the following data through rest

on the following url

I am getting this error Pastebin

Are you able to reproduce it here?

If yes, share the Body content and URI

Sorry for the late reply, I was a bit involved in university vivas. Yes, there is an error while sending causeOfDeathNonCoded here.

uri: /openmrs/ws/rest/v1/patient/8673ee4f-e2ab-4077-ba55-4980f408773e

body content:

{“identifiers”:[{“identifier”:“100GEJ”}],“person”:{“addresses”:[{“address1”:“Address10351”,“cityVillage”:“City0351”,“country”:“India”,“postalCode”:“60351”,“preferred”:true,“stateProvince”:“State0351”}],“birthdate”:“1972-04-04”,“birthdateEstimated”:false,“causeOfDeathNonCoded”:“Eating banana”,“dead”:true,“gender”:“M”,“names”:[{“familyName”:“Wilson”,“givenName”:“John”}]}}


error! msg: error errorThrown: Internal Server Error req: [object Object]

By looking at the server side log, your json is not properly formatted.

I made causeOfDeathNonCoded empty and dead:false, then the same worked successfully.

Can you share the body content?

this was the body content i tried.

Which one?