While creating an encounter, there is a variable, location which tells about the place from where the encounter is being performed. But the admission.xml file shown has encounterLocation, so it has to be passed from android separately in JSON object or it is the same as location tag while creating encounter.
@rishabh997 the location should be any location in the server that has the tag ‘Admission Location’. Hope this helps.
so in the demo server, there’s only Inpatient Ward and Isolation Ward available.
@dkayiwa can you help with this?
Did you look at the json for creating an encounter?
That’s the problem actually, the json for admission happens to be the same for visits in android client.
So after digging through log cats and API documentation, I found that I need to send location and encounterprovider variables too while creating encounters in admissions… So I have to change the Encounter.kt file to accommodate these two variables. But I have one issue, will we have to change the EncounterTable.java file too??? If yes, what all changes need to be done in database files??? I have attached the response I get from the server after creating admission encounter
adm.txt (6.3 KB)
@rishabh997 You should add the location UUID and the encounterProvider’s UUID to the EncounterTable since only 1 provider is creating the encounter (for simplicity sake). Later on when we migrate to Room we won’t be using this anymore.